home *** CD-ROM | disk | FTP | other *** search
-
- #include <stdio.h>
- #include <libraries/dos.h>
-
- #define INF_PKT "ram:inform.pkt"
- #define CMD_PKT "ram:command.pkt"
-
- void main(void) {
- FILE *file=0;
- char buf[256];
-
- for(;;) {
- chkabort();
- Delay(75);
-
- if (access(INF_PKT, 0) == 0) {
- DisplayBeep(NULL);
- remove(INF_PKT);
- }
-
- if (access(CMD_PKT, 4) == 0) {
- if (file = fopen(CMD_PKT, "r")) {
- fgets(buf, sizeof(buf), file);
- Execute(buf,0,0);
- fclose(file);
- file=0;
- remove(CMD_PKT);
- } else puts("File execution error\n");
- }
- }
- }
-