* man2hlp.c (handle_link): Strip .B and .I
* gindex.pl: Use fifth argument as man2hlp location.
Этот коммит содержится в:
родитель
20dd6b4e88
Коммит
0154dbfdc3
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
* man2hlp.c (handle_command): Handle backslash quoting
|
* man2hlp.c (handle_command): Handle backslash quoting
|
||||||
for .I and .B
|
for .I and .B
|
||||||
|
(handle_link): Strip .B and .I
|
||||||
|
* gindex.pl: Use fifth argument as man2hlp location.
|
||||||
|
|
||||||
2002-03-20 Andrew V. Samoilov <kai@cmail.ru>
|
2002-03-20 Andrew V. Samoilov <kai@cmail.ru>
|
||||||
|
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
# the warranty are quite big, we leave them at the end of the help file,
|
# 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.
|
# 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]";
|
$Topics = "$ARGV[3]";
|
||||||
} elsif ($#ARGV == 2) {
|
} elsif ($#ARGV == 2) {
|
||||||
$Topics = 'Topics:';
|
$Topics = 'Topics:';
|
||||||
} else {
|
} 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]";
|
$man_file = "$ARGV[0]";
|
||||||
@ -16,8 +20,7 @@ $tmpl_file = "$ARGV[1]";
|
|||||||
$out_file = "$ARGV[2]";
|
$out_file = "$ARGV[2]";
|
||||||
|
|
||||||
$help_width = 58;
|
$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";;
|
die "Cannot open read output of man2hlp: $!\n";;
|
||||||
@help_file = <HELP1>;
|
@help_file = <HELP1>;
|
||||||
close (HELP1);
|
close (HELP1);
|
||||||
|
@ -309,6 +309,10 @@ static void handle_link (char *buffer)
|
|||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
/* First part of new format link */
|
/* 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);
|
strcpy (old, buffer);
|
||||||
link_flag = 3;
|
link_flag = 3;
|
||||||
break;
|
break;
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user