summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
AgeCommit message (Collapse)Author
2012-06-01Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),Philip Guenthe
and valloc() are not in the current version, while posix_memalign() mkstemp(), and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'. ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@
2012-05-22Don't misleadingly suggest that fpos_t only needs to be a complex typeMatthew Dempsky
on non-UNIX systems: it's a complex type on Linux, and to be C99 compliant we'll probably need it to be a complex type too.
2012-05-22Document that ftell() may return EOVERFLOW.Matthew Dempsky
Diff from Tim van der Molen.
2012-05-21Fix ftell() to return EOVERFLOW if the file offset is greater thanMatthew Dempsky
LONG_MAX. Also, remove an Alpha-specific optimization that only saves a couple of bytes of code size. ok millert, guenther
2012-04-12document getdelim() and getline(), and a grammar fix whilst here;Jason McIntyre
from Jan Stary ok fgsch
2012-03-21Implement getdelim(3) and getline(3).Federico G. Schwindt
Prompted in a mail to tech@ by Jan Klemkow (j-dot-klemkow-at-wemelug-dot-de) but this is based on NetBSD's implementation instead with some tweaks by me. Further improvements would happen in tree. ok millert@; discussed with many others ports cleanup by naddy@, sthen@. Antti Harri, Gonzalo L. R. and myself.
2012-01-22Credit Keith Sklower and 2BSD for the first implementation of read-writeIngo Schwarze
access; information found in the 2bsd directory of the CSRG archive CDs. feedback and ok jmc@
2012-01-18Add missing header needed by iswspace()Charles Longeau
ok stsp@
2012-01-18Add support for C99 %ls, %lc, and %l[ format directives to scanf(3).Stefan Sperling
Based on code from FreeBSD. Tested by myself (full release/install cycle on i386 and sparc64) and ajacoutot. Man page help from jmc.
2012-01-15Document early history of a few functions specifically mentioned in 2BSDIngo Schwarze
manuals; however, it turned out all of these actually predate 2BSD. All information from http://minnie.tuhs.org/cgi-bin/utree.pl. ok jmc@ sobrado@
2011-11-08Make __svfscanf() the unlocked, core of vfscanf() and use it inPhilip Guenthe
sscanf()/vsscanf() where locking is unnecessary. ok millert@
2011-11-02Sync scanf(3) to wscanf(3), and a few bits the opposite way:Ingo Schwarze
.Fd -> .In, .Li -> .Vt, and remove various other gratuitous differences. feedback and ok stsp@, ok jmc@
2011-10-16Add wscanf(3) and friends. Based on our scanf(3) implementation, with wideStefan Sperling
character support changes based on code from FreeBSD. ok espie guenther; man page help from schwarze
2011-10-02signedness fix; ok millertDarren Tucker
2011-09-03some minor tweaks;Jason McIntyre
2011-09-03make -column lists pretty again;Jason McIntyre
specifically, rewrite them to permit some markup in the column headers, and use "Ta" instead of literal tabs; mandoc does not currently match groff 100%, but a mandoc fix may be some time off, and we've gone enough releases with poorly formatting column lists. in some cases i have rewritten the lists as -tag, where -column made little sense.
2011-07-29missing $ in rcs tag; from Daniel DickmanStuart Henderson
2011-07-06Add support for C99 %ls and %lc format directives, as been documented inStefan Sperling
the vfprintf(3) man page for ages. Based on code from NetBSD/FreeBSD. Prevent ramdisk growth with a maze of #ifdefs. ok robert, no objections deraadt, espie, millert
2011-07-05from Tim van der Molen:Jason McIntyre
- State that ftell() and ftello() return -1 on error rather than just a non-zero value. The latter is not specific enough, because these functions can also return non-zero on success. - For clarity and search-friendliness, don't refer to fgetpos() and fsetpos() as "the others", but mention them by name. ok millert otto
2011-07-03Recognize %a, %A format specifiers, per C99.Martynas Venckus
2011-07-03Properly implement the long double (%Lf) scanf without the precisionMartynas Venckus
loss.
2011-05-30Make printf-like and scanf-like functions marked as such in llib-lc.lnMartynas Venckus
and llib-lwrap.ln databases; so that the lint features doing format strings checks are enabled by default. Looks good to millert@.
2011-05-16remove Xr for a page we don;t yet have; ok stspJason McIntyre
2011-05-09Add a wprintf(3) man page based on FreeBSD's page. Help and ok schwarze jmcStefan Sperling
2011-05-09Always free the multibyte->wchar conversion buffer allocated in __mbsconv().Stefan Sperling
ok matthew dcoppa miod
2011-05-02no need to escape `|'; as discussed with schwartzeJason McIntyre
2011-04-28Bring back wprintf. We've sorted out what to do for gcc2 and gcc3.Stefan Sperling
"Yes, go ahead then" deraadt
2011-04-24Back out wprintf until we've determined what to do for gcc2 and gcc3 arches.Stefan Sperling
2011-04-24Add fwprintf, swprintf, vfwprintf, vswprintf, vwprintf, and wprintf to libc.Stefan Sperling
Based on our vfprintf etc. implementations. Wide character parts based on NetBSD but with lots of macros expanded. Minor bump for libc. ok kettenis espie
2011-01-10tweak previous; ok millertJason McIntyre
2011-01-10mkdtemp() is present in POSIX 1003.1-2008Todd C. Miller
Add a warning about using less than 6 Xs causing an error on some systems
2011-01-07mktemp(3) can be used, but not where mkstemp(3) is an alternative. AlsoNicholas Marriott
trim an inaccurate comment about its future removal. ok deraadt
2010-12-27mktemp(3) (and thus mktemp(1)) no longer use the process ID whenTodd C. Miller
replacing the Xs, it is now purely random. Also replace a use of .Fn that should be .Xr. OK jmc@
2010-12-22Fix out of date comment; no code changeTodd C. Miller
2010-10-17The ssizearg member of union arg is pointless if it isn't of type ssize_tPhilip Guenthe
Noted by Claus Assmann
2010-09-10observe the following spelling:Jason McIntyre
- wide character (noun) - wide-character (adjective) this is the "fix of least resistance", and appears to be in line with posix style; a tiny fix still needed for curses, but i'll mail that upstream;
2010-03-26dispense with some wacky escape sequences;Jason McIntyre
2010-03-22Various improvements, mainly regarding ERRORS.Ingo Schwarze
* Document EINVAL and EEXIST. * Neither mkstemp nor mkdtemp use lstat, but mktemp does. * Documenting ENOTDIR is useless, it is documented in lstat(2), mkdir(2) and open(2), and it's just one thing out of several that could go wrong. * Refer to lstat(2) instead of stat(2), which is actually used here. * State that two of these functions are standardized in the XPG. * Move the sentence about mkdtemp and mkstemps to the new STANDARDS section. * Get rid of the ugly ".So Li X Sc Ns s", just use "Xs" (suggested by jmc@). tweaks and ok jmc@ millert@
2010-03-21When all tried file names already existed, mktemp(3) returned withoutIngo Schwarze
setting errno(2). Behaviour unchanged for mkstemp[s] and mkdtemp. ok guenther deraadt
2010-02-11The previous commit didn't use the first X in the template if thePhilip Guenthe
entire template was Xs. Test suite written now to keep this from happening again. Problem caught by Vadim Zhukov again. ok millert@
2010-02-08Don't underrun the buffer when the template is all X's.Philip Guenthe
Also, remove a duplicate preconditions check. Based on a suggestion by Vadim Zhukov (persgray <at> gmail.com) ok millert@
2010-01-03.Bl always requires .It, even in .Bl -column;Ingo Schwarze
syntax errors found by mandoc(1), also required to fix the mandoc build; feedback and ok jmc@ and sobrado@
2009-11-21Ooops, committed an unbaked changePhilip Guenthe
2009-11-21Several stdio functions were failing to set the stream orientationPhilip Guenthe
to 'narrow' as they should. "looks correct" millert@ "makes sense" blambert@
2009-11-09Fix the handle locking in stdio to use flockfile/funlockfileKurt Miller
internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. committing on behalf of and okay guenther@ now that we have install media space available.
2009-11-08ansifyStefan Sperling
ok deraadt
2009-10-28skip the \' formatting flag, grouping is not implemented; ok deraadt@Christian Weisgerber
2009-10-22Back out previous commit, as it caused too much growth for the installPhilip Guenthe
media to fit
2009-10-21Fix the handle locking in stdio to use flockfile/funlockfilePhilip Guenthe
internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. ok kurt@, earlier version tested by sthen@ and jj@
2009-10-16teach gdtoa & its subroutines that malloc can fail; in which caseMartynas Venckus
ecvt, fcvt, gcvt, *printf, strtof, strtod, strtold act per ieee 1003.1. after these massive changes, remove unused files which would not work now. reported by Maksymilian Arciemowicz; ok theo