Jacques Vidrine
e0554a531f
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
Mike Makonnen
e5b9245bfa
Fix use of an uninitialized pointer introduced in a previous revision.
...
Approved by: markm (mentor)(implicit)
2003-02-06 01:08:19 +00:00
Tim J. Robbins
56b9200d1f
Back out previous. Many people disagreed with removing the warning.
2003-01-30 23:32:53 +00:00
Tim J. Robbins
8137227111
Remove runtime warning about gets().
2003-01-30 12:00:26 +00:00
Tim J. Robbins
21d4d23958
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
Tim J. Robbins
21a1863da8
Remove part of my stateful locale patch that slipped into the previous rev.
2003-01-26 11:45:54 +00:00
Tim J. Robbins
c297498757
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
Tim J. Robbins
2c19171bc1
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
Tim J. Robbins
83bb3b4979
Add missing word to "Return Values" section.
2003-01-13 01:29:14 +00:00
Tim J. Robbins
c24891e9e2
The macro versions of putc() and putchar() are gone.
2003-01-10 07:47:12 +00:00
Tim J. Robbins
9031030003
There is no macro version of getc() anymore.
2003-01-10 07:45:24 +00:00
Tim J. Robbins
72c9dabbb7
Bring the list of function-like macros up to date with reality.
2003-01-10 07:38:38 +00:00
Alfred Perlstein
d2b9b6b10c
spell multiple correctly.
2003-01-10 06:52:19 +00:00
Tim J. Robbins
4549f62011
Document clearerr_unlocked(), feof_unlocked(), ferror_unlocked()
...
and fileno_unlocked().
2003-01-10 06:22:28 +00:00
Tim J. Robbins
4d844c09ac
Add a manual page for flockfile(), ftrylockfile(), and funlockfile().
2003-01-10 05:34:11 +00:00
Tim J. Robbins
cbee408df1
Document getc_unlocked(), getchar_unlocked(), putc_unlocked(),
...
and putchar_unlocked().
2003-01-10 04:56:20 +00:00
Tim J. Robbins
a5b0089e65
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
Tim J. Robbins
16fdde11b7
Remove an unused variable: mbresult.
2003-01-07 06:20:47 +00:00
Tim J. Robbins
0b4b7b65ed
#include <stdlib.h> for free()'s prototype.
2003-01-07 06:17:13 +00:00
Tim J. Robbins
e2b090f34f
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
Tim J. Robbins
43a240930c
#include "local.h" to make __svfscanf()'s prototype visible.
2003-01-03 23:27:27 +00:00
Tim J. Robbins
276ba5b4fa
Reset the stream orientation to 0 (unoriented) in freopen(), as required
...
by the C standard.
2003-01-03 12:27:19 +00:00
Ruslan Ermilov
facc67676f
mdoc(7) police: Deal with self-xrefs.
2002-12-24 13:41:48 +00:00
Tim J. Robbins
4aca04ee5c
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
Tim J. Robbins
5a7405be50
C99 standardised the vscanf() family of functions, update Standards
...
section to reflect this.
2002-12-20 07:46:01 +00:00
Tim J. Robbins
37d2356335
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
Tim J. Robbins
a207a8e3f1
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
Ruslan Ermilov
2efeeba554
mdoc(7) police: "The .Fa argument.".
2002-12-19 09:40:28 +00:00
Ruslan Ermilov
5c564bae0a
mdoc(7) police: Fixed abuses of the .Ar and .Em macros.
2002-12-18 13:33:04 +00:00
Ruslan Ermilov
1fae73b137
mdoc(7) police: "The .Fn function".
2002-12-18 12:45:11 +00:00
Ruslan Ermilov
a9a15f3ea4
mdoc(7) police: tiny nits.
...
Approved by: re
2002-12-09 14:11:37 +00:00
Ruslan Ermilov
ae82896268
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
Ruslan Ermilov
898f520da8
mdoc(7) police: markup overhaul.
...
Approved by: re
2002-12-04 17:49:15 +00:00
Ruslan Ermilov
1798791d24
mdoc(7) police: formatting nits.
...
Approved by: re
2002-11-29 15:57:50 +00:00
Ruslan Ermilov
c51d717f0c
libc_r wasn't so tied to libc for 22 months.
2002-11-18 09:50:57 +00:00
Warner Losh
cf04ed1bdf
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
Warner Losh
c906b66373
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 Perlstein
ac1cc6ee11
Backout "compatibility hack" for __sF.
...
Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter)
2002-11-04 03:23:56 +00:00
Alfred Perlstein
0fc25b925d
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
Tim J. Robbins
14ffdae94d
No need to include floatio.h here: vfscanf() no longer uses anything
...
it defines.
2002-11-01 05:13:01 +00:00
Alfred Perlstein
c313cb2abf
Make __sF static. This can not be allowed to exist in 5.x.
2002-10-31 01:54:27 +00:00
Tim J. Robbins
ae95ea1a26
Cross-reference putc(3).
2002-10-28 10:35:18 +00:00
Tim J. Robbins
79db40061f
The ORIENTLOCK macro is no longer needed since all functions use
...
FLOCKFILE/FUNLOCKFILE explicitly.
2002-10-25 07:01:56 +00:00
Tim J. Robbins
9619813de9
Cross-reference fmtcheck(3).
2002-10-20 03:56:37 +00:00
Peter Wemm
d7dd6ae7ec
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
Tim J. Robbins
118bb75e02
Indent code example with one tab, not two, for consistency with the rest.
2002-10-19 13:48:45 +00:00
Tim J. Robbins
0145ba86d1
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
Tim J. Robbins
63b01047f4
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
Tim J. Robbins
bd25c6f476
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
Tim J. Robbins
35739e072b
Count field width correctly for suppressed multibyte fields (%*lc,
...
%*ls, %*l[).
2002-10-16 14:07:08 +00:00