2001-02-09  Ulrich Drepper  <drepper@redhat.com>

	* 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.
This commit is contained in:
Ulrich Drepper 2001-02-09 17:02:23 +00:00
parent 90feeaa2eb
commit f126ef6731
6 changed files with 29 additions and 13 deletions

View File

@ -1,3 +1,15 @@
2001-02-09 Ulrich Drepper <drepper@redhat.com>
* 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 <drepper@redhat.com>
* Makerules (build-shlib): Work around different order of

View File

@ -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);

View File

@ -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"));
}

View File

@ -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

View File

@ -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

View File

@ -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.