From vankemme@imec.be Date: Wed, 16 Nov 94 16:25:51 MET From: Rudi Vankemmel To: advax@triumf.ca Subject: hlptohtml Resent-Date: Wed, 16 Nov 1994 07:26:09 PST Resent-From: Resent-To: Hi, i got your hlptohtml shar file from the net and compiled it on our VAX here in order to convert some local software help pages to HTML. A problem occured in this process: in our hlp files it happens that in the first column a number occurs directly followed by a non blank character like in "2-Dimensional...", "8mm" etc. The hlptohtml convertor interprets this as being a new level which it is clearly not as the VAX - HELP only takes a new level if the number is followed by a blank or tab. In order to meet this I modified the C-code slightly for which a patch is included at the end of this mail. However, it is very well possible that I do not have the latest version as I see also other strange things happening when sublevels are referenced. Although these sublevels are indexed well in the .href file, a wrong reference is sometimes taken in the .html pages. So, were can I retrieve the latest version as this problem may be solved in it. Otherwise I'll try to isolate the problem and maybe have a close look myself. Anyway, here comes the patch for the C-version of hlptohtml. *** hlptohtmlv1.c Wed Nov 16 15:54:34 1994 --- hlptohtmlv2.c Wed Nov 16 15:53:22 1994 *************** *** 4,9 **** --- 4,12 ---- /* A.Daviel, TRIUMF, 16-FEB-1994 ; /* modifications by Jerome Lauret /* some changes derived from FORTRAN version 22-Aug-94 AD + * modif 2: R. Vankemmel (vankemme@imec.be): the VAX- VMS HELP + * takes a new level only if the level number is followed + * by a tab or a space; else it is treated as text. */ char **desc_pp ; *************** *** 35,41 **** #include math #include stdio.h #include stdlib.h /* for EXIT_SUCCESS and EXIT_FAILURE */ ! #define Lline 132 #define maxlevel 9 /* max. no. of levels in HLP file */ --- 38,44 ---- #include math #include stdio.h #include stdlib.h /* for EXIT_SUCCESS and EXIT_FAILURE */ ! #include ctype.h /* for isdigit, isspace [modif2] */ #define Lline 132 #define maxlevel 9 /* max. no. of levels in HLP file */ *************** *** 149,154 **** --- 152,160 ---- goto L2 ; } ; if ((line[0] < '1') || (line[0] > '9')) goto L3 ; + /* VAX-HELP recognizes a level only if the number is followed + * by a space or tab; else it is treated as normal text [modif2] */ + if (! (isdigit(line[0]) && isspace(line[1]))) goto L3; ni = sscanf(line,"%d",&level) ; if (ni < 1) goto L3 ; strncpy(word,&line[1],nch) ; /* nch-1 +1 for null */ if (level < prev_level) { with best regards, -- Rudi Vankemmel IMEC vzw. - ASP division TCAD group Kapeldreef 75 phone: (32)-(0)16/28 13 37 3001 Leuven fax: (32)-(0)16/28 12 14 Belgium email: vankemme@imec.be -------------------------------------------------------------------------------