diff --git a/src/ChangeLog b/src/ChangeLog index eb161f2a9..a33b733a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * man2hlp.c (handle_command): Handle backslash quoting for .I and .B + (handle_link): Strip .B and .I + * gindex.pl: Use fifth argument as man2hlp location. 2002-03-20 Andrew V. Samoilov diff --git a/src/gindex.pl b/src/gindex.pl index 1bb4edbc3..eabf920f0 100755 --- a/src/gindex.pl +++ b/src/gindex.pl @@ -3,12 +3,16 @@ # the warranty are quite big, we leave them at the end of the help file, # the index will be consulted quite frequently, so we put it at the beginning. -if ($#ARGV == 3) { +$man2hlp = './man2hlp'; +if ($#ARGV == 4) { + $Topics = "$ARGV[3]"; + $man2hlp = "$ARGV[4]"; +} elsif ($#ARGV == 3) { $Topics = "$ARGV[3]"; } elsif ($#ARGV == 2) { $Topics = 'Topics:'; } else { - die "Usage: gindex.pl man_file tmpl_file out_file [Topic section header]"; + die "Usage: gindex.pl man_file tmpl_file out_file [Topic section header] [man2hlp]"; } $man_file = "$ARGV[0]"; @@ -16,8 +20,7 @@ $tmpl_file = "$ARGV[1]"; $out_file = "$ARGV[2]"; $help_width = 58; - -open (HELP1, "./man2hlp $help_width $man_file |") or +open (HELP1, "$man2hlp $help_width $man_file |") or die "Cannot open read output of man2hlp: $!\n";; @help_file = ; close (HELP1); diff --git a/src/man2hlp.c b/src/man2hlp.c index c408f3476..43f2811aa 100644 --- a/src/man2hlp.c +++ b/src/man2hlp.c @@ -309,6 +309,10 @@ static void handle_link (char *buffer) break; case 2: /* First part of new format link */ + /* Bold text or italics text */ + if (buffer [0] == '.' && (buffer [1] == 'I' || buffer [1] == 'B')) + for (buffer += 2; *buffer == ' ' || *buffer == '\t'; buffer++) + ; strcpy (old, buffer); link_flag = 3; break;