removed support for -r, -h, and rmail
[unix-history] / usr / src / usr.bin / window / wwend.c
CommitLineData
60de5df9 1/*
46e9ea25
KB
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of California at Berkeley. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
60de5df9
EW
11 */
12
46e9ea25 13#ifndef lint
16ea9636 14static char sccsid[] = "@(#)wwend.c 3.10 (Berkeley) %G%";
46e9ea25
KB
15#endif /* not lint */
16
d06fcb1c 17#include "ww.h"
e908bfac 18#include "tt.h"
d06fcb1c
EW
19
20wwend()
21{
64280781 22 wwupdate();
16ea9636
EW
23 if (tt.tt_scroll_top != 0 || tt.tt_scroll_bot != tt.tt_nrow - 1)
24 /* tt.tt_setscroll is known to be defined */
25 (*tt.tt_setscroll)(0, tt.tt_nrow - 1);
64280781
EW
26 if (tt.tt_insert)
27 (*tt.tt_setinsert)(0);
28 if (tt.tt_modes)
29 (*tt.tt_setmodes)(0);
16ea9636
EW
30 if (tt.tt_scroll_down)
31 (*tt.tt_scroll_down)();
bb05dfb5 32 (*tt.tt_move)(tt.tt_nrow - 1, 0);
e908bfac 33 (*tt.tt_end)();
b1189050 34 ttflush();
4cbd8755 35 (void) wwsettty(0, &wwoldtty, &wwnewtty);
d06fcb1c 36}