nectar
832e8b7f9a
Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
...
Only warnings that could be fixed without changing the generated object
code and without restructuring the source code have been handled.
Reviewed by: /sbin/md5
2003-02-16 17:29:11 +00:00
mtm
68ea6f266e
Fix use of an uninitialized pointer introduced in a previous revision.
...
Approved by: markm (mentor)(implicit)
2003-02-06 01:08:19 +00:00
tjr
46abb5f788
Back out previous. Many people disagreed with removing the warning.
2003-01-30 23:32:53 +00:00
tjr
72fe86c519
Remove runtime warning about gets().
2003-01-30 12:00:26 +00:00
tjr
a3bd15f559
Lock stdin on entry, unlock on return, use __sgetc() instead of getchar()
...
to avoid locking the stream for each character and to avoid input being
scattered among multiple threads.
2003-01-30 11:46:25 +00:00
tjr
6a029f7c04
Remove part of my stateful locale patch that slipped into the previous rev.
2003-01-26 11:45:54 +00:00
tjr
680c2aca55
Initial implementation of the C99 feature whereby calling freopen() with
...
a NULL filename argument allows a stream's mode to be changed. At the
moment it just recycles the old file descriptor instead of storing the
filename somewhere and using that to reopen the file, as the standard
seems to require. Strictly conforming C99 applications probably can't
tell the difference but POSIX ones can.
PR: 46791
2003-01-26 10:01:59 +00:00
tjr
9adc11de8a
Lock the stream before calling __sfileno() to retrieve the file descriptor.
...
1003.1-2001 requires that fileno() behave as if it locks the stream.
2003-01-13 02:58:18 +00:00
tjr
7c6b8aca67
Add missing word to "Return Values" section.
2003-01-13 01:29:14 +00:00
tjr
92b8a62ce5
The macro versions of putc() and putchar() are gone.
2003-01-10 07:47:12 +00:00
tjr
1728522b0e
There is no macro version of getc() anymore.
2003-01-10 07:45:24 +00:00
tjr
bd44cebe6a
Bring the list of function-like macros up to date with reality.
2003-01-10 07:38:38 +00:00
alfred
90d9ad7de5
spell multiple correctly.
2003-01-10 06:52:19 +00:00
tjr
5e6eecbdf0
Document clearerr_unlocked(), feof_unlocked(), ferror_unlocked()
...
and fileno_unlocked().
2003-01-10 06:22:28 +00:00
tjr
87092eb373
Add a manual page for flockfile(), ftrylockfile(), and funlockfile().
2003-01-10 05:34:11 +00:00
tjr
f07524edbc
Document getc_unlocked(), getchar_unlocked(), putc_unlocked(),
...
and putchar_unlocked().
2003-01-10 04:56:20 +00:00
tjr
b4a40863e5
Add function versions of getchar_unlocked(), getc_unlocked(),
...
putchar_unlocked(), putc_unlocked(), feof_unlocked(), ferror_unlocked(),
clearerr_unlocked(), and fileno_unlocked(). The first four are required
by POSIX. The rest are provided for consistency.
2003-01-10 04:35:08 +00:00
tjr
cce4ee0815
Remove an unused variable: mbresult.
2003-01-07 06:20:47 +00:00
tjr
2785027057
#include <stdlib.h> for free()'s prototype.
2003-01-07 06:17:13 +00:00
tjr
0c0f5aecab
Note that the printf(3) and scanf(3) family of functions don't deal with
...
multibyte characters in the format string correctly.
2003-01-06 06:19:19 +00:00
tjr
d0b52ce8cc
#include "local.h" to make __svfscanf()'s prototype visible.
2003-01-03 23:27:27 +00:00
tjr
c1a0e9934f
Reset the stream orientation to 0 (unoriented) in freopen(), as required
...
by the C standard.
2003-01-03 12:27:19 +00:00
ru
4979ab8d81
mdoc(7) police: Deal with self-xrefs.
2002-12-24 13:41:48 +00:00
tjr
08218617f4
Document the fact that the printf() family of functions return negative
...
values (EOF in our case) on error, and some of the possible errno values
in an Errors section.
PR: 39257
2002-12-20 08:28:10 +00:00
tjr
9b26000e8d
C99 standardised the vscanf() family of functions, update Standards
...
section to reflect this.
2002-12-20 07:46:01 +00:00
tjr
80abd67f59
Write the message to stderr, not file descriptor 2, so that perror()
...
writes to the correct stream if stderr has been redirected with freopen().
2002-12-19 09:53:26 +00:00
tjr
93b0a6ff83
Use strerror_r() to format the error message so that strerror()'s static
...
buffer does not get clobbered.
ISO/IEC 9899:1999 7.21.6.2 3:
"The implementation shall behave as if no library function calls the
strerror function."
2002-12-19 09:50:10 +00:00
ru
51fe7c1a88
mdoc(7) police: "The .Fa argument.".
2002-12-19 09:40:28 +00:00
ru
863465c1ab
mdoc(7) police: Fixed abuses of the .Ar and .Em macros.
2002-12-18 13:33:04 +00:00
ru
8746d263e1
mdoc(7) police: "The .Fn function".
2002-12-18 12:45:11 +00:00
ru
c3c9add94c
mdoc(7) police: tiny nits.
...
Approved by: re
2002-12-09 14:11:37 +00:00
ru
ea13b9803b
Consistently mark std(in|out|err) with .Dv, because that's how they
...
are marked up in stdio(3), and because they are defined expressions
of type "FILE *".
Approved by: re
2002-12-04 18:57:46 +00:00
ru
a4483b8cb5
mdoc(7) police: markup overhaul.
...
Approved by: re
2002-12-04 17:49:15 +00:00
ru
3f859aa2ab
mdoc(7) police: formatting nits.
...
Approved by: re
2002-11-29 15:57:50 +00:00
ru
40e2359f4b
libc_r wasn't so tied to libc for 22 months.
2002-11-18 09:50:57 +00:00
imp
e8dd838bf1
bde points out that the LIBC_MAJOR macro doesn't exist and requests
...
that we not use it here. In its place I've put a comment about the
current state of play.
Submitted by: bde
2002-11-14 14:06:14 +00:00
imp
58ac802ff1
Restore Peter's version of static __sF. There's too much pain for it
...
to be static for 5.0. I may remove this for 5.1 or 5.2. No more
binaries or libarires will be generated with __sF starting as of
yesterday. Originally the plan had been to eliminate this for 5.0,
but we didn't get the __std{in,out,err}p changes merged into -stable
until yesterday (rather than in September 2001 like it should have
been). Given that didn't happen on time, we can't do the other part
of the scheme now.
# Please do not change this without talking to me first.
2002-11-10 08:44:38 +00:00
alfred
e08a3f47cf
Backout "compatibility hack" for __sF.
...
Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter)
2002-11-04 03:23:56 +00:00
alfred
c9d42873f8
Provide a hook to make __sF visible outside of libc for commercial apps
...
if WANT_COMPAT4_STDIO is defined when compiling libc.
Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
2002-11-02 19:47:53 +00:00
tjr
7d29f30b2b
No need to include floatio.h here: vfscanf() no longer uses anything
...
it defines.
2002-11-01 05:13:01 +00:00
alfred
91ccc1d808
Make __sF static. This can not be allowed to exist in 5.x.
2002-10-31 01:54:27 +00:00
tjr
36a8c7e6f5
Cross-reference putc(3).
2002-10-28 10:35:18 +00:00
tjr
61dd08c523
The ORIENTLOCK macro is no longer needed since all functions use
...
FLOCKFILE/FUNLOCKFILE explicitly.
2002-10-25 07:01:56 +00:00
tjr
a80071534e
Cross-reference fmtcheck(3).
2002-10-20 03:56:37 +00:00
peter
90a2f4ba9a
Give in on the __sF stuff. I have a better fix in mind that is future
...
proof, but this should buy me some time for now.
2002-10-19 22:28:07 +00:00
tjr
6507d2b5f5
Indent code example with one tab, not two, for consistency with the rest.
2002-10-19 13:48:45 +00:00
tjr
4e85c855b3
Fix off-by-one error when pushing back a multibyte sequence in
...
wide character class (%l[) and wide string (%ls) conversions.
2002-10-17 13:04:00 +00:00
tjr
fa470876dd
Make part of the previous change clearer; check flags for SUPPRESS directly
...
instead of checking whether we're using a temporary buffer.
2002-10-17 12:06:29 +00:00
tjr
235c4480d3
The field width for single-byte string conversions (%c, %s, %[) is the
...
maximum number of bytes that may be stored in the array, not the maximum
number of wide characters to read. The wording of the standard unfortunately
does not make this clear.
2002-10-17 12:02:36 +00:00
tjr
0d7bae1697
Count field width correctly for suppressed multibyte fields (%*lc,
...
%*ls, %*l[).
2002-10-16 14:07:08 +00:00