blob: b33d3b59048ec6b2ee7c0be28c1d4b6709fb87cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <stdio.h>
#include "nonstd/io.h"
/** write a string to a file stream **/
int fputs(const char * restrict s, FILE * restrict stream)
{
flockfile(stream);
while (*s) {
if (fputc(*s++, stream) == EOF) {
return EOF;
}
}
funlockfile(stream);
/*
RETURN_SUCCESS(NONNEGATIVE());
RETURN_FAILURE(CONSTANT(EOF));
*/
return 1;
}
/***
writes the string ARGUMENT(s) to ARGUMENT(stream), not including
the terminating CHAR(\0) character.
***/
/*
STDC(1)
*/
|