1: #include "lint.h"
2: #ifndef lint
3: static char sccs_id[] = "@(#)util2.c 2.1 8/13/82";
4: #endif lint
5: #include <stdio.h>
6: #include <ape.h>
7:
8: PMINT stom(str)
9: char *str; /* This allows initialization of a MINT by
10: * a number represented by a string of arbitrary
11: * length. The usual C conventions are used for
12: * determining the input base. */
13: {
14: PMINT local;
15:
16: new(&local);
17: if (*str == '0')
18: {
19: ++str;
20: if (*str == 'x' || *str == 'X')
21: {
22: ++str;
23: sm_in (local, 16, str);
24: }
25: else
26: sm_in (local, 8, str);
27: }
28: else
29: sm_in (local, 10, str);
30: return (local);
31: }
32:
33: mcmp(a,b)
34: MINT *a,*b;
35: { MINT c;
36: int res;
37:
38: if(a->len!=b->len) return(a->len-b->len);
39: c.len=0;
40: msub(a,b,&c);
41: res=c.len;
42: xfree(&c);
43: return(res);
44: }
Defined functions
mcmp
defined in line
33; used 3 times
stom
defined in line
8; used 4 times
Defined variables