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

	* Makefile (distribute): Add scripts/documented.sh.
	* scripts/documented.sh: New file.
This commit is contained in:
Ulrich Drepper 2001-04-09 18:07:15 +00:00
parent eacde9d081
commit 4c78249d06
10 changed files with 186 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2001-04-09 Ulrich Drepper <drepper@redhat.com>
* Makefile (distribute): Add scripts/documented.sh.
* scripts/documented.sh: New file.
2001-04-08 Hans-Peter Nilsson <hp@axis.com> 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
* sysdeps/unix/sysv/linux/cris/Dist: New file. * sysdeps/unix/sysv/linux/cris/Dist: New file.

View File

@ -267,7 +267,7 @@ distribute := README README.libm INSTALL FAQ FAQ.in NOTES NEWS BUGS \
mkinstalldirs move-if-change install-sh \ mkinstalldirs move-if-change install-sh \
test-installation.pl gen-FAQ.pl versions.awk\ test-installation.pl gen-FAQ.pl versions.awk\
gen-sorted.awk abi-versions.awk \ gen-sorted.awk abi-versions.awk \
firstversions.awk) firstversions.awk documented.sh)
distribute := $(strip $(distribute)) distribute := $(strip $(distribute))
generated := $(generated) stubs.h generated := $(generated) stubs.h

2
README
View File

@ -19,6 +19,8 @@ configurations:
ia64-*-linux-gnu Linux-2.x on ia64 ia64-*-linux-gnu Linux-2.x on ia64
s390-*-linux-gnu Linux-2.x on IBM S/390 s390-*-linux-gnu Linux-2.x on IBM S/390
s390x-*-linux-gnu Linux-2.x on IBM S/390 64-bit s390x-*-linux-gnu Linux-2.x on IBM S/390 64-bit
sh-*-linux-gnu Linux-2.x on Super Hitachi
cris-*-linux-gnu Linux-2.4+ on CRIS
Former releases of this library (version 1.09.1 and perhaps earlier Former releases of this library (version 1.09.1 and perhaps earlier
versions) used to run on the following configurations: versions) used to run on the following configurations:

View File

