summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* mdoc(7) police: formatting nits.ru2002-11-291-1/+1
| | | | Approved by: re
* libc_r wasn't so tied to libc for 22 months.ru2002-11-181-3/+1
|
* bde points out that the LIBC_MAJOR macro doesn't exist and requestsimp2002-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
* Restore Peter's version of static __sF. There's too much pain for itimp2002-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.
* Backout "compatibility hack" for __sF.alfred2002-11-042-9/+1
| | | | Requested by: Steve Kargl <sgk@troutmask.apl.washington.edu> (submitter)
* Provide a hook to make __sF visible outside of libc for commercial appsalfred2002-11-022-1/+9
| | | | | | if WANT_COMPAT4_STDIO is defined when compiling libc. Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu>
* No need to include floatio.h here: vfscanf() no longer uses anythingtjr2002-11-012-2/+0
| | | | it defines.
* Make __sF static. This can not be allowed to exist in 5.x.alfred2002-10-311-1/+1
|
* Cross-reference putc(3).tjr2002-10-281-0/+1
|
* The ORIENTLOCK macro is no longer needed since all functions usetjr2002-10-251-7/+0
| | | | FLOCKFILE/FUNLOCKFILE explicitly.
* Cross-reference fmtcheck(3).tjr2002-10-201-0/+1
|
* Give in on the __sF stuff. I have a better fix in mind that is futurepeter2002-10-191-1/+1
| | | | proof, but this should buy me some time for now.
* Indent code example with one tab, not two, for consistency with the rest.tjr2002-10-191-8/+8
|
* Fix off-by-one error when pushing back a multibyte sequence intjr2002-10-171-2/+6
| | | | wide character class (%l[) and wide string (%ls) conversions.
* Make part of the previous change clearer; check flags for SUPPRESS directlytjr2002-10-171-7/+7
| | | | instead of checking whether we're using a temporary buffer.
* The field width for single-byte string conversions (%c, %s, %[) is thetjr2002-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.
* Count field width correctly for suppressed multibyte fields (%*lc,tjr2002-10-161-60/+84
| | | | %*ls, %*l[).
* Set the error bit on the stream if an encoding error occurs. Improvetjr2002-10-166-15/+52
| | | | handling of multibyte sequences representing null wide characters.
* Add support for the XSI %C and %S formats, which are the same as %lctjr2002-10-162-0/+24
| | | | and %ls.
* Use a weak reference instead of a macro to make vfscanf an aliastjr2002-10-142-0/+4
| | | | for __vfscanf.
* Ignore TMPDIR if the application is setugid.kris2002-10-131-1/+2
| | | | MFC after: 2 weeks
* Add restrict type-qualifier.mike2002-10-1216-28/+29
|
* Describe the restrictions on seeking on wide character streams, and alsotjr2002-10-121-3/+15
| | | | point out that fseek() clears the ungetwc() buffer.
* Zap the early-adopter transition aid before we get into seriouspeter2002-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.
* Cross-reference between byte and wide-character stdio functions. Removetjr2002-10-107-13/+13
| | | | references to fputwc() and fgetwc() being macros while I'm at it.
* Remove masking macros for getwc(), putwc(), putwchar() and getwchar().tjr2002-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.
* Back out previous, free the buffer when __vfprintf() fails and don't bothertjr2002-09-261-19/+13
| | | | trying to shrink the buffer with realloc() before returning it.
* Back out previous and solve the problems a different way: move va_start/tjr2002-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
* Correctly handle the case where __vfwprintf() fails because it runs outtjr2002-09-261-1/+7
| | | | of memory.
* Sync with OpenBSD: avoid memory leak when __vfprintf() fails because ittjr2002-09-262-24/+39
| | | | runs out of memory, always call va_end.
* Add cross-references between wide character and single-byte charactertjr2002-09-243-2/+6
| | | | versions of printf() and scanf().
* Remove an unneeded call to _sfrefill() that was missed in the conversiontjr2002-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.
* Use the new va_copy macro to copy variable argument lists instead oftjr2002-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
* Add implementations of wscanf() and related functions: fwscanf(), swscanf(),tjr2002-09-239-6/+1530
| | | | | vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide- character versions of the scanf() family of functions.
* Implement the %lc, %ls and %[ conversions, which read sequences of widetjr2002-09-232-16/+137
| | | | | characters, non-whitespace wide character strings and wide character strings in a scanset.
* The character argument for __ungetwc() should be wint_t instead of wchar_t.tjr2002-09-231-1/+1
|
* Add an unlocked version of ungetwc(), __ungetwc(), that __vfwscanf()tjr2002-09-222-9/+22
| | | | will need to use.
* Delete stray reference to vsnprintf().tjr2002-09-211-3/+2
|
* Add implementations of the wprintf() family of functions, which performtjr2002-09-2110-4/+2434
| | | | formatted wide-character output.
* Lock the file once per call and use the unlocked fgetwc()/fputwc() variants.tjr2002-09-202-9/+20
|
* Lock and unlock the file once per call and use the unlocked version oftjr2002-09-201-7/+11
| | | | ungetc() instead of having ungetc() recurse on the lock.
* Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()tjr2002-09-203-18/+44
| | | | and __fgetwc() which can be used when we know the file is locked.
* Implement the %ls and %lc conversions for printing wide character stringstjr2002-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.
* Optimise the common case where no special encoding is in use (LC_CTYPE is "C"tjr2002-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.
* Logic error in previous: don't exit the loop when an incomplete multibytetjr2002-09-181-1/+1
| | | | sequence is detected.
* Reimplement the functionality of fgetrune(), fputrune(), and fungetrune()tjr2002-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.
* Fix vsnprintf(3) memory leak for size == 0.maxim2002-09-171-0/+6
| | | | | | | PR: bin/36175 Obtained from: OpenBSD Reviewed by: silence on -audit MFC after: 5 days
* Convert eight space indents to tabs in the "*" format handling code.tjr2002-09-161-43/+43
|
* Style: One space between "restrict" qualifier and "*".tjr2002-09-0616-24/+24
|
* Print a '-' sign for negative zero. Tested withschweikh2002-08-271-7/+2
| | | | | | | | | | | | | | | | | | | | | #include <stdio.h> int main(void) { printf("%+f\n", -0.0); printf("%+f\n", +0.0); printf("%+f\n", 0.0); return 0; } to output -0.000000 +0.000000 +0.000000 PR: bin/41823 Submitted by: GOTO Kentaro <gotoken@notwork.org> Liked by: bde MFC after: 3 weeks
OpenPOWER on IntegriCloud