/* meter.c - tell me when to feed my parking meter */ /* METER minutes message */ /* after 'minutes' minutes, will BROadcast 'message' to the terminal that ran METER */ /* I use BRO rather that QIOW$ IO_WBT with timeout because BRO is priviledged and tracks RSX, while my hack would just imitate BRO and possibly be out of date with the next RSX. */ /* ideas: make it understand absolute time as well as 'n' minutes from now */ #include #include #include #include #include #include #include extern int $dsw; #define LUN 4 #define EFN 4 char message[300]; /* the message to broadcast */ int minutes; /* number of minutes to wait before BRO */ main(argc,argv) int argc; char **argv; BEGIN int a; /* counts arguments on command line */ IF (argc<2) THEN fprintf(stderr,"usage METER nm mess\n"); fprintf(stderr,"nm: number of minutes to wait before BRO\n"); fprintf(stderr,"mess: message to BRO to your terminal after waiting\n"); fprintf(stderr,"This frob is to help you to remember to feed your parking meter\n"); exit(); FI; sprintf(message,"BRO TT%o: ",wotttn()); strcat(message,"\7METER - "); FOR (a=2; a