@ -19,6 +19,7 @@ configurations:
ia64-*-linux-gnu Linux-2.x on ia64 ia64-*-linux-gnu Linux-2.x on ia64
s390-*-linux-gnu Linux-2.x on IBM S/390 s390-*-linux-gnu Linux-2.x on IBM S/390
s390x-*-linux-gnu Linux-2.x on IBM S/390 64-bit s390x-*-linux-gnu Linux-2.x on IBM S/390 64-bit
sh-*-linux-gnu Linux-2.x on Super Hitachi
cris-*-linux-gnu Linux-2.4+ on CRIS cris-*-linux-gnu Linux-2.4+ on CRIS
Former releases of this library (version 1.09.1 and perhaps earlier Former releases of this library (version 1.09.1 and perhaps earlier

View File

@ -236,9 +236,9 @@ the implementation.)
These functions return the complex sine of @var{z}. These functions return the complex sine of @var{z}.
The mathematical definition of the complex sine is The mathematical definition of the complex sine is
@ifinfo @ifnottex
@math{sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i))}. @math{sin (z) = 1/(2*i) * (exp (z*i) - exp (-z*i))}.
@end ifinfo @end ifnottex
@tex @tex
$$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$ $$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$
@end tex @end tex
@ -256,9 +256,9 @@ $$\sin(z) = {1\over 2i} (e^{zi} - e^{-zi})$$
These functions return the complex cosine of @var{z}. These functions return the complex cosine of @var{z}.
The mathematical definition of the complex cosine is The mathematical definition of the complex cosine is
@ifinfo @ifnottex
@math{cos (z) = 1/2 * (exp (z*i) + exp (-z*i))} @math{cos (z) = 1/2 * (exp (z*i) + exp (-z*i))}
@end ifinfo @end ifnottex
@tex @tex
$$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$ $$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$
@end tex @end tex
@ -276,9 +276,9 @@ $$\cos(z) = {1\over 2} (e^{zi} + e^{-zi})$$
These functions return the complex tangent of @var{z}. These functions return the complex tangent of @var{z}.
The mathematical definition of the complex tangent is The mathematical definition of the complex tangent is
@ifinfo @ifnottex
@math{tan (z) = -i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i))} @math{tan (z) = -i * (exp (z*i) - exp (-z*i)) / (exp (z*i) + exp (-z*i))}
@end ifinfo @end ifnottex
@tex @tex
$$\tan(z) = -i \cdot {e^{zi} - e^{-zi}\over e^{zi} + e^{-zi}}$$ $$\tan(z) = -i \cdot {e^{zi} - e^{-zi}\over e^{zi} + e^{-zi}}$$
@end tex @end tex
@ -723,9 +723,9 @@ These functions return @code{e} (the base of natural
logarithms) raised to the power of @var{z}. logarithms) raised to the power of @var{z}.
Mathematically, this corresponds to the value Mathematically, this corresponds to the value
@ifinfo @ifnottex
@math{exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z)))} @math{exp (z) = exp (creal (z)) * (cos (cimag (z)) + I * sin (cimag (z)))}
@end ifinfo @end ifnottex
@tex @tex
$$\exp(z) = e^z = e^{{\rm Re}\,z} (\cos ({\rm Im}\,z) + i \sin ({\rm Im}\,z))$$ $$\exp(z) = e^z = e^{{\rm Re}\,z} (\cos ({\rm Im}\,z) + i \sin ({\rm Im}\,z))$$
@end tex @end tex
@ -743,9 +743,9 @@ $$\exp(z) = e^z = e^{{\rm Re}\,z} (\cos ({\rm Im}\,z) + i \sin ({\rm Im}\,z))$$
These functions return the natural logarithm of @var{z}. These functions return the natural logarithm of @var{z}.
Mathematically, this corresponds to the value Mathematically, this corresponds to the value
@ifinfo @ifnottex
@math{log (z) = log (cabs (z)) + I * carg (z)} @math{log (z) = log (cabs (z)) + I * carg (z)}
@end ifinfo @end ifnottex
@tex @tex
$$\log(z) = \log |z| + i \arg z$$ $$\log(z) = \log |z| + i \arg z$$
@end tex @end tex
@ -769,9 +769,9 @@ or is very close to 0. It is well-defined for all other values of
These functions return the base 10 logarithm of the complex value These functions return the base 10 logarithm of the complex value
@var{z}. Mathematically, this corresponds to the value @var{z}. Mathematically, this corresponds to the value
@ifinfo @ifnottex
@math{log (z) = log10 (cabs (z)) + I * carg (z)} @math{log (z) = log10 (cabs (z)) + I * carg (z)}
@end ifinfo @end ifnottex
@tex @tex
$$\log_{10}(z) = \log_{10}|z| + i \arg z$$ $$\log_{10}(z) = \log_{10}|z| + i \arg z$$
@end tex @end tex
@ -1411,6 +1411,64 @@ restore that state.
If the function fails the return value is @code{NULL}. If the function fails the return value is @code{NULL}.
@end deftypefun @end deftypefun
The four functions described so far in this section all work on a state
which is shared by all threads. The state is not directly accessible to
the user and can only be modified by these functions. This makes it
hard to deal with situations where each thread should have its own
pseudo-random number generator.
The GNU C library contains four additional functions which contain the
state as an explicit parameter and therefore make it possible to handle
thread-local PRNGs. Beside this there are no difference. In fact, the
four functions already discussed are implemented internally using the
following interfaces.
The @file{stdlib.h} header contains a definition of the following type:
@comment stdlib.h
@comment GNU
@deftp {Data Type} {struct random_data}
Objects of type @code{struct random_data} contain the information
necessary to represent the state of the PRNG. Although a complete
definition of the type is present the type should be treated as opaque.
@end deftp
The functions modifying the state follow exactly the already described
functions.
@comment stdlib.h
@comment GNU
@deftypefun int random_r (struct random_data *restrict @var{buf}, int32_t *restrict @var{result})
The @code{random_r} function behaves exactly like the @code{random}
function except that it uses and modifies the state in the object
pointed to by the first parameter instead of the global state.
@end deftypefun
@comment stdlib.h
@comment GNU
@deftypefun int srandom_r (unsigned int @var{seed}, struct random_data *@var{buf})
The @code{srandom_r} function behaves exactly like the @code{srandom}
function except that it uses and modifies the state in the object
pointed to by the second parameter instead of the global state.
@end deftypefun
@comment stdlib.h
@comment GNU
@deftypefun int initstate_r (unsigned int @var{seed}, char *restrict @var{statebuf}, size_t @var{statelen}, struct random_data *restrict @var{buf})
The @code{initstate_r} function behaves exactly like the @code{initstate}
function except that it uses and modifies the state in the object
pointed to by the fourth parameter instead of the global state.
@end deftypefun
@comment stdlib.h
@comment GNU
@deftypefun int setstate_r (char *restrict @var{statebuf}, struct random_data *restrict @var{buf})
The @code{setstate_r} function behaves exactly like the @code{setstate}
function except that it uses and modifies the state in the object
pointed to by the first parameter instead of the global state.
@end deftypefun
@node SVID Random @node SVID Random
@subsection SVID Random Number Function @subsection SVID Random Number Function

View File

