summaryrefslogtreecommitdiffstats
path: root/libc/stdio/printf.c
Commit message (Collapse)AuthorAgeFilesLines
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-181-2/+0
| | | | | | | | sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-201-2/+2
|
* make DODEBUG=y happy, update sysdeps/common/* copyrightPeter S. Mazinger2006-01-141-1/+1
|
* hidden_def/hidden_proto: convert all users (I hope) termios split, add some ↵Peter S. Mazinger2006-01-141-3/+6
| | | | missing headers, other jump relocs removed
* Implement all needed hidden *printf and correct vasprintf, thx blindvtPeter S. Mazinger2005-12-091-2/+3
|
* New stdio core. Should be more maintainable. Fixes a couple of bugs.Manuel Novoa III2004-02-111-3255/+4
| | | | | | | | 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.
* Quick fix to make sure vfprintf always checks stream orientation whenManuel Novoa III2003-09-231-0/+19
| | | | wchar support is enabled.
* Implement vsnprintf (old_vfprintf only) and vsnscanf when uClibc isManuel Novoa III2003-09-061-16/+80
| | | | | | | | 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.
* Fix precision bug for %g conversion specifier when using %f style.Manuel Novoa III2003-09-011-3/+4
|
* Add a new *scanf implementation, includeing the *wscanf functions.Manuel Novoa III2003-08-011-327/+824
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* The big thing is locale dependent collation support.Manuel Novoa III2002-12-201-4/+15
| | | | Also added outdigit support and (legacy) YESSTR/NOSTR support.
* Fix an ifdef mismatch.Manuel Novoa III2002-11-271-2/+2
|
* Ok... here's the summary:Manuel Novoa III2002-11-221-377/+757
| | | | | | | | | | | | | | Hopefully locale support will build when cross compiling now. Collation is still not supported, but that's what I'm currently working on. In the next couple of days, I'll probably put up a couple of files for download that will save people the trouble of generating all the glibc locales. Added *wprintf functions, although they currently don't support floating point. That will be fixed when I rewrite _dtostr... or possibly before. Added the wcsto{inttype} functions. Added iconv() and a mini iconv utility. The require locale support and only provide for conversions involving the various unicode encodings { UCS-4*, UCS-2*, UTF-32*, UTF-16*, UTF-8 }, the 8-bit codesets built with the locale data, and the internal WCHAR_T.
* Add printf wchar support for %lc (%C) and %ls (%S).Manuel Novoa III2002-11-041-14/+99
| | | | | | | | | | | | | Require printf format strings to be valid multibyte strings beginning and ending in their initial shift state, as per the stds. Fixed a bug in _wchar_wcsntoutf8s(). Don't store wcs position if dst is NULL. Also, introduce an awful hack into _wchar_wcsntoutf8s() and wcsrtombs() in order to support %ls in printf. See comments below for details. Change behaviour of wc<->mb functions when in the C locale. Now they do a 1-1 map for the range 0x80-UCHAR_MAX. This is for backwards compatibility and consistency with the stds requirements that a printf format string by a valid multibyte string beginning and ending in it's initial shift state.
* It was easy enough to respect locale-specific decimal point for printfManuel Novoa III2002-11-031-2/+15
| | | | | floating point output, so at least implement that. But grouping will have to wait for the rewrite of _dtostr.
* Implement locale-specific grouping in printf for base 10 integer conversionsManuel Novoa III2002-11-031-5/+19
| | | | | when the grouping flag "'" is specified. Grouping for floating point values may wait until I do a rewrite of the floating pt to string code...
* Fix a silly typo for ManuelEric Andersen2002-10-291-1/+1
| | | | -Erik
* Fix a problem in vasprintf (reported by vodz a while back) when builtManuel Novoa III2002-10-291-14/+35
| | | | | | without custom stream support. In that case, it is necessary to do a va_copy. Note: The affected code is not built in the stock config. Also, make sure each va_copy has a matching va_end, as required by C99.
* Fix two problems with printf that showed up in the python 2.2.1 tests;Manuel Novoa III2002-08-171-1/+10
| | | | One involving %o and one involving %f.
* __fsetlocking() and FILE field user_locking were completely broken. :-(Manuel Novoa III2002-08-131-0/+4
| | | | | | 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.
* Revert commit by davidm to printf.c that initialized conv_numManuel Novoa III2002-08-121-4/+4
| | | | | | | | | needlessly. To do so increases the generated code size with bcc. Eliminate duplicate define warnings in wstring.c. Fix potentially broken preprocessor comparisons. The preprocessor converts integers to maximal signed type, so inequality comparisons involving UINTMAX_MAX, ULLONG_MAX, and (if no long long) ULONG_MAX were potentially broken.
* Fix a number of compile time warnings so that uClibc will build with -Werror ↵David McCullough2002-08-091-1/+1
| | | | | | using a 3.0.4 version of the sh-linux-gcc compiler.
* Attempt to clean up the strerror_r situation.Manuel Novoa III2002-07-071-1/+1
|
* Enable WCHAR support for C/POSIX stub locales.Manuel Novoa III2002-07-031-19/+53
| | | | | | Implemented unformatted wide i/o functions. (ungetwc still needs testing) Fix a few bugs in wchar.c. Modifications for bcc/elks support.
* Fix perror() and printf("%m") to not call strerror(), as required by theManuel Novoa III2002-06-181-1/+1
| | | | | | | | | standards. Temporarily added a utility function to wrap Erik's strerror_r so that "Unknown error xxx" strings can be generated for errno's which cause strerror_r to fail. That utility function will eventually be merged in with the strerror/strerror_r functions when I change over to optionallly mmap'ing the system error strings to provide for lower mem comsumption on non-MMU platforms, as well as locale-specific system error messages.
* Revert Erik's patch to vasprintf and fix the real issue.Manuel Novoa III2002-06-111-1/+0
| | | | | The writer for the stream returned by open_memstream was supposed to keep the buffer nul-terminated. I apparently left out a statement.
* This patch from Rik Faith <faith@alephnull.com> fixes a potentiallyEric Andersen2002-06-111-0/+1
| | | | | | | non-NULL terminated string problem that could result from the use of open_memstream(). Manuel may have a better solution, but this one works for me, since with this plus the popen fix I can now run things like gdb properly. Thanks Rik!
* Several bugfixes for problems that showed up on alphaEric Andersen2002-05-121-1/+1
| | | | -Erik
* Adjust preprocessor logic to initialize QUAL_CHARS correctly for Erik's alphaManuel Novoa III2002-05-111-10/+32
| | | | | port. Also, explicitly use the macro versions of isdigit and isspace in the printf and scanf code.
* Fix an arg promotion handling bug in _do_one_spec for %c reportedManuel Novoa III2002-04-021-2/+9
| | | | by Ilguiz Latypov <ilatypov@superbt.com>.
* Forget to initialize thread locks for fake files. Thanks Erik.Manuel Novoa III2002-04-011-0/+12
|
* Add in a knob to disable %m supportEric Andersen2002-03-221-0/+12
| | | | -Erik
* Apply Miles Bader's missing __va_copy() fix.Manuel Novoa III2002-03-131-0/+11
|
* Fix another O_LARGEFILE bug. Also, I forget to make floating point optionalManuel Novoa III2002-03-121-9/+32
| | | | in the new printf code.
* Deal with cvs "feature"... or is that cvs _user_...Manuel Novoa III2002-03-121-0/+2033
|
* Swap in the new stdio code.Manuel Novoa III2002-03-121-713/+0
|
* Fix printf so that %p outputs "(nil)" for (void *) 0, to match glibc behavior.Manuel Novoa III2001-06-131-11/+20
|
* Fix printf handling of %p to prepend "0x" since output is in hex.Manuel Novoa III2001-06-131-0/+1
| | | | | Note: glibc output for (void *)0 is "(nil)" while uClibc output is "0". Does anyone have a preference?
* A couple of printf fixes from Johan Adolfsson (johan.adolfsson@axis.com).Manuel Novoa III2001-05-071-23/+31
|
* Since Erik apparently wants def/undef vs def 1/0...Manuel Novoa III2001-03-191-26/+26
|
* Test for Config features using features.h.Manuel Novoa III2001-03-181-27/+27
|
* Delete a stray character that hopped into the file...Manuel Novoa III2001-03-131-1/+1
|
* Fix a buglet regarding floating point output for ?nprintf functions.Manuel Novoa III2001-02-281-1/+2
|
* stdio mostly rewritten... passes lots of tests now.Manuel Novoa III2001-02-271-29/+28
| | | | printf now supports long double, plus some bug fixes.
* Lots of stdio cleanups. Several bug fixes, addition of a number of functionsManuel Novoa III2001-02-191-13/+28
| | | | | to supplement macros in stdio.h, change perror to use stdio package instead of "write". Also add back in weak stdio initialization for static lib case.
* Add vdprintf function. Note: will be rewritten to check if file descriptor ↵Manuel Novoa III2001-02-151-0/+11
| | | | has an associated FILE to avoid bad interactions with buffered output, but needed for busybox right now and that implementation has the same bug.
* Fix a couple of bugs in printf. Add floating pt output for doubles. Yeah!Manuel Novoa III2001-01-301-5/+33
| | | | | Modified stdio/Makefile to build printf.c according to Config values for HAS_FLOATS and HAS_LONG_LONG.
* Really fixed 0-pad bug this time. ;-) Code-size reductions if sizeof(int) andManuel Novoa III2001-01-281-54/+62
| | | | sizeof(long) equal. printf # flag now works for b (binary) specifier.
* Fixed (hopefully) 0-pad bug in printf. Added asprintf function. ReworkedManuel Novoa III2001-01-271-30/+70
| | | | the *s*printf functions to no longer use a static fake file.
* Cannot portably pass a short via va_args, since it will beEric Andersen2001-01-121-2/+2
| | | | | | internally converted to an int on many platforms. So make it be an int explicitly and call that good enough. -Erik