extern char *__prtshort(), *__prtld(), *__prtld();
mode
= 0; /* mode zero, putchar */
if (parlist
+ 1 < MAXFILES
+ 1)
mode
++; /* mode one, cputc */
mode
++; /* mode two, string */
while (c
>= '0' && c
<= '9')
width
= width
* 10 + (c
- '0');
while (c
>= '0' && c
<= '9')
prec
= prec
* 10 + (c
- '0');
/* we now have all the prelims out of the way;
let's see what we want to print */
case 'd': /* decimal signed */
__prtint(p
++, buf
, 10, 1, fn
, 0);
case 'u': /* decimal unsigned */
__prtint(p
++, buf
, 10, 0, __prtshort
, 0);
case 'o': /* octal unsigned */
__prtint(p
++, buf
, 8, 0, __prtshort
, 0);
case 'x': /* hexadecimal unsigned */
__prtint(p
++, buf
, 16, 0, __prtshort
, c
== 'X');
case 'c': /* character */
case 'e': /* exponential */
ftoa(*dblptr
, buf
, sizeof buf
- 1, prec
, c
);
default: /* just print the character */
if (prec
< len
&& prec
>= 0)
if (padchar
!= ' ' && *s
== '-')
__putch(mode
, &fd
, *s
++);
__putch(mode
, &fd
, padchar
);
__putch(mode
, &fd
, *s
++);
__putch(mode
, &fd
, padchar
);
char *__prtld(pobj
, pbuf
, base
, signed, digs
)
for (; n
!= 0; n
=/ base
)