george@rebel.UUCP (George M. Sipe) (10/11/88)
Posting-number: Volume 4, Issue 121 Submitted-by: "George M. Sipe" <george@rebel.UUCP> Archive-name: clock [The second of three manglings of net.classics... ++bsa] #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # README # Makefile # clock.man # clock.c # digits.c # This archive created: Tue Aug 9 01:02:42 1988 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'README' then echo shar: "will not over-write existing file 'README'" else sed 's/^X//' << \SHAR_EOF > 'README' XClock displays a large 4-digit, 12-hour clock on the user's screen. A Xline containing the hostname is displayed above the time and a line Xcontaining the full date and time is displayed after it. X XUnlike another recent clock program posting, this program is Xstand-alone and does not depend on the presence or operation of any Xother program (e.g. System V banner). X XThe display is updated once every minute (low SBB overhead) by Xdefault. If refresh_rate is specified, then the display is updated Xevery refresh_rate seconds. Clock will automatically synchronize Xitself to even minute, or fraction of minute boundaries. The first Xrefresh after the initial display will therefore probably be less than Xthe default or specified refresh rate. After that however, the updates Xwill be very regular. X XIf clock is run under GNU Emacs terminal-emulator function, it will Xautomatically use slightly fewer lines in order to fit the display Xwindow on a normal 24 line terminal. X XThe interrupt character ends the program and clears the screen. X X X Copyright (c) 1988 by George M. Sipe. All rights reserved. X XThis software may only be redistributed without fee and without any Xother form of monetary gain (including sold, rented, leased, or Xtraded), unless the express written permission of the copyright holder Xis obtained in advance. X XThis copyright notice must be reproduced in its entirety on all copies Xof this software. Further, acknowledgment of the authorship of this Xsoftware must not be removed from its current or derived Xdocumentation. X XNo expressed or implied warranty is made for this software. No party Xconnected with this software assumes any liability or responsibility Xfor its use, the correctness of its operation, or its fitness for any Xpurpose. X XAny distributor of copies of this software shall grant the recipient Xpermission for further redistribution as permitted by this notice. X XPermission is hereby granted to copy, reproduce, redistribute and Xotherwise use this software as long as the conditions above are Xstrictly adhered to. X XNOTE: This software was originally written by Jim Earenluindil X Trethewey and modified by George M. Sipe (rebel!george) to the X point where Jim would no longer recognize it. No copyright X notices were embodied in the original net distribution. SHAR_EOF fi if test -f 'Makefile' then echo shar: "will not over-write existing file 'Makefile'" else sed 's/^X//' << \SHAR_EOF > 'Makefile' X# Makefile for: clock - digital clock display X XDEFINES = -DBSD XCFLAGS = -O $(DEFINES) XLIBS = -lcurses -ltermcap XROFF = nroff XRFLAGS = -man XLDFLAGS = -s XDESTBIN = ${HOME} XDESTMAN = ${HOME} XDESTCAT = ${HOME} XDESTOWN = root XDESTGRP = staff XSHELL = /bin/sh XMAKEFILE = Makefile XPROGRAM = clock XMANPAGES = clock.man XCATPAGES = clock.cat XSRCS = clock.c digits.c XOBJS = clock.o digits.o X X.man.cat: X $(ROFF) $(RFLAGS) $< > $@ X X.SUFFIXES: .man .cat X X# Compile and load the program and format its manual pages. Xall: $(PROGRAM) $(CATPAGES) X X$(PROGRAM): $(OBJS) X $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM) X X# Run lint on source files, put results on standard output. Xlint: X lint -u $(DEFINES) $(SRCS) X X# Create a tags file for use by a source code editor. Xtags: $(SRCS) X ctags $(SRCS) X X# Edit the makefile and regenerate the dependency information. Xdepend: X mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DESTBIN=$(DESTBIN) X X# Print an index of functions on standard output. Xindex: X ctags -wx $(SRCS) X X# Print source code files on standard output. Xprint: X lpr -p $(SRCS) $(MANPAGES) X X# Compile and load the program, format manual pages, and move them X# to their destination directories. Xinstall: $(PROGRAM) $(CATPAGES) X cp $(PROGRAM) $(DESTBIN) X chmod 755 $(DESTBIN)/$(PROGRAM) X chown $(DESTOWN) $(DESTBIN)/$(PROGRAM) X chgrp $(DESTGRP) $(DESTBIN)/$(PROGRAM) X -for manpage in $(MANPAGES); do \ X basepage=`basename $$manpage .man`; \ X cp $$basepage.man $(DESTMAN)/$$basepage.l; \ X chmod 644 $(DESTMAN)/$$basepage.l; \ X chown $(DESTOWN) $(DESTMAN)/$$basepage.l; \ X chgrp $(DESTGRP) $(DESTMAN)/$$basepage.l; \ X cp $$basepage.cat $(DESTCAT)/$$basepage.l; \ X chmod 644 $(DESTCAT)/$$basepage.l; \ X chown $(DESTOWN) $(DESTCAT)/$$basepage.l; \ X chgrp $(DESTGRP) $(DESTCAT)/$$basepage.l; \ X done X X# Remove the program and its formatted manual pages from their X# destination directories. Xuninstall: X rm -f $(DESTBIN)/$(PROGRAM) X -for manpage in $(MANPAGES); do \ X basepage=`basename $$manpage .man`; \ X rm -f $(DESTMAN)/$$basepage.l; \ X rm -f $(DESTCAT)/$$basepage.l; \ X done X X# Remove all target and intermediate files. Xclean: X -rm -f $(PROGRAM) $(CATPAGES) $(OBJS) X -rm -f core a.out made *.o SHAR_EOF fi if test -f 'clock.man' then echo shar: "will not over-write existing file 'clock.man'" else sed 's/^X//' << \SHAR_EOF > 'clock.man' X.TH CLOCK l "21 July 1988" X.SH NAME Xclock \- digital clock display X.SH SYNTAX X.B clock "[refresh_rate]" X.SH DESCRIPTION X.I Clock Xdisplays a large 4-digit, 12-hour clock on the user's screen. A line Xcontaining the hostname is displayed above the time and a line Xcontaining the full date and time is displayed after it. X.PP XThe display is updated once every minute (low system overhead) by Xdefault. If X.B refresh_rate Xis specified, then the display is updated every X.B refresh_rate Xseconds. X.I Clock Xwill automatically synchronize itself to even minute, or fraction of Xminute boundaries. The first refresh after the initial display will Xtherefore probably be less than the default or specified refresh rate. XAfter that however, the updates will be very regular. X.PP XIf X.I clock Xis run under X.I "GNU Emacs" X.B "terminal-emulator" Xfunction, it will automatically use slightly fewer lines in order to Xfit the display window on a normal 24 line terminal. X.PP XThe interrupt character ends the program and clears the screen. X.SH "SEE ALSO" XUser Commands (1): date X.SH AUTHOR XOriginally written by Jim Earenluindil Trethewey. X.PP XIt has been substantially modified by George M. Sipe (currently - 7/88, Xat rebel!george) to the point where Jim would no longer recognize it. SHAR_EOF fi if test -f 'clock.c' then echo shar: "will not over-write existing file 'clock.c'" else sed 's/^X//' << \SHAR_EOF > 'clock.c' X/* Copyright (c) 1988 by George M. Sipe. All rights reserved. X XThis software may only be redistributed without fee and without any Xother form of monetary gain (including sold, rented, leased, or Xtraded), unless the express written permission of the copyright holder Xis obtained in advance. X XThis copyright notice must be reproduced in its entirety on all copies Xof this software. Further, acknowledgment of the authorship of this Xsoftware must not be removed from its current or derived Xdocumentation. X XNo expressed or implied warranty is made for this software. No party Xconnected with this software assumes any liability or responsibility Xfor its use, the correctness of its operation, or its fitness for any Xpurpose. X XAny distributor of copies of this software shall grant the recipient Xpermission for further redistribution as permitted by this notice. X XPermission is hereby granted to copy, reproduce, redistribute and Xotherwise use this software as long as the conditions above are Xstrictly adhered to. X X NOTE: This software was originally written by Jim Earenluindil X Trethewey and modified by George M. Sipe (rebel!george) to the X point where Jim would no longer recognize it. No copyright X notices were embodied in the original net distribution. X*/ X X#include <stdio.h> X#include <curses.h> X#include <signal.h> X#include <sys/types.h> X X#ifndef MSDOS X X#ifdef BSD X X#include <strings.h> X#include <sys/ioctl.h> X#include <sys/time.h> Xextern time_t time(); X X#else /* !BSD */ X X#include <string.h> X#include <time.h> Xextern long time(); Xextern unsigned int sleep(); Xextern void exit(); X X#endif /* !BSD */ X Xextern struct tm *localtime(); Xextern unsigned int alarm(); Xextern void pr_big(); Xextern void pr_colon(); Xextern void pr_space(); Xstatic int on_intr(); Xstatic void big_nums(); Xstatic void time_update(); X X#else /* MSDOS */ X X#include <stdlib.h> X#undef getch X#include <conio.h> X#include <string.h> X#include <time.h> X#include <local.h> Xextern int main(int argc,char **argv); Xextern void pr_big(int num,int col); Xextern void pr_colon(int col); Xextern void pr_space(void); Xstatic int on_intr(void); Xstatic void big_nums(int hrs,int mins); Xstatic void time_update(void); X X#endif /* MSDOS */ X X#define SYSLINE 0 /* line to put system name on */ X#define DIGITS 3 /* line to put digits on */ X#define DATETM 19 /* line to put full date and time on */ X Xstatic int BASE; /* base line for output */ Xstatic struct tm *loc_time; /* local time structure */ Xstatic unsigned int refresh_rate;/* seconds between updates */ X Xstatic char myname[40]; /* string to store system name in */ X XWINDOW *scr; /* screen where large numbers displayed */ Xint curr_col; /* current center of colon column */ Xint NBASE; /* numeric base line for output */ X Xstatic int on_intr() X{ X refresh_rate = 0; X alarm(0); X#ifdef BSD X kill(0, SIGALRM); X#endif X return(0); X} X Xstatic void big_nums(hrs, mins) Xint hrs, mins; X{ X static int x_hr_h = -1, x_hr_l = -1; X static int x_min_h = -1, x_min_l = -1, x_indent = -1; X int hr_h, hr_l, min_h, min_l, indent; X X hr_h = hrs / 10; X hr_l = hrs % 10; X min_h = mins / 10; X min_l = mins % 10; X indent = (hr_h == 0) ? 16 : 24; X if (indent != x_indent) { X pr_space(); X x_hr_h = x_hr_l = x_min_h = x_min_l = -1; X pr_colon(indent + 15); X x_indent = indent; X } X if ((hr_h != 0) && (hr_h != x_hr_h)) { X pr_big(hr_h, 9); X x_hr_h = hr_h; X } X if (hr_l != x_hr_l) { X pr_big(hr_l, indent); X x_hr_l = hr_l; X } X if (min_h != x_min_h) { X pr_big(min_h, indent + 21); X x_min_h = min_h; X } X if (min_l != x_min_l) { X pr_big(min_l, indent + 36); X x_min_l = min_l; X } X} X Xstatic void time_update() X{ X time_t clock; X char time_str[43]; X int t_hour, t_min, t_sec; X int delta; X static int colon = 15; X X wmove(scr, BASE, 0); X wclrtoeol(scr); X wmove(scr, BASE, (COLS / 2 - strlen(myname) / 2)); X wprintw(scr, myname); X wmove(scr, BASE + DATETM, 0); X wclrtoeol(scr); X (void) time(&clock); X (void) strcpy(time_str, ctime(&clock)); X wmove(scr, BASE + DATETM, (COLS / 2 - strlen(time_str) / 2)); X wprintw(scr, time_str); X X loc_time = localtime(&clock); X t_hour = loc_time->tm_hour; X if (t_hour > 12) t_hour = t_hour - 12; X if (t_hour == 0) t_hour = 12; X t_min = loc_time->tm_min; X big_nums(t_hour, t_min); X t_sec = loc_time->tm_sec; X colon = (colon == 9) ? 4 : 9; X wmove(scr, NBASE + colon, curr_col); X wrefresh(scr); X if (refresh_rate % 60 == 0) X delta = refresh_rate X - ((t_min % (refresh_rate / 60)) * 60) X - (t_sec % 60); X else X delta = refresh_rate - (t_sec % refresh_rate); X if (delta > 0) (void) sleep((unsigned) delta); X else (void) sleep(refresh_rate); X#ifdef MSDOS X while (kbhit()) (void) getch(); X#endif X} X Xint main(argc, argv) Xint argc; Xchar *argv[]; X{ X#ifdef BSD X struct sgttyb tty_old, tty_new; X#endif X#ifdef MSDOS X int brk_old; X X brk_old = setbreak(TRUE); X if (argc == 1) refresh_rate = 1; X#else X if (argc == 1) refresh_rate = 60; X#endif X else if (argc == 2) refresh_rate = atoi(argv[1]); X else { X (void) printf("Usage: %s [refresh_rate]\n", argv[0]); X exit(1); X } X if (refresh_rate < 1) refresh_rate = 1; X#ifdef BSD X if (ioctl(1, TIOCGETP, &tty_old) < 0) perror("ioctl TIOCGETP"); X tty_new = tty_old; X tty_new.sg_flags |= XTABS; X if (ioctl(1, TIOCSETP, &tty_new) < 0) perror("ioctl TIOCSETP"); X#endif X initscr(); X BASE = LINES - 21 + SYSLINE; X NBASE = BASE + DIGITS; X (void) gethostname(myname,sizeof(myname)); X noecho(); X nonl(); X scr = newwin(LINES, COLS, 0, 0); X scrollok(scr, FALSE); X leaveok(scr, FALSE); X wclear(scr); X (void) signal(SIGINT, on_intr); X for ( ; refresh_rate; ) time_update(); X wclear(scr); X wmove(scr, LINES - 1, 0); X wclrtoeol(scr); X wrefresh(scr); X endwin(); X#ifdef BSD X if (ioctl(1, TIOCSETP, &tty_old) < 0) perror("ioctl TIOCSETP"); X#endif X#ifdef MSDOS X (void) setbreak(brk_old); X#endif X return(0); X} SHAR_EOF fi if test -f 'digits.c' then echo shar: "will not over-write existing file 'digits.c'" else sed 's/^X//' << \SHAR_EOF > 'digits.c' X/* Copyright (c) 1988 by George M. Sipe. All rights reserved. X XThis software may only be redistributed without fee and without any Xother form of monetary gain (including sold, rented, leased, or Xtraded), unless the express written permission of the copyright holder Xis obtained in advance. X XThis copyright notice must be reproduced in its entirety on all copies Xof this software. Further, acknowledgment of the authorship of this Xsoftware must not be removed from its current or derived Xdocumentation. X XNo expressed or implied warranty is made for this software. No party Xconnected with this software assumes any liability or responsibility Xfor its use, the correctness of its operation, or its fitness for any Xpurpose. X XAny distributor of copies of this software shall grant the recipient Xpermission for further redistribution as permitted by this notice. X XPermission is hereby granted to copy, reproduce, redistribute and Xotherwise use this software as long as the conditions above are Xstrictly adhered to. X X NOTE: This software was originally written by Jim Earenluindil X Trethewey and modified by George M. Sipe (rebel!george) to the X point where Jim would no longer recognize it. No copyright X notices were embodied in the original net distribution. X*/ X X#include <curses.h> X X#ifndef MSDOS Xextern void pr_colon(); Xextern void pr_space(); Xextern void pr_big(); X#else Xextern void pr_colon(int col); Xextern void pr_space(void); Xextern void pr_big(int num,int col); X#endif X Xextern WINDOW *scr; /* screen where large numbers displayed */ Xextern int curr_col; /* current center of colon column */ Xextern int NBASE; /* numeric base line for output */ X Xvoid pr_colon(col) Xint col; X{ X curr_col = col + 1; X wmove(scr, NBASE , col); wprintw(scr, " "); X wmove(scr, NBASE + 1, col); wprintw(scr, " "); X wmove(scr, NBASE + 2, col); wprintw(scr, " "); X wmove(scr, NBASE + 3, col); wprintw(scr, " # "); X wmove(scr, NBASE + 4, col); wprintw(scr, "###"); X wmove(scr, NBASE + 5, col); wprintw(scr, " # "); X wmove(scr, NBASE + 6, col); wprintw(scr, " "); X wmove(scr, NBASE + 7, col); wprintw(scr, " "); X wmove(scr, NBASE + 8, col); wprintw(scr, " # "); X wmove(scr, NBASE + 9, col); wprintw(scr, "###"); X wmove(scr, NBASE + 10, col); wprintw(scr, " # "); X wmove(scr, NBASE + 11, col); wprintw(scr, " "); X wmove(scr, NBASE + 12, col); wprintw(scr, " "); X wmove(scr, NBASE + 13, col); wprintw(scr, " "); X} X Xvoid pr_space() X{ X int i; X for(i = NBASE; i < NBASE + 14; i++) { X wmove(scr, i, 9); X wprintw(scr, " "); X wmove(scr, i, 42); X wprintw(scr, " "); X } X} X Xvoid pr_big(num, col) Xint num; Xint col; X{ X if(num == 0) { X wmove(scr, NBASE , col); wprintw(scr, " ###### "); X wmove(scr, NBASE + 1, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 2, col); wprintw(scr, "#### ####"); X wmove(scr, NBASE + 3, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 4, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 5, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 6, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 7, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 8, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 9, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 10, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 11, col); wprintw(scr, "#### ####"); X wmove(scr, NBASE + 12, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ###### "); X } else if(num == 1) { X wmove(scr, NBASE , col); wprintw(scr, " ## "); X wmove(scr, NBASE + 1, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 2, col); wprintw(scr, " #### "); X wmove(scr, NBASE + 3, col); wprintw(scr, " ##### "); X wmove(scr, NBASE + 4, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 5, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 6, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 7, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 8, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 9, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 10, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 11, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 12, col); wprintw(scr, " ####### "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ####### "); X } else if(num == 2) { X wmove(scr, NBASE , col); wprintw(scr, " ######## "); X wmove(scr, NBASE + 1, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 2, col); wprintw(scr, "### ####"); X wmove(scr, NBASE + 3, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 4, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 5, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 6, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 7, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 8, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 9, col); wprintw(scr, " #### "); X wmove(scr, NBASE + 10, col); wprintw(scr, " #### "); X wmove(scr, NBASE + 11, col); wprintw(scr, " #### "); X wmove(scr, NBASE + 12, col); wprintw(scr, "############"); X wmove(scr, NBASE + 13, col); wprintw(scr, "############"); X } else if(num == 3) { X wmove(scr, NBASE , col); wprintw(scr, " ######## "); X wmove(scr, NBASE + 1, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 2, col); wprintw(scr, "### ####"); X wmove(scr, NBASE + 3, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 4, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 5, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 6, col); wprintw(scr, " ####### "); X wmove(scr, NBASE + 7, col); wprintw(scr, " ####### "); X wmove(scr, NBASE + 8, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 9, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 10, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 11, col); wprintw(scr, "### ####"); X wmove(scr, NBASE + 12, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ######## "); X } else if(num == 4) { X wmove(scr, NBASE , col); wprintw(scr, " ### "); X wmove(scr, NBASE + 1, col); wprintw(scr, " #### "); X wmove(scr, NBASE + 2, col); wprintw(scr, " ##### "); X wmove(scr, NBASE + 3, col); wprintw(scr, " ###### "); X wmove(scr, NBASE + 4, col); wprintw(scr, " ### ### "); X wmove(scr, NBASE + 5, col); wprintw(scr, " ### ### "); X wmove(scr, NBASE + 6, col); wprintw(scr, " ### ### "); X wmove(scr, NBASE + 7, col); wprintw(scr, "############"); X wmove(scr, NBASE + 8, col); wprintw(scr, "############"); X wmove(scr, NBASE + 9, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 10, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 11, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 12, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ### "); X } else if(num == 5) { X wmove(scr, NBASE , col); wprintw(scr, "############"); X wmove(scr, NBASE + 1, col); wprintw(scr, "############"); X wmove(scr, NBASE + 2, col); wprintw(scr, "### "); X wmove(scr, NBASE + 3, col); wprintw(scr, "### "); X wmove(scr, NBASE + 4, col); wprintw(scr, "### ###### "); X wmove(scr, NBASE + 5, col); wprintw(scr, "########### "); X wmove(scr, NBASE + 6, col); wprintw(scr, "### ####"); X wmove(scr, NBASE + 7, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 8, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 9, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 10, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 11, col); wprintw(scr, "### ####"); X wmove(scr, NBASE + 12, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ######## "); X } else if(num == 6) { X wmove(scr, NBASE , col); wprintw(scr, " ### "); X wmove(scr, NBASE + 1, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 2, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 3, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 4, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 5, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 6, col); wprintw(scr, " ######### "); X wmove(scr, NBASE + 7, col); wprintw(scr, "########### "); X wmove(scr, NBASE + 8, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 9, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 10, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 11, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 12, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ###### "); X } else if(num == 7) { X wmove(scr, NBASE , col); wprintw(scr, "############"); X wmove(scr, NBASE + 1, col); wprintw(scr, "############"); X wmove(scr, NBASE + 2, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 3, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 4, col); wprintw(scr, " ###"); X wmove(scr, NBASE + 5, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 6, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 7, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 8, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 9, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 10, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 11, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 12, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 13, col); wprintw(scr, "### "); X } else if(num == 8) { X wmove(scr, NBASE , col); wprintw(scr, " ###### "); X wmove(scr, NBASE + 1, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 2, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 3, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 4, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 5, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 6, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 7, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 8, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 9, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 10, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 11, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 12, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ###### "); X } else if(num == 9) { X wmove(scr, NBASE , col); wprintw(scr, " ###### "); X wmove(scr, NBASE + 1, col); wprintw(scr, " ########## "); X wmove(scr, NBASE + 2, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 3, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 4, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 5, col); wprintw(scr, "### ###"); X wmove(scr, NBASE + 6, col); wprintw(scr, " ###########"); X wmove(scr, NBASE + 7, col); wprintw(scr, " ######### "); X wmove(scr, NBASE + 8, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 9, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 10, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 11, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 12, col); wprintw(scr, " ### "); X wmove(scr, NBASE + 13, col); wprintw(scr, " ### "); X } X} SHAR_EOF fi exit 0 # End of shell archive -- George M. Sipe, Phone: (404) 662-1533 Tolerant Systems, 6961 Peachtree Industrial, Norcross, GA 30071 UUCP: ...!{decvax,hplabs,linus,rutgers,seismo}!gatech!rebel!george