home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
minnie.tuhs.org
/
unixen.tar
/
unixen
/
PDP-11
/
Distributions
/
ucb
/
spencer_2bsd.tar.gz
/
2bsd.tar
/
src
/
csh
/
11printf.c
< prev
next >
Wrap
C/C++ Source or Header
|
1980-02-17
|
596b
|
36 lines
/* Copyright (c) 1979 Regents of the University of California */
/*
* Hacked "printf" which prints through putchar.
* DONT USE WITH STDIO!
*/
printf(fmt, args)
char *fmt;
{
_doprnt(fmt, &args, 0);
}
_strout(string, count, adjust, foo, fillch)
register char *string;
register int count;
int adjust;
register struct { int a[6]; } *foo;
{
if (foo != 0)
abort();
while (adjust < 0) {
if (*string=='-' && fillch=='0') {
putchar(*string++);
count--;
}
putchar(fillch);
adjust++;
}
while (--count>=0)
putchar(*string++);
while (adjust) {
putchar(fillch);
adjust--;
}
}