This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] wchar stdio patches broke infos


Hi,

The recently applied wchar/stdio patches broke "make info".

Below is a pretty rough patch, which got me building newlib again.

Ralf

Index: libc/stdio/fputws.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/fputws.c,v
retrieving revision 1.1
diff -u -r1.1 fputws.c
--- libc/stdio/fputws.c	10 Dec 2008 23:43:12 -0000	1.1
+++ libc/stdio/fputws.c	12 Dec 2008 11:35:55 -0000
@@ -26,7 +26,7 @@
 
 /*
 FUNCTION        
-<<fputs>>---write a wide character string in a file or stream
+<<fputws>>---write a wide character string in a file or stream
 
 INDEX
 	fputws   
Index: libc/stdio/getwc.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/getwc.c,v
retrieving revision 1.1
diff -u -r1.1 getwc.c
--- libc/stdio/getwc.c	10 Dec 2008 23:43:12 -0000	1.1
+++ libc/stdio/getwc.c	12 Dec 2008 11:35:55 -0000
@@ -24,6 +24,53 @@
  * SUCH DAMAGE.
  */
 
+/*
+FUNCTION
+<<getwc>>---read a character
+
+INDEX
+	getwc
+INDEX
+	_getwc_r
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t getwc(FILE *<[fp]>);
+
+	#include <wchar.h>
+	wchar_t _getwc_r(struct _reent *<[ptr]>, FILE *<[fp]>);
+
+TRAD_SYNOPSIS
+	#include <wchar.h>
+	wchar_t getwc(<[fp]>)
+	FILE *<[fp]>;
+
+	#include <wchar.h>
+	wchar_t _getwc_r(<[ptr]>, <[fp]>)
+	struct _reent *<[ptr]>;
+	FILE *<[fp]>;
+
+DESCRIPTION
+The <<getwc>> function or macro is the wide-character equivalent of
+the <<getc>> function. You can use <<getwc>> to get the next
+wide character from the file or stream identified by <[fp]>.  As a 
+side effect, <<getwc>> advances the file's current position indicator.
+
+The alternate function <<_getwc_r>> is a reentrant version.  The
+extra argument <[reent]> is a pointer to a reentrancy structure.
+
+RETURNS
+The next character cast to <<wint_t>>, unless there is no more
+data, or the host system reports a read error; in either of these
+situations, <<getc>> returns <<WEOF>>.
+
+You can distinguish the two situations that cause an <<EOF>> result by
+using the <<ferror>> and <<feof>> functions.
+
+PORTABILITY
+C99
+*/
+
 #include <_ansi.h>
 #include <reent.h>
 #include <stdio.h>
Index: libc/stdio/getwchar.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/getwchar.c,v
retrieving revision 1.1
diff -u -r1.1 getwchar.c
--- libc/stdio/getwchar.c	10 Dec 2008 23:43:12 -0000	1.1
+++ libc/stdio/getwchar.c	12 Dec 2008 11:35:55 -0000
@@ -56,11 +56,11 @@
 extra argument <[reent]> is a pointer to a reentrancy structure.
 
 RETURNS
-The next wide character cast to <<wint_t>>), unless there is no more
+The next wide character cast to <<wint_t>>, unless there is no more
 data, or the host system reports a read error; in either of these
-situations, <<getwchar>> returns <<EOF>>.
+situations, <<getwchar>> returns <<WEOF>>.
 
-You can distinguish the two situations that cause an <<EOF>> result by
+You can distinguish the two situations that cause an <<WEOF>> result by
 using `<<ferror(stdin)>>' and `<<feof(stdin)>>'.
 
 PORTABILITY
Index: libc/stdio/putwc.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/putwc.c,v
retrieving revision 1.1
diff -u -r1.1 putwc.c
--- libc/stdio/putwc.c	10 Dec 2008 23:43:12 -0000	1.1
+++ libc/stdio/putwc.c	12 Dec 2008 11:35:55 -0000
@@ -24,6 +24,52 @@
  * SUCH DAMAGE.
  */
 
+/*
+FUNCTION
+<<putwc>>---write a wide character
+
+INDEX
+	putwc
+INDEX
+	_putwc_r
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t putwc(wchar_t <[wc]>, FILE *<[fp]>);
+
+	#include <wchar.h>
+	wchar_t _putwc_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
+
+TRAD_SYNOPSIS
+	#include <wchar.h>
+	wchar_t putwc(<[wc]>, <[fp]>)
+	wchar_t <[wc]>;
+	FILE *<[fp]>;
+
+	#include <stdio.h>
+	wchar_t _putwc_r(<[ptr]>, <[wc]>, <[fp]>)
+	struct _reent *<[ptr]>;
+	wchar_t <[wc]>;
+	FILE *<[fp]>;
+
+
+DESCRIPTION
+The <<putwc>> function or macro is the wide-character equivalent of
+the <<putc>> function. It writes the wide-character wc to the file or
+stream identified by <[fp]>.
+
+The alternate function <<_putwc_r>> is a reentrant version.  The
+extra argument <[reent]> is a pointer to a reentrancy structure.
+
+RETURNS
+If successful, <<putwc>> returns its argument <[wc]>.  If an error
+intervenes, the result is <<WEOF>>.  You can use `<<ferror(<[fp]>)>>' to
+query for errors.
+
+PORTABILITY
+C99
+*/
+
 #include <_ansi.h>
 #include <reent.h>
 #include <stdio.h>
Index: libc/stdio/putwchar.c
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/putwchar.c,v
retrieving revision 1.1
diff -u -r1.1 putwchar.c
--- libc/stdio/putwchar.c	10 Dec 2008 23:43:12 -0000	1.1
+++ libc/stdio/putwchar.c	12 Dec 2008 11:35:55 -0000
@@ -49,7 +49,7 @@
 	wchar_t <[wc]>;
 
 DESCRIPTION
-The <<putwchar(>> function or macro is the wide-character equivalent of
+The <<putwchar>> function or macro is the wide-character equivalent of
 the <<putchar>> function. It writes the wide character wc to stdout.
 
 The alternate function <<_putwchar_r>> is a reentrant version.  The
Index: libc/stdio/stdio.tex
===================================================================
RCS file: /cvs/src/src/newlib/libc/stdio/stdio.tex,v
retrieving revision 1.11
diff -u -r1.11 stdio.tex
--- libc/stdio/stdio.tex	10 Dec 2008 23:43:12 -0000	1.11
+++ libc/stdio/stdio.tex	12 Dec 2008 11:35:55 -0000
@@ -211,6 +211,9 @@
 @include stdio/getw.def
 
 @page
+@include stdio/getwc.def
+
+@page
 @include stdio/getwchar.def
 
 @page
@@ -241,6 +244,9 @@
 @include stdio/putw.def
 
 @page
+@include stdio/putwc.def
+
+@page
 @include stdio/putwchar.def
 
 @page

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]