1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
1998-03-19 14:28  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/strtok_r.c: Make __strtok_r real name and strtok_r
	weak alias.
	* sysdeps/i386/strtok_r.c: Likewise.

	* sysdeps/libm-i387/i686/s_fdim.S: Make it really work.
	* sysdeps/libm-i387/i686/s_fdimf.S: Likewise.
	* sysdeps/libm-i387/i686/s_fdiml.S: Likewise.
	* sysdeps/libm-i387/i686/s_fmin.S: Likewise.
	* sysdeps/libm-i387/i686/s_fminf.S: Likewise.
	* sysdeps/libm-i387/i686/s_fminl.S: Likewise.

1998-03-19  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* intl/localealias.c: Remove unneeded define for strdup.

1998-03-19 13:45  Ulrich Drepper  <drepper@cygnus.com>

	* manual/argp.texi: Adjust for better TeX output.
	* manual/arith.texi: Likewise.
	* manual/conf.texi: Likewise.
	* manual/filesys.texi: Likewise.
	* manual/header.texi: Likewise.
	* manual/lgpl.texinfo: Likewise.
	* manual/math.texi: Likewise.
	* manual/message.texi: Likewise.
	* manual/pattern.texi: Likewise.
	* manual/process.texi: Likewise.
	* manual/signal.texi: Likewise.
	* manual/socket.texi: Likewise.
	* manual/startup.texi: Likewise.
	* manual/stdio.texi: Likewise.
	* manual/terminal.texi: Likewise.
	* manual/examples/rprintf.c: Likewise.
	* manual/examples/testopt.c: Likewise.
	Patches by Zack Weinberg <zack@rabi.phys.columbia.edu>.

1998-03-19 20:45  Tim Waugh  <tim@cyberelk.demon.co.uk>

	* posix/wordexp.c (parse_param): Don't immediately stop parsing a
	parameter name after seeing a digit if it's enclosed in braces.
This commit is contained in:
Ulrich Drepper
1998-03-19 14:32:08 +00:00
parent 7551a1e510
commit 838e5ffe9e
31 changed files with 213 additions and 123 deletions

View File

@ -1,3 +1,46 @@
1998-03-19 14:28 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/strtok_r.c: Make __strtok_r real name and strtok_r
weak alias.
* sysdeps/i386/strtok_r.c: Likewise.
* sysdeps/libm-i387/i686/s_fdim.S: Make it really work.
* sysdeps/libm-i387/i686/s_fdimf.S: Likewise.
* sysdeps/libm-i387/i686/s_fdiml.S: Likewise.
* sysdeps/libm-i387/i686/s_fmin.S: Likewise.
* sysdeps/libm-i387/i686/s_fminf.S: Likewise.
* sysdeps/libm-i387/i686/s_fminl.S: Likewise.
1998-03-19 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* intl/localealias.c: Remove unneeded define for strdup.
1998-03-19 13:45 Ulrich Drepper <drepper@cygnus.com>
* manual/argp.texi: Adjust for better TeX output.
* manual/arith.texi: Likewise.
* manual/conf.texi: Likewise.
* manual/filesys.texi: Likewise.
* manual/header.texi: Likewise.
* manual/lgpl.texinfo: Likewise.
* manual/math.texi: Likewise.
* manual/message.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/process.texi: Likewise.
* manual/signal.texi: Likewise.
* manual/socket.texi: Likewise.
* manual/startup.texi: Likewise.
* manual/stdio.texi: Likewise.
* manual/terminal.texi: Likewise.
* manual/examples/rprintf.c: Likewise.
* manual/examples/testopt.c: Likewise.
Patches by Zack Weinberg <zack@rabi.phys.columbia.edu>.
1998-03-19 20:45 Tim Waugh <tim@cyberelk.demon.co.uk>
* posix/wordexp.c (parse_param): Don't immediately stop parsing a
parameter name after seeing a digit if it's enclosed in braces.
1998-03-18 Andreas Jaeger <aj@arthur.rhein-neckar.de> 1998-03-18 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* manual/memory.texi (Heap Consistency Checking): Document * manual/memory.texi (Heap Consistency Checking): Document

View File

@ -1,5 +1,5 @@
/* Handle aliases for locale names. /* Handle aliases for locale names.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. the C library, however.
@ -82,12 +82,11 @@ void free ();
because some ANSI C functions will require linking with this object because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */ file and the name space must not be polluted. */
# define strcasecmp __strcasecmp # define strcasecmp __strcasecmp
# define strdup __strdup
# define mempcpy __mempcpy # define mempcpy __mempcpy
# define HAVE_MEMPCPY 1 # define HAVE_MEMPCPY 1
/* We need locking here since we can be called from different palces. */ /* We need locking here since we can be called from different places. */
# include <bits/libc-lock.h> # include <bits/libc-lock.h>
__libc_lock_define_initialized (static, lock); __libc_lock_define_initialized (static, lock);

View File

