1 |
perry |
1 |
PUTS |
|
|
2 |
!!!PUTS |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
CONFORMING TO |
|
|
8 |
BUGS |
|
|
9 |
SEE ALSO |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
fputc, fputs, putc, putchar, puts - output of characters and strings |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__#include |
|
|
19 |
__ ''c''__, FILE *__''stream''__); |
|
|
20 |
int fputs(const char *__''s''__, FILE *__''stream''__); |
|
|
21 |
int putc(int__ ''c''__, FILE *__''stream''__); |
|
|
22 |
int putchar(int__ ''c''__); |
|
|
23 |
int puts(const char *__''s''__); |
|
|
24 |
__ |
|
|
25 |
!!DESCRIPTION |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
__fputc()__ writes the character ''c'', cast to an |
|
|
29 |
__unsigned char__, to ''stream''. |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
__fputs()__ writes the string ''s'' to ''stream'', |
|
|
33 |
without its trailing __'0'__. |
|
|
34 |
|
|
|
35 |
|
|
|
36 |
__putc()__ is equivalent to __fputc()__ except that it |
|
|
37 |
may be implemented as a macro which evaluates ''stream'' |
|
|
38 |
more than once. |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
__putchar(__''c''__);__ is equivalent to |
|
|
42 |
__putc(__''c''__,__''stdout''__).__ |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
__puts()__ writes the string ''s'' and a trailing |
|
|
46 |
newline to ''stdout''. |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
Calls to the functions described here can be mixed with each |
|
|
50 |
other and with calls to other output functions from the |
|
|
51 |
__stdio__ library for the same output |
|
|
52 |
stream. |
|
|
53 |
!!RETURN VALUE |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
__fputc()__, __putc()__ and __putchar()__ return |
|
|
57 |
the character written as an __unsigned char__ cast to an |
|
|
58 |
__int__ or __EOF__ on error. |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
__puts()__ and __fputs()__ return a non - negative |
|
|
62 |
number on success, or __EOF__ on error. |
|
|
63 |
!!CONFORMING TO |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
ANSI - C, POSIX.1 |
|
|
67 |
!!BUGS |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
It is not advisable to mix calls to output functions from |
|
|
71 |
the __stdio__ library with low - level calls to |
|
|
72 |
__write()__ for the file descriptor associated with the |
|
|
73 |
same output stream; the results will be undefined and very |
|
|
74 |
probably not what you want. |
|
|
75 |
!!SEE ALSO |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
write(2), fopen(3), fwrite(3), |
|
|
79 |
scanf(3), gets(3), fseek(3), |
|
|
80 |
ferror(3) |
|
|
81 |
---- |