X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/251b09710fa057c01df8d132b6e165bd3b6c9a34..90acb15a1f41955ab2a3413c91835bdf17fdfd47:/usr/src/cmd/sdb/sub.c diff --git a/usr/src/cmd/sdb/sub.c b/usr/src/cmd/sdb/sub.c index ba0227e792..60a789dda6 100644 --- a/usr/src/cmd/sdb/sub.c +++ b/usr/src/cmd/sdb/sub.c @@ -54,6 +54,7 @@ char *s; { printf("%s\n", s); } +char * cpstr(p,q) char *p, *q; { do { @@ -77,7 +78,7 @@ chkerr() { IF errflg ORF mkfault THEN error(errflg); - reset(); + longjmp(env, 0); FI } @@ -98,9 +99,7 @@ eqstr(s1, s2) longseek(f, a) L_INT a; { -#ifndef EDDT return(lseek(f,(long) a,0) != -1); -#endif } @@ -149,8 +148,12 @@ char *pat, *str; { p = pat[0]; s = str[0]; if (cnt == 8) return(1); - if (p == '?') return(eqpatr(pat+1, str+1, cnt+1)); + if (p == '?') { + if (s == '\0') return(0); + return(eqpatr(pat+1, str+1, cnt+1)); + } if (p == '*') { + if (pat[1] == '\0') return(1); for(i=1; i<8-cnt; i++) { if (eqpatr(pat+1, str+i, cnt+i)) return(1); if (str[i] == '\0') return(0); @@ -268,4 +271,3 @@ char *p; { } return(value); } -