|
|
1.1 ! root 1: #include "../h/rt.h" ! 2: ! 3: /* ! 4: * stop(a,b,...) - write arguments (starting on error output) and stop. ! 5: */ ! 6: ! 7: Xstop(nargs) ! 8: int nargs; ! 9: { ! 10: register int n; ! 11: char sbuf[MAXSTRING]; ! 12: struct descrip arg; ! 13: FILE *f; ! 14: ! 15: f = stderr; ! 16: ! 17: for (n = 1; n <= nargs; n++) { ! 18: arg = ARG(n); ! 19: DeRef(arg) ! 20: ! 21: if (!QUAL(arg) && TYPE(arg) == T_FILE) { ! 22: if (n > 1) ! 23: putc('\n', f); ! 24: if ((BLKLOC(arg)->file.status & FS_WRITE) == 0) ! 25: runerr(213, &arg); ! 26: f = BLKLOC(arg)->file.fd; ! 27: } ! 28: else { ! 29: if (n == 1 && (k_output.status & FS_WRITE) == 0) ! 30: runerr(213, NULL); ! 31: defany(&arg, &nullstr); ! 32: if (cvstr(&arg, sbuf) == NULL) ! 33: runerr(109, &arg); ! 34: putstr(f, STRLOC(arg), STRLEN(arg)); ! 35: } ! 36: } ! 37: ! 38: putc('\n', f); ! 39: c_exit(1); ! 40: } ! 41: ! 42: Procblock(stop,-1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.