aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-13 12:29:13 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-13 12:29:13 +0000
commit7a68c94a5b8fb848590857f7d8c4a271bf4e8ea9 (patch)
treef91b98eed7220f1cb3b29337ca432d323c7b7408 /manual
parentceb27555a1f637c048c7ec65a01f8122c3e79bf3 (diff)
downloadglibc-7a68c94a5b8fb848590857f7d8c4a271bf4e8ea9.tar.xz
glibc-7a68c94a5b8fb848590857f7d8c4a271bf4e8ea9.zip
Update.
1998-07-10 18:14 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu> * manual/Makefile: Overhauled. Generate libc.texinfo from the chapter files. Exorcise the chapters, chapters-incl mess. Support inserting doc chapters from add-on modules. (chapters): New variable. (add-chapters): New variable. (appendices): New variable. (libc.texinfo): New target. (clean): Fix bugs. (realclean): Fix bugs. * manual/texis.awk: New file. * manual/libc-texinfo.sh: New file. * manual/libc-texinfo.in: New file. * manual/conf.texi (top @node): Remove next pointer. * manual/lang.texi (top @node): Remove prev pointer. * manual/job.texi (top @node): Add explicit pointers. * manual/message.texi (top @node): Add explicit pointers. * manual/nss.texi (top @node): Add explicit pointers. * manual/process.texi (top @node): Add explicit pointers. * manual/startup.texi (top @node): Add explicit pointers. * manual/terminal.texi (top @node): Add explicit pointers. * manual/users.texi (top @node): Add explicit pointers. * manual/arith.texi: Add %MENU% tag. * manual/conf.texi: Add %MENU% tag. * manual/contrib.texi: Add %MENU% tag. * manual/ctype.texi: Add %MENU% tag. * manual/errno.texi: Add %MENU% tag. * manual/filesys.texi: Add %MENU% tag. * manual/header.texi: Add %MENU% tag. * manual/install.texi: Add %MENU% tag. * manual/intro.texi: Add %MENU% tag. * manual/io.texi: Add %MENU% tag. * manual/job.texi: Add %MENU% tag. * manual/lang.texi: Add %MENU% tag. * manual/llio.texi: Add %MENU% tag. * manual/locale.texi: Add %MENU% tag. * manual/maint.texi: Add %MENU% tag. * manual/math.texi: Add %MENU% tag. * manual/mbyte.texi: Add %MENU% tag. * manual/memory.texi: Add %MENU% tag. * manual/message.texi: Add %MENU% tag. * manual/nss.texi: Add %MENU% tag. * manual/pattern.texi: Add %MENU% tag. * manual/pipe.texi: Add %MENU% tag. * manual/process.texi: Add %MENU% tag. * manual/search.texi: Add %MENU% tag. * manual/setjmp.texi: Add %MENU% tag. * manual/signal.texi: Add %MENU% tag. * manual/socket.texi: Add %MENU% tag. * manual/startup.texi: Add %MENU% tag. * manual/stdio.texi: Add %MENU% tag. * manual/string.texi: Add %MENU% tag. * manual/sysinfo.texi: Add %MENU% tag. * manual/terminal.texi: Add %MENU% tag. * manual/time.texi: Add %MENU% tag. * manual/users.texi: Add %MENU% tag. 1998-07-13 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/i386/dl-procinfo.h (x86_cap_flags): Update. 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/recvmsg.c (__libc_recvmsg): Use ANSI style declaration to avoid warning. * sysdeps/unix/sysv/linux/sendmsg.c (__libc_sendmsg): Likewise. 1998-07-04 Mark Kettenis <kettenis@phys.uva.nl> * elf/rtld.c (process_dl_debug): Add missing continue. 1998-07-12 Mark Kettenis <kettenis@phys.uva.nl> * elf/rtld.c (_dl_skip_args): Make global because the Hurd startup code needs it. 1998-07-10 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makeconfig ($(common-objpfx)sysd-dirs): Write out definition of sysd-dirs-done. * Makerules: Don't generate version maps too early. ($(common-objpfx)sysd-versions): Force regeneration if the list of subdirs has changed. 1998-07-10 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dlfcn.h (DL_CALL_FCT): Use portable comma expression. 1998-07-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * iconv/gconv_db.c (gen_steps): Always set *handle and *nsteps. * iconv/gconv_dl.c (__gconv_find_shlib): Correct use of tfind return value. 1998-07-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dl-open.c (dl_open_worker): New function. (_dl_open): Call it to do the actual work while catching errors. * elf/dl-close.c (_dl_close): Only call termination function if the initialisation function was called. 1998-07-13 Ulrich Drepper <drepper@cygnus.com> * libio/libioP.h (_IO_cleanup_registration_needed): Use __PMT. Reported by Felix von Leitner <leitner@amdiv.de>. 1998-07-13 10:28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/rtld.c (process_dl_debug): Add missing continue. 1998-06-23 Mark Kettenis <kettenis@phys.uva.nl>
Diffstat (limited to 'manual')
-rw-r--r--manual/.cvsignore2
-rw-r--r--manual/Makefile88
-rw-r--r--manual/arith.texi1967
-rw-r--r--manual/chapters.texi35
-rw-r--r--manual/conf.texi4
-rw-r--r--manual/contrib.texi1
-rw-r--r--manual/ctype.texi1
-rw-r--r--manual/errno.texi1
-rw-r--r--manual/filesys.texi1
-rw-r--r--manual/header.texi1
-rw-r--r--manual/install.texi1
-rw-r--r--manual/intro.texi1
-rw-r--r--manual/io.texi1
-rw-r--r--manual/job.texi3
-rw-r--r--manual/lang.texi4
-rw-r--r--manual/libc-texinfo.sh115
-rw-r--r--manual/libc.texinfo892
-rw-r--r--manual/llio.texi1
-rw-r--r--manual/locale.texi1
-rw-r--r--manual/maint.texi1
-rw-r--r--manual/math.texi1395
-rw-r--r--manual/mbyte.texi1
-rw-r--r--manual/memory.texi1
-rw-r--r--manual/message.texi3
-rw-r--r--manual/nss.texi7
-rw-r--r--manual/pattern.texi1
-rw-r--r--manual/pipe.texi1
-rw-r--r--manual/process.texi3
-rw-r--r--manual/search.texi1
-rw-r--r--manual/setjmp.texi1
-rw-r--r--manual/signal.texi1
-rw-r--r--manual/socket.texi1
-rw-r--r--manual/startup.texi3
-rw-r--r--manual/stdio.texi1
-rw-r--r--manual/string.texi1
-rw-r--r--manual/sysinfo.texi1
-rw-r--r--manual/terminal.texi3
-rw-r--r--manual/texis78
-rw-r--r--manual/texis.awk21
-rw-r--r--manual/time.texi1
-rw-r--r--manual/top-menu.texi499
-rw-r--r--manual/users.texi3
42 files changed, 2582 insertions, 2566 deletions
diff --git a/manual/.cvsignore b/manual/.cvsignore
index 92494696db..01f89684cf 100644
--- a/manual/.cvsignore
+++ b/manual/.cvsignore
@@ -5,7 +5,7 @@ TODO COPYING* AUTHORS copyr-* copying.*
glibc-*
*.dvi* *.info* *.c.texi *.ps
-*.toc *.aux *.log
+*.toc *.aux *.log *.tmp
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
chapters chapters-incl1 chapters-incl2 summary.texi stamp-*
diff --git a/manual/Makefile b/manual/Makefile
index c5ca263537..8af1d6c1a2 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -41,47 +41,37 @@ all: info
info: libc.info dir-add.info
endif
-# Set chapters and chapters-incl[12].
--include chapters
-chapters: libc.texinfo
- $(find-includes)
-ifdef chapters
-# @includes in chapter files
--include chapters-incl1
-chapters-incl1: $(chapters)
- $(find-includes)
-chapters-incl1 := $(filter-out summary.texi,$(chapters-incl1))
-endif
-ifdef chapters-incl1
-# @includes in files included by chapter files, if any
--include chapters-incl2
-chapters-incl2: $(chapters-incl1)
- $(find-includes)
-endif
-
-chapters-incl := $(chapters-incl1) $(chapters-incl2)
-
-define find-includes
-(echo '$(@F) :=' \\ ;\
- $(AWK) '$$1 == "@include" { print $$2 " \\" }' $^) > $@.new
-mv -f $@.new $@
-endef
-
# scripts we use
ifndef move-if-change
move-if-change = ./move-if-change
endif
mkinstalldirs = $(..)scripts/mkinstalldirs
-libc.dvi libc.info: $(chapters) summary.texi $(chapters-incl)
+chapters = $(addsuffix .texi, \
+ intro errno memory ctype string mbyte locale message search \
+ pattern io stdio llio filesys pipe socket terminal math \
+ arith time setjmp signal startup process job nss users \
+ sysinfo conf)
+add-chapters = $(wildcard $(patsubst %, ../%.texi, \
+ $(join $(add-ons:=/),$(add-ons))))
+appendices = lang.texi header.texi install.texi maint.texi contrib.texi
+
+-include texis
+texis: $(chapters) $(add-chapters) $(appendices) lgpl.texinfo
+ $(AWK) -f texis.awk $^ > $@.T
+ mv -f $@.T $@
+
+nonexamples = $(filter-out %.c.texi, $(texis))
+examples = $(filter %.c.texi, $(texis))
+
+# Kludge: implicit rule so Make knows the one command does it all.
+chapters.% top-menu.%: $(texis)
+ AWK=$(AWK) $(SHELL) libc-texinfo.sh \
+ '$(chapters)' '$(add-chapters)' '$(appendices)'
+
+libc.dvi libc.info: chapters.texi top-menu.texi
libc.dvi: texinfo.tex
-%.info: %.texinfo
- $(MAKEINFO) $<
-
-%.dvi: %.texinfo
- $(TEXI2DVI) $<
-
# Generate the summary from the Texinfo source files for each chapter.
summary.texi: stamp-summary ;
stamp-summary: summary.awk $(chapters) $(chapters-incl)
@@ -93,7 +83,7 @@ stamp-summary: summary.awk $(chapters) $(chapters-incl)
# Generate a file which can be added to the `dir' content to provide direct
# access to the documentation of the function, variables, and other
# definitions.
-dir-add.texinfo: xtract-typefun.awk $(chapters) $(chapters-incl)
+dir-add.texinfo: xtract-typefun.awk $(texis)
(echo "@dircategory GNU C library functions"; \
echo "@direntry"; \
$(AWK) -f $^; \
@@ -109,18 +99,22 @@ dir-add.texinfo: xtract-typefun.awk $(chapters) $(chapters-incl)
$< | expand > $@.new
mv -f $@.new $@
+%.info: %.texinfo
+ $(MAKEINFO) $<
+
+%.dvi: %.texinfo
+ $(TEXI2DVI) $<
+
+# Distribution.
+minimal-dist = summary.awk texis.awk libc-texinfo.sh libc.texinfo \
+ $(filter-out summary.texi, $(nonexamples)) \
+ $(patsubst %.c.texi,examples/%.c, $(examples))
-minimal-dist = summary.awk libc.texinfo $(chapters) \
- $(patsubst %.c.texi,examples/%.c, \
- $(filter-out summary.texi,$(chapters-incl)))
doc-only-dist = Makefile COPYING.LIB
-distribute = $(minimal-dist) \
- $(patsubst examples/%.c,%.c.texi,$(filter examples/%.c, \
- $(minimal-dist))) \
- libc.info* libc.?? libc.??s texinfo.tex summary.texi \
- stamp-summary chapters chapters-incl1 chapters-incl2 \
+distribute = $(minimal-dist) $(examples) texis stdio-fp.c \
+ libc.info* libc.?? libc.??s texinfo.tex stamp-summary \
xtract-typefun.awk dir-add.texinfo dir-add.info dir \
- stdio-fp.c
+ chapters.texi top-menu.texi
export distribute := $(distribute)
tar-it = tar chovf $@ $^
@@ -149,15 +143,17 @@ glibc-doc-$(edition).tar: $(doc-only-dist) $(distribute)
.PHONY: mostlyclean distclean realclean clean
mostlyclean:
- -rm -f libc.dvi libc.info* dir-add.info stubs
+ -rm -f libc.dvi libc.tmp libc.info* dir-add.info
+ -rm -f $(objpfx)stubs $(objpfx)distinfo
-rm -f $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
clean: mostlyclean
distclean: clean
indices = cp fn pg tp vr ky
realclean: distclean
- -rm -f chapters chapters-incl* summary.texi stamp-summary *.c.texi
+ -rm -f texis summary.texi stamp-summary *.c.texi
-rm -f $(foreach index,$(indices),libc.$(index) libc.$(index)s)
- -rm -f libc.log libc.aux libc.toc dir-add.texi
+ -rm -f libc.log libc.aux libc.toc dir-add.texinfo
+ -rm -f top-menu.texi chapters.texi
.PHONY: install subdir_install installdirs install-data
install-data subdir_install: install
diff --git a/manual/arith.texi b/manual/arith.texi
index 8822a8ce9d..bb7ec34793 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -1,30 +1,6 @@
-@c We need some definitions here.
-@c No we don't, they were done by math.texi. -zw
-@ignore
-@ifclear cdot
-@ifhtml
-@set cdot ·
-@macro mul
-@end macro
-@end ifhtml
-@iftex
-@set cdot ·
-@macro mul
-@cdot
-@end macro
-@end iftex
-@ifclear cdot
-@set cdot x
-@macro mul
-x
-@end macro
-@end ifclear
-@end ifclear
-@end ignore
-
@node Arithmetic, Date and Time, Mathematics, Top
-@chapter Low-Level Arithmetic Functions
+@c %MENU% Low level arithmetic functions
+@chapter Arithmetic Functions
This chapter contains information about functions for doing basic
arithmetic operations, such as splitting a float into its integer and
@@ -33,176 +9,145 @@ These functions are declared in the header files @file{math.h} and
@file{complex.h}.
@menu
-* Infinity:: What is Infinity and how to test for it.
-* Not a Number:: Making NaNs and testing for NaNs.
-* Imaginary Unit:: Constructing complex Numbers.
-* Predicates on Floats:: Testing for infinity and for NaNs.
-* Floating-Point Classes:: Classify floating-point numbers.
-* Operations on Complex:: Projections, Conjugates, and Decomposing.
-* Absolute Value:: Absolute value functions.
-* Normalization Functions:: Hacks for radix-2 representations.
-* Rounding and Remainders:: Determining the integer and
- fractional parts of a float.
-* Arithmetic on FP Values:: Setting and Modifying Single Bits of FP Values.
-* Special arithmetic on FPs:: Special Arithmetic on FPs.
-* Integer Division:: Functions for performing integer
- division.
-* Parsing of Numbers:: Functions for ``reading'' numbers
- from strings.
-* Old-style number conversion:: Low-level number to string conversion.
+* Floating Point Numbers:: Basic concepts. IEEE 754.
+* Floating Point Classes:: The five kinds of floating-point number.
+* Floating Point Errors:: When something goes wrong in a calculation.
+* Rounding:: Controlling how results are rounded.
+* Control Functions:: Saving and restoring the FPU's state.
+* Arithmetic Functions:: Fundamental operations provided by the library.
+* Complex Numbers:: The types. Writing complex constants.
+* Operations on Complex:: Projection, conjugation, decomposition.
+* Integer Division:: Integer division with guaranteed rounding.
+* Parsing of Numbers:: Converting strings to numbers.
+* System V Number Conversion:: An archaic way to convert numbers to strings.
@end menu
-@node Infinity
-@section Infinity Values
-@cindex Infinity
+@node Floating Point Numbers
+@section Floating Point Numbers
+@cindex floating point
+@cindex IEEE 754
@cindex IEEE floating point
-Mathematical operations easily can produce as the result values which
-are not representable by the floating-point format. The functions in
-the mathematics library also have this problem. The situation is
-generally solved by raising an overflow exception and by returning a
-huge value.
+Most computer hardware has support for two different kinds of numbers:
+integers (@math{@dots{}-3, -2, -1, 0, 1, 2, 3@dots{}}) and
+floating-point numbers. Floating-point numbers have three parts: the
+@dfn{mantissa}, the @dfn{exponent}, and the @dfn{sign bit}. The real
+number represented by a floating-point value is given by
+@tex
+$(s \mathrel? -1 \mathrel: 1) \cdot 2^e \cdot M$
+@end tex
+@ifnottex
+@math{(s ? -1 : 1) @mul{} 2^e @mul{} M}
+@end ifnottex
+where @math{s} is the sign bit, @math{e} the exponent, and @math{M}
+the mantissa. @xref{Floating Point Concepts}, for details. (It is
+possible to have a different @dfn{base} for the exponent, but all modern
+hardware uses @math{2}.)
+
+Floating-point numbers can represent a finite subset of the real
+numbers. While this subset is large enough for most purposes, it is
+important to remember that the only reals that can be represented
+exactly are rational numbers that have a terminating binary expansion
+shorter than the width of the mantissa. Even simple fractions such as
+@math{1/5} can only be approximated by floating point.
+
+Mathematical operations and functions frequently need to produce values
+that are not representable. Often these values can be approximated
+closely enough for practical purposes, but sometimes they can't.
+Historically there was no way to tell when the results of a calculation
+were inaccurate. Modern computers implement the @w{IEEE 754} standard
+for numerical computations, which defines a framework for indicating to
+the program when the results of calculation are not trustworthy. This
+framework consists of a set of @dfn{exceptions} that indicate why a
+result could not be represented, and the special values @dfn{infinity}
+and @dfn{not a number} (NaN).
+
+@node Floating Point Classes
+@section Floating-Point Number Classification Functions
+@cindex floating-point classes
+@cindex classes, floating-point
+@pindex math.h
-The @w{IEEE 754} floating-point defines a special value to be used in
-these situations. There is a special value for infinity.
+@w{ISO C 9x} defines macros that let you determine what sort of
+floating-point number a variable holds.
@comment math.h
@comment ISO
-@deftypevr Macro float INFINITY
-An expression representing the infinite value. @code{INFINITY} values are
-produced by mathematical operations like @code{1.0 / 0.0}. It is
-possible to continue the computations with this value since the basic
-operations as well as the mathematical library functions are prepared to