freebsd-dev/lib/libc/stdio
Pietro Cerutti 646b68f04d - Remove underscores from the internal structure name, as it doesn't collide
with the user's namespace.

- Correct size and position variables type from long to size_t.

- Do not set errno to ENOMEM on malloc failure, as malloc already does so.

- Implement the concept of "buffer data length", which mandates what SEEK_END
  refers to and the allowed extent for a read.

- Use NULL as read-callback if the buffer is opened in write-only mode.
  Conversely, use NULL as write-callback when opened in read-only mode.

- Implement the handling of the ``b'' character in the mode argument. A binary
  buffer differs from a text buffer (default mode if ``b'' is omitted) in that
  NULL bytes are never appended to writes and that the "buffer data length"
  equals to the size of the buffer.

- Remove shall from the man page. Use indicative instead. Also, specify that
  the ``b'' flag does not conform with POSIX but is supported by glibc.

- Update the regression test so that the ``b'' functionality and the "buffer
  data length" concepts are tested.

- Minor style(9) corrections.

Suggested by:	jilles
Reviewed by:	cognet
Approved by:	cognet
2013-01-31 16:39:50 +00:00
..
_flock_stub.c Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into 2008-04-17 22:17:54 +00:00
asprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
clrerr.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
dprintf.c Add dprintf() and vdprintf() from POSIX.1-2008. Like getline(), 2009-03-04 03:38:51 +00:00
fclose.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fclose.c Take the spinlock around clearing of the fp->_flags in fclose(3), which 2012-04-24 17:51:36 +00:00
fcloseall.c Oops, correct the weak reference (s/fclose/fcloseall). 2006-04-22 16:47:59 +00:00
fdopen.c libc: Allow setting close-on-exec in fopen/freopen/fdopen. 2012-11-30 23:51:33 +00:00
feof.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
ferror.3 Better wording for clearing EOF indicator. 2009-01-28 14:38:41 +00:00
ferror.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
fflush.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fflush.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fgetc.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fgetln.3 - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(), 2009-02-28 06:00:58 +00:00
fgetln.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fgetpos.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fgets.3 Remove reference to non-existent FreeBSD Security Architecture 2012-05-09 17:27:49 +00:00
fgets.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fgetwc.c Previously, vfscanf()'s wide character processing functions were 2012-04-29 16:28:39 +00:00
fgetwln.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fgetwln.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
fgetws.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fgetws.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
fileno.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
findfp.c Take the spinlock around clearing of the fp->_flags in fclose(3), which 2012-04-24 17:51:36 +00:00
flags.c libc: Allow setting close-on-exec in fopen/freopen/fdopen. 2012-11-30 23:51:33 +00:00
floatio.h Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
flockfile.3
fmemopen.c - Remove underscores from the internal structure name, as it doesn't collide 2013-01-31 16:39:50 +00:00
fopen.3 - Remove underscores from the internal structure name, as it doesn't collide 2013-01-31 16:39:50 +00:00
fopen.c Fix a leak in the recent fixes for file descriptors > SHRT_MAX. In the 2008-04-22 17:03:32 +00:00
fprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
fpurge.c Only set _w to 0 when the file stream is not currently reading. Without 2012-05-30 04:06:38 +00:00
fputc.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fputs.3 Grammer correction from: emaste 2007-04-19 14:01:04 +00:00
fputs.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fputwc.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
fputws.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fputws.c As noted by Peter Jeremy, r234528 only partially fixed the infinite 2012-04-21 07:31:27 +00:00
fread.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fread.c Give a less silly response to a silly request. 2010-01-10 14:30:30 +00:00
freopen.c libc: Allow setting close-on-exec in fopen/freopen/fdopen. 2012-11-30 23:51:33 +00:00
fscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
fseek.3 Add rewind() to the list of functions which may fail and set errno 2007-06-18 02:13:04 +00:00
fseek.c Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into 2008-04-17 22:17:54 +00:00
fsetpos.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ftell.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
funopen.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
funopen.c Fix many "function declaration isn't a prototype" warnings in libc. 2009-12-05 19:31:38 +00:00
fvwrite.c Eliminate dead store. 2009-11-25 04:21:42 +00:00
fvwrite.h Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fwalk.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fwide.3
fwide.c Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into 2008-04-17 22:17:54 +00:00
fwprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
fwrite.c Give a less silly response to a silly request. 2010-01-10 14:30:30 +00:00
fwscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
getc.3 Remove unnecessary quoting and markup, add missing punctuation. 2010-01-08 22:02:42 +00:00
getc.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
getchar.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
getdelim.c Better glibc compatibility for getline/getdelim: 2009-10-04 19:43:36 +00:00
getline.3 The getline function returns the number of characters read, not 2012-12-01 15:25:41 +00:00
getline.c - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(), 2009-02-28 06:00:58 +00:00
gets.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getw.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getwc.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getwc.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
getwchar.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
glue.h Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
local.h Previously, vfscanf()'s wide character processing functions were 2012-04-29 16:28:39 +00:00
makebuf.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
Makefile.inc Add fmemopen(3), an interface to get a FILE * from a buffer in memory, along 2013-01-30 14:59:26 +00:00
mktemp.3 Remove outdated comment of seven years 2012-03-04 16:44:04 +00:00
mktemp.c In _gettemp(), check that the length of the path doesn't exceed 2010-02-28 13:31:29 +00:00
perror.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
printf_l.3 Add two new locale-specific man pages: 2012-05-23 17:13:30 +00:00
printf-pos.c Remove two unused variables, left over from the refactoring in r180104. 2010-12-02 13:40:21 +00:00
printf.3 Clarify that the ' flag is an apostrophe. 2012-11-08 02:01:04 +00:00
printf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
printfcommon.h Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
printflocal.h The argument corresponding to %zn is supposed to be an ssize_t *, not 2009-03-02 04:07:58 +00:00
putc.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
putc.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
putchar.c Expose FILE's internals to the world again in all their glory. Restore 2008-05-05 16:03:52 +00:00
puts.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
putw.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
putwc.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
putwc.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
putwchar.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
refill.c Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into 2008-04-17 22:17:54 +00:00
remove.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
remove.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rewind.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rget.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
scanf_l.3 Correct double "the the" 2012-09-14 21:28:56 +00:00
scanf.3 Minor mdoc nits. 2012-05-12 20:27:13 +00:00
scanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
setbuf.3 Fix small documentation mistakes. 2012-04-28 21:50:30 +00:00
setbuf.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setbuffer.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setvbuf.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
snprintf.c If the size passed to {,v}s{w,n}printf is larger than INT_MAX+1 2012-04-21 06:10:18 +00:00
sprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
sscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
stdio.3 Add dprintf() and vdprintf() from POSIX.1-2008. Like getline(), 2009-03-04 03:38:51 +00:00
stdio.c Retire the __fgetcookie(), __fgetpendout(), and __fsetfileno() accessors 2008-05-05 16:14:02 +00:00
swprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
swscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
Symbol.map Add fmemopen(3), an interface to get a FILE * from a buffer in memory, along 2013-01-30 14:59:26 +00:00
tempnam.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tmpfile.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tmpnam.3 mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the 2010-05-13 12:07:55 +00:00
tmpnam.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ungetc.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ungetc.c Next stage of stdio cleanup: Retire __sFILEX and merge the fields back into 2008-04-17 22:17:54 +00:00
ungetwc.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ungetwc.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vasprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vdprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vfprintf.c If the size passed to {,v}s{w,n}printf is larger than INT_MAX+1 2012-04-21 06:10:18 +00:00
vfscanf.c Remove incorrect __restrict qualifier on several pointers 2012-04-30 11:28:17 +00:00
vfwprintf.c If the size passed to {,v}s{w,n}printf is larger than INT_MAX+1 2012-04-21 06:10:18 +00:00
vfwscanf.c Remove incorrect __restrict qualifier on several pointers 2012-04-30 11:28:17 +00:00
vprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vsnprintf.c If the size passed to {,v}s{w,n}printf is larger than INT_MAX+1 2012-04-21 06:10:18 +00:00
vsprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vsscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vswprintf.c If the size passed to {,v}s{w,n}printf is larger than INT_MAX+1 2012-04-21 06:10:18 +00:00
vswscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vwprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
vwscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
wbuf.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
wprintf.3 mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the 2010-05-13 12:07:55 +00:00
wprintf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
wscanf.3 Minor mdoc nits. 2012-05-12 20:27:13 +00:00
wscanf.c Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
wsetup.c Set the error indicator on an attempt to write to a read-only stream. 2009-01-08 06:38:06 +00:00
xprintf_errno.c Make the %V{is} extension handle a NULL pointer like %s does: output "(null)" 2006-01-25 12:45:24 +00:00
xprintf_float.c Add an extensible version of our *printf(3) implementation to libc 2005-12-16 18:56:39 +00:00
xprintf_hexdump.c Add an extensible version of our *printf(3) implementation to libc 2005-12-16 18:56:39 +00:00
xprintf_int.c Explicitely use a "signed char" instead of a "char", for those archs where 2005-12-22 14:23:54 +00:00
xprintf_quote.c Fix the %Q printf extension to behave as expected 2006-03-02 08:53:45 +00:00
xprintf_str.c Add an extensible version of our *printf(3) implementation to libc 2005-12-16 18:56:39 +00:00
xprintf_time.c Because we call __printf_out() with a on-stack buffer, also call 2011-03-06 19:47:46 +00:00
xprintf_vis.c Make the %V{is} extension handle a NULL pointer like %s does: output "(null)" 2006-01-25 12:45:24 +00:00
xprintf.c The register_printf_render_std() function expects regular string. 2012-07-04 17:35:07 +00:00