Commit Graph

84 Commits

Author SHA1 Message Date
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
mikel 37ee5d07f0 xref lseek(2) instead of seek(2); PR lib/2750
also note fpos_t/off_t discrepancy.
1997-01-23 08:10:04 +00:00
perry 49f0a0ae54 fix pr-2664, second param to fgets is int not size_t, from SAITOH Masanobu 1997-01-17 02:38:19 +00:00
cgd 316aac5b98 pull in local.h for prototypes. first arg to __sflags() is const char * 1996-12-20 20:26:00 +00:00
mouse b88c4afb8d Apply PR 2751 - writefn's second arg is const char *, not char *. 1996-11-07 09:23:10 +00:00
explorer 5b3a9aad8d Cute little bug with operator precedence in our stdio code. It appears
that flushing wasn't done right when input buffers were refilled, due
to a check like
	if (foo == _A | _B) which, since _A and _B are both != 0, always
evaluates to true.

Found by proven@cygnus.com
1996-08-13 07:54:00 +00:00
pk 204be49cb4 typo: DV -> Dv 1996-05-05 19:21:20 +00:00
mycroft 0fd4b530e0 Change suggested by Chris Torek to fix problem freopen()ing with a closed
file descriptor.
1996-05-04 19:25:19 +00:00
jtc da8d0ce8e0 Add explict function return types 1996-03-29 23:29:06 +00:00
jtc 0bcc20d745 Fix typo in funopen prototype; Reported by Noriyuki Soda in PR #1954 1996-01-17 01:42:55 +00:00
jtc b01f461032 Remove trailing comma from cross reference list. 1995-07-03 22:49:10 +00:00
jtc 615fb07b15 The C Standard says that printf's format string is a multi-byte
character string.  NA1 says that the 99 characters required by the
Standard have representations in the initial state which are one byte
long and do not alter the state.

Thus we can safely break apart the format string with mbtowc() until
we reach a '%' character, and the process format directive characters
one by one.

We really shouldn't be using mbtowc(), rather mbrtowc() (which takes a
mbstate-t argument) but we don't have the NA1 functions implemented
yet.  This is safe, because even when we do we're not likely to
support multi-byte character encodings that use shift states.
1995-05-02 19:52:41 +00:00
jtc 2ef4abe78f change second arg of fgets() from size_t to int 1995-03-25 02:50:04 +00:00
jtc 4255068068 Removed const qualifier from ftell's FILE * argument. It's not ANSI,
and the recent change to flush output causes it to be changed.
1995-03-22 18:17:24 +00:00
jtc 3b29974599 Added "long long" support %ll{d,x,o,i}. 1995-03-22 00:56:55 +00:00
jtc 38937f73d0 flush so that the offset will be correct on streams opened in
append mode (from chris torek).
1995-03-05 06:56:09 +00:00
cgd 3d5508dc07 mktemp.c belongs here, not gen/Makefile.inc 1995-02-25 17:06:28 +00:00
cgd 708504beb1 when you have a pointer and want to assign to a quad, you must cast it
to long to quiet the compiler.
1995-02-25 07:06:38 +00:00
cgd 9386b82936 when you have a quad and want to assign to a pointer, you must say:
ptr = (ptr_type)(long)quad;
to quiet the compiler.
1995-02-25 07:02:16 +00:00
jtc edead1feee revert 1995-02-02 02:16:48 +00:00
jtc 255db7b26b Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
1995-02-02 02:09:03 +00:00
jtc 389c46c57d Merged with 4.4lite.
Changed to conform to NetBSD's new RCS Id convention.
1995-02-02 01:15:33 +00:00
jtc 7cd7db23c2 imported from 44lite 1995-02-02 00:57:36 +00:00
jtc 6a96a52c80 Handle long doubles.
Like Plauger's implementation in "The Standard C Library", we use strtod(),
which will limit the range of values that can be converter properly if
long double has greater precision or range than double.

We will need a string to long double function to handle this properly, but
this change is better than the previous behavior of ignoring the existance
of long doubles.
1995-01-30 00:45:59 +00:00
jtc f0c0009971 Added support for quad_t and u_quad_t's with the 'q' flag. 1995-01-27 15:20:25 +00:00
jtc 2893ea1742 Removed conflicting "backwards compatibility" code to make scanf
ANSI compliant.
1995-01-26 01:34:44 +00:00
jtc a40e8f9215 Fixed bug with '+' or ' ' flags and precision.
for example, printf("% 6.4d\n", 77) output one two many padding chars.
1995-01-25 11:20:41 +00:00
mycroft 33c7f89b0e Remove useless invocation of the evil getdtablesize(3). 1994-12-30 04:40:13 +00:00
cgd ae9172d6cd specify man pages the new way. 1994-12-22 09:57:51 +00:00
cgd fee4815efc fix pr 594, pointed out by Chuck Silvers. fix taken from 4.4-Lite, rather
than his patch.  (functionally identical, though...)
1994-12-08 22:58:47 +00:00
jtc 14c8a82a15 Fix zero padding when using the # format modifier. 1994-10-20 03:56:56 +00:00
cgd 4d09105f58 needs string.h 1994-10-19 03:18:47 +00:00
jtc e19f10c79b Change size of array passed to __strerror() from 128 to NL_TEXTMAX. 1994-10-06 18:14:53 +00:00
jtc c36fd69bc3 The decimal point character is locale specific. 1994-09-30 02:39:13 +00:00
mycroft e9d5734eb6 Move FLOATING_POINT definition into Makefile.inc. 1994-09-19 04:43:02 +00:00
jtc 0d6ff3aeed Increased the size of char buffer used by perror(); the error strings may
be much longer in some locales.
1994-09-03 05:20:00 +00:00
jtc c7527f8b84 Converted to use link-time warning messages. 1994-07-21 17:13:35 +00:00
cgd 26fc33ba8d _VA_LIST_ -> _BSD_VA_LIST_ 1994-05-22 23:14:07 +00:00
jtc d44d58bfcc Fix typo, from Giles Lean (Fixes bug #248) 1994-05-16 20:15:04 +00:00
mycroft d3972d5149 Get rid of extra calls to strlen(). 1994-04-24 01:05:13 +00:00
mycroft 409eebd101 Print the name of the program using a deprecated function. 1994-04-24 01:01:29 +00:00
cgd 769ce7c7ee fgetln, not fgetline 1994-04-03 01:38:27 +00:00
cgd 1d2110a409 be reasonable and unique. 1994-03-29 10:46:37 +00:00
jtc 719a8083f0 Fix spelling errors. 1994-01-11 00:05:54 +00:00
cgd f45b975fa5 rename fgetline() 1994-01-04 05:36:22 +00:00
cgd 02254e0c37 rename fgetline() and sharpen axe for bostic... 1994-01-04 05:16:44 +00:00
mycroft 4fdb06a4f5 Clean up deleted files. 1994-01-04 05:13:19 +00:00
cgd a18790e65d rename fgetline() and sharpen axe for bostic... 1994-01-04 05:13:16 +00:00
jtc 58f143a599 Add explicit return types to function definitions. 1993-12-31 19:13:47 +00:00
jtc b64dadb1ac #include <string.h> to bring function prototypes into scope. 1993-12-28 19:45:46 +00:00