aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/catman.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-11-27 11:46:44 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-11-27 11:46:44 +0000
commit70b854a8e664254f12bc43f940791a2514b10cfc (patch)
treeb18082b182a30d58259975384041f5e0683a96fd /catman.c
parent8f00108b9e7335a68e0dfa8b30abc8679c8c6a0a (diff)
downloadmandoc-70b854a8e664254f12bc43f940791a2514b10cfc.tar.gz
mandoc-70b854a8e664254f12bc43f940791a2514b10cfc.tar.zst
mandoc-70b854a8e664254f12bc43f940791a2514b10cfc.zip
Removing INSECURE mode. This is a work in progress! Logic for
formatting manpages is now linked into man.cgi.
Diffstat (limited to 'catman.c')
-rw-r--r--catman.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/catman.c b/catman.c
index 59dd50ae..f3e214e6 100644
--- a/catman.c
+++ b/catman.c
@@ -1,4 +1,4 @@
-/* $Id: catman.c,v 1.1 2011/11/26 19:54:13 kristaps Exp $ */
+/* $Id: catman.c,v 1.2 2011/11/27 11:46:44 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -52,8 +52,10 @@
} while (/* CONSTCOND */0)
static int indexhtml(char *);
+#if 0
static int jobstart(const char *, const char *, pid_t *);
static int jobwait(pid_t);
+#endif
static int manup(const struct manpaths *, const char *);
static int mkpath(char *, mode_t, mode_t);
static int treecpy(char *, char *);
@@ -194,6 +196,7 @@ out:
return(rc);
}
+#if 0
/*
* Clean up existing child.
* Return 1 if cleaned up fine (or none was started) and 0 otherwise.
@@ -252,6 +255,7 @@ jobstart(const char *dst, const char *src, pid_t *pid)
exit(EXIT_FAILURE);
/* NOTREACHED */
}
+#endif
/*
* Pass over the recno database and re-create HTML pages if they're
@@ -292,7 +296,7 @@ indexhtml(char *dst)
xstrlcat(dst, "/", MAXPATHLEN);
xstrlcat(dst, f, MAXPATHLEN);
- xstrlcat(dst, ".html", MAXPATHLEN);
+ /*xstrlcat(dst, ".html", MAXPATHLEN);*/
if (-1 == (rc = isnewer(dst, f))) {
fprintf(stderr, "%s: Manpage missing\n", f);
@@ -310,8 +314,12 @@ indexhtml(char *dst)
}
*d = '/';
- if ( ! jobstart(dst, f, &pid))
+
+ if ( ! filecpy(dst, f))
break;
+
+ /*if ( ! jobstart(dst, f, &pid))
+ break;*/
if (verbose)
printf("%s\n", dst);
}
@@ -320,8 +328,8 @@ indexhtml(char *dst)
if (c < 0)
perror(fname);
- if ( ! jobwait(pid))
- c = -1;
+ /*if ( ! jobwait(pid))
+ c = -1;*/
return(1 == c ? 1 : -1);
}