summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
Commit message (Collapse)AuthorAgeFilesLines
* Sort cross references.Wolfram Schneider1997-01-207-12/+12
| | | | Notes: svn path=/head/; revision=21907
* Use collate for national [a-z]-like rangesAndrey A. Chernov1997-01-161-8/+13
| | | | | | | Should go in 2.2 Notes: svn path=/head/; revision=21757
* The following patch to lib/libc/stdio implements positional arguments inJordan K. Hubbard1997-01-142-22/+414
| | | | | | | | | | | | a manner consistent with other implementations. Its done in a way that adds only a tiny amount of overhead when positional arguments are not used. I also have a test program to go with this, but don't know where it belongs in the tree. Submitted-By: Bill Fenner <fenner@FreeBSD.ORG> Notes: svn path=/head/; revision=21674
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-1458-58/+58
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* perror () does not prepend ": " for the non-NULL argument "". close PR 1492Wolfram Schneider1996-09-301-1/+1
| | | | | | | | | | Submitted by: Kent Vander Velden <graphix@iastate.edu> Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=18577
* .DV -> .Dv (FOPEN_MAX was invisible).Bruce Evans1996-09-281-1/+1
| | | | Notes: svn path=/head/; revision=18533
* fwopen() argument type mis-describedPaul Traina1996-09-131-1/+1
| | | | | | | Obtained from: NetBSD lib/2751 (der Mouse) Notes: svn path=/head/; revision=18279
* Correctly use .Fn instead of .Nm to reference function namesMike Pritchard1996-08-222-2/+4
| | | | | | | | | | | in a bunch of man pages. Use the correct .Bx (BSD UNIX) or .At (AT&T UNIX) macros instead of explicitly specifying the version in the text in a bunch of man pages. Notes: svn path=/head/; revision=17782
* Update some more man pages to use the .Fx macro.Mike Pritchard1996-08-211-1/+1
| | | | Notes: svn path=/head/; revision=17763
* Fix nasty bracketing/precedence bug. Every time something read (andPeter Wemm1996-08-131-2/+2
| | | | | | | | | | | | refilled) a file that was either line- or un-buffered, all files were flushed. According to the code comment, the flush (according to ANSI) is supposed to happen on write + line buffered output files, not _all_ files. Obtained from: OpenBSD / Theo de Raadt, possibly from proven@cygnus.com Notes: svn path=/head/; revision=17584
* Correct the paramter type of the second argument to fgets.Mike Pritchard1996-08-061-1/+1
| | | | | | | Obtained from: NetBSD-bugs mailing list Notes: svn path=/head/; revision=17456
* Fix some of the problems that bde pointed out to me some time ago.Peter Wemm1996-07-281-7/+16
| | | | | | | | | - buffer expansions were not working right due to a return code botch. - signed types instead of size_t's meant somebody else went and put casts in, I've changed the types to what they should have been. Notes: svn path=/head/; revision=17319
* Suggested by: Bruce Evans, Jeffrey Hsu, Gary PalmerJames Raynard1996-06-2257-50/+317
| | | | | | | | | | | | | | | | | | | | | | | | Added $Id$'s to files that were lacking them (gpalmer), made some cosmetic changes to conform to style guidelines (bde) and checked against NetBSD and Lite2 to remove unnecessary divergences (hsu, bde) One last code cleanup:- Removed spurious casts in fseek.c and stdio.c. Added missing function argument in fwalk.c. Added missing header include in flags.c and rget.c. Put in casts where int's were being passed as size_t's. Put in missing prototypes for static functions. Changed second args of __sflags() inflags.c and writehook() in vasprintf.c from char * to const char * to conform to prototypes. This directory now compiles with no warnings with -Wall under gcc-2.6.3 and with considerably less warnings than before with the ultra-pedantic script I used for testing. (Most of the remaining ones are due to const poisoning). Notes: svn path=/head/; revision=16586
* Code cleanup:-James Raynard1996-06-122-2/+3
| | | | | | | | The usual stuff, adding missing function prototypes, argument types, return values, etc. Notes: svn path=/head/; revision=16338
* Code cleanup:-James Raynard1996-06-126-13/+13
| | | | | | | | | | The usual stuff, adding missing function prototypes, argument types, return values, etc. This directory now compiles with no warnings with -Wall on gcc2.6.3! Notes: svn path=/head/; revision=16337
* Code cleanup:-James Raynard1996-06-127-12/+11
| | | | | | | | | The usual stuff, adding missing function prototypes, argument types, return values, etc. In mktemp.c, convert pid from u_int to pid_t, and get rid of "extern int errno". Notes: svn path=/head/; revision=16336
* Code cleanup:-James Raynard1996-06-125-5/+5
| | | | | | | | The usual stuff, adding missing function prototypes, argument types, return values, etc. Notes: svn path=/head/; revision=16335
* Reword the sentence about the required space for the result string.Joerg Wunsch1996-06-091-1/+1
| | | | | | | Closes PR # 1303.- Notes: svn path=/head/; revision=16241
* Fix bogus MLINKS line from vasprintf change.Jordan K. Hubbard1996-05-291-2/+2
| | | | Notes: svn path=/head/; revision=15976
* add manpage linksWolfram Schneider1996-05-291-1/+2
| | | | | | | | asprintf.3 -> printf.3 vasprintf -> printf.3 Notes: svn path=/head/; revision=15970
* Add an implementation of the gnu-ish asprintf() and vasprintf(). They arePeter Wemm1996-05-274-38/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | not based on gpl'ed code, just prototype and usage. I'm not 100% certain they behave the same while the system is in trouble (eg: malloc() failing) but in those circumstances all bets would be off anyway. These routines work like sprintf() and vsprintf(), except that instead of using a fixed buffer, they allocate memory and return it to the user and it's the user's responsibility to free() it. They have allocate as much memory as they need (and can get), so the size of strings it can deal with is limited only by the amount of memory it can malloc() on your behalf. There are a few gpl'ed programs starting to use this interface, and it's becoming more common with the scares about security risks with sprintf(). I dont like the look of the code that the various programs (including cvs, gdb, libg++, etc) provide if configure can't find it on the system. It should be possible to modify the stdio core code to provide this interface more efficiently, I was more worried about having something that worked and was secure. :-) (I noticed that there was once intended to be a smprintf() routine when our stdio was written for 4.4BSD, but it looks pretty stillborn, and it's intended interface is not clear). Since Linux and gnu libc have this interface, it seemed silly to bring yet another one onto the scene. Notes: svn path=/head/; revision=15931
* Fixed various problems: typos, grammer, missing include filesMike Pritchard1996-05-232-5/+5
| | | | | | | | wrong function type declarations, and wrong argument type declarations. Notes: svn path=/head/; revision=15874
* Fix a typo.Mike Pritchard1996-05-011-1/+1
| | | | Notes: svn path=/head/; revision=15521
* Correct a minor typo. Fixes part of PR#1000.Mike Pritchard1996-04-091-1/+1
| | | | | | | Submitted by: Dave Glowacki <dglo@ssec.wisc.edu> Notes: svn path=/head/; revision=15164
* Added missing section numbers to a bunch of .Xr macros, orMike Pritchard1996-03-274-15/+15
| | | | | | | | converted them into .Fn macros where appropriate. Also fixed up some minor formatting problems. Notes: svn path=/head/; revision=14855
* Removed now-bogus casts that were to hide the inconsistency between theBruce Evans1996-03-271-4/+4
| | | | | | | | | | nonstandard normal version and the standard threaded version. Removed a bogus L in a constant. fpos_t's aren't longs, and casting to fpos_t would be verbose. Notes: svn path=/head/; revision=14840
* Fixed bogus cross references.Bruce Evans1996-03-272-5/+5
| | | | | | | Reviewed by: mpp Notes: svn path=/head/; revision=14839
* Say what happens to the buffer when fgets() returns NULL.Bruce Evans1996-03-271-6/+11
| | | | | | | Fixed bogus cross references and a misordered line. Notes: svn path=/head/; revision=14838
* Since n is int now, sanity check must be n <= 0, not simple n == 0Andrey A. Chernov1996-03-251-1/+1
| | | | Notes: svn path=/head/; revision=14810
* Fix incorrect parameter types.Paul Richards1996-03-242-2/+2
| | | | Notes: svn path=/head/; revision=14790
* The 4.4-lite vfprintf counted the %# hex prefix and the sign inBill Fenner1996-03-201-8/+6
| | | | | | | | | | | the precision; ANSI X3J11 is not crystal clear but certainly says that the precision specifies the number of /digits/, and signs and "0x" aren't really digits. NetBSD already has a similar patch. Notes: svn path=/head/; revision=14727
* Added a little NOTES section explaining that passing in a string thatMike Pritchard1996-02-151-0/+22
| | | | | | | | | | | | | resides in read-only memory is going to cause the program to core dump, and this is commmon with older pre-ANSI C programs. (I've scratched my head over this one at 3 in the morning before while trying to port some ancient program) Suggested by: Gary Kline <kline@tera.com> Notes: svn path=/head/; revision=14099
* Fix even more spelling errors in some more man pages.Mike Pritchard1996-01-301-3/+3
| | | | Notes: svn path=/head/; revision=13750
* Reviewed by: julian and (hsu?)Julian Elischer1996-01-2232-34/+417
| | | | | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations Notes: svn path=/head/; revision=13545
* Fix a variety of minor typos and cross references in a bunch ofMike Pritchard1996-01-201-1/+1
| | | | | | | | | | | man pages. Masanobu Saitoh <msaitoh@spa.is.uec.ac.jp> Giles Lean <giles@nemeton.com.au> <soda@sra.co.jp> Notes: svn path=/head/; revision=13511
* Minor cleanup, #include's and unused vars.Poul-Henning Kamp1995-10-223-1/+5
| | | | | | | Added compile-time warning to an old funky function. Notes: svn path=/head/; revision=11667
* Make a link-time warning for the use of gets().Peter Wemm1995-10-041-0/+3
| | | | | | | | | | IMHO, the run-time warning should come out, but I'm not game to start that fight yet... This uses a feature of the gnu linker. Inspired by: NetBSD Notes: svn path=/head/; revision=11185
* This gets() used \r\n, which is doggish.Bruce Evans1995-09-291-1/+1
| | | | Notes: svn path=/head/; revision=11064
* fgetline does not exist.. fgetln is in it's place. Correct the X-Ref.Peter Wemm1995-08-181-1/+1
| | | | | | | Noticed by: Brian Tao, Bruce Evans Notes: svn path=/head/; revision=10100
* Remove trailing whitespace.Rodney W. Grimes1995-05-304-8/+8
| | | | Notes: svn path=/head/; revision=8870
* Fixed typo.David Greenman1995-05-151-1/+1
| | | | Notes: svn path=/head/; revision=8534
* Obtained from: 1.1.5 (originally by jtc)Bruce Evans1995-04-061-1/+2
| | | | | | | | | | Fix printf("%g", 0.0) - print "0", not "0.". The previous fixes in this area had one non-cosmetic (non-)change that caused this bug. Bruce Notes: svn path=/head/; revision=7649
* Remove `|| flags & ALT == 0' which was an obscure no-op, not aBruce Evans1995-03-121-1/+1
| | | | | | | parenthesization/precedence bug. Notes: svn path=/head/; revision=7036
* Obtained from: 1.1.5. Originally by jtc. Cosmetically changed for thisBruce Evans1995-03-121-15/+23
| | | | | | | | | | | | | | | | | | | | | commit by bde. Fix bugs in floating point formatting. The 4.4lite version is similar to revision 1.3 in old-cvs and is missing all of jtc's fixes in revision 1.4 in old-cvs. Revision 1.2 in ncvs fixed one of the old bugs but introduced at least one new one (for %.0e). old-cvs log: revision 1.4 date: 1993/11/04 19:38:22; author: jtc; state: Exp; lines: +33 -20 My work from NetBSD to make printf() & friends ANSI C compliant. Fixes several bugs in floating point formatting: 1. Trailing zeros were being stripped with %e format. 2. %g/%G formats incorrect. 3. Lots of other nits. Notes: svn path=/head/; revision=7033
* Fix handling of 'e' format floating point so that it prints trailing zerosDoug Rabson1995-01-191-1/+0
| | | | | | | correctly. Notes: svn path=/head/; revision=5707
* Date: Wed, 26 Oct 1994 15:44:49 -0600Nate Williams1994-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | From: Chris Torek <torek@bsdi.com> Here is a semi-official patch (apply to /usr/src/lib/libc/stdio/fseek.c, rebuild libc, install). The current code fails when the seek: - is optimized, and - is to just past the end of the block currently in the buffer, and - is followed by another seek with no intervening read operation, and - the destination of subsequent seek is within the block left in the buffer (seeking to the beginning of a block does not force a read, so the buffer still contains the previous block) so it is indeed rather obscure. I may have a different `final' fix, as this one `loses' the buffer contents on a seek that goes just past the end of the current block. [Footnote: seeks are optimized only on read-only opens of regular files that are buffered by the file's optimal I/O size. This is what you get with fopen(path, "r") and no call to setvbuf().] Obtained from: [ BSDI mailing list ] Notes: svn path=/head/; revision=4169
* First crack at making libc work with the new make macros. It compiles onGarrett Wollman1994-08-051-3/+5
| | | | | | | | my machine, and a simple static (genassym) and shared (sysctl) executable both work. Still to be done: RPCand YP merge. Notes: svn path=/head/; revision=1849
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-2790-0/+10714
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573