/* Wavy Lines for the H19/Z19/H89/Z89 Written by Leor Zolman, 11/81 This program is configured for the H19 terminal, but may be used on ANY cursor-addressable terminal by: a) modifying the first four #define lines to suit your particular terminal, and b) modifying the cursor addressing sequence (commented) in the program to work for your terminal. For best effect, compile with: A>cc1 wavy.c -e2000 -o */ /* The following four #define statements need customizing for your terminal: */ #define INIT "\33E\33F\33x5" /* clear screen, enter graphics mode, */ /* and turn off the cursor */ #define UNINIT "\33E\33G\33y5" /* clear screen, exit graphics mode, */ /* and turn cursor back on */ #define SLASH 'x' /* these are special characters in H19 */ #define BACKSLASH 'y' /* graphics mode. If you don't have an */ /* H19, make these simply '/' and '\\' */ #define MAXL 200 /* maximum number of lines at one time */ int direc[MAXL]; char column[MAXL]; char i; char nlines; main() { top: puts(UNINIT); srand1("How many wavy lines (1-200, q to quit) ? "); if (!scanf("%d",&nlines) || nlines < 1 || nlines > MAXL) exit(); puts(INIT); for (i=0; i