296 |
STRBUF *ib = strbuf_open(MAXBUFLEN); |
STRBUF *ib = strbuf_open(MAXBUFLEN); |
297 |
const char *fid; |
const char *fid; |
298 |
char *p, *q; |
char *p, *q; |
299 |
int c; |
int c, type; |
300 |
|
|
301 |
/* |
/* |
302 |
* [Job] |
* [Job] |
309 |
* v |
* v |
310 |
* <a href='http://xxx/global/S/39.html#110'>main</a>\n |
* <a href='http://xxx/global/S/39.html#110'>main</a>\n |
311 |
* |
* |
312 |
* If the file name is not found in GPATH, change into the path to CGI script. |
* If the file is not source code, change into the path to CGI script. |
313 |
* <a href='http://xxx/global/S/ ./README .html#9'>main</a>\n |
* <a href='http://xxx/global/S/ ./README .html#9'>main</a>\n |
314 |
* | |
* | |
315 |
* v |
* v |
341 |
*q++ = '\0'; |
*q++ = '\0'; |
342 |
/* |
/* |
343 |
* Convert path name into URL. |
* Convert path name into URL. |
344 |
* The output of 'global -xgo' may include lines about |
* The output of 'global -xgo' and 'global -xPo' may include |
345 |
* files other than source code. In this case, file id |
* lines about files other than source code. In this case, |
346 |
* doesn't exist in GPATH. |
* the HTML file corresponding to file id may not exist. |
347 |
*/ |
*/ |
348 |
fid = gpath_path2fid(p, NULL); |
fid = gpath_path2fid(p, &type); |
349 |
if (fid) { |
if (fid && type == GPATH_SOURCE) { |
350 |
fputs("/S/", stdout); |
fputs("/S/", stdout); |
351 |
fputs(fid, stdout); |
fputs(fid, stdout); |
352 |
fputs(q, stdout); |
fputs(q, stdout); |