Skip to content

Commit

Permalink
__texi2html__: update error messages, grab error when no texinfo is a…
Browse files Browse the repository at this point in the history
…vailable
  • Loading branch information
pr0m1th3as committed Jan 21, 2024
1 parent 4245c80 commit 00a5897
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions inst/private/__texi2html__.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
endfor
endif
if tex_num == 0
error ("function_texi2html: bad tex format in %s docstring.", ...
error ("__texi2html__: bad tex format in %s docstring.", ...
fcnname);
endif
endfor
Expand All @@ -88,9 +88,9 @@
## Check that 'texi2html' exists in system's PATH
[status, msg] = unix ("texi2html --version");
if (status)
error ("function_texi2html: 'texi2html' command-line tool is missing.");
error ("__texi2html__: 'texi2html' command-line tool is missing.");
elseif (! strcmp (strtrim (msg), "1.82"))
error ("function_texi2html: 'texi2html' version must be exactly 1.82.");
error ("__texi2html__: 'texi2html' version must be exactly 1.82.");
endif

## Fix texi tags that 'texi2html' cannot process or generates error
Expand All @@ -109,7 +109,7 @@

[status, ~] = unix (sprintf ("texi2html %s > /dev/null 2>&1", fcnfile));
if (status)
error ("function_texi2html: unable to convert to html.");
error ("__texi2html__: unable to convert to html.");
endif

## Read generated html file and erase both html and its source
Expand All @@ -125,6 +125,9 @@

## Remove <body *> tag
bd_tag = strfind (html_txt, "\n");
if (bd_tag(1)+2 > length (html_txt))
error ("__texi2html__: no texinfo found.");
endif
html_txt([1:bd_tag(1)+2]) = [];

## Remove index tags from function syntax
Expand Down

0 comments on commit 00a5897

Please sign in to comment.