version 1.9, 2014/03/24 01:07:30 |
version 1.10, 2014/03/24 01:43:42 |
|
|
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
|
/* |
|
* In what section can we find Perl manuals? |
|
*/ |
|
#define PERL_SECTION "3p" |
|
|
struct args { |
struct args { |
const char *title; /* override "Dt" title */ |
const char *title; /* override "Dt" title */ |
const char *date; /* override "Dd" date */ |
const char *date; /* override "Dd" date */ |
Line 212 trylink(const char *buf, size_t *start, size_t end, si |
|
Line 217 trylink(const char *buf, size_t *start, size_t end, si |
|
* First, allow us to link to other Perl manuals. |
* First, allow us to link to other Perl manuals. |
*/ |
*/ |
if (hasdouble) |
if (hasdouble) |
printf("Xr %.*s 3p", |
printf("Xr %.*s " PERL_SECTION, |
(int)(nend - sv), &buf[sv]); |
(int)(nend - sv), &buf[sv]); |
else if (nend - sv > 3 && isalnum(buf[sv]) && |
else if (nend - sv > 3 && isalnum(buf[sv]) && |
')' == buf[nend - 1] && |
')' == buf[nend - 1] && |
Line 899 dofile(const struct args *args, const char *fname, |
|
Line 904 dofile(const struct args *args, const char *fname, |
|
if (NULL != (cp = strrchr(title, '.'))) { |
if (NULL != (cp = strrchr(title, '.'))) { |
*cp++ = '\0'; |
*cp++ = '\0'; |
if (0 == strcmp(cp, "pm")) |
if (0 == strcmp(cp, "pm")) |
section = "3p"; |
section = PERL_SECTION; |
} |
} |
} |
} |
|
|