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"
25 for (n
= 0; c
= *s
; s
++)
26 n
+= (c
*n
+ c
<< (n
%4));
27 return (n
> 0 ? n
: -n
);
33 fprintf(stderr
, gettext("Error: "));
34 fprintf(stderr
, s
, a
);
40 prefix(char *t
, char *s
)
44 while ((c
= *t
++) == *s
++)
47 return (c
== 0 ? 1 : 0);
51 mindex(char *s
, char c
)
61 zalloc(size_t m
, size_t n
)
66 fprintf(stderr
, "calling calloc for %d*%d bytes\n", m
, n
);
70 fprintf(stderr
, "calloc returned %o\n", t
);