diff options
author | 2014-07-13 12:44:57 +0000 | |
---|---|---|
committer | 2014-07-13 12:44:57 +0000 | |
commit | 2f7bef27e65e1d4700b333a09903fd93487b8c46 (patch) | |
tree | 50c7d318ea6dedefae198d4ac9659c2a53d0cb4f /usr.bin/mandoc/cgi.c | |
parent | By popular demand, bring man.cgi default mode closer to what man(1) does: (diff) | |
download | wireguard-openbsd-2f7bef27e65e1d4700b333a09903fd93487b8c46.tar.xz wireguard-openbsd-2f7bef27e65e1d4700b333a09903fd93487b8c46.zip |
make source vs. formatted guessing a bit more robust
Diffstat (limited to 'usr.bin/mandoc/cgi.c')
-rw-r--r-- | usr.bin/mandoc/cgi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mandoc/cgi.c b/usr.bin/mandoc/cgi.c index c0c1a9c77d9..fec807bf0c5 100644 --- a/usr.bin/mandoc/cgi.c +++ b/usr.bin/mandoc/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.10 2014/07/13 12:31:00 schwarze Exp $ */ +/* $Id: cgi.c,v 1.11 2014/07/13 12:44:57 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@usta.de> @@ -764,6 +764,8 @@ format(const struct req *req, const char *file) static void resp_show(const struct req *req, const char *file) { + if ('.' == file[0] || '/' == file[1]) + file += 2; if ('c' == *file) catman(req, file); |