diff options
author | rhlabs <rhlabs> | 1998-03-10 22:41:58 +0000 |
---|---|---|
committer | rhlabs <rhlabs> | 1998-03-10 22:41:58 +0000 |
commit | 37d153443134e2849f3abf91cc53d547b413f1c1 (patch) | |
tree | 92b89068e119611e1f3c3e2e39a7eda6ce03627a | |
parent | b3b1989c00dbeaf47f10fbecd2ff3fb9717e7554 (diff) | |
download | yelp-37d153443134e2849f3abf91cc53d547b413f1c1.tar.gz |
Fixed a few thing, having problems with others:
- man2html converter outputs absolute refs in index, like 'man:ls(1)#index'
- added some session management code, but its disabled till argp stuff settles
- possibly broke marc's code to keep human readable URLs in entry box
not a good day.
Dr Mike <msf@redhat.com>
-rw-r--r-- | src/man2html/yelp-man2html.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/man2html/yelp-man2html.c b/src/man2html/yelp-man2html.c index bf40671e..93906a1a 100644 --- a/src/man2html/yelp-man2html.c +++ b/src/man2html/yelp-man2html.c @@ -123,6 +123,9 @@ #include <sys/time.h> #include <errno.h> + +static char *URLbasename = NULL; + #define NULL_TERMINATED(n) ((n) + 1) #define HUGE_STR_MAX 10000 @@ -1838,7 +1841,8 @@ add_to_index(int level, char *item) } subs=level; scan_troff(item, 1, &c); - sprintf(manidx+mip, "<DT><A HREF=\"#%s\">%s</A><DD>\n", label, c); + sprintf(manidx+mip, "<DT><A HREF=\"%s#%s\">%s</A><DD>\n", + ((URLbasename) ? URLbasename : ""), label, c); if (c) free(c); while (manidx[mip]) @@ -3617,6 +3621,10 @@ main(int argc, char **argv) char *h = '\0'; STRDEF *stdf; + /* see if they gave us a basename for the URL references */ + if (argc > 1) + if (!strcmp(argv[1], "-n")) + URLbasename = strdup(argv[2]); buf=read_man_page(); if (!buf) { |