1 .TH PRINT 3 "$Revision: 1.9 $"
4 print, fprint, sprint, doprnt -- very simple formatted-output routines
10 .B void print(format [, arg] ... )
13 .B void fprint(filep, format [, arg] ... )
17 .B char *sprint(s, format [, arg] ... )
20 .B void doprnt(filep, format, args)
25 .B int _format(buf, format, args)
32 writes output on standard output.
36 place output on the open file known by
38 .I filep could for instance be STDOUT or STDERR.
40 places `output' in the string
42 followed by the character `\\0'.
44 Each of these functions converts, formats and prints its arguments, following
47 argument, under control of
50 is a character string which contains two types of objects: plain characters,
51 which are simply copied to the output destination, and conversion
52 specifications, each of which causes conversion and printing of the next
55 A conversion specification is introduced by the character %.
56 Following the %, there may be
58 an optional row of decimal digits specifying the field width;
59 if the converted integral value has fewer characters than
60 the field width, it will be blank-padded on the left;
61 if the field width begins with a zero, zero-padding will be done;
65 specifying that a following
72 corresponds to a long-integer argument;
74 a character which indicates the type of conversion to be applied.
77 The conversion characters and their meanings are
79 The next argument is an integer and is converted to binary, decimal, octal
80 or hexadecimal notation respectively.
82 Next argument is a character and is put directly into the resulting string.
83 the field width is one character.
85 Next argument is taken to be a character pointer and characters from the
86 string are taken until a null character is reached; a specified field width
87 is not taken into account.
89 The unsigned integer argument is converted to decimal.
92 Integral arguments are not truncated, even if their size exceeds the specified
94 Padding takes place only if the specified field width exceeds the actual width.
96 The printing routines build the string to be printed internally and use
102 routine builds the string, but does not null-terminate it. It returns the
103 length of the string.
108 as the address of the arguments of the format string.
111 ~em/modules/lib/libprint.a
117 Each illegal conversion specification is replaced by the string "<bad\ format>".
119 The maximum length of the string to be printed is 1024 characters.