2 Proprietary Rand Corporation
, 1981.
3 Further distribution of
this software
4 subject to the terms of the Rand
24 while((i
= getchar()) != '\n') {
27 if(cp
< &ansbuf
[31]) {
28 if(i
>= 'A' && i
<= 'Z')
34 if(ansbuf
[0] == '?' || cp
== ansbuf
) {
35 printf("Options are:\n");
36 for(ap
= ansp
; ap
->sw
; ap
++)
37 printf(" %s\n", ap
->sw
);
40 if((i
= smatch(ansbuf
, ansp
)) < 0) {
41 printf("%s: %s.\n", ansbuf
, i
== -1? "unknown":"ambiguous");