*** ./html.c.ORIG Wed Apr 13 00:58:58 2011 --- ./html.c Wed Apr 13 00:59:14 2011 *************** *** 25,31 **** --- 25,33 ---- #include #include #include + #ifndef _AIX51 #include + #endif #include #include #include *** ./mdoc_term.c.ORIG Wed Apr 13 00:59:40 2011 --- ./mdoc_term.c Wed Apr 13 00:59:53 2011 *************** *** 23,29 **** --- 23,31 ---- #include #include + #ifndef _AIX51 #include + #endif #include #include #include *** ./term.c.ORIG Wed Apr 13 01:00:06 2011 --- ./term.c Wed Apr 13 01:00:31 2011 *************** *** 23,29 **** --- 23,31 ---- #include #include + #ifndef _AIX51 #include + #endif #include #include #include *** ./term_ps.c.ORIG Wed Apr 13 01:01:02 2011 --- ./term_ps.c Wed Apr 13 01:01:15 2011 *************** *** 22,28 **** --- 22,30 ---- #include #include + #ifndef _AIX51 #include + #endif #include #include #include *** ./main.c.ORIG Wed Apr 13 01:02:25 2011 --- ./main.c Wed Apr 13 01:02:36 2011 *************** *** 21,27 **** --- 21,29 ---- #include #include + #ifndef _AIX51 #include + #endif #include #include #include *** ./mandoc.h.ORIG Wed Apr 13 01:03:18 2011 --- ./mandoc.h Wed Apr 13 01:03:30 2011 *************** *** 295,301 **** struct mdoc; struct man; - __BEGIN_DECLS void mparse_free(struct mparse *); void mparse_reset(struct mparse *); --- 295,300 ---- *************** *** 310,315 **** void *mandoc_malloc(size_t); void *mandoc_realloc(void *, size_t); - __END_DECLS #endif /*!MANDOC_H*/ --- 309,313 ---- *** ./libmandoc.h.ORIG Wed Apr 13 01:04:26 2011 --- ./libmandoc.h Wed Apr 13 01:04:37 2011 *************** *** 63,69 **** struct reg regs[REG__MAX]; }; - __BEGIN_DECLS struct roff; struct mdoc; --- 63,68 ---- *************** *** 107,112 **** const struct tbl_span *roff_span(const struct roff *); const struct eqn *roff_eqn(const struct roff *); - __END_DECLS #endif /*!LIBMANDOC_H*/ --- 106,110 ---- *** ./libroff.h.ORIG Wed Apr 13 01:05:07 2011 --- ./libroff.h Wed Apr 13 01:05:22 2011 *************** *** 17,23 **** #ifndef LIBROFF_H #define LIBROFF_H - __BEGIN_DECLS enum tbl_part { TBL_PART_OPTS, /* in options (first line) */ --- 17,22 ---- *************** *** 63,68 **** void eqn_free(struct eqn_node *); enum rofferr eqn_read(struct eqn_node **, int, const char *, int); - __END_DECLS #endif /*LIBROFF_H*/ --- 62,66 ---- *** ./term_ascii.c.ORIG Fri May 27 12:20:04 2011 --- ./term_ascii.c Fri May 27 12:20:16 2011 *************** *** 24,30 **** --- 24,32 ---- #ifdef USE_WCHAR # include #endif + #ifndef _AIX51 #include + #endif #include #include #include *** ./demandoc.c.ORIG Wed Sep 7 22:45:14 2011 --- ./demandoc.c Wed Sep 7 22:57:04 2011 *************** *** 20,26 **** --- 20,28 ---- #include #include + #ifndef _AIX51 #include + #endif #include #include #include *** ./Makefile.ORIG Sun Oct 9 21:25:56 2011 --- ./Makefile Sun Oct 9 21:36:28 2011 *************** *** 23,34 **** # CFLAGS += -DUSE_WCHAR ! CFLAGS += -g -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\"" ! CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings PREFIX = /usr/local BINDIR = $(PREFIX)/bin INCLUDEDIR = $(PREFIX)/include/mandoc ! LIBDIR = $(PREFIX)/lib/mandoc MANDIR = $(PREFIX)/man EXAMPLEDIR = $(PREFIX)/share/examples/mandoc INSTALL = install --- 23,34 ---- # CFLAGS += -DUSE_WCHAR ! CFLAGS += -DHAVE_CONFIG_H -DVERSION="\"$(VERSION)\"" ! #CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -Wwrite-strings PREFIX = /usr/local BINDIR = $(PREFIX)/bin INCLUDEDIR = $(PREFIX)/include/mandoc ! LIBDIR = $(PREFIX)/lib MANDIR = $(PREFIX)/man EXAMPLEDIR = $(PREFIX)/share/examples/mandoc INSTALL = install *************** *** 43,49 **** # However, if you don't have -ldb at all (or it's not native), then # comment out apropos and mandocdb. # ! #DBLIB = -ldb DBBIN = apropos mandocdb all: mandoc preconv demandoc $(DBBIN) --- 43,49 ---- # However, if you don't have -ldb at all (or it's not native), then # comment out apropos and mandocdb. # ! DBLIB = -ldb DBBIN = apropos mandocdb all: mandoc preconv demandoc $(DBBIN) *** ./apropos.c.ORIG Sun Oct 9 21:28:10 2011 --- ./apropos.c Sun Oct 9 21:41:29 2011 *************** *** 23,39 **** #include #include #include #include #include #include #include #include #include #include #include #include ! #ifdef __linux__ # include #else # include --- 23,43 ---- #include #include #include + #ifndef _AIX #include + #endif #include #include #include + #ifndef _AIX51 #include + #endif #include #include #include #include ! #if defined(__linux__) || defined(_AIX) # include #else # include *************** *** 150,155 **** --- 154,184 ---- static char *progname; + #ifdef _AIX + #include + + char * + strcasestr (char *haystack, char *needle) + { + char *p, *startn = 0, *np = 0; + + for (p = haystack; *p; p++) { + if (np) { + if (toupper(*p) == toupper(*np)) { + if (!*++np) + return startn; + } else + np = 0; + } else if (toupper(*p) == toupper(*needle)) { + np = needle + 1; + startn = p; + } + } + + return 0; + } + #endif + int main(int argc, char *argv[]) { *** ./mandocdb.c.ORIG Sun Oct 9 21:36:59 2011 --- ./mandocdb.c Sun Oct 9 21:49:44 2011 *************** *** 23,35 **** #include #include #include #include #include #include #include #include ! #ifdef __linux__ # include #else # include --- 23,39 ---- #include #include #include + #ifndef _AIX #include + #endif #include + #ifndef _AIX51 #include + #endif #include #include ! #if defined(__linux__) || defined(_AIX) # include #else # include *************** *** 1223,1229 **** while (NULL != (dp = readdir(d))) { fn = dp->d_name; ! if (DT_DIR == dp->d_type) { if (0 == strcmp(".", fn)) continue; if (0 == strcmp("..", fn)) --- 1227,1234 ---- while (NULL != (dp = readdir(d))) { fn = dp->d_name; ! // AIX struct dirent does not contain a member "d_type" ! ! // if (DT_DIR == dp->d_type) { if (0 == strcmp(".", fn)) continue; if (0 == strcmp("..", fn)) *************** *** 1243,1251 **** fprintf(stderr, "%s: Path too long\n", dir); return(0); ! } ! if (DT_REG != dp->d_type) ! continue; if (0 == strcmp(MANDOC_DB, fn) || 0 == strcmp(MANDOC_IDX, fn)) --- 1248,1256 ---- fprintf(stderr, "%s: Path too long\n", dir); return(0); ! // } ! // if (DT_REG != dp->d_type) ! // continue; if (0 == strcmp(MANDOC_DB, fn) || 0 == strcmp(MANDOC_IDX, fn))