summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Convert eight space indents to tabs in the "*" format handling code.Tim J. Robbins2002-09-161-43/+43
| | | | Notes: svn path=/head/; revision=103399
* Style: One space between "restrict" qualifier and "*".Tim J. Robbins2002-09-0616-24/+24
| | | | Notes: svn path=/head/; revision=103012
* Print a '-' sign for negative zero. Tested withJens Schweikhardt2002-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 Notes: svn path=/head/; revision=102499
* o Merge <machine/ansi.h> and <machine/types.h> into a new headerMike Barcroft2002-08-217-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien Notes: svn path=/head/; revision=102227
* Leave room for a trailing NUL not a NULL, that's not an ASCII character.Juli Mallett2002-08-192-2/+2
| | | | Notes: svn path=/head/; revision=102085
* - For compliance with IEEE Std 1003.1-2001, add the 'restrict'Robert Drehmel2002-08-155-17/+11
| | | | | | | | | qualifier to function prototypes and definitions where appropriate using the '__restrict' macro. - Update the manual page. Notes: svn path=/head/; revision=101914
* - Introduce the 'restrict' qualifier to function prototypes andRobert Drehmel2002-08-155-8/+8
| | | | | | | | definitions to comply with IEEE Std 1003.1-2001. - Update the manual pages. Notes: svn path=/head/; revision=101913
* - Add the 'restrict' qualifier to the function definitions andRobert Drehmel2002-08-143-10/+4
| | | | | | | | | | | public prototypes of setbuf(3) and setvbuf(3) using the '__restrict' macro from <sys/cdefs.h> to be compliant with IEEE Std 1003.1-2001. - Replace the K&R with ANSI-C function definitions. - Bring the manual page up-to-date. Notes: svn path=/head/; revision=101889
* Unbreak one of the most confusing breaks of the tree I've seen.Poul-Henning Kamp2002-08-131-1/+2
| | | | | | | The last commit cannot possibly have been tested. Notes: svn path=/head/; revision=101841
* Tidy up SRCS and MAN assignments.Tim J. Robbins2002-08-131-20/+13
| | | | Notes: svn path=/head/; revision=101793
* Remove the Bugs section, which is not relevant to FreeBSD: there is noTim J. Robbins2002-08-131-2/+0
| | | | | | | one-character ungetwc(3) buffer limit. Notes: svn path=/head/; revision=101782
* FreeBSD-ify: use In macro for header files in Synopsis, St C-99 instead ofTim J. Robbins2002-08-134-12/+12
| | | | | | | St C99 in Standards section. Notes: svn path=/head/; revision=101781
* Basic support for wide character I/O: getwc(), fgetwc(), getwchar(),Tim J. Robbins2002-08-1339-12/+846
| | | | | | | putwc(), fputwc(), putwchar(), ungetwc(), fwide(). Notes: svn path=/head/; revision=101776
* Manual pages for fwide(), getwc(), fgetwc(), getwchar(), putwc(), fputwc(),Tim J. Robbins2002-08-124-0/+417
| | | | | | | | | | putwchar(), ungetwc() from NetBSD and Citrus Project, unmodified except for the addition of $FreeBSD$. Obtained from: NetBSD, Citrus Project Notes: svn path=/head/; revision=101732
* Fix typos; each file has at least one s/seperat/separat/Jens Schweikhardt2002-08-111-3/+3
| | | | | | | | | | | | | (I skipped those in contrib/, gnu/ and crypto/) While I was at it, fixed a lot more found by ispell that I could identify with certainty to be errors. All of these were in comments or text, not in actual code. Suggested by: bde MFC after: 3 days Notes: svn path=/head/; revision=101677
* mdoc(7) police: punctuation.Ruslan Ermilov2002-08-091-1/+1
| | | | Notes: svn path=/head/; revision=101578
* Don't claim to fully implement C99 in the STANDARDS section and then disclaimGarrett Wollman2002-07-151-2/+4
| | | | | | | compliance in the BUGS section immediately below. Notes: svn path=/head/; revision=100136
* Note that fseeko() and ftello() are standard in 1003.1-2001.Garrett Wollman2002-07-151-1/+1
| | | | | | | (Prefer the more-encompassing POSIX standard to SUSv2.) Notes: svn path=/head/; revision=100135
* 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