freebsd-dev/lib/libc/stdio
Stephen J. Kiernan 8b17691466 The function fwscanf() return value is wrong when encountering an early
matching failure.

According to the Open Group documentation for fwscanf:
"Upon successful completion, these functions shall return the number of
successfully matched and assigned input items; this number can be zero in
the event of an early matching failure."

Without this change, fwscanf would return EOF in the case of an early
matching failure, instead of the proper return value of 0.

This change aligns fwscanf(3) with the implementation in fscanf(3).

PR:		202240
Submitted by:	rajendra.sy@gmail.com
Reviewed by:	jhb, cem
Approved by:	sjg (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13288
2017-12-06 21:12:24 +00:00
..
_flock_stub.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
asprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
clrerr.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
dprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fclose.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fclose.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fcloseall.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fdopen.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
feof.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ferror.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ferror.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fflush.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fflush.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fgetc.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fgetln.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fgetln.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fgetpos.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fgets.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fgets.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fgetwc.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fgetwln.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fgetwln.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fgetws.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fgetws.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fileno.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
findfp.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
flags.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
floatio.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
flockfile.3
fmemopen.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fopen.3 fopen(3): make manlint fixes 2017-05-23 07:08:30 +00:00
fopen.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fopencookie.3 fopencookie(3): declare function pointers in SYNOPSIS correctly 2017-05-23 07:15:57 +00:00
fopencookie.c libc: Add fopencookie(3) wrapper around funopen(3) 2016-05-11 14:38:27 +00:00
fprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fpurge.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fputc.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fputs.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fputs.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fputwc.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fputws.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fputws.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fread.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fread.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
freopen.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fscanf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fseek.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
fseek.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fsetpos.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ftell.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
funopen.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
funopen.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fvwrite.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fvwrite.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fwalk.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fwide.3
fwide.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fwprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
fwrite.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
fwscanf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
getc.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
getc.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
getchar.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
getdelim.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
getline.3 Remove _WITH_GETLINE and _WITH_DPRINTF guards 2016-07-30 01:00:16 +00:00
getline.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
gets.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
getw.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
getwc.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
getwc.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
getwchar.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
glue.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
local.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
makebuf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
Makefile.inc libc: Add fopencookie(3) wrapper around funopen(3) 2016-05-11 14:38:27 +00:00
mktemp.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mktemp.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
open_memstream.3 Fix bunch of .Xrs. 2016-03-28 16:48:28 +00:00
open_memstream.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
open_wmemstream.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
perror.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
printf_l.3 Add missing include files for the printf_l and scanf_l man pages. 2013-11-17 02:03:45 +00:00
printf-pos.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
printf.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
printf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
printfcommon.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
printflocal.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
putc.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
putc.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
putchar.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
puts.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
putw.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
putwc.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
putwc.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
putwchar.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
refill.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
remove.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
remove.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
rewind.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
rget.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
scanf_l.3 Add missing include files for the printf_l and scanf_l man pages. 2013-11-17 02:03:45 +00:00
scanf.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
scanf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
setbuf.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
setbuf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
setbuffer.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
setvbuf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
snprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
sprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
sscanf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
stdio.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
stdio.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
swprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
swscanf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
Symbol.map libc: Actually export fopencookie(3) 2016-05-12 21:30:22 +00:00
tempnam.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
tmpfile.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
tmpnam.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
tmpnam.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ungetc.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ungetc.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ungetwc.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ungetwc.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
vasprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
vdprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
vfprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vfscanf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vfwprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vfwscanf.c The function fwscanf() return value is wrong when encountering an early 2017-12-06 21:12:24 +00:00
vprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vscanf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vsnprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vsprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vsscanf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vswprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
vswscanf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
vwprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
vwscanf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
wbuf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
wprintf.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
wprintf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
wscanf.3 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
wscanf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
wsetup.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
xprintf_errno.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
xprintf_float.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
xprintf_hexdump.c Truncate negative lengths to zero 2017-11-27 09:57:37 +00:00
xprintf_int.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
xprintf_quote.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
xprintf_str.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
xprintf_time.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
xprintf_vis.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
xprintf.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00