2003-01-07 Charles Wilson <cwilson@ece.gatech.edu>

* libc/stdio/sprintf.c: fix typo
        * libc/stdio/vfprintf.c: fix typo
This commit is contained in:
Jeff Johnston 2003-01-07 20:02:33 +00:00
parent d4c3a750e7
commit be9c60e52e
3 changed files with 15 additions and 10 deletions

View File

@ -1,3 +1,8 @@
2003-01-07 Charles Wilson <cwilson@ece.gatech.edu>
* libc/stdio/sprintf.c: fix typo
* libc/stdio/vfprintf.c: fix typo
2003-01-07 Jeff Johnston <jjohnstn@redhat.com> 2003-01-07 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: Support long double I/O for x86-linux. * configure.host: Support long double I/O for x86-linux.

View File

@ -18,13 +18,13 @@
/* /*
FUNCTION FUNCTION
<<printf>>, <<fprintf>>, <<saprintf>>, <<sprintf>>, <<snprintf>>---format output <<printf>>, <<fprintf>>, <<asprintf>>, <<sprintf>>, <<snprintf>>---format output
INDEX INDEX
fprintf fprintf
INDEX INDEX
printf printf
INDEX INDEX
saprintf asprintf
INDEX INDEX
sprintf sprintf
INDEX INDEX
@ -36,7 +36,7 @@ ANSI_SYNOPSIS
int printf(const char *<[format]> [, <[arg]>, ...]); int printf(const char *<[format]> [, <[arg]>, ...]);
int fprintf(FILE *<[fd]>, const char *<[format]> [, <[arg]>, ...]); int fprintf(FILE *<[fd]>, const char *<[format]> [, <[arg]>, ...]);
int sprintf(char *<[str]>, const char *<[format]> [, <[arg]>, ...]); int sprintf(char *<[str]>, const char *<[format]> [, <[arg]>, ...]);
int saprintf(char **<[strp]>, const char *<[format]> [, <[arg]>, ...]); int asprintf(char **<[strp]>, const char *<[format]> [, <[arg]>, ...]);
int snprintf(char *<[str]>, size_t <[size]>, const char *<[format]> [, <[arg]>, ...]); int snprintf(char *<[str]>, size_t <[size]>, const char *<[format]> [, <[arg]>, ...]);
TRAD_SYNOPSIS TRAD_SYNOPSIS
@ -49,7 +49,7 @@ TRAD_SYNOPSIS
FILE *<[fd]>; FILE *<[fd]>;
char *<[format]>; char *<[format]>;
int saprintf(<[strp]>, <[format]> [, <[arg]>, ...]); int asprintf(<[strp]>, <[format]> [, <[arg]>, ...]);
char **<[strp]>; char **<[strp]>;
char *<[format]>; char *<[format]>;
@ -72,16 +72,16 @@ DESCRIPTION
If there are more arguments than the format requires, excess If there are more arguments than the format requires, excess
arguments are ignored. arguments are ignored.
<<fprintf>>, <<saprintf>>, <<sprintf>> and <<snprintf>> are identical <<fprintf>>, <<asprintf>>, <<sprintf>> and <<snprintf>> are identical
to <<printf>>, other than the destination of the formatted output: to <<printf>>, other than the destination of the formatted output:
<<fprintf>> sends the output to a specified file <[fd]>, while <<fprintf>> sends the output to a specified file <[fd]>, while
<<saprintf>> stores the output in a dynamically allocated buffer, <<asprintf>> stores the output in a dynamically allocated buffer,
while <<sprintf>> stores the output in the specified char array while <<sprintf>> stores the output in the specified char array
<[str]> and <<snprintf>> limits number of characters written to <[str]> and <<snprintf>> limits number of characters written to
<[str]> to at most <[size]> (including terminating <<0>>). For <[str]> to at most <[size]> (including terminating <<0>>). For
<<sprintf>> and <<snprintf>>, the behavior is undefined if the <<sprintf>> and <<snprintf>>, the behavior is undefined if the
output <<*<[str]>>> overlaps with one of the arguments. For output <<*<[str]>>> overlaps with one of the arguments. For
<<saprintf>>, <[strp]> points to a pointer to char which is filled <<asprintf>>, <[strp]> points to a pointer to char which is filled
in with the dynamically allocated buffer. <[format]> is a pointer in with the dynamically allocated buffer. <[format]> is a pointer
to a charater string containing two types of objects: ordinary to a charater string containing two types of objects: ordinary
characters (other than <<%>>), which are copied unchanged to the characters (other than <<%>>), which are copied unchanged to the
@ -282,11 +282,11 @@ O-
RETURNS RETURNS
<<sprintf>> and <<saprintf>> return the number of bytes in the output string, <<sprintf>> and <<asprintf>> return the number of bytes in the output string,
save that the concluding <<NULL>> is not counted. save that the concluding <<NULL>> is not counted.
<<printf>> and <<fprintf>> return the number of characters transmitted. <<printf>> and <<fprintf>> return the number of characters transmitted.
If an error occurs, <<printf>> and <<fprintf>> return <<EOF>> and If an error occurs, <<printf>> and <<fprintf>> return <<EOF>> and
<<saprintf>> returns -1. No error returns occur for <<sprintf>>. <<asprintf>> returns -1. No error returns occur for <<sprintf>>.
PORTABILITY PORTABILITY
The ANSI C standard specifies that implementations must The ANSI C standard specifies that implementations must

View File

@ -91,7 +91,7 @@ TRAD_SYNOPSIS
DESCRIPTION DESCRIPTION
<<vprintf>>, <<vfprintf>>, <<vasprintf>>, <<vsprintf>> and <<vsnprintf>> are <<vprintf>>, <<vfprintf>>, <<vasprintf>>, <<vsprintf>> and <<vsnprintf>> are
(respectively) variants of <<printf>>, <<fprintf>>, <<saprintf>>, <<sprintf>>, (respectively) variants of <<printf>>, <<fprintf>>, <<asprintf>>, <<sprintf>>,
and <<snprintf>>. They differ only in allowing their caller to pass the and <<snprintf>>. They differ only in allowing their caller to pass the
variable argument list as a <<va_list>> object (initialized by <<va_start>>) variable argument list as a <<va_list>> object (initialized by <<va_start>>)
rather than directly accepting a variable number of arguments. rather than directly accepting a variable number of arguments.