diff options
Diffstat (limited to 'man2html/man2html.c')
-rw-r--r-- | man2html/man2html.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/man2html/man2html.c b/man2html/man2html.c index 7d660d2..b4c6cb6 100644 --- a/man2html/man2html.c +++ b/man2html/man2html.c @@ -154,7 +154,6 @@ add_links(char *c) ** www.host.name -> http://www.host.name ** ftp.host.name -> ftp://ftp.host.name ** name@host -> mailto:name@host - ** <name.h> -> file:/usr/include/name.h (guess) ** ** Other possible links to add in the future: ** @@ -162,7 +161,7 @@ add_links(char *c) */ int i,j,nr; char *f, *g, *h; - char *idtest[6]; /* url, mailto, www, ftp, manpage, include file */ + char *idtest[5]; /* url, mailto, www, ftp, manpage */ out_length+=strlen(c); @@ -172,33 +171,12 @@ add_links(char *c) idtest[2]=strstr(c,"www."); idtest[3]=strstr(c,"ftp."); idtest[4]=strchr(c+1,'('); - idtest[5]=strstr(c+1,".h>"); - for (i=0; i<6; i++) nr += (idtest[i]!=NULL); + for (i=0; i<5; i++) nr += (idtest[i]!=NULL); while (nr) { j=-1; - for (i=0; i<6; i++) + for (i=0; i<5; i++) if (idtest[i] && (j<0 || idtest[i]<idtest[j])) j=i; switch (j) { - case 5: /* <name.h> */ - f=idtest[5]; - h=f+2; - g=f; - while (g>c && g[-1]!=';') g--; - if (g!=c) { - char t; - t=*g; - *g=0; - printf("%s",c); - *g=t;*h=0; - include_file_html(g); - c=f+6; - } else { - f[5]=0; - printf("%s",c); - f[5]=';'; - c=f+5; - } - break; case 4: /* manpage? */ f=idtest[j]; /* find section - accept (1), (3F), (3Xt), (n), (l) */ @@ -321,8 +299,7 @@ add_links(char *c) if (idtest[2] && idtest[2]<c) idtest[2]=strstr(c,"www."); if (idtest[3] && idtest[3]<c) idtest[3]=strstr(c,"ftp."); if (idtest[4] && idtest[4]<c) idtest[4]=strchr(c+1,'('); - if (idtest[5] && idtest[5]<c) idtest[5]=strstr(c+1,".h>"); - for (i=0; i<6; i++) nr += (idtest[i]!=NULL); + for (i=0; i<5; i++) nr += (idtest[i]!=NULL); } printf("%s", c); } |