summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Delete stray reference to vsnprintf().Tim J. Robbins2002-09-211-3/+2
| | | | Notes: svn path=/head/; revision=103740
* Add implementations of the wprintf() family of functions, which performTim J. Robbins2002-09-2110-4/+2434
| | | | | | | formatted wide-character output. Notes: svn path=/head/; revision=103739
* Lock the file once per call and use the unlocked fgetwc()/fputwc() variants.Tim J. Robbins2002-09-202-9/+20
| | | | Notes: svn path=/head/; revision=103678
* Lock and unlock the file once per call and use the unlocked version ofTim J. Robbins2002-09-201-7/+11
| | | | | | | ungetc() instead of having ungetc() recurse on the lock. Notes: svn path=/head/; revision=103677
* Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()Tim J. Robbins2002-09-203-18/+44
| | | | | | | and __fgetwc() which can be used when we know the file is locked. Notes: svn path=/head/; revision=103676
* Implement the %ls and %lc conversions for printing wide character stringsTim J. Robbins2002-09-192-14/+110
| | | | | | | | | and wide characters. These were already documented in the manual page, with an entry mentioning that they were not implemented yet. The XSI %S and %C synoyms have not been added. Notes: svn path=/head/; revision=103633
* Optimise the common case where no special encoding is in use (LC_CTYPE is "C"Tim J. Robbins2002-09-182-8/+48
| | | | | | | | | or "POSIX", other European locales). Use __sgetc() and __sputc() where possible to avoid a wasteful lock and unlock for each byte and to avoid function call overhead. Notes: svn path=/head/; revision=103539
* Logic error in previous: don't exit the loop when an incomplete multibyteTim J. Robbins2002-09-181-1/+1
| | | | | | | sequence is detected. Notes: svn path=/head/; revision=103538
* Reimplement the functionality of fgetrune(), fputrune(), and fungetrune()Tim J. Robbins2002-09-185-25/+61
| | | | | | | | | here in terms of mbrtowc(), wcrtomb(), and the single-byte I/O functions. The rune I/O functions are about to become deprecated in favour of the ones provided by ISO C90 Amd. 1 and C99. Notes: svn path=/head/; revision=103523
* Fix vsnprintf(3) memory leak for size == 0.Maxim Konovalov2002-09-171-0/+6
| | | | | | | | | | PR: bin/36175 Obtained from: OpenBSD Reviewed by: silence on -audit MFC after: 5 days Notes: svn path=/head/; revision=103480