home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / source / gutil / prargs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1985-01-23  |  658 b   |  42 lines

  1. # include    <sccs.h>
  2.  
  3. SCCSID(@(#)prargs.c    8.1    12/31/84)
  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. }
  42.