2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
24 static char buff
[BSIZ
];
28 int c
, n
= 0, las
= 0;
32 while ((c
= (sinput
? *sinput
++ : getchar())) > 0) {
35 if (isalpha(c
) || isdigit(c
)) {
50 fprintf(stderr
, gettext("query long than %d characters\n"),
52 assert(p
< buff
+ BSIZ
);
53 if (sinput
== 0 && c
<= 0) eof
= 1;
55 fprintf(stderr
, "no. keys %d\n", n
);
56 for (c
= 0; c
< n
; c
++)
57 fprintf(stderr
, "keys X%sX\n", v
[c
]);