Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / texinfo / makeinfo / tests / menu-whitespace
bloba01a38d5c04ba7e459b0668d8a117a008b3c2598
1 #!/bin/sh
2 # Bug where whitespace after @menu caused confusion.
4 unset TEXINFO_OUTPUT
5 : ${srcdir=.}
6 input=`basename $0`.txi
8 ../makeinfo -o /dev/null $srcdir/$input
9 exit $?
11 Date: 07 Dec 1998 11:23:44 +0100
12 From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
13 To: bug-texinfo@gnu.org
14 Subject: Makeinfo mishandles defaulted node links
16 The following example demonstrates a bug in makeinfo:
18 $ cat top.texi
19 @setfilename top.info
21 @node Top
22 @top Top
24 @menu
25 * first::
26 @end menu
28 @node first
29 @chapter first
31 @menu @c
32 * second::
33 @end menu
35 @node second
36 @section second
37 $ makeinfo top.texi
38 Making info file `top.info' from `top.texi'.
39 ./top.texi:3: Next field of node `Top' not pointed to.
40 ./top.texi:17: This node (second) has the bad Prev.
41 makeinfo: Removing output file `/home/as/test/top.info' due to errors; use --force to preserve.
43 Makeinfo is being confused by the whitespace after @menu, or rather by its
44 absence.
47 1998-12-06 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
49 * makeinfo/node.c (cm_node): When searching for @menu don't
50 require a space after it.
52 --- texinfo-3.12b/makeinfo/node.c.~1~ Mon Oct 26 23:14:59 1998
53 +++ texinfo-3.12b/makeinfo/node.c Sun Dec 6 00:23:59 1998
54 @@ -523,9 +523,10 @@
55 orig_size = size_of_input_text;
57 input_text_offset =
58 - search_forward ("\n@menu ", orig_offset);
59 + search_forward ("\n@menu", orig_offset);
61 - if (input_text_offset > -1)
62 + if (input_text_offset > -1
63 + && cr_or_whitespace (input_text[input_text_offset + 6]))
65 char *nodename_from_menu = NULL;
68 --
69 Andreas Schwab "And now for something
70 schwab@issan.cs.uni-dortmund.de completely different"
71 schwab@gnu.org