@ -9,4 +9,4 @@ glibc-*
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs *.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
chapters chapters-incl1 chapters-incl2 summary.texi stamp-* chapters chapters-incl1 chapters-incl2 summary.texi stamp-*
distinfo dir-add.texi distinfo dir-add.texinfo

View File

@ -480,7 +480,8 @@ case ARGP_KEY_ARG:
/* First argument */ /* First argument */
first_arg = @var{arg}; first_arg = @var{arg};
else else
return ARGP_KEY_UNKNOWN; /* Let the next case parse it. */ /* Let the next case parse it. */
return ARGP_KEY_UNKNOWN;
break; break;
case ARGP_KEY_ARGS: case ARGP_KEY_ARGS:
remaining_args = @var{state}->argv + @var{state}->next; remaining_args = @var{state}->argv + @var{state}->next;

View File

@ -1,4 +1,6 @@
@c We need some definitions here. @c We need some definitions here.
@c No we don't, they were done by math.texi. -zw
@ignore
@ifclear cdot @ifclear cdot
@ifhtml @ifhtml
@set cdot <20> @set cdot <20>
@ -19,6 +21,7 @@ x
@end macro @end macro
@end ifclear @end ifclear
@end ifclear @end ifclear
@end ignore
@node Arithmetic, Date and Time, Mathematics, Top @node Arithmetic, Date and Time, Mathematics, Top
@chapter Low-Level Arithmetic Functions @chapter Low-Level Arithmetic Functions

View File

@ -315,6 +315,10 @@ Here are the symbolic constants for use as the @var{parameter} argument
to @code{sysconf}. The values are all integer constants (more to @code{sysconf}. The values are all integer constants (more
specifically, enumeration type values). specifically, enumeration type values).
@c This table runs a bit wide.
@iftex
@indexfonts
@end iftex
@table @code @table @code
@comment unistd.h @comment unistd.h
@comment POSIX.1 @comment POSIX.1
@ -604,7 +608,7 @@ Inquire about the parameter corresponding to @code{_POSIX_TTY_NAME_MAX}.
@comment POSIX.1 @comment POSIX.1
@item _SC_THREAD_DESTRUCTOR_ITERATIONS @item _SC_THREAD_DESTRUCTOR_ITERATIONS
Inquire about the parameter corresponding to Inquire about the parameter corresponding to
@code{_POSIX_THREAD_DESTRUCTOR_ITERATIONS}. @code{_POSIX_THREAD_DESTRUCTOR_@*ITERATIONS}.
@comment unistd.h @comment unistd.h
@comment POSIX.1 @comment POSIX.1
@ -960,6 +964,9 @@ Inquire about the parameter corresponding to @code{NL_SETMAX}.
@item _SC_NL_TEXTMAX @item _SC_NL_TEXTMAX
Inquire about the parameter corresponding to @code{NL_TEXTMAX}. Inquire about the parameter corresponding to @code{NL_TEXTMAX}.
@end table @end table
@iftex
@textfonts
@end iftex
@node Examples of Sysconf @node Examples of Sysconf
@subsection Examples of @code{sysconf} @subsection Examples of @code{sysconf}

View File

@ -977,19 +977,19 @@ They are not yet documented.}
@end deftypevr @end deftypevr
@comment errno.h @comment errno.h
@comment Linux???: Level 2 not synchronized @comment Obsolete: Level 2 not synchronized
@deftypevr Macro int EL2NSYNC @deftypevr Macro int EL2NSYNC
@comment errno ???/45 @comment errno ???/45
@end deftypevr @end deftypevr
@comment errno.h @comment errno.h
@comment Linux???: Level 3 halted @comment Obsolete: Level 3 halted
@deftypevr Macro int EL3HLT @deftypevr Macro int EL3HLT
@comment errno ???/46 @comment errno ???/46
@end deftypevr @end deftypevr
@comment errno.h @comment errno.h
@comment Linux???: Level 3 reset @comment Obsolete: Level 3 reset
@deftypevr Macro int EL3RST @deftypevr Macro int EL3RST
@comment errno ???/47 @comment errno ???/47
@end deftypevr @end deftypevr
@ -1013,7 +1013,7 @@ They are not yet documented.}
@end deftypevr @end deftypevr
@comment errno.h @comment errno.h
@comment Linux???: Level 2 halted @comment Obsolete: Level 2 halted
@deftypevr Macro int EL2HLT @deftypevr Macro int EL2HLT
@comment errno ???/51 @comment errno ???/51
@end deftypevr @end deftypevr

View File

