2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
12 int g_sigint
; /* sensed an interrupt */
20 static char ansbuf
[128];
21 register char *cp
, **cpp
;
24 VOID
signal(SIGINT
, g_sig
);
29 while((i
= getchar()) != '\n') {
30 if(i
== EOF
|| g_sigint
) {
38 if(ansbuf
[0] == '?' || cp
== ansbuf
) {
39 printf("Options are:\n");
40 printsw(ALL
, ansp
, "");
43 cpp
= brkstring(ansbuf
, " ", NULLCP
);
44 switch(smatch(*cpp
, ansp
)) {
45 case -2:ambigsw(*cpp
, ansp
); /* ambiguous */
47 case -1: /* unknown */
48 printf(" -%s unknown. Hit <CR> for help.\n", *cpp
);
51 return(cpp
); /* list, edit, quit, send */
59 VOID
signal(SIGINT
, g_sig
);