static char sccsid
[] = "@(#)sub.c 4.1 %G%";
if ((i
= getc(f
)) == EOF
) {
while(varchar(*q
) || number(*q
))
if (c
== *s
++) return(1);
if (s2
== (STRING
) -1) return(0);
DO IF
*s2
++ == 0 ORF s1
>=es1
return(lseek(f
,(long) a
,0) != -1);
/* descriptor format to length */
* checks equality of pattern pat with str,
* assuming str is tructaed at length 8
return(eqpatr(pat
, str
, 0));
return(eqpatr(pat
, str
));
if (s
== '\0') return(0);
return(eqpatr(pat
+1, str
+1, cnt
+1));
return(eqpatr(pat
+1, str
+1));
if (pat
[1] == '\0') return(1);
if (eqpatr(pat
+1, str
+i
, cnt
+i
)) return(1);
if (eqpatr(pat
+1, str
+i
)) return(1);
if (str
[i
] == '\0') return(0);
if ((eqany(p
, ".[->") || p
== '\0') && s
== '\0') return(1);
return(eqpatr(pat
+1, str
+1, cnt
+1));
return(eqpatr(pat
+1, str
+1));
/* gets indirect address for pointers and subscripts */
getindir(class, addr
, type
)
if (ISARY(type
)) return(addr
);
return(*(ADDR
*)(((ADDR
) &u
) + R0
+ (WORDSIZE
)*addr
));
return(getval(addr
, 'd', DSP
));
if (**p
== 'x' || **p
== 'X') {
return(sign
* rint(p
, 16, hexdigit
, hexconv
));
else return(sign
* rint(p
, 8, octdigit
, octconv
));
else return(sign
* rint(p
, 10, decdigit
, decconv
));
rint(p
, base
, digit
, conv
)
int (*digit
)(), (*conv
)(); {
while ((*digit
)(**p
)) value
= base
*value
+ (*conv
)(*(*p
)++);
return(c
>= '0' && c
<= '7');
return(c
>= '0' && c
<= '9');
return((c
>= '0' && c
<= '9') || (c
>= 'a' && c
<= 'f') ||
if (c
>= '0' && c
<= '9') return(c
- '0');
if (c
>= 'a' && c
<= 'f') return(c
- 'a' + 10);
if (c
>= 'A' && c
<= 'F') return(c
- 'A' + 10);
error("hex conversion error");
/* decodes number, character or variable */
} else if ((ch
>= '0' && ch
<= '9') || ch
== '-') {
} else if ((ch
>= 'a' && ch
<= 'z') || (ch
>= 'A' && ch
<= 'Z') ||
j
= varaddr(curproc()->pname
, var
);
printf("Unknown variable: %s\n", argsp
);
value
= getval(j
, typetodesc(sl_type
, 0)[0], DSP
);
} while (varchar(*p
) || number(*p
));
/* print hex number in field of length 12 */
/* print line number followed by offset */
struct proct
*procp
; ADDR v
; {
lineno
= adrtolineno((ADDR
) v
);
diff
= v
- lnfaddr
; /* set by adrtolineno() */