* COPYING: Fix Y2k bug in sample copyright notices.
[platform/upstream/glibc.git] / manual / libc-texinfo.sh
index 7f26f8e..a1aff02 100644 (file)
@@ -19,13 +19,13 @@ build_menu () {
 }
 
 collect_nodes () {
-  grep '^@node.*Top' "$@" /dev/null | cut -d, -f-2 |
-  sed 's/, /:/; s/:@node /:/; s/ /_/g; s/:/ /g' |
+  egrep '^(@c )?@node.*Top' "$@" /dev/null | cut -d, -f-2 |
+  sed 's/@c //; 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'
+  $AWK -f tsort.awk | sed 's/_/ /g'
 }
 
 collect_nodes $1 | build_menu
@@ -34,8 +34,8 @@ 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
+  egrep '^(@c )?@node.*Top' `echo $2 /dev/null | tr ' ' '\n' | sort` |
+  cut -d, -f1 | sed 's/@c //;s/@node //' | build_menu
 
 fi
 
@@ -68,7 +68,7 @@ mv -f incl.$$ chapters.texi
   !/^\*/ { print; }
  ' smenu.$$
  cat <<EOF
-* Copying::                      The GNU Library General Public License says
+* Copying::                      The GNU Lesser General Public License says
                                   how you can copy and share the GNU C Library.
 
 Indices