45 lines
826 B
Plaintext
45 lines
826 B
Plaintext
/*
|
|
* Copyright (c) 1980 Regents of the University of California.
|
|
* All rights reserved. The Berkeley Software License Agreement
|
|
* specifies the terms and conditions for redistribution.
|
|
*/
|
|
|
|
#ifndef lint
|
|
static char *sccsid = "@(#)printf.c.vax 1.1 92/07/30 SMI; from UCB 5.2 6/6/85";
|
|
#endif
|
|
|
|
/*
|
|
* Hacked "printf" which prints through putchar.
|
|
* DONT USE WITH STDIO!
|
|
*/
|
|
printf(fmt, args)
|
|
char *fmt;
|
|
{
|
|
_doprnt(fmt, &args, 0);
|
|
}
|
|
|
|
_strout(count, string, 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--;
|
|
}
|
|
}
|