util.c revision 2
2N/A/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 2N/A/* All Rights Reserved */ 2N/A * Copyright (c) 1980 Regents of the University of California. 2N/A * All rights reserved. The Berkeley software License Agreement 2N/A * specifies the terms and conditions for redistribution. 2N/A/* Portions Copyright(c) 1988, Sun Microsystems Inc. */ 2N/A/* All Rights Reserved */ 2N/A * Copyright (c) 1997, by Sun Microsystems, Inc. 2N/A * All rights reserved. 2N/A#
ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ 2N/A for (j = 0; j < i; j++) {
2N/A i =
malloc(
sizeof (
short) * ((
unsigned)
nint +
2));
/* ??? 2 ??? */ 2N/A for (j = i; j > 0 && a->
val[j-
1] == 0; j--)
2N/A * Convert hex digit to binary value 2N/A if (c >=
'0' && c <=
'9') {
2N/A }
else if (c >=
'a' && c <=
'f') {
2N/A return (c -
'a' +
10);
2N/A }
else if (c >=
'A' && c <=
'F') {
2N/A return (c -
'A' +
10);
2N/A * Convert hex key to MINT key 2N/A return (
'a' -
10 + d);
2N/A * Convert MINT key to hex key 2N/A for (p--, s =
hex; s < p; s++, p--) {
2N/A * Deallocate a multiple precision integer