home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / src / libc / stdio / strout.c < prev    next >
Encoding:
C/C++ Source or Header  |  1979-01-10  |  388 b   |  24 lines

  1. #include    <stdio.h>
  2.  
  3. _strout(string, count, adjust, file, fillch)
  4. register char *string;
  5. register count;
  6. int adjust;
  7. register struct _iobuf *file;
  8. {
  9.     while (adjust < 0) {
  10.         if (*string=='-' && fillch=='0') {
  11.             putc(*string++, file);
  12.             count--;
  13.         }
  14.         putc(fillch, file);
  15.         adjust++;
  16.     }
  17.     while (--count>=0)
  18.         putc(*string++, file);
  19.     while (adjust) {
  20.         putc(fillch, file);
  21.         adjust--;
  22.     }
  23. }
  24.