Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site npois.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!mtuxo!npois!adam From: adam@npois.UUCP (Adam V. Reed) Newsgroups: net.micro.att Subject: UNIX PC quickie environment, installment 5 Message-ID: <319@npois.UUCP> Date: Mon, 20-May-85 17:46:03 EDT Article-I.D.: npois.319 Posted: Mon May 20 17:46:03 1985 Date-Received: Tue, 21-May-85 06:59:57 EDT Organization: ATTIS, Neptune, NJ Lines: 39 /* 2h.c */ /* When executed in the login shell or in a shell window (preferably, but not necessarily, the only active shell window) this program will divide the screen between two 80-column wide, horizontally stacked asynchronous windows. Substitue sh if you don't have ksh. */ #include #include #include #include #include #include main() { struct uwdata thiswindow; extern int errno; int pid; (void)ioctl(0,WIOCGETD,&thiswindow); thiswindow.uw_x = 0; thiswindow.uw_y = 16; thiswindow.uw_width = 720; thiswindow.uw_height = 132; thiswindow.uw_uflags |= NBORDER; (void)ioctl(0,WIOCSETD,&thiswindow); if ((pid=fork()) == 0) { (void)winit(); if (wprexec()) wexit(errno); thiswindow.uw_y = 152; thiswindow.uw_height = 144; (void)ioctl(0,WIOCSETD,&thiswindow); if (execl("/bin/ksh","/bin/ksh",0)) wexit(errno); } else exit(pid); }