@ -1379,7 +1379,7 @@ get this information two functions. They are declared in the file
@comment sys/sysinfo.h @comment sys/sysinfo.h
@comment GNU @comment GNU
@deftypefun long int get_phys_pages (void) @deftypefun {long int} get_phys_pages (void)
The @code{get_phys_pages} function returns the total number of pages of The @code{get_phys_pages} function returns the total number of pages of
physical the system has. To get the amount of memory this number has to physical the system has. To get the amount of memory this number has to
be multiplied by the page size. be multiplied by the page size.
@ -1389,7 +1389,7 @@ This function is a GNU extension.
@comment sys/sysinfo.h @comment sys/sysinfo.h
@comment GNU @comment GNU
@deftypefun long int get_avphys_pages (void) @deftypefun {long int} get_avphys_pages (void)
The @code{get_phys_pages} function returns the number of available pages of The @code{get_phys_pages} function returns the number of available pages of
physical the system has. To get the amount of memory this number has to physical the system has. To get the amount of memory this number has to
be multiplied by the page size. be multiplied by the page size.

View File

@ -625,7 +625,7 @@ anyway.
@comment unistd.h @comment unistd.h
@comment ??? @comment ???
@deftypefun long int syscall (long int @var{sysno}, ...) @deftypefun {long int} syscall (long int @var{sysno}, ...)
@code{syscall} performs a generic system call. @code{syscall} performs a generic system call.

102
scripts/documented.sh Normal file
View File

@ -0,0 +1,102 @@
#! /bin/sh
bindir=$1
VERSION=1.0
egrep -h @deftypefunx? *.texi ../linuxthreads/*.texi |
sed -e 's/@deftypefunx*[[:space:]]*\({[^{]*}\|[[:alnum:]_]*\)[[:space:]]*\([[:alnum:]_]*\).*/\2/' -e '/^@/d' |
sed -e '/^obstack_/d' -e '/^\([lf]\|\)stat\(\|64\)$/d' -e '/^mknod$/d' |
sed -e '/^signbit$/d' -e '/^sigsetjmp$/d' |
sed -e '/^pthread_cleanup/d' -e '/^IFTODT$/d' -e '/^DTTOIF$/d' |
sed -e '/^__fwriting$/d' -e '/^__fwritable$/d' -e '/^__fsetlocking$/d' |
sed -e '/^__freading$/d' -e '/^__freadable$/d' -e '/^__fpurge$/d' |
sed -e '/^__fpending$/d' -e '/^__flbf$/d' -e '/^__fbufsize$/d' |
sed -e '/^alloca$/d' |
sort -u > DOCUMENTED
nm --extern --define $bindir/libc.so $bindir/math/libm.so $bindir/rt/librt.so $bindir/linuxthreads/libpthread.so $bindir/dlfcn/libdl.so $bindir/crypt/libcrypt.so $bindir/login/libutil.so |
egrep " [TW] ([[:alpha:]]|_[[:alpha:]])" |
sed 's/\(@.*\)//' |
cut -b 12- |
sed -e '/^_IO/d' -e '/^_dl/d' -e '/^_pthread/d' -e '/^_obstack/d' |
sed -e '/^_argp/d' -e '/^_authenticate$/d' -e '/^_environ$/d' |
sed -e '/^_errno$/d' -e '/^_h_errno$/d' -e '/^_longjmp$/d' |
sed -e '/^_mcleanup$/d' -e '/^_rpc_dtablesize$/d' -e '/^_seterr_reply$/d' |
sed -e '/^_nss/d' -e '/^_setjmp$/d' |
sort -u > AVAILABLE
cat <<EOF
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Undocumented glibc functions</title>
</head>
<body>
<center><h1>Undocumented <tt>glibc</tt> functions</h1></center>
<p>The following table includes names of the function in glibc
which are not yet documented in the manual. This list is
automatically created and therefore might contain errors. Please
check the latest manual (available from the CVS archive) before
starting to work. It might also be good to let me know in
advanace on which functions you intend to work to avoid
duplication.</p>
<p>A few comments:</p>
<ul>
<li>Some functions in the list are much less important than
others. Please prioritize.</li>
<li>Similarly for the LFS functions (those ending in 64).</li>
</ul>
<p>The function sombody already volunteered to document are marked
with a reference to the person.</p>
<center><table>
EOF
n=0
diff -y --width=60 --suppress-common-lines DOCUMENTED AVAILABLE |
expand | cut -b 33- | sed '/^[[:space:]]*$/d' |
while read name; do
line="$line
<td><tt>$name</tt></td>"
n=$(expr $n + 1)
if [ $n -eq 4 ]; then
echo "<tr>
$line
</tr>"
line=""
n=0
fi
done
if [ $n -gt 0 ]; then
if [ $n -eq 1 ]; then
line="$line
<td></td>"
fi
if [ $n -eq 2 ]; then
line="$line
<td></td>"
fi
if [ $n -eq 3 ]; then
line="$line
<td></td>"
fi
echo "<tr>
$line
</tr>"
fi
cat <<EOF
</table></center>
<hr>
<address><a href="mailto:drepper@redhat.com">Ulrich Drepper</a></address>
Generated on $(date) with documented.sh version $VERSION
</body>
</html>
EOF

View File

@ -0,0 +1 @@
#include <sysdeps/unix/sysv/linux/i386/setresgid.c>

View File

@ -0,0 +1 @@
#include <sysdeps/unix/sysv/linux/i386/setresuid.c>