2 * Copyright 1990 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"
17 /* ts.c: minor string processing subroutines */
19 match(char *s1
, char *s2
)
30 prefix(char *small
, char *big
)
33 while ((c
= *small
++) == *big
++)
41 if (ch
>= 'a' && ch
<= 'z')
43 if (ch
>= 'A' && ch
<= 'Z')
51 /* convert to integer */
53 for (k
=0; *str
>= '0' && *str
<= '9'; str
++)
54 k
= k
*10 + *str
- '0';
61 return(x
>= '0' && x
<= '9');
71 tcopy(char *s
, char *t
)