| 1 | #!/bin/sh | 
|---|
| 2 | # Bug where whitespace after @menu caused confusion. | 
|---|
| 3 |  | 
|---|
| 4 | unset TEXINFO_OUTPUT | 
|---|
| 5 | : ${srcdir=.} | 
|---|
| 6 | input=`basename $0`.txi | 
|---|
| 7 |  | 
|---|
| 8 | ../makeinfo -o /dev/null $srcdir/$input | 
|---|
| 9 | exit $? | 
|---|
| 10 |  | 
|---|
| 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 | 
|---|
| 15 |  | 
|---|
| 16 | The following example demonstrates a bug in makeinfo: | 
|---|
| 17 |  | 
|---|
| 18 | $ cat top.texi | 
|---|
| 19 | @setfilename top.info | 
|---|
| 20 |  | 
|---|
| 21 | @node Top | 
|---|
| 22 | @top Top | 
|---|
| 23 |  | 
|---|
| 24 | @menu | 
|---|
| 25 | * first:: | 
|---|
| 26 | @end menu | 
|---|
| 27 |  | 
|---|
| 28 | @node first | 
|---|
| 29 | @chapter first | 
|---|
| 30 |  | 
|---|
| 31 | @menu   @c | 
|---|
| 32 | * second:: | 
|---|
| 33 | @end menu | 
|---|
| 34 |  | 
|---|
| 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. | 
|---|
| 42 |  | 
|---|
| 43 | Makeinfo is being confused by the whitespace after @menu, or rather by its | 
|---|
| 44 | absence. | 
|---|
| 45 |  | 
|---|
| 46 |  | 
|---|
| 47 | 1998-12-06  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de> | 
|---|
| 48 |  | 
|---|
| 49 | * makeinfo/node.c (cm_node): When searching for @menu don't | 
|---|
| 50 | require a space after it. | 
|---|
| 51 |  | 
|---|
| 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; | 
|---|
| 56 |  | 
|---|
| 57 | input_text_offset = | 
|---|
| 58 | -                    search_forward ("\n@menu ", orig_offset); | 
|---|
| 59 | +                    search_forward ("\n@menu", orig_offset); | 
|---|
| 60 |  | 
|---|
| 61 | -                  if (input_text_offset > -1) | 
|---|
| 62 | +                  if (input_text_offset > -1 | 
|---|
| 63 | +                     && cr_or_whitespace (input_text[input_text_offset + 6])) | 
|---|
| 64 | { | 
|---|
| 65 | char *nodename_from_menu = NULL; | 
|---|
| 66 |  | 
|---|
| 67 |  | 
|---|
| 68 | -- | 
|---|
| 69 | Andreas Schwab                                      "And now for something | 
|---|
| 70 | schwab@issan.cs.uni-dortmund.de                      completely different" | 
|---|
| 71 | schwab@gnu.org | 
|---|
| 72 |  | 
|---|