diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-17 12:36:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-17 12:36:43 +0000 |
commit | 07435eb48c6acb0313a8957257af4771e9e55030 (patch) | |
tree | 18150741adde33705ec19becfb988a8053cf9ca0 /manual/libc-texinfo.sh | |
parent | af553418323e7afc30e5e1333d1a82592cd3888b (diff) | |
download | glibc-07435eb48c6acb0313a8957257af4771e9e55030.tar.gz glibc-07435eb48c6acb0313a8957257af4771e9e55030.tar.xz glibc-07435eb48c6acb0313a8957257af4771e9e55030.zip |
Update.
1998-07-17 Ulrich Drepper <drepper@cygnus.com> * debug/catchsegv.sh: Fix several stupid bugs. * shlib-versions: Define version for libSegFault. * debug/Makefile: Replace shared lib version number while rewriting. 1998-07-17 Mark Kettenis <kettenis@phys.uva.nl> * sysdeps/mach/hurd/dl-sysdep.c (__mmap): Add sanity check. Suggested by Roland McGrath. 1998-07-15 Andreas Jaeger <aj@arthur.rhein-neckar.de> * timezone/Makefile: Remove '-L (leapseconds)' for testdata generation to control environment. 1998-07-17 09:21 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/sysv4/solaris2/bits/signum.h: Define SIG_HOLD. Patch by John Tobey <jtobey@banta-im.com>. * manual/llio.texi: Document readv/writev and mmap functions. Patch by Michael Deutschmann <michael@talamasca.wkpowerlink.com>. 1998-07-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/Makefile (texis): Depend on texis.awk. (nonexamples): Filter out add-on chapters. (chapters.% top-menu.%): Depend on libc-texinfo.sh. (stamp-summary): Depend on $(texis) except summary.texi. ($(inst_infodir)/libc.info): Simplify command. * manual/libc-texinfo.sh: Cleaned up to use less temporary files. Fix the generation of the detailed node listing to make it complete again. * manual/math.texi: Fix signature of lgamma_r.
Diffstat (limited to 'manual/libc-texinfo.sh')
-rw-r--r-- | manual/libc-texinfo.sh | 147 |
1 files changed, 60 insertions, 87 deletions
diff --git a/manual/libc-texinfo.sh b/manual/libc-texinfo.sh index 88733cb079..7f26f8ec5f 100644 --- a/manual/libc-texinfo.sh +++ b/manual/libc-texinfo.sh @@ -2,98 +2,71 @@ # Create libc.texinfo from the chapter files. -grep '^@node.*Top' $1 | cut -d, -f-2 | - sed 's/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g' >cnodes.$$ - -$AWK '{ file[$2] = $1; nnode[$2] = $3 } -END { for(x in file) - if(file[x] != "") - print file[x] ":" x, file[nnode[x]] ":" nnode[x] }' \ - cnodes.$$ | tsort | sed 's/_/ /g; $d' >corder.$$ - -[ -z "$2" ] || grep '^@node.*Top' `echo $2 /dev/null | tr ' ' '\n' | sort` | - cut -d, -f1 | sed 's/@node //' >xorder.$$ - -grep '^@node.*Top' $3 | cut -d, -f-2 | - sed 's/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g' >anodes.$$ - -$AWK '{ file[$2] = $1; nnode[$2] = $3 } -END { for(x in file) - if(file[x] != "") - print file[x] ":" x, file[nnode[x]] ":" nnode[x] }' \ - anodes.$$ | tsort | sed 's/_/ /g; $d' >aorder.$$ - -IFS=: - ->incl.$$ ->smenu.$$ ->lmenu.$$ - -while read file node; do - echo "@include $file" >>incl.$$ - echo "* $node:: `sed -n 's/^@c %MENU% //p' $file`" >>smenu.$$ - lmenu=`sed -n '/^@menu/,/^@end menu/p; /^@end menu/q' $file | - sed '/^@menu/d; /^@end menu/d'` - [ -z "$lmenu" ] || ( - echo; echo "$node"; echo - echo "$lmenu" - ) >>lmenu.$$ -done <corder.$$ - -if [ -f xorder.$$ ]; then - - (echo; echo 'Add-ons'; echo) >>smenu.$$ - - while read file node; do - echo "@include $file" >>incl.$$ - echo "* $node:: `sed -n 's/^@c %MENU% //p' $file`" >>smenu.$$ - lmenu=`sed -n '/^@menu/,/^@end menu/p; /^@end menu/q' $file | - sed '/^@menu/d; /^@end menu/d'` - [ -z "$lmenu" ] || ( - echo; echo "$node"; echo - echo "$lmenu" - ) >>lmenu.$$ - done <xorder.$$ -fi +trap "rm -f *.$$; exit 1" 1 2 15 + +exec 3>incl.$$ 4>smenu.$$ 5>lmenu.$$ + +build_menu () { + while IFS=: read file node; do + echo "@include $file" >&3 + echo "* $node:: `sed -n 's/^@c %MENU% //p' $file`" >&4 + $AWK 'BEGIN { do_menu = 0 } + /^@node / { sub(/^@node /, ""); sub(/,.*$/, ""); node = $0 } + /^@menu/ { printf "\n%s\n\n", node; do_menu = 1; next } + /^@end menu/ { do_menu = 0 } + do_menu { print }' $file >&5 + done +} -(echo; echo 'Appendices'; echo) >>smenu.$$ - -while read file node; do - echo "@include $file" >>incl.$$ - echo "* $node:: `sed -n 's/^@c %MENU% //p' $file`" >>smenu.$$ - lmenu=`sed -n '/^@menu/,/^@end menu/p; /^@end menu/q' $file | - sed '/^@menu/d; /^@end menu/d'` - [ -z "$lmenu" ] || ( - echo; echo "$node"; echo - echo "$lmenu" - ) >>lmenu.$$ -done <aorder.$$ - -$AWK ' -BEGIN { FS=":" } - -/^\*/ { - printf("%-32s", $1 "::"); - x = split($3, word, " "); - hpos = 34; - for(i = 1; i <= x; i++) { - hpos += length(word[i]) + 1; - if(hpos > 78) { - printf("\n%34s", ""); - hpos = 35 + length(word[i]); - } - printf(" %s", word[i]); - } - print "."; +collect_nodes () { + grep '^@node.*Top' "$@" /dev/null | cut -d, -f-2 | + sed 's/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g' | + $AWK '{ file[$2] = $1; nnode[$2] = $3 } + END { for (x in file) + if (file[x] != "") + print file[x] ":" x, file[nnode[x]] ":" nnode[x] }' | + tsort | sed 's/_/ /g; $d' } -!/^\*/ { print; } -' smenu.$$ >smenux.$$ +collect_nodes $1 | build_menu + +if [ -n "$2" ]; then + + { echo; echo 'Add-ons'; echo; } >&4 + + grep '^@node.*Top' `echo $2 /dev/null | tr ' ' '\n' | sort` | + cut -d, -f1 | sed 's/@node //' | build_menu + +fi + +{ echo; echo 'Appendices'; echo; } >&4 + +collect_nodes $3 | build_menu + +exec 3>&- 4>&- 5>&- mv -f incl.$$ chapters.texi -(echo '@menu' - cat smenux.$$ +{ + echo '@menu' + $AWK -F: ' + /^\*/ { + printf("%-32s", $1 "::"); + x = split($3, word, " "); + hpos = 34; + for (i = 1; i <= x; i++) { + hpos += length(word[i]) + 1; + if (hpos > 78) { + printf("\n%34s", ""); + hpos = 35 + length(word[i]); + } + printf(" %s", word[i]); + } + print "."; + } + + !/^\*/ { print; } + ' smenu.$$ cat <<EOF * Copying:: The GNU Library General Public License says how you can copy and share the GNU C Library. @@ -109,7 +82,7 @@ Indices --- The Detailed Node Listing --- EOF cat lmenu.$$ - echo '@end menu' ) >top-menu.texi.$$ + echo '@end menu'; } >top-menu.texi.$$ mv -f top-menu.texi.$$ top-menu.texi rm -f *.$$ |