summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* Fix style and wording bugs introduced in my last commit.Chris Costello2002-06-181-11/+9
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=98392
* o Move more information from BUGS into SECURITY CONSIDERATIONS andChris Costello2002-06-151-50/+56
| | | | | | | | | | | condense the redundant bits. o Provide an example for using snprintf over sprintf. This may be supplemented with an asprintf() example soon. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=98241
* Include information on the dangers of passing a user-supplied string asChris Costello2002-06-131-0/+21
| | | | | | | | | | | a format string. This will later on be changed to a reference to the FreeBSD Security Architecture after it has been committed. PR: docs/39320 Sposnored by: DARPA, NAI Labs Notes: svn path=/head/; revision=98194
* Grammar fix: "contents" is plural.Archie Cobbs2002-05-311-2/+2
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=97651
* mdoc(7) police: markup nits.Ruslan Ermilov2002-05-301-43/+53
| | | | Notes: svn path=/head/; revision=97570
* mdoc(7) police: fix markup for types.Ruslan Ermilov2002-05-291-4/+4
| | | | Notes: svn path=/head/; revision=97466
* Assume __STDC__, remove non-__STDC__ code.Alfred Perlstein2002-05-2812-141/+2
| | | | | | | Submitted by: keramida Notes: svn path=/head/; revision=97407
* Correct a check for NUL.Robert Drehmel2002-05-271-1/+1
| | | | | | | Spotted by: bde Notes: svn path=/head/; revision=97357
* - Move the loop conditional into the "for" header.Robert Drehmel2002-05-271-19/+17
| | | | | | | | | | | - Remove redundant "? :" construct. style(9): - Place a space after return statements. - Compare pointers to NULL. - Do not use ! to compare a character to nul. Notes: svn path=/head/; revision=97345
* Avoid wandering over the beginning of the actual bufferRobert Drehmel2002-05-231-1/+1
| | | | | | | | | | if the passed template string contains only 'X' characters. Submitted by: Mark Andrews <marka@isc.org> (patch modified) PR: 38402 Notes: svn path=/head/; revision=97168
* Clarify that the value of getc() etc. is an unsigned char convertedTony Finch2002-05-151-0/+4
| | | | | | | | | | | to an int (as per the C standard) i.e. it can be passed straight to isalpha() etc. Approved by: dwmalone (mentor) MFC after: 3 days Notes: svn path=/head/; revision=96675
* Implement several of the c99 updates to scanf(3):Bill Fenner2002-04-202-140/+220
| | | | | | | | | | | | | | | | - New length modifiers: hh, j, ll, t, z. Still to do: - %C, %S, %lc, %ls (wide character support) - %a/%A (exact hex representation of floating-point numbers) Removed old compatability equivalents: - %D for %ld, %O for %lo, %X for %lx, %E and %F for %le & %lf (these were buggy anyway, since they should have represented %Le & %Lf). - %[unknown uppercase char] for %ld, %[unknown lowercase char] for %d Notes: svn path=/head/; revision=95137
* scanf.3 has an obsolete ``this release''.Tom Rhodes2002-04-101-7/+0
| | | | | | | | PR: 35610 MFC after: 2 days Notes: svn path=/head/; revision=94384
* Fix the style of the SCM ID's.David E. O'Brien2002-03-224-1/+3
| | | | | | | I believe have made all of libc .h's as consistent as possible. Notes: svn path=/head/; revision=92991
* Fix the style of the SCM ID's.David E. O'Brien2002-03-2268-251/+137
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove multi-line __P() usage.David E. O'Brien2002-03-221-5/+5
| | | | Notes: svn path=/head/; revision=92941
* Remove __P() usage.David E. O'Brien2002-03-2111-39/+39
| | | | Notes: svn path=/head/; revision=92905
* Remove 'register' keyword.David E. O'Brien2002-03-2123-56/+56
| | | | Notes: svn path=/head/; revision=92889
* Don't refer the reader to look for a word that doesn't exist anywhereDima Dorfman2002-03-101-1/+3
| | | | | | | | | | else in the page. PR: 35623 Submitted by: Gary W. Swearingen <swear@blarg.net> Notes: svn path=/head/; revision=91995
* mdoc(7) police:Ruslan Ermilov2002-01-093-3/+6
| | | | | | | Stop abusing the .%J macro for where the .Pa macro should have been used. Notes: svn path=/head/; revision=89138
* All information from the "BUGS" section not belonging in "SECURITYChris Costello2002-01-062-48/+34
| | | | | | | | | | CONSIDERATIONS" moved to "COMPATIBILITY". Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=88973
* Add new "SECURITY CONSIDERATIONS" sections.Chris Costello2002-01-063-0/+48
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=88971
* Fix some style bugsAlexey Zelkin2001-12-171-15/+18
| | | | | | | Prompted by: mike Notes: svn path=/head/; revision=88057
* Also fix cases when thousands separator should be put before number. ForAlexey Zelkin2001-12-131-2/+4
| | | | | | | | example before for grouping sequence "\003\003" number 123456 was formated as ",123,456", now "123,456". Notes: svn path=/head/; revision=87818
* Respect locale while handling of \' flag.Alexey Zelkin2001-12-131-22/+63
| | | | | | | | | | | | | In original version grouping was hardcoded. It assumed that thousands separator should be inserted to separate each 3 numbers. I.e. grouping string "\003" was assumed for all cases. In correct case (per POSIX) vfprintf should respect locale defined non-monetary (LC_NUMERIC category) grouping sequence. Also simplify thousands_sep handling. Notes: svn path=/head/; revision=87815
* mdoc(7) police: Minor formatting nits and optimizations to rev. 1.34.Ruslan Ermilov2001-12-121-57/+67
| | | | Notes: svn path=/head/; revision=87735
* * localeconv() usage is not FLOATING_POINT specific anymore (due to "'" flagAlexey Zelkin2001-12-071-3/+3
| | | | | | | | addition) so move locale.h inclusion out of FLOATING_POINT ifdef's. * add more comments Notes: svn path=/head/; revision=87490
* Remove blank line.Bill Fenner2001-12-071-1/+0
| | | | Notes: svn path=/head/; revision=87478
* Implement several of the c99 updates to printf(3):Bill Fenner2001-11-302-211/+458
| | | | | | | | | | | | | | | | | | | - New length modifiers: hh, j, t, z. - New flag: '. Note that %'f is not yet implemented. - Use "inf"/"nan" for efg formats, "INF"/"NAN" for EFG formats. - Implemented %q in terms of %ll; if "quad_t" is not "long long" %q will break. Still to do: - %C, %S, %lc, %ls (wide character support) - %'f (thousands in integer portion of %f) - %a/%A (exact hex representation of floating-point numbers) Garrett Wollman wrote the first version of the vfprintf.c update; Mike Barcroft wrote the first version of the printf.3 changes. Notes: svn path=/head/; revision=87113
* Back out national digits support, POSIX explicetely disallows it:Andrey A. Chernov2001-11-291-53/+55
| | | | | | | | | | | | | | The definition of character class digit requires that only ten characters -the ones defining digits- can be specified; alternate digits (for example, Hindi or Kanji) cannot be specified here. However, the encoding may vary if an implementation supports more than one encoding. The definition of character class xdigit requires that the characters included in character class digit are included here also and allows for different symbols for the hexadecimal digits 10 through 15. Notes: svn path=/head/; revision=87078
* Don't ever assume that isdigit() is always subset of isxdigit()Andrey A. Chernov2001-11-281-1/+1
| | | | Notes: svn path=/head/; revision=87042
* Allow national (non-ASCII) digitsAndrey A. Chernov2001-11-281-55/+53
| | | | Notes: svn path=/head/; revision=87037
* mdoc(7) police: sort xrefs.Ruslan Ermilov2001-11-201-2/+2
| | | | Notes: svn path=/head/; revision=86657
* Cross-reference the fdopen and fileno manpages.Murray Stokely2001-11-142-1/+3
| | | | | | | | PR: docs/31866 Submitted by: W. Campbell <wcampbel@botbay.net> Notes: svn path=/head/; revision=86352
* In > LONG_MAX test use sseek return value and not _offset which can be notAndrey A. Chernov2001-10-251-3/+4
| | | | | | | active. Notes: svn path=/head/; revision=85513
* Help to recover from bad seek (i.e. negative or too big) happens beyondAndrey A. Chernov2001-10-242-5/+12
| | | | | | | | our pre-check control. Do the same way as refill.c does when it set __SERR, i.e. clear read and ungetc buffers. Clear EOF flag too. Notes: svn path=/head/; revision=85418
* Back out read buffer invalidating via __SMOD.Andrey A. Chernov2001-10-232-7/+2
| | | | | | | | It was correct, but not needed because internal buffer cleared on each seek outside of it. Notes: svn path=/head/; revision=85396
* Change comment explaining another usage of __SMODAndrey A. Chernov2001-10-231-2/+2
| | | | Notes: svn path=/head/; revision=85394
* Disallow fseek() optimization in internal read buffer, if pointer is moved byAndrey A. Chernov2001-10-231-0/+5
| | | | | | | | seek. It means that beginning of read buffer becomes not the same as current file position. Notes: svn path=/head/; revision=85391
* Fixed style bugs in previous commit.Bruce Evans2001-10-151-15/+15
| | | | Notes: svn path=/head/; revision=84962
* Make this compile on ia64.Doug Rabson2001-10-141-25/+46
| | | | Notes: svn path=/head/; revision=84922
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-0120-23/+23
| | | | Notes: svn path=/head/; revision=84306
* 1) If __SAPP stream is not seekable, remove __SAPP flag on first call insteadAndrey A. Chernov2001-09-071-3/+10
| | | | | | | | | | | | of repeating unsuccessful lseek call on each write (original stdio bug). 2) Save errno accross _sseek call in _swrite to not touch it in case write success (original stdio bug). 3) Add _sseek error checking back, but only for __SOPT mode now. Notes: svn path=/head/; revision=83211
* For now just back out seek error checking in __SAPP case, it cause problemsAndrey A. Chernov2001-09-071-2/+2
| | | | | | | | | with non-seekable streams. Now here is what here was originally, but it is ugly, producing unneded seek syscall on each non-seekable stream write. I'll think about proper solution later. Notes: svn path=/head/; revision=83177
* When __SOPT is cleared, clear __SOFF too.Andrey A. Chernov2001-09-031-1/+1
| | | | | | | NOTE: original stdio bug. Notes: svn path=/head/; revision=82839
* Re-arrange my funopen(3) fix to minimize differences with original stdio code,Andrey A. Chernov2001-09-036-83/+91
| | | | | | | | | no functional changes. Add fp->_offset optimization in _SAPP+_SOPT case Notes: svn path=/head/; revision=82838
* Internal seeks are overoptimized. They should remember fp->_offset only forAndrey A. Chernov2001-09-022-3/+1
| | | | | | | | | | plain regular files, i.e. files with __SOPT flag set. Fix it, so ftell(stdout) always returns the same as lseek(1, 0, 1) now. NOTE: this bug was in original stdio code Notes: svn path=/head/; revision=82827
* Fix bug in off_t overflow checking: if fp->_offset overflows, just removeAndrey A. Chernov2001-09-021-5/+3
| | | | | | | | __SOFF flag (i.e. we don't have offset) instead of returning EOVERFLOW. It allows again continious reading from non-stop stream. Notes: svn path=/head/; revision=82818
* Typo seek(2) -> lseek(2)Andrey A. Chernov2001-09-021-1/+1
| | | | Notes: svn path=/head/; revision=82810
* Move all stdio internal flags processing and setting out of __sread(),Andrey A. Chernov2001-09-029-55/+89
| | | | | | | | | | | | | __swrite() and __sseek() to higher level. According to funopen(3) they all are just wrappers to something like standard read(2), write(2) and lseek(2), i.e. must not touch stdio internals because they are replaceable with any other functions knows nothing about stdio internals. See example of funopen(3) usage in sendmail sources f.e. NOTE: this is original stdio bug, not result of my range checkin added. Notes: svn path=/head/; revision=82807