From f126ef6731021d7796f88800eb59106388683280 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Feb 2001 17:02:23 +0000 Subject: [PATCH] Update. 2001-02-09 Ulrich Drepper * locale/programs/linereader.c (get_ident): Stop loop if EOF. Use lr_ungetc to push back last read character. * locale/programs/linereader.h (lr_ungetc): Don't push back is character is EOF. (lr_ignore_rest): Don't warn about garbage if it is really the end of the file. * manual/Makefile: Use ifnottext and not ifinfo to protect Top node definition. --- ChangeLog | 12 ++++++++++++ locale/programs/linereader.c | 4 ++-- locale/programs/linereader.h | 6 ++++-- manual/libc.texinfo | 4 ++-- manual/stdio.texi | 8 ++++---- manual/sysinfo.texi | 8 +++++--- 6 files changed, 29 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 863869d..487029f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-02-09 Ulrich Drepper + + * locale/programs/linereader.c (get_ident): Stop loop if EOF. Use + lr_ungetc to push back last read character. + * locale/programs/linereader.h (lr_ungetc): Don't push back is + character is EOF. + (lr_ignore_rest): Don't warn about garbage if it is really the end + of the file. + + * manual/Makefile: Use ifnottext and not ifinfo to protect Top node + definition. + 2001-02-08 Ulrich Drepper * Makerules (build-shlib): Work around different order of diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c index 5dba62f..9a61428 100644 --- a/locale/programs/linereader.c +++ b/locale/programs/linereader.c @@ -528,7 +528,7 @@ get_ident (struct linereader *lr) ADDC (lr->buf[lr->idx - 1]); while (!isspace ((ch = lr_getc (lr))) && ch != '"' && ch != ';' - && ch != '<' && ch != ',') + && ch != '<' && ch != ',' && ch != EOF) { if (ch == lr->escape_char) { @@ -542,7 +542,7 @@ get_ident (struct linereader *lr) ADDC (ch); } - lr_ungetn (lr, 1); + lr_ungetc (lr, ch); kw = lr->hash_fct (buf, bufact); diff --git a/locale/programs/linereader.h b/locale/programs/linereader.h index 94802fc..27ea124 100644 --- a/locale/programs/linereader.h +++ b/locale/programs/linereader.h @@ -123,7 +123,8 @@ lr_ungetc (struct linereader *lr, int ch) if (lr->idx == 0) return -1; - lr->buf[--lr->idx] = ch; + if (ch != EOF) + lr->buf[--lr->idx] = ch; return 0; } @@ -154,7 +155,8 @@ lr_ignore_rest (struct linereader *lr, int verbose) else ++lr->idx; - if (lr->buf[lr->idx] != '\n' &&lr->buf[lr->idx] != lr->comment_char) + if (lr->buf[lr->idx] != '\n' && ! feof (lr->fp) + && lr->buf[lr->idx] != lr->comment_char) lr_error (lr, _("trailing garbage at end of line")); } diff --git a/manual/libc.texinfo b/manual/libc.texinfo index 684c49d..365cbd9 100644 --- a/manual/libc.texinfo +++ b/manual/libc.texinfo @@ -101,13 +101,13 @@ Foundation. @end titlepage @page -@ifinfo +@ifnottex @node Top, Introduction, (dir), (dir) @top Main Menu This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU C Library Reference Manual}, for Version @value{VERSION} of the GNU C Library. -@end ifinfo +@end ifnottex @include top-menu.texi @include chapters.texi diff --git a/manual/stdio.texi b/manual/stdio.texi index f65e9c2..d6dada1 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -4222,10 +4222,10 @@ This function is declared in the @file{stdio_ext.h} header. @comment stdio_ext.h @comment GNU -@deftypefun size_t __fpending (FILE *@var{stream}) -The @code{__fpending} function returns the number of bytes currently in -the output buffer. This function should not be used on buffers in read -mode or opened read-only. +@deftypefun size_t __fpending (FILE *@var{stream}) The @code{__fpending} +function returns the number of bytes currently in the output buffer. +For wide-oriented stream the measuring unit is wide characters. This +function should not be used on buffers in read mode or opened read-only. This function is declared in the @file{stdio_ext.h} header. @end deftypefun diff --git a/manual/sysinfo.texi b/manual/sysinfo.texi index 1768d01..187314a 100644 --- a/manual/sysinfo.texi +++ b/manual/sysinfo.texi @@ -341,6 +341,7 @@ gets stored. @end menu @node Mount Information, Mount-Unmount-Remount, , Filesystem Handling +@subsection Mount Information For some programs it is desirable and necessary to access information about whether a certain filesystem is mounted and, if it is, where, or @@ -384,7 +385,7 @@ names should always be used. @end menu @node fstab -@subsection The @file{fstab} file +@subsubsection The @file{fstab} file The internal representation for entries of the file is @w{@code{struct fstab}}, defined in @file{fstab.h}. @@ -536,7 +537,7 @@ returns a @code{NULL} pointer. @node mtab -@subsection The @file{mtab} file +@subsubsection The @file{mtab} file The following functions and data structure access the @file{mtab} file. @comment mntent.h @@ -746,7 +747,7 @@ when all options have to be processed one is better off with using the @end deftypefun @node Other Mount Information -@subsection Other (Non-libc) Sources of Mount Information +@subsubsection Other (Non-libc) Sources of Mount Information On a system with a Linux kernel and the @code{proc} filesystem, you can get information on currently mounted filesystems from the file @@ -757,6 +758,7 @@ to date. @node Mount-Unmount-Remount, , Mount Information, Filesystem Handling +@subsection Mount, Unmount, Remount This section describes the functions for mounting, unmounting, and remounting filesystems. -- 2.7.4