summaryrefslogtreecommitdiffstats
path: root/libc/stdio/scanf.c
Commit message (Collapse)AuthorAgeFilesLines
* New stdio core. Should be more maintainable. Fixes a couple of bugs.Manuel Novoa III2004-02-111-81/+146
| | | | | | | | Codepaths streamlined. Improved performance for nonthreaded apps when linked with a thread-enabled libc. Minor iconv bug and some locale/thread related startup issues fixed. These showed up in getting a gcj-compiled java helloworld app running. Removed some old extension functions... _stdio_fdout and _stdio_fsfopen.
* Fix a couple of 'declaration after statement' errors.Manuel Novoa III2003-12-141-1/+1
|
* Ugh... EOF handling by scanf was completely broken. :-( Regretably,Manuel Novoa III2003-09-221-67/+66
| | | | | | | | I got my mind fixed in one mode and didn't comply with the standards. Things should be fixed now, but comparision testing is difficult when glibc's scanf is broken and they stubbornly refuse to even acknowledge that it is... even when confronted by specific examples from the C99 standards and from an official C standard defect report.
* Fix a problem reported by Atsushi Nemoto <anemo@mba.ocn.ne.jp>Manuel Novoa III2003-09-131-3/+7
| | | | for environments where long and long long are the same size.
* Implement vsnprintf (old_vfprintf only) and vsnscanf when uClibc isManuel Novoa III2003-09-061-13/+83
| | | | | | | | configured with non-buffered stdio and non-wchar mode. Fix a couple of bugs that showed up in minimalist configurations. Update old_vfprintf to handle size qualifiers on the integer and %n conversions. It now passed the glibc printf tests with the exception of a floating point rounding difference.
* scanf %lc,%ls,%l[ would always set mb_fail on eof or error,Manuel Novoa III2003-08-181-8/+22
| | | | | even when just starting a new mb char. wscanf would incorrectly unget in certain situations.
* Add a new *scanf implementation, includeing the *wscanf functions.Manuel Novoa III2003-08-011-527/+1843
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should be standards compliant and with several optional features, including support for hexadecimal float notation, locale awareness, glibc-like locale-specific digit grouping with the `'' flag, and positional arg support. I tested it pretty well (finding several bugs in glibc's scanf in the process), but it is brand new so be aware. The *wprintf functions now support floating point output. Also, a couple of bugs were squashed. Finally, %a/%A conversions are now implemented. Implement the glibc xlocale interface for thread-specific locale support. Also add the various *_l(args, locale_t loc_arg) funcs. NOTE!!! setlocale() is NOT threadsafe! NOTE!!! The strto{floating point} conversion functions are now locale aware. The also now support hexadecimal floating point notation. Add the wcsto{floating point} conversion functions. Fix a bug in mktime() related to dst. Note that unlike glibc's mktime, uClibc's version always normalizes the struct tm before attempting to determine the correct dst setting if tm_isdst == -1 on entry. Add a stub version of the libintl functions. (untested) Fixed a known memory leak in setlocale() related to the collation data. Add lots of new config options (which Erik agreed to sort out :-), including finally exposing some of the stripped down stdio configs. Be careful with those though, as they haven't been tested in a long time. (temporary) GOTCHAs... The ctype functions are currently incorrect for 8-bit locales. They will be fixed shortly. The ctype functions are now table-based, resulting in larger staticly linked binaries. I'll be adding an option to use the old approach in the stub locale configuration.
* Bug fix from Peter Kjellerstedt <peter.kjellerstedt@axis.com>. vfscanf wasManuel Novoa III2003-07-171-1/+9
| | | | | not setting the FILE bufread member to flag the end of the buffer. Also, do not set bufgetc member if getc macro support is disabled.
* Sorry. Changed this while fixing the last bug and forgot to change itManuel Novoa III2003-05-231-1/+1
| | | | back. Unfortunately, none of my test cases caught it.
* Fix (hopefully) scanf behavior for nul bytes in the stream when processingManuel Novoa III2003-05-151-6/+13
| | | | | | | %c, %s, and %[ specifiers. Note that scanf is undergoing rewrite so I didn't bother optimizing this. I did run all my regression tests though. Set EOF correctly for fmemopen on readonly streams. I really need to check what glibc behavior is for the various open modes though.
* Patch from Tero_Lyytik�inen <tero@paravant.fi> to fix bug in matchcharManuel Novoa III2002-09-061-0/+4
| | | | case.
* Kill the HAS_LONG_LONG option. It really did not make a lot ofEric Andersen2002-08-251-16/+0
| | | | | | sense to exclude it, gcc always supports long long, and we never fully excluded long long anyways (off64_t for example). -Erik
* __fsetlocking() and FILE field user_locking were completely broken. :-(Manuel Novoa III2002-08-131-0/+2
| | | | | | I think they're fixed now (I've run a few tests). Note: __fsetlocking() is not threadsafe... but glibc's doesn't appear to be either.
* Enable WCHAR support for C/POSIX stub locales.Manuel Novoa III2002-07-031-19/+19
| | | | | | Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support.
* Adjust preprocessor logic to initialize QUAL_CHARS correctly for Erik's alphaManuel Novoa III2002-05-111-8/+8
| | | | | port. Also, explicitly use the macro versions of isdigit and isspace in the printf and scanf code.
* Protect against ctype macros.Manuel Novoa III2002-05-101-4/+6
|
* Forget to initialize thread locks for fake files. Thanks Erik.Manuel Novoa III2002-04-011-0/+4
|
* Modified because of the new str to int funcs.Manuel Novoa III2002-03-131-7/+8
|
* Swap in the new stdio code.Manuel Novoa III2002-03-121-23/+60
|
* Update to accomodate the header file changesEric Andersen2001-09-271-0/+1
|
* Add in changes from philipc@lineo:David McCullough2001-08-091-12/+15
| | | | | | | | | | | | | | | Fix three bugs and bring into line with glibc: 1. The first character read using getc() was being ignored if it was EOF. Normally this is okay because the next getc() returns EOF as well, but for sscanf, this was causing us to skip the null terminator and start scanning whatever happened to be next in memory. 2. %s, %c, and %[ formats now return -1 if EOF is reached before any characters are read, instead of 0. This was causing an infinite loop in diald. 3. Default to base 10 for %i fields if not prefix modifier present.
* Add comment about scanf pushback behavior and glibc difference.Manuel Novoa III2001-05-211-0/+11
|
* Bug fix from Peter Kjellerstedt <Peter.Kjellerstedt@axis.com>.Manuel Novoa III2001-03-231-0/+7
|
* Since Erik apparently wants def/undef vs def 1/0...Manuel Novoa III2001-03-191-8/+8
|
* Test for Config features using features.h.Manuel Novoa III2001-03-181-20/+17
|
* Fix bug with %c... takes care of bug reported with busybox ps.Manuel Novoa III2001-03-151-3/+6
|
* New version of scanf, with floating point support.Manuel Novoa III2001-03-131-378/+545
|
* Hack long long support into scanf. For now, will fail for unsigned long longsManuel Novoa III2001-03-121-3/+20
| | | | | that are greater that long long max, but works well enough to support interface in busybox. Just a temporary measure until scanf.c is rewritten.
* stdio mostly rewritten... passes lots of tests now.Manuel Novoa III2001-02-271-6/+6
| | | | printf now supports long double, plus some bug fixes.
* Some cleanups from Manuel Novoa III <mnovoa3@bellsouth.net>,Eric Andersen2000-11-171-2/+3
| | | | and a bit of extra cleanup in the test makefiles.
* Add in tmpnam() support from David Whedon <dwhedon@gordian.com>,Eric Andersen2000-11-151-10/+3
| | | | rework include/stdio.h, and fix up the resultant damage.
* Bug ugly formatting updateEric Andersen2000-10-091-425/+402
|
* Lots and lots of cleanups.Eric Andersen2000-07-061-27/+27
| | | | -Erik
* Initial revision0_9_1Erik Andersen2000-05-141-0/+536