joerg
20fc76af98
Fix escape sequences
2010-04-05 21:35:36 +00:00
joerg
727da1104c
\\ -> \e
2010-04-05 21:33:54 +00:00
joerg
1c3412fa2f
Use .In for header files instead of .Ar Pa and variations.
2010-03-22 19:30:53 +00:00
jruoho
66475d5b9d
Break the (too) big lead paragraph into three smaller ones.
2010-03-22 13:15:54 +00:00
jruoho
67dcd1d1f0
Bump date for previous.
2010-03-21 20:38:20 +00:00
jruoho
341372abaa
Note inttypes(3) also here.
2010-03-21 20:34:52 +00:00
jruoho
61f4a4ebdc
Mention the recommended usage of inttypes(3) when applicable.
2010-03-21 19:55:19 +00:00
joerg
00711901b6
Use a proper char */size_t pair in __sfileext to keep track of the line
...
buffer for fgetln and fgetwln. Simplifies code by dropping the INT_MAX
related logic. Drop conditionals around FREELB, free(NULL) is valid.
2010-01-11 20:39:29 +00:00
christos
b56987f3f3
PR/42466: Yasuoka Masahiko: vsnprintf_ss() causes infinite loop
2009-12-17 15:19:48 +00:00
wiz
6277279df4
Whitespace nit.
2009-12-14 07:29:23 +00:00
dholland
34a411910a
whoops, bump date for previous.
2009-12-14 04:40:29 +00:00
dholland
cd1a57ae6d
Document %ll. Closes PR 42283.
2009-12-14 04:39:29 +00:00
joerg
f65504295d
Fix markup.
2009-12-09 18:06:08 +00:00
roy
c9c21f1ecc
Test against SSIZE_MAX as pointed out by enami tsugutomo.
2009-12-07 21:31:43 +00:00
roy
5eba354808
Pass lint.
2009-12-02 11:14:47 +00:00
roy
7cfa046806
Reinstate __getdelim which does no locking.
...
Callers are now required to FLOCKFILE so they can operate on fp as well.
2009-12-02 09:03:13 +00:00
roy
142091db36
Protect getline.
2009-12-02 08:46:33 +00:00
wiz
9e3ffe49a3
Make HTML-ready, use standard section headers, fix Xr.
2009-12-01 08:15:50 +00:00
roy
3490b83a1f
Protect getdelim when used internally.
2009-12-01 00:52:13 +00:00
roy
755657be4b
Remove __getdelim and just use getdelim.
...
fgetstr now works with strings up to SSIZE_MAX as a result, but may
reallocate buffers needlessly just like it used to when the buffer size
exceeds INT_MAX.
fgetstr converts errno EOVERFLOW to EINVAL on getdelim error.
2009-12-01 00:03:53 +00:00
roy
ec4d484515
Note that callers should use feof(3) or ferror(3) to distinguish between
...
EOF or an error.
2009-11-30 23:23:29 +00:00
roy
4cf0472d7d
Note that EOF returns -1 when no characters are read.
...
Add code example.
2009-11-30 22:51:46 +00:00
christos
cfbb35ed03
revert some of dsl's changes to make things build on i386; he can undo what
...
he wants when he comes back.
2009-10-25 20:44:13 +00:00
dsl
5f1a9bea9e
Lint is differentially far too picky...
...
Remove some warnings that only appear on i386 (not on amd64) and that
for some reason best known to others are deemed fatal for i386.
Making this code 'pass lint' does absolutely nothing for its readability (etc).
2009-10-25 17:09:34 +00:00
dsl
0b807be843
Remove a load of pointless casts - one that even lint doesn't bleat about.
2009-10-24 15:20:15 +00:00
dsl
695bc79994
Check for EOF before erroring fgets() with length <= 0.
...
If length is invalid, set errno = EINVAL and __SERR as well returning NULL.
Should let me close PR/41992.
2009-10-24 14:50:48 +00:00
snj
550147bd6a
Remove 3rd and 4th clauses in christos' license. OK christos.
2009-10-21 01:07:44 +00:00
dsl
40f437887d
Reverse previous, committed by mistake.
2009-10-15 06:19:35 +00:00
roy
5f96926957
Handle errors from getdelim better.
2009-10-15 00:36:24 +00:00
dsl
01a0f8ea84
Change a while () {} into a do {} while() so that fgets(buf, 1, file)
...
detects EOF on an empty file.
Fixes most of PR/41992
2009-10-14 21:25:52 +00:00
roy
6e80fcc98f
Store the allocated buffer against FILE, plugging a memory leak.
...
Fixes PR bin/42183.
2009-10-14 20:54:51 +00:00
roy
86eafd3e05
__getdelim works on strings up to SIZE_MAX - 2 and returns 0 on EOF.
...
getdelim works on strings up to SSIZE_MAX and returns -1 on EOF.
__fgetstr is now just a wrapper around __getdelim and ensures that
the buffer doesn't overflow the one provided by FILE.
__slbexpand is now static in fgetwln as it is the only consumer of that func.
2009-09-24 20:38:53 +00:00
wiz
0e46e32aae
Note some restrictions for getdelim arguments noted by joerg.
...
Bump date.
2009-08-25 16:28:26 +00:00
dsl
f687cf7e68
If the current locale doesn't define the 'thousands' grouping info
...
then use sane defaults (',' every 3 digits).
Fixes PR/40714
2009-08-05 20:46:01 +00:00
roy
6c5916565e
Allow a buffer of SSIZE_MAX + 1 as the returned bytes do not include the NULL.
2009-07-14 18:29:41 +00:00
christos
cfef64a1a4
pass lint
2009-07-14 17:04:32 +00:00
wiz
9400935da7
Fix typo added in previous.
2009-07-13 22:31:59 +00:00
wiz
06601ed792
The character is NUL, the pointer is NULL.
...
Fix a typo.
It's \-1, not -1.
Add "and getline" in a few places.
Add comma in enumeration.
No dot needed in SEE ALSO.
End sentence with a dot.
2009-07-13 22:30:52 +00:00
roy
d4a3cf6a5a
Add implementations for getdelim(3) and getline(3).
2009-07-13 22:19:24 +00:00
joerg
58ad7418e8
No .br after .Sh.
2009-04-09 00:04:34 +00:00
joerg
fd0a2075ae
Fix markup.
2009-03-15 09:26:07 +00:00
christos
eb7fe43718
fix sign comparison warning in debug build.
2009-02-21 17:20:01 +00:00
roy
dbf72b0e6a
printf("%zi\n", (ssize_t)-1); now correcly prints -1 on i386
...
ok: christos
2009-02-20 09:23:37 +00:00
lukem
cfd7bc0451
Fix sign-compare issues.
...
Ensure provided uio_resid >= 0; negative sizes have "interesting"
semantics elsewhere in stdio, so it's better to avoid them.
2009-02-11 23:48:17 +00:00
lukem
5e1ba2f2e6
sign-compare fix
2009-02-05 03:22:37 +00:00
lukem
bc395719cc
sign-compare fix
2009-01-31 06:08:28 +00:00
lukem
e1e343f9f7
sign-compare fix
2009-01-31 00:08:05 +00:00
lukem
957ba389e8
sign-compare fix
2009-01-30 23:46:03 +00:00
christos
461a86f9bd
merge christos-time_t
2009-01-11 02:45:45 +00:00
tnozaki
2af58f1cce
1. reworking PR lib/40317:
...
libnbcompat already contains empty fparseln.lo
so previous fix doesn't work correctly.
i've just added broken fparseln check to configure script.
2. reworking cross build breakage under FreeBSD/MacOS X.
FreeBSD/MacOS X still have public /usr/include/runetype.h
derived from 4.4BSD-Lite. so i renamed out private header from
src/lib/libc/locale/runetype.h to src/lib/libc/locale/runetype_local.h
to solve this problems.
3. fix build breakage when CITRUS=no was set.
2009-01-05 06:11:43 +00:00