@ -10,7 +10,9 @@ typedef struct
/*@end group*/ /*@end group*/
int int
print_widget (FILE *stream, const struct printf_info *info, va_list *app) print_widget (FILE *stream,
const struct printf_info *info,
va_list *app)
{ {
Widget *w; Widget *w;
char *buffer; char *buffer;

View File

@ -41,7 +41,8 @@ main (int argc, char **argv)
/*@end group*/ /*@end group*/
/*@group*/ /*@group*/
printf ("aflag = %d, bflag = %d, cvalue = %s\n", aflag, bflag, cvalue); printf ("aflag = %d, bflag = %d, cvalue = %s\n",
aflag, bflag, cvalue);
for (index = optind; index < argc; index++) for (index = optind; index < argc; index++)
printf ("Non-option argument %s\n", argv[index]); printf ("Non-option argument %s\n", argv[index]);

View File

@ -86,7 +86,7 @@ Permission to read or search a component of the file name was denied.
@end table @end table
@end deftypefun @end deftypefun
Here is an example showing how you could implement the behavior of GNU's Here is an example showing how you could implement the behavior of GNU's@*
@w{@code{getcwd (NULL, 0)}} using only the standard behavior of @w{@code{getcwd (NULL, 0)}} using only the standard behavior of
@code{getcwd}: @code{getcwd}:
@ -230,17 +230,18 @@ A character device.
A block device. A block device.
@end table @end table
This member is a BSD extension. Each value except DT_UNKNOWN This member is a BSD extension. On systems where it is used, it
corresponds to the file type bits in the @code{st_mode} member of corresponds to the file type bits in the @code{st_mode} member of
@code{struct statbuf}. These two macros convert between @code{d_type} @code{struct statbuf}. On other systems it will always be DT_UNKNOWN.
values and @code{st_mode} values: These two macros convert between @code{d_type} values and @code{st_mode}
values:
@deftypefun int IFTODT (mode_t @var{mode}) @deftypefun int IFTODT (mode_t @var{mode})
This returns the @code{d_type} value corresponding to @var{mode}. This returns the @code{d_type} value corresponding to @var{mode}.
@end deftypefun @end deftypefun
@deftypefun mode_t DTTOIF (int @var{dirtype}) @deftypefun mode_t DTTOIF (int @var{dtype})
This returns the @code{st_mode} value corresponding to @var{dirtype}. This returns the @code{st_mode} value corresponding to @var{dtype}.
@end deftypefun @end deftypefun
@end table @end table

View File

@ -7,8 +7,15 @@ standard or other source from which each facility is derived, and tells
you where in the manual you can find more information about how to use you where in the manual you can find more information about how to use
it. it.
@c This table runs wide. Shrink fonts.
@iftex
@indexfonts @rm
@end iftex
@table @code @table @code
@comment summary.texi is generated from the other Texinfo files. @comment summary.texi is generated from the other Texinfo files.
@comment See the Makefile and summary.awk for the details. @comment See the Makefile and summary.awk for the details.
@include summary.texi @include summary.texi
@end table @end table
@iftex
@textfonts @rm
@end iftex

View File

@ -112,7 +112,7 @@ works together with the library.
General Public License rather than by this special one. General Public License rather than by this special one.
@iftex @iftex
@unnumberedsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @unnumberedsec TERMS AND CONDITIONS FOR COPYING,@*DISTRIBUTION AND MODIFICATION
@end iftex @end iftex
@ifinfo @ifinfo
@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

View File

@ -1,24 +1,16 @@
@c We need some definitions here. @c We need some definitions here.
@ifclear cdot
@ifhtml @ifhtml
@set cdot <20> @set mult <20>
@macro mul
<EFBFBD>
@end macro
@end ifhtml @end ifhtml
@iftex @iftex
@set cdot <20> @set mult @cdot
@macro mul
@cdot
@end macro
@end iftex @end iftex
@ifclear cdot @ifclear mult
@set cdot x @set mult x
@end ifclear
@macro mul @macro mul
x @value{mult}
@end macro @end macro
@end ifclear
@end ifclear
@iftex @iftex
@set infty @infty @set infty @infty
@end iftex @end iftex
@ -443,7 +435,7 @@ Another possibility which is useful in several situations is
@deftypefun int feholdexcept (fenv_t *@var{envp}) @deftypefun int feholdexcept (fenv_t *@var{envp})
Store the current floating-point environment in the object pointed to by Store the current floating-point environment in the object pointed to by
@var{envp}. Afterwards, all exception flags are cleared and if @var{envp}. Afterwards, all exception flags are cleared and if
available a mode is installed which continues on all exception and does available a mode is installed which continues on all exceptions and does
not cause a trap to occur. In this case a nonzero value is returned. not cause a trap to occur. In this case a nonzero value is returned.
If the floating-point implementation does not support such a non-stop If the floating-point implementation does not support such a non-stop
@ -455,8 +447,8 @@ restored can take two kinds of arguments:
@itemize @bullet @itemize @bullet
@item @item
Pointed to objects which previously were initialized by a call to Pointers to @code{fenv_t} objects which were initialized previously by a
@code{fegetenv} or @code{feholdexcept}. call to @code{fegetenv} or @code{feholdexcept}.
@item @item
@vindex FE_DFL_ENV @vindex FE_DFL_ENV
The special macro @code{FE_DFL_ENV} which represents the floating-point The special macro @code{FE_DFL_ENV} which represents the floating-point
@ -466,10 +458,11 @@ Implementation defined macros with names starting with @code{FE_}.
@vindex FE_NOMASK_ENV @vindex FE_NOMASK_ENV
If possible, the GNU C Library defines a macro @code{FE_NOMASK_ENV} If possible, the GNU C Library defines a macro @code{FE_NOMASK_ENV}
which represents an environment where no exception is masked and so each which represents an environment where no exceptions are masked, so every
raised exception causes a trap to occur. Whether this macro is available can easily be tested using @code{#ifdef}. exception raised causes a trap to occur. You can test for this macro
using @code{#ifdef}.
Some platforms might define further predefined environments. Some platforms might define other predefined environments.
@end itemize @end itemize
@noindent @noindent

View File

@ -673,7 +673,8 @@ int
main (void) main (void)
@{ @{
nl_catd catdesc = catopen ("hello.cat", NL_CAT_LOCALE); nl_catd catdesc = catopen ("hello.cat", NL_CAT_LOCALE);
printf (catgets (catdesc, SetMainSet, SetMainHello, "Hello, world!\n")); printf (catgets (catdesc, SetMainSet, SetMainHello,
"Hello, world!\n"));
catclose (catdesc); catclose (catdesc);
return 0; return 0;
@} @}

View File

@ -196,8 +196,8 @@ This is a GNU extension.
The address of an alternative implementation of the @code{lstat} The address of an alternative implementation of the @code{lstat}
function to get information about an object in the filesystems, not function to get information about an object in the filesystems, not
following symbolic links. It is used if the @code{GLOB_ALTDIRFUNC} bit following symbolic links. It is used if the @code{GLOB_ALTDIRFUNC} bit
is set in the flag parameter. The type of this field is @w{@code{int is set in the flag parameter. The type of this field is @code{@w{int
(*) (const char *, struct stat *)}}. (*) (const char *,} @w{struct stat *)}}.
This is a GNU extension. This is a GNU extension.
@end table @end table
@ -847,13 +847,16 @@ actually matches is near the end of the first word. But it is
@code{regexec} reports nonuse of the ``na'' subexpression. @code{regexec} reports nonuse of the ``na'' subexpression.
Another place where this rule applies is when the regular expression Another place where this rule applies is when the regular expression
@w{@samp{\(ba\(na\)*s \|nefer\(ti\)* \)*}} matches @samp{bananas nefertiti}. @smallexample
The ``na'' subexpression does match in the first word, but it doesn't \(ba\(na\)*s \|nefer\(ti\)* \)*
match in the second word because the other alternative is used there. @end smallexample
Once again, the second repetition of the outer subexpression overrides @noindent
the first, and within that second repetition, the ``na'' subexpression matches @samp{bananas nefertiti}. The ``na'' subexpression does match
is not used. So @code{regexec} reports nonuse of the ``na'' in the first word, but it doesn't match in the second word because the
subexpression. other alternative is used there. Once again, the second repetition of
the outer subexpression overrides the first, and within that second
repetition, the ``na'' subexpression is not used. So @code{regexec}
reports nonuse of the ``na'' subexpression.
@node Regexp Cleanup @node Regexp Cleanup
@subsection POSIX Regexp Matching Cleanup @subsection POSIX Regexp Matching Cleanup

View File

@ -709,19 +709,19 @@ the following members:
@table @code @table @code
@item int w_termsig @item int w_termsig
The value of this member is the same as the result of the The value of this member is the same as that of the
@code{WTERMSIG} macro. @code{WTERMSIG} macro.
@item int w_coredump @item int w_coredump
The value of this member is the same as the result of the The value of this member is the same as that of the
@code{WCOREDUMP} macro. @code{WCOREDUMP} macro.
@item int w_retcode @item int w_retcode
The value of this member is the same as the result of the The value of this member is the same as that of the
@code{WEXITSTATUS} macro. @code{WEXITSTATUS} macro.
@item int w_stopsig @item int w_stopsig
The value of this member is the same as the result of the The value of this member is the same as that of the
@code{WSTOPSIG} macro. @code{WSTOPSIG} macro.
@end table @end table

View File

@ -2285,12 +2285,12 @@ for some special system processes. Otherwise, send the signal to all
processes with the same effective user ID. processes with the same effective user ID.
@end table @end table
A process can send a signal @var{signum} to itself with a call like A process can send a signal to itself with a call like @w{@code{kill
@w{@code{kill (getpid(), @var{signum})}}. If @code{kill} is used by a (getpid(), @var{signum})}}. If @code{kill} is used by a process to send
process to send a signal to itself, and the signal is not blocked, then a signal to itself, and the signal is not blocked, then @code{kill}
@code{kill} delivers at least one signal (which might be some other delivers at least one signal (which might be some other pending
pending unblocked signal instead of the signal @var{signum}) to that unblocked signal instead of the signal @var{signum}) to that process
process before it returns. before it returns.
The return value from @code{kill} is zero if the signal can be sent The return value from @code{kill} is zero if the signal can be sent
successfully. Otherwise, no signal is sent, and a value of @code{-1} is successfully. Otherwise, no signal is sent, and a value of @code{-1} is

View File

@ -792,7 +792,7 @@ be better if the usage were made consistent, but it is not hard to extract
the integer from the structure or put the integer into a structure. the integer from the structure or put the integer into a structure.
The following basic definitions for Internet addresses appear in the The following basic definitions for Internet addresses appear in the
header file @file{netinet/in.h}: header file@*@file{netinet/in.h}:
@pindex netinet/in.h @pindex netinet/in.h
@comment netinet/in.h @comment netinet/in.h
@ -866,8 +866,9 @@ own variables to this value.
@subsubsection Host Address Functions @subsubsection Host Address Functions
@pindex arpa/inet.h @pindex arpa/inet.h
@noindent
These additional functions for manipulating Internet addresses are These additional functions for manipulating Internet addresses are
declared in @file{arpa/inet.h}. They represent Internet addresses in declared in@*@file{arpa/inet.h}. They represent Internet addresses in
network byte order; they represent network numbers and network byte order; they represent network numbers and
local-address-within-network numbers in host byte order. local-address-within-network numbers in host byte order.
@xref{Byte Order}, for an explanation of network and host byte order. @xref{Byte Order}, for an explanation of network and host byte order.
@ -1244,6 +1245,7 @@ service at port @var{port} using protocol @var{proto}. If it can't
find such a service, it returns a null pointer. find such a service, it returns a null pointer.
@end deftypefun @end deftypefun
@noindent
You can also scan the services database using @code{setservent}, You can also scan the services database using @code{setservent},
@code{getservent}, and @code{endservent}. Be careful in using these @code{getservent}, and @code{endservent}. Be careful in using these
functions, because they are not reentrant. functions, because they are not reentrant.
@ -2689,8 +2691,17 @@ This function is used to set the socket option @var{optname} at level
@var{level} for socket @var{socket}. The value of the option is passed @var{level} for socket @var{socket}. The value of the option is passed
in the buffer @var{optval}, which has size @var{optlen}. in the buffer @var{optval}, which has size @var{optlen}.
@c Argh. -zw
@iftex
@hfuzz 6pt
The return value and error codes for @code{setsockopt} are the same as The return value and error codes for @code{setsockopt} are the same as
for @code{getsockopt}. for @code{getsockopt}.
@end iftex
@ifinfo
The return value and error codes for @code{setsockopt} are the same as
for @code{getsockopt}.
@end ifinfo
@end deftypefun @end deftypefun
@node Socket-Level Options @node Socket-Level Options
@ -2705,8 +2716,9 @@ this section.
@end deftypevr @end deftypevr
@pindex sys/socket.h @pindex sys/socket.h
@noindent
Here is a table of socket-level option names; all are defined in the Here is a table of socket-level option names; all are defined in the
header file @file{sys/socket.h}. header file@*@file{sys/socket.h}.
@table @code @table @code
@comment sys/socket.h @comment sys/socket.h

View File

@ -409,7 +409,7 @@ these environment variable names for some other purpose.
@comment Extra blank lines make it look better. @comment Extra blank lines make it look better.
@table @code @table @code
@item HOME @item HOME
@cindex HOME environment variable @cindex @code{HOME} environment variable
@cindex home directory @cindex home directory
This is a string representing the user's @dfn{home directory}, or This is a string representing the user's @dfn{home directory}, or
@ -425,7 +425,7 @@ this lets the user specify the value.
@c !!! also USER @c !!! also USER
@item LOGNAME @item LOGNAME
@cindex LOGNAME environment variable @cindex @code{LOGNAME} environment variable
This is the name that the user used to log in. Since the value in the This is the name that the user used to log in. Since the value in the
environment can be tweaked arbitrarily, this is not a reliable way to environment can be tweaked arbitrarily, this is not a reliable way to
@ -436,7 +436,7 @@ For most purposes, it is better to use @code{LOGNAME}, precisely because
this lets the user specify the value. this lets the user specify the value.
@item PATH @item PATH
@cindex PATH environment variable @cindex @code{PATH} environment variable
A @dfn{path} is a sequence of directory names which is used for A @dfn{path} is a sequence of directory names which is used for
searching for a file. The variable @code{PATH} holds a path used searching for a file. The variable @code{PATH} holds a path used
@ -463,7 +463,7 @@ the one that is executed.
@c !!! also TERMCAP @c !!! also TERMCAP
@item TERM @item TERM
@cindex TERM environment variable @cindex @code{TERM} environment variable
This specifies the kind of terminal that is receiving program output. This specifies the kind of terminal that is receiving program output.
Some programs can make use of this information to take advantage of Some programs can make use of this information to take advantage of
@ -473,13 +473,13 @@ of terminals. Many programs which use the termcap library
Manual}) use the @code{TERM} environment variable, for example. Manual}) use the @code{TERM} environment variable, for example.
@item TZ @item TZ
@cindex TZ environment variable @cindex @code{TZ} environment variable
This specifies the time zone. @xref{TZ Variable}, for information about This specifies the time zone. @xref{TZ Variable}, for information about
the format of this string and how it is used. the format of this string and how it is used.
@item LANG @item LANG
@cindex LANG environment variable @cindex @code{LANG} environment variable
This specifies the default locale to use for attribute categories where This specifies the default locale to use for attribute categories where
neither @code{LC_ALL} nor the specific environment variable for that neither @code{LC_ALL} nor the specific environment variable for that
@ -489,7 +489,7 @@ locales.
@ignore @ignore
@c I doubt this really exists @c I doubt this really exists
@item LC_ALL @item LC_ALL
@cindex LC_ALL environment variable @cindex @code{LC_ALL} environment variable
This is similar to the @code{LANG} environment variable. However, its This is similar to the @code{LANG} environment variable. However, its
value takes precedence over any values provided for the individual value takes precedence over any values provided for the individual
@ -498,7 +498,7 @@ environment variable.
@end ignore @end ignore
@item LC_ALL @item LC_ALL
@cindex LC_ALL environment variable @cindex @code{LC_ALL} environment variable
If this environment variable is set it overrides the selection for all If this environment variable is set it overrides the selection for all
the locales done using the other @code{LC_*} environment variables. The the locales done using the other @code{LC_*} environment variables. The
@ -506,45 +506,45 @@ value of the other @code{LC_*} environment variables is simply ignored
in this case. in this case.
@item LC_COLLATE @item LC_COLLATE
@cindex LC_COLLATE environment variable @cindex @code{LC_COLLATE} environment variable
This specifies what locale to use for string sorting. This specifies what locale to use for string sorting.
@item LC_CTYPE @item LC_CTYPE
@cindex LC_CTYPE environment variable @cindex @code{LC_CTYPE} environment variable
This specifies what locale to use for character sets and character This specifies what locale to use for character sets and character
classification. classification.
@item LC_MESSAGES @item LC_MESSAGES
@cindex LC_MESSAGES environment variable @cindex @code{LC_MESSAGES} environment variable
This specifies what locale to use for printing messages and to parse This specifies what locale to use for printing messages and to parse
responses. responses.
@item LC_MONETARY @item LC_MONETARY
@cindex LC_MONETARY environment variable @cindex @code{LC_MONETARY} environment variable
This specifies what locale to use for formatting monetary values. This specifies what locale to use for formatting monetary values.
@item LC_NUMERIC @item LC_NUMERIC
@cindex LC_NUMERIC environment variable @cindex @code{LC_NUMERIC} environment variable
This specifies what locale to use for formatting numbers. This specifies what locale to use for formatting numbers.
@item LC_TIME @item LC_TIME
@cindex LC_TIME environment variable @cindex @code{LC_TIME} environment variable
This specifies what locale to use for formatting date/time values. This specifies what locale to use for formatting date/time values.
@item NLSPATH @item NLSPATH
@cindex NLSPATH environment variable @cindex @code{NLSPATH} environment variable
This specifies the directories in which the @code{catopen} function This specifies the directories in which the @code{catopen} function
looks for message translation catalogs. looks for message translation catalogs.
@item _POSIX_OPTION_ORDER @item _POSIX_OPTION_ORDER
@cindex _POSIX_OPTION_ORDER environment variable. @cindex @code{_POSIX_OPTION_ORDER} environment variable.
If this environment variable is defined, it suppresses the usual If this environment variable is defined, it suppresses the usual
reordering of command line arguments by @code{getopt} and reordering of command line arguments by @code{getopt} and

