Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Feb 9, 2001
1 parent 90feeaa commit f126ef6
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 13 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions locale/programs/linereader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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);

Expand Down
6 changes: 4 additions & 2 deletions locale/programs/linereader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

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

Expand Down
4 changes: 2 additions & 2 deletions manual/libc.texinfo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions manual/stdio.texi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions manual/sysinfo.texi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit f126ef6

Please sign in to comment.