|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 553 (0x229) Types: TextFile Names: »test1.c«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Dpy/test1.c«
/* * Example program. Randomly fill up the screen with numbers until * it all turns to asterisks. */ #ifdef USG #define random rand #endif USG main() { register int row, col, ch; register int rows, cols; if (dpyinit((char *)0, "e")) exit(1); dpymove(-1, -1); rows = dpygetrow() + 1; cols = dpygetcol() + 1; dpyhome(); while (1) { dpyupdate(); row = random() % rows; col = random() % cols; ch = dpyget(row, col); if (ch == ' ') ch = '1'; else if (ch == '9') ch = '*'; else if (ch != '*') ch++; dpyplace(row, col, ch); } }