diff options
Diffstat (limited to 'extension')
-rw-r--r-- | extension/ChangeLog | 7 | ||||
-rw-r--r-- | extension/Makefile.am | 4 | ||||
-rw-r--r-- | extension/Makefile.in | 91 | ||||
-rw-r--r-- | extension/fnmatch.3am | 1 | ||||
-rw-r--r-- | extension/fork.3am | 1 | ||||
-rw-r--r-- | extension/rwarray.3am | 88 | ||||
-rw-r--r-- | extension/time.3am | 2 |
7 files changed, 180 insertions, 14 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog index 40355ef3..5ab0207b 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,10 @@ +2012-08-01 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (man_MANS): Add man page files so that they + get installed. + * rwarray.3am: New file. + * fnmatch.3am, fork.3am, time.3am: Revised. + 2012-07-31 Arnold D. Robbins <arnold@skeeve.com> * rwarray0.c: Renamed from rwarray.c. diff --git a/extension/Makefile.am b/extension/Makefile.am index 016b0344..2e6a523d 100644 --- a/extension/Makefile.am +++ b/extension/Makefile.am @@ -78,5 +78,9 @@ EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 +man_MANS = \ + filefuncs.3am fnmatch.3am fork.3am ordchr.3am \ + readdir.3am readfile.3am rwarray.3am time.3am + # gettext requires this SUBDIRS = diff --git a/extension/Makefile.in b/extension/Makefile.in index f3cea570..e64fb88b 100644 --- a/extension/Makefile.in +++ b/extension/Makefile.in @@ -133,7 +133,8 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(pkgextensiondir)" +am__installdirs = "$(DESTDIR)$(pkgextensiondir)" \ + "$(DESTDIR)$(man3dir)" LTLIBRARIES = $(pkgextension_LTLIBRARIES) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @@ -224,6 +225,9 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +man3dir = $(mandir)/man3 +NROFF = nroff +MANS = $(man_MANS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -457,6 +461,10 @@ EXTRA_DIST = build-aux/config.rpath \ ChangeLog \ ChangeLog.0 +man_MANS = \ + filefuncs.3am fnmatch.3am fork.3am ordchr.3am \ + readdir.3am readfile.3am rwarray.3am time.3am + # gettext requires this SUBDIRS = @@ -612,6 +620,49 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt +install-man3: $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + +uninstall-man3: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man3dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -777,6 +828,19 @@ distclean-tags: -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically 'make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -959,10 +1023,10 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile $(LTLIBRARIES) config.h +all-am: Makefile $(LTLIBRARIES) $(MANS) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(pkgextensiondir)"; do \ + for dir in "$(DESTDIR)$(pkgextensiondir)" "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -1019,7 +1083,7 @@ info: info-recursive info-am: -install-data-am: install-pkgextensionLTLIBRARIES +install-data-am: install-man install-pkgextensionLTLIBRARIES install-dvi: install-dvi-recursive @@ -1035,7 +1099,7 @@ install-info: install-info-recursive install-info-am: -install-man: +install-man: install-man3 install-pdf: install-pdf-recursive @@ -1067,7 +1131,9 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-pkgextensionLTLIBRARIES +uninstall-am: uninstall-man uninstall-pkgextensionLTLIBRARIES + +uninstall-man: uninstall-man3 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ cscopelist-recursive ctags-recursive install-am install-strip \ @@ -1085,12 +1151,13 @@ uninstall-am: uninstall-pkgextensionLTLIBRARIES install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkgextensionLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am \ + install-man3 install-pdf install-pdf-am \ + install-pkgextensionLTLIBRARIES install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-man uninstall-man3 \ uninstall-pkgextensionLTLIBRARIES diff --git a/extension/fnmatch.3am b/extension/fnmatch.3am index 2a922d21..d4384974 100644 --- a/extension/fnmatch.3am +++ b/extension/fnmatch.3am @@ -81,7 +81,6 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH) .fi .ft R .SH "SEE ALSO" -.IR fnmatch (3), .IR "GAWK: Effective AWK Programming" , .IR filefuncs (3am), .IR fork (3am), diff --git a/extension/fork.3am b/extension/fork.3am index 4fb9681c..804ad0c9 100644 --- a/extension/fork.3am +++ b/extension/fork.3am @@ -58,6 +58,7 @@ else .IR "GAWK: Effective AWK Programming" , .IR filefuncs (3am), .IR fnmatch (3am), +.IR ordchr (3am), .IR readdir (3am), .IR readfile (3am), .IR rwarray (3am), diff --git a/extension/rwarray.3am b/extension/rwarray.3am new file mode 100644 index 00000000..b8977604 --- /dev/null +++ b/extension/rwarray.3am @@ -0,0 +1,88 @@ +.TH RWARRAY 3am "Aug 01 2012" "Free Software Foundation" "GNU Awk Extension Modules" +.SH NAME +writea, reada \- write and read gawk arrays to/from files +.SH SYNOPSIS +.ft CW +@load "rwarray" +.br +ret = writea(file, array) +.sp +ret = reada(file, array) +.ft R +.SH DESCRIPTION +The +.I rwarray +extension adds two functions named +.BR writea() . +and +.BR reada() , +as follows. +.TP +.B writea() +This function takes a string argument, which is the name of the +file to which dump the array, and the array itself as the second +argument. +.B writea() +understands multidimensional arrays. +It returns 1 on success, 0 on failure. +.TP +.B reada() +is the inverse of +.BR writea() ; +it reads the file named as its first argument, filling in +the array named as the second argument. It clears the array +first. +Here too, the return value is 1 on success and 0 on failure. +.SH NOTES +The file contains binary data. All integral values are written +in network byte order. +However, double precision floating-point values are written as +native binary data. Thus, arrays containing only string data +can theoretically be dumped on systems with one byte order and +restored on systems with a different one, but this has not been tried. +... .SH BUGS +.SH EXAMPLE +.ft CW +.nf +@load "rwarray" +\&... +ret = writea("arraydump.bin", array) +\&... +ret = reada("arraydump.bin", array) +.fi +.ft R +.SH "SEE ALSO" +.IR "GAWK: Effective AWK Programming" , +.IR filefuncs (3am), +.IR fnmatch (3am), +.IR fork (3am), +.IR ordchr (3am), +.IR readdir (3am), +.IR readfile (3am), +.IR time (3am). +.SH AUTHOR +Arnold Robbins, +.BR arnold@skeeve.com . +.SH COPYING PERMISSIONS +Copyright \(co 2012 +Free Software Foundation, Inc. +.PP +Permission is granted to make and distribute verbatim copies of +this manual page provided the copyright notice and this permission +notice are preserved on all copies. +.ig +Permission is granted to process this file through troff and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual page). +.. +.PP +Permission is granted to copy and distribute modified versions of this +manual page under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. +.PP +Permission is granted to copy and distribute translations of this +manual page into another language, under the above conditions for +modified versions, except that this permission notice may be stated in +a translation approved by the Foundation. diff --git a/extension/time.3am b/extension/time.3am index ad582b72..53cd1751 100644 --- a/extension/time.3am +++ b/extension/time.3am @@ -54,7 +54,7 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done" .IR ordchr (3am), .IR readdir (3am), .IR readfile (3am), -.IR rwarray (3am), +.IR rwarray (3am). .SH AUTHOR Arnold Robbins, .BR arnold@skeeve.com . |