Subversion Repositories Kolibri OS

Rev

Rev 4921 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4921 Rev 6099
Line 15... Line 15...
15
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16
 */
16
 */
Line 17... Line 17...
17
 
17
 
18
/*
18
/*
19
FUNCTION
19
FUNCTION
Line 20... Line 20...
20
<>---write a character string in a file or stream
20
<>, <>---write a character string in a file or stream
21
 
21
 
22
INDEX
22
INDEX
-
 
23
	fputs
-
 
24
INDEX
23
	fputs
25
	fputs_unlocked
-
 
26
INDEX
-
 
27
	_fputs_r
Line 24... Line 28...
24
INDEX
28
INDEX
25
	_fputs_r
29
	_fputs_unlocked_r
26
 
30
 
Line -... Line 31...
-
 
31
ANSI_SYNOPSIS
-
 
32
	#include 
-
 
33
	int fputs(const char *restrict <[s]>, FILE *restrict <[fp]>);
-
 
34
 
27
ANSI_SYNOPSIS
35
	#define _GNU_SOURCE
28
	#include 
36
	#include 
Line -... Line 37...
-
 
37
	int fputs_unlocked(const char *restrict <[s]>, FILE *restrict <[fp]>);
-
 
38
 
-
 
39
	#include 
29
	int fputs(const char *restrict <[s]>, FILE *restrict <[fp]>);
40
	int _fputs_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>);
30
 
41
 
31
	#include 
42
	#include 
32
	int _fputs_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>);
43
	int _fputs_unlocked_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>);
33
 
44
 
Line -... Line 45...
-
 
45
TRAD_SYNOPSIS
-
 
46
	#include 
-
 
47
	int fputs(<[s]>, <[fp]>)
-
 
48
	char *<[s]>;
-
 
49
	FILE *<[fp]>;
-
 
50
 
34
TRAD_SYNOPSIS
51
	#define _GNU_SOURCE
35
	#include 
52
	#include 
36
	int fputs(<[s]>, <[fp]>)
53
	int fputs_unlocked(<[s]>, <[fp]>)
37
	char *<[s]>;
54
	char *<[s]>;
38
	FILE *<[fp]>;
55
	FILE *<[fp]>;
Line -... Line 56...
-
 
56
 
-
 
57
	#include 
-
 
58
	int _fputs_r(<[ptr]>, <[s]>, <[fp]>)
-
 
59
	struct _reent *<[ptr]>;
-
 
60
	char *<[s]>;
-
 
61
	FILE *<[fp]>;
39
 
62
 
40
	#include 
63
	#include 
41
	int _fputs_r(<[ptr]>, <[s]>, <[fp]>)
64
	int _fputs_unlocked_r(<[ptr]>, <[s]>, <[fp]>)
Line 42... Line 65...
42
	struct _reent *<[ptr]>;
65
	struct _reent *<[ptr]>;
-
 
66
	char *<[s]>;
-
 
67
	FILE *<[fp]>;
-
 
68
 
-
 
69
DESCRIPTION
-
 
70
<> writes the string at <[s]> (but without the trailing null)
-
 
71
to the file or stream identified by <[fp]>.
-
 
72
 
-
 
73
<> is a non-thread-safe version of <>.
-
 
74
<> may only safely be used within a scope
43
	char *<[s]>;
75
protected by flockfile() (or ftrylockfile()) and funlockfile().  This
Line 44... Line 76...
44
	FILE *<[fp]>;
76
function may safely be used in a multi-threaded program if and only
45
 
77
if they are called while the invoking thread owns the (FILE *)
Line 46... Line 78...
46
DESCRIPTION
78
object, as is the case after a successful call to the flockfile() or
47
<> writes the string at <[s]> (but without the trailing null)
79
ftrylockfile() functions.  If threads are disabled, then
48
to the file or stream identified by <[fp]>.
80
<> is equivalent to <>.
Line -... Line 81...
-
 
81
 
-
 
82
<<_fputs_r>> and <<_fputs_unlocked_r>> are simply reentrant versions of the
49
 
83
above that take an additional reentrant struct pointer argument: <[ptr]>.
50
<<_fputs_r>> is simply the reentrant version of <> that takes
84
 
51
an additional reentrant struct pointer argument: <[ptr]>.
85
RETURNS
Line 52... Line 86...
52
 
86
If successful, the result is <<0>>; otherwise, the result is <>.
53
RETURNS
87
 
54
If successful, the result is <<0>>; otherwise, the result is <>.
88
PORTABILITY
55
 
89
ANSI C requires <>, but does not specify that the result on
56
PORTABILITY
90
success must be <<0>>; any non-negative value is permitted.
Line -... Line 91...
-
 
91
 
-
 
92
<> is a GNU extension.
-
 
93
 
-
 
94
Supporting OS subroutines required: <>, <>, <>,
-
 
95
<>, <>, <>, <>.
57
ANSI C requires <>, but does not specify that the result on
96
*/
58
success must be <<0>>; any non-negative value is permitted.
97
 
59
 
98
#include <_ansi.h>
60
Supporting OS subroutines required: <>, <>, <>,
-
 
61
<>, <>, <>, <>.
99
#include 
62
*/
100
#include 
63
 
101
#include "fvwrite.h"
64
#include <_ansi.h>
102
#include "local.h"
65
#include 
103