diff options
author | obrien <obrien@FreeBSD.org> | 2000-01-16 10:01:07 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2000-01-16 10:01:07 +0000 |
commit | 23ef7a8bc955202c448999809e972fd1fef3ec32 (patch) | |
tree | 5fcfca9f31719366c6989a72e2bc7e8df2a853fa /contrib/bc/doc | |
parent | fae56b48f4647ca03d9d87e5aa9b399155b5b576 (diff) | |
parent | 9657c835ffcf45e0a6d46f291505b0b112f8a244 (diff) | |
download | FreeBSD-src-23ef7a8bc955202c448999809e972fd1fef3ec32.zip FreeBSD-src-23ef7a8bc955202c448999809e972fd1fef3ec32.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r56101,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/bc/doc')
-rw-r--r-- | contrib/bc/doc/Makefile.in | 201 | ||||
-rw-r--r-- | contrib/bc/doc/dc.texi | 86 |
2 files changed, 182 insertions, 105 deletions
diff --git a/contrib/bc/doc/Makefile.in b/contrib/bc/doc/Makefile.in index 770e201..2593d25 100644 --- a/contrib/bc/doc/Makefile.in +++ b/contrib/bc/doc/Makefile.in @@ -1,8 +1,14 @@ -# Makefile.in generated automatically by automake 1.1n from Makefile.am +# Makefile.in generated automatically by automake 1.3 from Makefile.am -# Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. SHELL = /bin/sh @@ -26,6 +32,8 @@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include +DISTDIR = + pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -43,12 +51,12 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ -NORMAL_INSTALL = true -PRE_INSTALL = true -POST_INSTALL = true -NORMAL_UNINSTALL = true -PRE_UNINSTALL = true -POST_UNINSTALL = true +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : CC = @CC@ LEX = @LEX@ PACKAGE = @PACKAGE@ @@ -72,7 +80,8 @@ TEXINFO_TEX = $(srcdir)/texinfo.tex INFO_DEPS = dc.info DVIS = dc.dvi TEXINFOS = dc.texi -MANS = bc.1 dc.1 +man1dir = $(mandir)/man1 +MANS = $(man_MANS) NROFF = nroff DIST_COMMON = Makefile.am Makefile.in texinfo.tex @@ -82,14 +91,14 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP = --best -default: all +all: Makefile $(INFO_DEPS) $(MANS) .SUFFIXES: -.SUFFIXES: .texi .texinfo .info .dvi .ps -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile +.SUFFIXES: .dvi .info .ps .texi .texinfo .txi +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -101,6 +110,7 @@ dc.dvi: dc.texi DVIPS = dvips .texi.info: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` @@ -109,54 +119,72 @@ DVIPS = dvips MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< .texi: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texinfo.info: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texinfo: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texinfo.dvi: TEXINPUTS=$(srcdir):$$TEXINPUTS \ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + +.txi.info: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` + +.txi.dvi: + TEXINPUTS=$(srcdir):$$TEXINPUTS \ + MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< + +.txi: + @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] + cd $(srcdir) \ + && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .dvi.ps: $(DVIPS) $< -o $@ install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(infodir) + $(mkinstalldirs) $(DESTDIR)$(infodir) @for file in $(INFO_DEPS); do \ d=$(srcdir); \ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ if test -f $$d/$$ifile; then \ - echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \ - $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \ + echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ + $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ else : ; fi; \ done; \ done @$(POST_INSTALL) - @if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ for file in $(INFO_DEPS); do \ - echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\ - install-info --info-dir=$(infodir) $(infodir)/$$file; :;\ + echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ + install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ done; \ else : ; fi uninstall-info: $(PRE_UNINSTALL) - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ ii=yes; \ else ii=; fi; \ for file in $(INFO_DEPS); do \ - test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \ + test -z "$ii" \ + || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done - $(NORMAL_UNINSTALL) + @$(NORMAL_UNINSTALL) for file in $(INFO_DEPS); do \ - (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ + (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ done dist-info: $(INFO_DEPS) @@ -169,39 +197,61 @@ dist-info: $(INFO_DEPS) done; \ done -mostlyclean-info: - rm -f dc.aux dc.cp dc.cps dc.dvi dc.fn dc.fns dc.ky dc.log dc.pg dc.toc \ - dc.tp dc.tps dc.vr dc.vrs dc.op dc.tr dc.cv +mostlyclean-aminfo: + -rm -f dc.aux dc.cp dc.cps dc.dvi dc.fn dc.fns dc.ky dc.kys dc.ps \ + dc.log dc.pg dc.toc dc.tp dc.tps dc.vr dc.vrs dc.op dc.tr \ + dc.cv dc.cn -clean-info: +clean-aminfo: -distclean-info: +distclean-aminfo: -maintainer-clean-info: - for i in $(INFO_DEPS); do rm -f `eval echo $$i*`; done -install-man: $(MANS) - $(NORMAL_INSTALL) - $(mkinstalldirs) $(mandir)/man1 - @sect=1; \ - inst=`echo "bc" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/bc.1; then file=$(srcdir)/bc.1; \ - else file=bc.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst - @sect=1; \ - inst=`echo "dc" | sed '$(transform)'`.1; \ - if test -f $(srcdir)/dc.1; then file=$(srcdir)/dc.1; \ - else file=dc.1; fi; \ - echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \ - $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst +maintainer-clean-aminfo: + for i in $(INFO_DEPS); do \ + rm -f $$i; \ + if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \ + rm -f $$i-[0-9]*; \ + fi; \ + done -uninstall-man: - $(NORMAL_UNINSTALL) - inst=`echo "bc" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst - inst=`echo "dc" | sed '$(transform)'`.1; \ - rm -f $(mandir)/man1/$$inst +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) uninstall-man1 tags: TAGS TAGS: @@ -209,6 +259,7 @@ TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = doc + distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ @@ -216,7 +267,7 @@ distdir: $(DISTFILES) || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ done - $(MAKE) distdir="$(distdir)" dist-info + $(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info info: $(INFO_DEPS) dvi: $(DVIS) check: all @@ -233,46 +284,44 @@ install: install-exec install-data all uninstall: uninstall-info uninstall-man -all: $(INFO_DEPS) $(MANS) Makefile - install-strip: - $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install installdirs: - $(mkinstalldirs) $(infodir) $(mandir)/man1 + $(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(mandir)/man1 mostlyclean-generic: - test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: - test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - rm -f Makefile $(DISTCLEANFILES) - rm -f config.cache config.log stamp-h - test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(DISTCLEANFILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: - test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-info mostlyclean-generic + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +mostlyclean: mostlyclean-aminfo mostlyclean-generic -clean: clean-info clean-generic mostlyclean +clean: clean-aminfo clean-generic mostlyclean -distclean: distclean-info distclean-generic clean - rm -f config.status +distclean: distclean-aminfo distclean-generic clean + -rm -f config.status -maintainer-clean: maintainer-clean-info maintainer-clean-generic \ +maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \ distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." -.PHONY: default install-info-am uninstall-info mostlyclean-info \ -distclean-info clean-info maintainer-clean-info install-man \ -uninstall-man tags distdir info dvi installcheck install-exec \ -install-data install uninstall all installdirs mostlyclean-generic \ -distclean-generic clean-generic maintainer-clean-generic clean \ -mostlyclean distclean maintainer-clean +.PHONY: install-info-am uninstall-info mostlyclean-aminfo \ +distclean-aminfo clean-aminfo maintainer-clean-aminfo install-man1 \ +uninstall-man1 install-man uninstall-man tags distdir info dvi \ +installcheck install-exec install-data install uninstall all \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/contrib/bc/doc/dc.texi b/contrib/bc/doc/dc.texi index e0ade80..968a819 100644 --- a/contrib/bc/doc/dc.texi +++ b/contrib/bc/doc/dc.texi @@ -27,7 +27,7 @@ Published by the Free Software Foundation, 675 Massachusetts Avenue, Cambridge, MA 02139 USA -Copyright (C) 1984 Free Software Foundation, Inc. +Copyright (C) 1984, 1994, 1997, 1998 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -60,7 +60,7 @@ by the Foundation. @author original manual by Richard Stallman @page @vskip 0pt plus 1filll -Copyright @copyright{} 1994, 1997 Free Software Foundation, Inc. +Copyright @copyright{} 1994, 1997, 1998 Free Software Foundation, Inc. @sp 2 Published by the Free Software Foundation, @* @@ -97,7 +97,7 @@ by the Foundation. * Strings:: Strings * Status Inquiry:: Status Inquiry * Miscellaneous:: Other commands -* Notes:: Notes +* Reporting bugs:: Reporting bugs @end menu @node Introduction, Invocation, Top, Top @@ -172,9 +172,23 @@ Prints the value on the top of the stack, without altering the stack. A newline is printed after the value. -@item P +@item n Prints the value on the top of the stack, popping it off, and does not print a newline after. +(This command is a GNU extension.) + +@item P +Pops off the value on top of the stack. +If it it a string, it is simply printed without a trailing newline. +Otherwise it is a number, and the integer portion of its absolute +value is printed out as a "base (UCHAR_MAX+1)" byte stream. +Assuming that (UCHAR_MAX+1) is 256 +(as it is on most machines with 8-bit bytes), +the sequence +@code{KSK 0k1/ [_1*]sx d0>x [256~aPd0<x]dsxx sxLKk} +could also accomplish this function, +except for the side-effect of clobbering the x register. +(Details of the behavior with a number are a GNU extension.) @item f Prints the entire contents of the stack @@ -199,9 +213,12 @@ from the second one popped, and pushes the result. @item * Pops two values, multiplies them, and pushes the result. -The number of fraction digits in the result is controlled -by the current precision value (see below) and does not -depend on the values being multiplied. +The number of fraction digits in the result is the largest of +the precision value, +the number of fraction digits in the multiplier, +or the number of fraction digits in the multiplicand; +but in no event exceeding the number of digits required for +an exact result. @item / Pops two values, divides the second one popped @@ -213,9 +230,8 @@ Pops two values, computes the remainder of the division that the @samp{/} command would do, and pushes that. -The division is done with as many fraction digits -as the precision value specifies, -and the remainder is also computed with that many fraction digits. +The value computed is the same as that computed by +the sequence @code{Sd dld/ Ld*-} . @item ~ Pops two values, @@ -244,11 +260,11 @@ is not an integer. The second popped is used as the exponent; this value must be a non-negative number, and any fractional part of this exponent will be ignored. -The third value popped is the base which gets exponentiated. -The precision value specifies the number of fraction -digits in the result. -For small numbers this is like the sequence @code{Sm lble^ Lm%}, +The third value popped is the base which gets exponentiated, +which should be an integer. +For small integers this is like the sequence @code{Sm^Lm%}, but, unlike @code{^}, this command will work with arbritrarily large exponents. +(This command is a GNU extension.) @item v Pops one value, computes its square root, and pushes that. @@ -262,11 +278,6 @@ The default precision value is zero, which means that all arithmetic except for addition and subtraction produces integer results. -The remainder operation (@samp{%}) requires some explanation: -applied to arguments @samp{a} and @samp{b} -it produces @samp{a - (b * (a / b))}, -where @samp{a / b} is computed in the current precision. - @node Stack Control, Registers, Arithmetic, Top @chapter Stack Control @@ -287,7 +298,8 @@ Reverses the order of (swaps) the top two values on the stack. @node Registers, Parameters, Stack Control, Top @chapter Registers -@sc{dc} provides 256 memory registers, each named by a single character. +@sc{dc} provides at least 256 memory registers, +each named by a single character. You can store a number in a register and retrieve it later. @table @samp @@ -333,7 +345,7 @@ The output radix is used for printing numbers. The input and output radices are separate parameters; you can make them unequal, which can be useful or confusing. -The input radix must be between 2 and 36 inclusive. +The input radix must be between 2 and 16 inclusive. The output radix must be at least 2. The precision must be zero or greater. The precision is always measured in decimal digits, @@ -412,13 +424,25 @@ if the original top-of-stack is greater. Thus, @samp{1 2>a} will invoke register @samp{a}'s contents and @samp{2 1>a} will not. +@item !>@var{r} +Similar but invokes the macro if the original top-of-stack is not greater +(is less than or equal to) what was the second-to-top. + @item <@var{r} Similar but invokes the macro if the original top-of-stack is less. +@item !<@var{r} +Similar but invokes the macro if the original top-of-stack is not less +(is greater than or equal to) what was the second-to-top. + @item =@var{r} Similar but invokes the macro if the two numbers popped are equal. @c This can also be validly used to compare two strings for equality. +@item !=@var{r} +Similar but invokes the macro if the two numbers popped are not equal. +@c This can also be validly used to compare two strings for equality. + @item ? Reads a line from the terminal and executes it. This command allows a macro to request input from the user. @@ -455,17 +479,20 @@ For a string, the value pushed is 0. @item z -Pushes the current stack depth; +Pushes the current stack depth: the number of objects on the stack before the execution of the @samp{z} command. @end table -@node Miscellaneous, Notes, Status Inquiry, Top +@node Miscellaneous, Reporting bugs, Status Inquiry, Top @chapter Miscellaneous @table @samp @item ! Will run the rest of the line as a system command. +Note that parsing of the !<, !=, and !> commands take precidence, +so if you want to run a command starting with <, =, or > you will +need to add a space after the !. @item # Will interpret the rest of the line as a comment. @@ -482,13 +509,14 @@ the array @var{r}. The selected value is then pushed onto the stack. @end table -@node Notes, , Miscellaneous, Top -@chapter Notes +Note that each stacked instance of a register has its own +array associated with it. +Thus @samp{1 @var{0:a} 0S@var{a} 2 @var{0:a} L@var{a} @var{0;a}p} +will print 1, because the 2 was stored in an instance of @var{0:a} +that was later popped. -The array operations @samp{:} and @samp{;} are usually -only used by traditional implementations of BC. -(The GNU implementation of BC is self contained -and does not need any version of @sc{dc} to run.) +@node Reporting bugs, , Miscellaneous, Top +@chapter Reporting bugs Email bug reports to @code{bug-gnu-utils@@prep.ai.mit.edu}. Be sure to include the word ``dc'' somewhere in the ``Subject:'' field. |