|
Lines 28-41
Link Here
|
| 28 |
unsigned long strtoul (); |
28 |
unsigned long strtoul (); |
| 29 |
|
29 |
|
| 30 |
static int |
30 |
static int |
| 31 |
int_printflen (const char *format, va_list *args) |
31 |
int_printflen (const char *format, va_list args) |
| 32 |
{ |
32 |
{ |
| 33 |
const char *cp; |
33 |
const char *cp; |
| 34 |
int total_width = 0; |
34 |
int total_width = 0; |
| 35 |
int width = 0; |
35 |
int width = 0; |
| 36 |
va_list ap; |
36 |
va_list ap; |
| 37 |
|
37 |
|
| 38 |
memcpy (&ap, args, sizeof (va_list)); |
38 |
va_copy(ap, args); |
| 39 |
|
39 |
|
| 40 |
for (cp = format ; *cp ; cp++) |
40 |
for (cp = format ; *cp ; cp++) |
| 41 |
{ |
41 |
{ |
|
Lines 93-105
Link Here
|
| 93 |
} |
93 |
} |
| 94 |
} |
94 |
} |
| 95 |
} |
95 |
} |
|
|
96 |
va_end(ap); |
| 96 |
return total_width; |
97 |
return total_width; |
| 97 |
} |
98 |
} |
| 98 |
|
99 |
|
| 99 |
int |
100 |
int |
| 100 |
vprintflen (const char *format, va_list args) |
101 |
vprintflen (const char *format, va_list args) |
| 101 |
{ |
102 |
{ |
| 102 |
return int_printflen (format, &args); |
103 |
return int_printflen (format, args); |
| 103 |
} |
104 |
} |
| 104 |
|
105 |
|
| 105 |
int |
106 |
int |