summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* #include "local.h" to make __svfscanf()'s prototype visible.Tim J. Robbins2003-01-033-0/+3
| | | | Notes: svn path=/head/; revision=108622
* Reset the stream orientation to 0 (unoriented) in freopen(), as requiredTim J. Robbins2003-01-031-0/+1
| | | | | | | by the C standard. Notes: svn path=/head/; revision=108598
* mdoc(7) police: Deal with self-xrefs.Ruslan Ermilov2002-12-241-1/+1
| | | | Notes: svn path=/head/; revision=108257
* Document the fact that the printf() family of functions return negativeTim J. Robbins2002-12-201-2/+14
| | | | | | | | | | values (EOF in our case) on error, and some of the possible errno values in an Errors section. PR: 39257 Notes: svn path=/head/; revision=108121
* C99 standardised the vscanf() family of functions, update StandardsTim J. Robbins2002-12-201-2/+5
| | | | | | | section to reflect this. Notes: svn path=/head/; revision=108120
* Write the message to stderr, not file descriptor 2, so that perror()Tim J. Robbins2002-12-191-1/+7
| | | | | | | writes to the correct stream if stderr has been redirected with freopen(). Notes: svn path=/head/; revision=108090
* Use strerror_r() to format the error message so that strerror()'s staticTim J. Robbins2002-12-191-1/+4
| | | | | | | | | | | 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." Notes: svn path=/head/; revision=108089
* mdoc(7) police: "The .Fa argument.".Ruslan Ermilov2002-12-195-8/+10
| | | | Notes: svn path=/head/; revision=108087
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.Ruslan Ermilov2002-12-181-2/+2
| | | | Notes: svn path=/head/; revision=108040
* mdoc(7) police: "The .Fn function".Ruslan Ermilov2002-12-185-5/+21
| | | | Notes: svn path=/head/; revision=108037
* mdoc(7) police: tiny nits.Ruslan Ermilov2002-12-091-4/+4
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107707
* Consistently mark std(in|out|err) with .Dv, because that's how theyRuslan Ermilov2002-12-0412-17/+17
| | | | | | | | | | are marked up in stdio(3), and because they are defined expressions of type "FILE *". Approved by: re Notes: svn path=/head/; revision=107619
* mdoc(7) police: markup overhaul.Ruslan Ermilov2002-12-046-14/+22
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107616
* mdoc(7) police: formatting nits.Ruslan Ermilov2002-11-291-1/+1
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107387
* libc_r wasn't so tied to libc for 22 months.Ruslan Ermilov2002-11-181-3/+1
| | | | Notes: svn path=/head/; revision=107052
* bde points out that the LIBC_MAJOR macro doesn't exist and requestsWarner Losh2002-11-141-3/+6
| | | | | | | | | | that we not use it here. In its place I've put a comment about the current state of play. Submitted by: bde Notes: svn path=/head/; revision=106915
* Restore Peter's version of static __sF. There's too much pain for itWarner Losh2002-11-101-1/+4
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=106721
* Backout "compatibility hack" for __sF.Alfred Perlstein2002-11-042-9/+1
| | | | | | | Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter) Notes: svn path=/head/; revision=106396
* Provide a hook to make __sF visible outside of libc for commercial appsAlfred Perlstein2002-11-022-1/+9
| | | | | | | | | if WANT_COMPAT4_STDIO is defined when compiling libc. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> Notes: svn path=/head/; revision=106352
* No need to include floatio.h here: vfscanf() no longer uses anythingTim J. Robbins2002-11-012-2/+0
| | | | | | | it defines. Notes: svn path=/head/; revision=106282
* Make __sF static. This can not be allowed to exist in 5.x.Alfred Perlstein2002-10-311-1/+1
| | | | Notes: svn path=/head/; revision=106230
* Cross-reference putc(3).Tim J. Robbins2002-10-281-0/+1
| | | | Notes: svn path=/head/; revision=106083
* The ORIENTLOCK macro is no longer needed since all functions useTim J. Robbins2002-10-251-7/+0
| | | | | | | FLOCKFILE/FUNLOCKFILE explicitly. Notes: svn path=/head/; revision=105909
* Cross-reference fmtcheck(3).Tim J. Robbins2002-10-201-0/+1
| | | | Notes: svn path=/head/; revision=105498
* Give in on the __sF stuff. I have a better fix in mind that is futurePeter Wemm2002-10-191-1/+1
| | | | | | | proof, but this should buy me some time for now. Notes: svn path=/head/; revision=105491
* Indent code example with one tab, not two, for consistency with the rest.Tim J. Robbins2002-10-191-8/+8
| | | | Notes: svn path=/head/; revision=105448
* Fix off-by-one error when pushing back a multibyte sequence inTim J. Robbins2002-10-171-2/+6
| | | | | | | wide character class (%l[) and wide string (%ls) conversions. Notes: svn path=/head/; revision=105322
* Make part of the previous change clearer; check flags for SUPPRESS directlyTim J. Robbins2002-10-171-7/+7
| | | | | | | instead of checking whether we're using a temporary buffer. Notes: svn path=/head/; revision=105318
* The field width for single-byte string conversions (%c, %s, %[) is theTim J. Robbins2002-10-171-33/+88
| | | | | | | | | 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. Notes: svn path=/head/; revision=105317
* Count field width correctly for suppressed multibyte fields (%*lc,Tim J. Robbins2002-10-161-60/+84
| | | | | | | %*ls, %*l[). Notes: svn path=/head/; revision=105247
* Set the error bit on the stream if an encoding error occurs. ImproveTim J. Robbins2002-10-166-15/+52
| | | | | | | handling of multibyte sequences representing null wide characters. Notes: svn path=/head/; revision=105234
* Add support for the XSI %C and %S formats, which are the same as %lcTim J. Robbins2002-10-162-0/+24
| | | | | | | and %ls. Notes: svn path=/head/; revision=105204
* Use a weak reference instead of a macro to make vfscanf an aliasTim J. Robbins2002-10-142-0/+4
| | | | | | | for __vfscanf. Notes: svn path=/head/; revision=105098
* Ignore TMPDIR if the application is setugid.Kris Kennaway2002-10-131-1/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=105037
* Add restrict type-qualifier.Mike Barcroft2002-10-1216-28/+29
| | | | Notes: svn path=/head/; revision=104989
* Describe the restrictions on seeking on wide character streams, and alsoTim J. Robbins2002-10-121-3/+15
| | | | | | | point out that fseek() clears the ungetwc() buffer. Notes: svn path=/head/; revision=104976
* Zap the early-adopter transition aid before we get into seriousPeter Wemm2002-10-111-4/+1
| | | | | | | | 5.0-R territory, as threatened. This only affects antique 5.0 systems that have not had a 'make world' done for well over a year. Notes: svn path=/head/; revision=104941
* Cross-reference between byte and wide-character stdio functions. RemoveTim J. Robbins2002-10-107-13/+13
| | | | | | | references to fputwc() and fgetwc() being macros while I'm at it. Notes: svn path=/head/; revision=104750
* Remove masking macros for getwc(), putwc(), putwchar() and getwchar().Tim J. Robbins2002-09-284-12/+4
| | | | | | | | | Although there was nothing wrong with getwc() and putwc(), getwchar() and putwchar() assumed that <stdio.h> had been included before <wchar.h>, which is not allowed by the standard. Notes: svn path=/head/; revision=104080
* Back out previous, free the buffer when __vfprintf() fails and don't botherTim J. Robbins2002-09-261-19/+13
| | | | | | | trying to shrink the buffer with realloc() before returning it. Notes: svn path=/head/; revision=104001
* Back out previous and solve the problems a different way: move va_start/Tim J. Robbins2002-09-261-20/+13
| | | | | | | | | | | va_end closer to the __vfprintf() call, free the buffer when __vfprintf() fails and don't bother trying to shrink the buffer with realloc() before returning it. Submitted by: bde Notes: svn path=/head/; revision=104000
* Correctly handle the case where __vfwprintf() fails because it runs outTim J. Robbins2002-09-261-1/+7
| | | | | | | of memory. Notes: svn path=/head/; revision=103997
* Sync with OpenBSD: avoid memory leak when __vfprintf() fails because itTim J. Robbins2002-09-262-24/+39
| | | | | | | runs out of memory, always call va_end. Notes: svn path=/head/; revision=103996
* Add cross-references between wide character and single-byte characterTim J. Robbins2002-09-243-2/+6
| | | | | | | versions of printf() and scanf(). Notes: svn path=/head/; revision=103891
* Remove an unneeded call to _sfrefill() that was missed in the conversionTim J. Robbins2002-09-241-6/+0
| | | | | | | | from vfscanf() to vfwscanf(). It doesn't hurt to have it there, but it's redundant since __fgetwc() will refill the buffer if it needs to. Notes: svn path=/head/; revision=103890
* Use the new va_copy macro to copy variable argument lists instead ofTim J. Robbins2002-09-242-2/+2
| | | | | | | | | | | assignment. This is needed on powerpc but is also more correct for the other ports. Submitted by: grehan Tested on: alpha, i386, sparc64 Notes: svn path=/head/; revision=103876
* Add implementations of wscanf() and related functions: fwscanf(), swscanf(),Tim J. Robbins2002-09-239-6/+1530
| | | | | | | | vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide- character versions of the scanf() family of functions. Notes: svn path=/head/; revision=103856
* Implement the %lc, %ls and %[ conversions, which read sequences of wideTim J. Robbins2002-09-232-16/+137
| | | | | | | | characters, non-whitespace wide character strings and wide character strings in a scanset. Notes: svn path=/head/; revision=103854
* The character argument for __ungetwc() should be wint_t instead of wchar_t.Tim J. Robbins2002-09-231-1/+1
| | | | Notes: svn path=/head/; revision=103853
* Add an unlocked version of ungetwc(), __ungetwc(), that __vfwscanf()Tim J. Robbins2002-09-222-9/+22
| | | | | | | will need to use. Notes: svn path=/head/; revision=103782