|
|
1.1 ! root 1: # include <sccs.h> ! 2: ! 3: SCCSID(@(#)prargs.c 7.1 2/5/81) ! 4: ! 5: /* ! 6: ** PRARGS -- print argument list ! 7: ** ! 8: ** Takes an argument list such as expected by any main() ! 9: ** or the DBU routines and prints them on the standard ! 10: ** output for debugging purposes. ! 11: ** ! 12: ** Parameters: ! 13: ** pc -- parameter count. ! 14: ** pv -- parameter vector (just like to main()). ! 15: ** ! 16: ** Returns: ! 17: ** nothing ! 18: ** ! 19: ** Side Effects: ! 20: ** output to stdout only. ! 21: */ ! 22: ! 23: prargs(pc, pv) ! 24: int pc; ! 25: char **pv; ! 26: { ! 27: register char **p; ! 28: register char c; ! 29: int n; ! 30: register char *q; ! 31: ! 32: n = pc; ! 33: printf("#args=%d:\n", n); ! 34: for (p = pv; n-- > 0; p++) ! 35: { ! 36: q = *p; ! 37: while ((c = *q++) != 0) ! 38: xputchar(c); ! 39: putchar('\n'); ! 40: } ! 41: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.