View File

@ -1,5 +1,9 @@
@node I/O on Streams, Low-Level I/O, I/O Overview, Top @node I/O on Streams, Low-Level I/O, I/O Overview, Top
@chapter Input/Output on Streams @chapter Input/Output on Streams
@c fix an overfull:
@tex
\hyphenation{which-ever}
@end tex
This chapter describes the functions for creating streams and performing This chapter describes the functions for creating streams and performing
input and output operations on them. As discussed in @ref{I/O input and output operations on them. As discussed in @ref{I/O
@ -1541,11 +1545,13 @@ make_message (char *name, char *value)
@group @group
if (nchars >= size) if (nchars >= size)
@{ @{
/* @r{Reallocate buffer now that we know how much space is needed.} */ /* @r{Reallocate buffer now that we know
how much space is needed.} */
buffer = (char *) xrealloc (buffer, nchars + 1); buffer = (char *) xrealloc (buffer, nchars + 1);
/* @r{Try again.} */ /* @r{Try again.} */
snprintf (buffer, size, "value of %s is %s", name, value); snprintf (buffer, size, "value of %s is %s",
name, value);
@} @}
/* @r{The last call worked, return the string.} */ /* @r{The last call worked, return the string.} */
return buffer; return buffer;
@ -1621,7 +1627,8 @@ the GNU C compiler provides a way to do this much more easily with macros.
For example: For example:
@smallexample @smallexample
#define myprintf(a, b, c, d, e, rest...) printf (mytemplate , ## rest...) #define myprintf(a, b, c, d, e, rest...) \
printf (mytemplate , ## rest...)
@end smallexample @end smallexample
@noindent @noindent
@ -2057,11 +2064,11 @@ If you define a meaning for @samp{%A}, what if the template contains
the handler when called needs to be able to get the options specified in the handler when called needs to be able to get the options specified in
the template. the template.
Both the @var{handler-function} and @var{arginfo-function} arguments Both the @var{handler-function} and @var{arginfo-function} accept an
to @code{register_printf_function} accept an argument that points to a argument that points to a @code{struct printf_info}, which contains
@code{struct printf_info}, which contains information about the options information about the options appearing in an instance of the conversion
appearing in an instance of the conversion specifier. This data type specifier. This data type is declared in the header file
is declared in the header file @file{printf.h}. @file{printf.h}.
@pindex printf.h @pindex printf.h
@comment printf.h @comment printf.h

View File

@ -73,18 +73,17 @@ The @dfn{terminal input queue} is also sometimes referred to as its
@dfn{typeahead buffer}. It holds the characters that have been received @dfn{typeahead buffer}. It holds the characters that have been received
from the terminal but not yet read by any process. from the terminal but not yet read by any process.
The size of the terminal's input queue is described by the The size of the input queue is described by the @code{MAX_INPUT} and
@code{MAX_INPUT} and @w{@code{_POSIX_MAX_INPUT}} parameters; see @ref{Limits @w{@code{_POSIX_MAX_INPUT}} parameters; see @ref{Limits for Files}. You
for Files}. You are guaranteed a queue size of at least are guaranteed a queue size of at least @code{MAX_INPUT}, but the queue
@code{MAX_INPUT}, but the queue might be larger, and might even might be larger, and might even dynamically change size. If input flow
dynamically change size. If input flow control is enabled by setting control is enabled by setting the @code{IXOFF} input mode bit
the @code{IXOFF} input mode bit (@pxref{Input Modes}), the terminal (@pxref{Input Modes}), the terminal driver transmits STOP and START
driver transmits STOP and START characters to the terminal when characters to the terminal when necessary to prevent the queue from
necessary to prevent the queue from overflowing. Otherwise, input may overflowing. Otherwise, input may be lost if it comes in too fast from
be lost if it comes in too fast from the terminal. In canonical mode, the terminal. In canonical mode, all input stays in the queue until a
all input stays in the queue until a newline character is received, so newline character is received, so the terminal input queue can fill up
the terminal input queue can fill up when you type a very long line. when you type a very long line. @xref{Canonical or Not}.
@xref{Canonical or Not}.
@cindex terminal output queue @cindex terminal output queue
The @dfn{terminal output queue} is like the input queue, but for output; The @dfn{terminal output queue} is like the input queue, but for output;

View File

@ -1220,10 +1220,9 @@ parse_param (char **word, size_t *word_length, size_t *max_length,
continue; continue;
} }
special = (strchr ("*@$", words[*offset]) != NULL special = strchr ("*@$", words[*offset]) != NULL;
|| isdigit (words[*offset]));
if (!isalpha (words[*offset]) && !special) if (!isalnum (words[*offset]) && !special)
/* Stop and evaluate, remembering char we stopped at */ /* Stop and evaluate, remembering char we stopped at */
break; break;
@ -1273,11 +1272,13 @@ envsubst:
} }
/* Is it a special parameter? */ /* Is it a special parameter? */
if (strpbrk (env, "0123456789*@$")) if (strpbrk (env, "*@$") || isdigit (*env))
{ {
if (env[1]) if ((isdigit(*env) && strcspn (env, "1234567890")) ||
(!isdigit(*env) && env[1] != '\0'))
{ {
/* Bad substitution if there is more than one character */ /* Bad substitution if it isn't "*", "@", "$", or just a number. */
bad_subst:
free (env); free (env);
fprintf (stderr, "${%s}: bad substitution\n", env); fprintf (stderr, "${%s}: bad substitution\n", env);
return WRDE_SYNTAX; return WRDE_SYNTAX;
@ -1286,7 +1287,11 @@ envsubst:
/* Is it a digit? */ /* Is it a digit? */
if (isdigit(*env)) if (isdigit(*env))
{ {
int n = *env - '0'; char *endp;
int n = strtol (env, &endp, 10);
if (*endp != '\0')
goto bad_subst;
free (env); free (env);
if (n >= __libc_argc) if (n >= __libc_argc)

View File

@ -1,5 +1,5 @@
/* Reentrant string tokenizer. Generic version. /* Reentrant string tokenizer. Generic version.
Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc. Copyright (C) 1991, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -32,7 +32,7 @@
// s = "abc\0-def\0" // s = "abc\0-def\0"
*/ */
char * char *
strtok_r (s, delim, save_ptr) __strtok_r (s, delim, save_ptr)
char *s; char *s;
const char *delim; const char *delim;
char **save_ptr; char **save_ptr;
@ -61,3 +61,4 @@ strtok_r (s, delim, save_ptr)
} }
return token; return token;
} }
weak_alias (__strtok_r, strtok_r)

View File

@ -2,3 +2,4 @@
# not really good to use heavily i586 optimized code on a i686. It's # not really good to use heavily i586 optimized code on a i686. It's
# better to use i486/i386 code. # better to use i486/i386 code.
i386/i486 i386/i486
libm-i387/i686

View File

@ -1,3 +1,4 @@
#define FUNCTION strtok_r #define FUNCTION __strtok_r
#define USE_AS_STRTOK_R 1 #define USE_AS_STRTOK_R 1
#include <sysdeps/i386/strtok.S> #include <sysdeps/i386/strtok.S>
weak_alias (__strtok_r, strtok_r)

View File

@ -1,5 +1,5 @@
/* Compute positive difference. /* Compute positive difference.
Copyright (C) 1997 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -30,11 +30,12 @@ ENTRY(__fdim)
fsubp %st(1), %st fsubp %st(1), %st
fldz fldz
fcmovnb %st(1), %st fcomi %st(1), %st
fcmovb %st(1), %st
jmp 2f jmp 2f
1: fucomi %st(0), %st 1: fucomi %st(0), %st
fcmovu %st, %st(1) fcmovnu %st(1), %st
2: fstp %st(1) 2: fstp %st(1)
ret ret
END(__fdim) END(__fdim)

View File

@ -1,5 +1,5 @@
/* Compute positive difference. /* Compute positive difference.
Copyright (C) 1997 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -30,11 +30,12 @@ ENTRY(__fdimf)
fsubp %st(1), %st fsubp %st(1), %st
fldz fldz
fcmovnb %st(1), %st fcomi %st(1), %st
fcmovb %st(1), %st
jmp 2f jmp 2f
1: fucomi %st(0), %st 1: fucomi %st(0), %st
fcmovu %st, %st(1) fcmovnu %st(1), %st
2: fstp %st(1) 2: fstp %st(1)
ret ret
END(__fdimf) END(__fdimf)

View File

@ -1,5 +1,5 @@
/* Compute positive difference. /* Compute positive difference.
Copyright (C) 1997 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -30,11 +30,12 @@ ENTRY(__fdiml)
fsubp %st(1), %st fsubp %st(1), %st
fldz fldz
fcmovnb %st(1), %st fcomi %st(1), %st
fcmovb %st(1), %st
jmp 2f jmp 2f
1: fucomi %st(0), %st 1: fucomi %st(0), %st
fcmovu %st, %st(1) fcmovnu %st(1), %st
2: fstp %st(1) 2: fstp %st(1)
ret ret
END(__fdiml) END(__fdiml)

View File

@ -1,5 +1,5 @@
/* Compute minimum of two numbers, regarding NaN as missing argument. /* Compute minimum of two numbers, regarding NaN as missing argument.
Copyright (C) 1997 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -29,7 +29,7 @@ ENTRY(__fmin)
fcmovu %st(1), %st // now %st contains y if not NaN, x otherwise fcmovu %st(1), %st // now %st contains y if not NaN, x otherwise
fucomi %st(1), %st fucomi %st(1), %st
fcmovb %st(1), %st fcmovnb %st(1), %st
fstp %st(1) fstp %st(1)

View File

@ -1,5 +1,5 @@
/* Compute minimum of two numbers, regarding NaN as missing argument. /* Compute minimum of two numbers, regarding NaN as missing argument.
Copyright (C) 1997 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -29,7 +29,7 @@ ENTRY(__fminf)
fcmovu %st(1), %st // now %st contains y if not NaN, x otherwise fcmovu %st(1), %st // now %st contains y if not NaN, x otherwise
fucomi %st(1), %st fucomi %st(1), %st
fcmovb %st(1), %st fcmovnb %st(1), %st
fstp %st(1) fstp %st(1)

View File

@ -1,5 +1,5 @@
/* Compute minimum of two numbers, regarding NaN as missing argument. /* Compute minimum of two numbers, regarding NaN as missing argument.
Copyright (C) 1997 Free Software Foundation, Inc. Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -29,7 +29,7 @@ ENTRY(__fminl)
fcmovu %st(1), %st // now %st contains y if not NaN, x otherwise fcmovu %st(1), %st // now %st contains y if not NaN, x otherwise
fucomi %st(1), %st fucomi %st(1), %st
fcmovb %st(1), %st fcmovnb %st(1), %st
fstp %st(1) fstp %st(1)