aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/troff2html
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-16 21:30:59 +0000
committerrsc <devnull@localhost>2005-01-16 21:30:59 +0000
commitb50e9caf31a0d1346bf782c6b4e32f90fd707223 (patch)
tree5839cf86aa5c788b26c0d1796447a86cb98be2b8 /src/cmd/troff2html
parenta192c1406c0427235c22e1b8151b660e9bfbee75 (diff)
downloadplan9port-b50e9caf31a0d1346bf782c6b4e32f90fd707223.tar.gz
plan9port-b50e9caf31a0d1346bf782c6b4e32f90fd707223.tar.bz2
plan9port-b50e9caf31a0d1346bf782c6b4e32f90fd707223.zip
handle section (9p)
Diffstat (limited to 'src/cmd/troff2html')
-rw-r--r--src/cmd/troff2html/troff2html.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/troff2html/troff2html.c b/src/cmd/troff2html/troff2html.c
index 20d48d1f..9cf0bdac 100644
--- a/src/cmd/troff2html/troff2html.c
+++ b/src/cmd/troff2html/troff2html.c
@@ -610,7 +610,7 @@ xcmd(Biobuf *b)
if(nfld==6 && strcmp(fld[2], "manref")==0){
/* was the right macro; is it the right form? */
if(strlen(fld[5])>=3 &&
- fld[5][0]=='(' && fld[5][2]==')' &&
+ fld[5][0]=='('/*)*/ && (fld[5][2]==/*(*/')' || (isalpha((uchar)fld[5][2]) && fld[5][3]==/*(*/')')) &&
'0'<=fld[5][1] && fld[5][1]<='9'){
if(strcmp(fld[3], "start") == 0){
/* set anchor attribute and remember string */
@@ -622,6 +622,9 @@ xcmd(Biobuf *b)
#else
snprint(buf, sizeof buf,
"<a href=\"../man%c/%s.html\">", fld[5][1], fld[4]);
+ for(p=buf; *p; p++)
+ if('A' <= *p && *p <= 'Z')
+ *p += 'a'-'A';
#endif
nanchors++;
anchors = erealloc(anchors, nanchors*sizeof(char*));