version 1.6, 2001/10/02 16:22:40 |
version 1.7, 2002/03/14 15:47:31 |
|
|
/* Interactive mode, or script file */ |
/* Interactive mode, or script file */ |
|
|
signal(SIGINT, onintr); |
signal(SIGINT, onintr); |
|
#ifdef __OpenBSD__ |
|
siginterrupt(SIGINT, 1); |
|
#endif |
|
|
/* The Main Loop */ |
/* The Main Loop */ |
while (1) { |
while (1) { |
|
|
} |
} |
|
|
if (!fgets(buf, sizeof buf, cmdf)) { |
if (!fgets(buf, sizeof buf, cmdf)) { |
|
putchar('\n'); |
if (interrupted) |
if (interrupted) |
continue; |
continue; |
else { |
else |
putchar('\n'); |
|
break; |
break; |
} |
|
} |
} |
if (cmdf != stdin) |
if (cmdf != stdin) |
printf("sectok> %s", buf); |
printf("sectok> %s", buf); |