summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the code and the server setup by deleting the pseudo-manpathIngo Schwarze2016-07-103-26/+13
| | | | | | | | | | "mandoc" that was used for man.cgi(8) documentation and by assuming that the apropos(1) and man.cgi(8) manuals are simply installed in the default manpath. Even though man.cgi(8) is not installed by default when installing OpenBSD, it is easy to copy it into the default manpath used for man.cgi(8). Idea found when considering a question asked by wrant dot com.
* Do not treat PATH_INFO as a complete path if it doesn't containIngo Schwarze2016-07-091-1/+1
| | | | | | a manpath. For example, this makes http://man.openbsd.org/mandoc work as expected. Bug reported by tb@, reminded by Svyatoslav Mishyn.
* getopt(3) is declared in <unistd.h>, and <getopt.h> is not needed;Ingo Schwarze2016-07-094-4/+0
| | | | from Joerg Sonnenberger via Thomas Klausner, NetBSD.
* ISO C99 7.19.2.5 doesn't like mixing putchar(3) and putwchar(3) onIngo Schwarze2016-07-083-8/+7
| | | | | | the same stream, and actually, it fails spectacularly on glibc. Portability issue pointed out by Svyatoslav Mishyn <juef at openmailbox dot org> after testing on Void Linux.
* A some missing files to TESTSRCS and DISTFILESIngo Schwarze2016-07-081-0/+5
| | | | and add a trivial "dist" target for convenience.
* POSIX requires that a process calling tcsetpgrp(3) from the backgroundIngo Schwarze2016-07-081-6/+18
| | | | | | gets a SIGTTOU signal. In that case, do not stop. Portability issue found while testing on commercial Solaris 9/10/11. Thanks to opencsw.org for providing me with a testing environment.
* some 1.13.4 release preparationsIngo Schwarze2016-07-074-4/+127
|
* update developer documentationIngo Schwarze2016-07-076-202/+200
|
* sync with OpenBSD: do not mention mansearch(3), which is not installed,Ingo Schwarze2016-07-071-1/+0
| | | | in a manual which is installed
* sync with OpenBSD: do not talk about nginx(8)Ingo Schwarze2016-07-071-4/+2
|
* Update and simplify the documentation of the -s option,Ingo Schwarze2016-07-011-29/+5
| | | | | | | which was forgotten when implementing the new man.conf(5) format. The outdated information was originally pointed out by Andy Bradford <amb dash openbsd at bradfords dot org> on misc@. OK jmc@
* delete two entries that are doneIngo Schwarze2016-06-051-5/+0
|
* Trim trailing whitespace from man.conf lines; patch from millert@.Ingo Schwarze2016-05-281-5/+4
|
* Simplify search form: minus two visible control elements, minusIngo Schwarze2016-05-282-41/+17
| | | | | one table, minus twenty lines of code, no loss of functionality. No idea why i didn't do this earlier...
* Delete useless variables that could sneak into the MakefileIngo Schwarze2016-05-181-6/+6
| | | | | behind the user's back, dangerously bypassing ./configure. Leakage reported by Peter Bray <pdb_ml at yahoo dot com dot au>.
* Do not hardcode "makewhatis" in a warning message, use BINM_MAKEWHATIS.Ingo Schwarze2016-05-181-2/+2
| | | | Patch from Peter Bray <pdb_ml at yahoo dot com dot au>.
* Various people (among others Maxim Belooussov and Carsten Kunze)Ingo Schwarze2016-05-183-48/+70
| | | | | | | | | | | reported that the build system still assumed that ohash is only needed if sqlite3 is also in use, which is no longer true: The ohash library is now required no matter what. Rework sqlite3 and ohash library autodetection such that both work independently of each other. Provide LDADD for additional linker flags. Add some missing variables to configure.local.example.
* Linux needs <stddef.h>, or NULL isn't defined.Ingo Schwarze2016-05-182-0/+2
|
* Only focus on the query input box when no manual page is displayed,Ingo Schwarze2016-04-291-8/+17
| | | | | | | | that is, for the index page, for the noresult page, and for the result of an apropos(1) query with more than one page. As noted by bentley@, when a manual page is displayed, it is more important that people can quickly use the space bar for paging and Ctrl-F for searching.
* Set the "autofocus" attribute on the query text box.Ingo Schwarze2016-04-281-1/+1
| | | | Patch from Fabian dot Raetz at gmail dot com.
* set up man.cgi(3) for inclusion in the web siteIngo Schwarze2016-04-151-0/+2
|
* document the internals of cgi.c for developers;Ingo Schwarze2016-04-151-0/+282
| | | | not intended to be installed
* Rename five static functions to make the classification of functionsIngo Schwarze2016-04-151-15/+15
| | | | | as parsers, page generators, and result generators more obvious. No functional change.
* prefer warn[x](3) over fprintf(3) where appropriateIngo Schwarze2016-04-151-22/+18
|
* Fix parsing of PATH_INFO if both a section directory and anIngo Schwarze2016-04-151-17/+13
| | | | architecture subdirectory are specified. Issue reported by tb@.
* Make HTML tags lower case for better stylistic agreement with whatIngo Schwarze2016-04-151-96/+96
| | | | html.c does.
* In the architectures dropdown, move aviion, ia64, solbourne, and vaxIngo Schwarze2016-04-151-9/+9
| | | | down to the currently unsupported entries.
* If PATH_INFO contains a complete and correct path to a manual pageIngo Schwarze2016-04-151-2/+3
| | | | | | | | | file, for example "/OpenBSD-5.9/man2/pledge.2", no database query is needed and the file is delivered directly. But even in this case, let's parse the PATH_INFO and fill the query structure such that the search form at the top of the result page gets pre-filled with useful values.
* omit list of other results when there is only one matchIngo Schwarze2016-04-151-20/+23
|
* for .Xr links, use short PATH_INFO style URIsIngo Schwarze2016-04-141-6/+2
|
* Fix a process group race.Ingo Schwarze2016-04-141-2/+8
| | | | | | | It could occasionally happen that the child process spawned less(1) before the parent process passed the control of the terminal to the child, and in that case, less(1) sometimes complained "Stopped (tty output)". Issue reported by naddy@.
* do not rewrite short queriesIngo Schwarze2016-04-141-1/+4
|
* in -man -Thtml, .nf does not preserve indentationIngo Schwarze2016-04-141-0/+5
|
* Give manuals in purely numerical sections priority over manuals ofIngo Schwarze2016-04-131-12/+14
| | | | | the same name in sections with an alphabetical suffix; same logic as in main.c rev. 1.264.
* Give manuals in purely numerical sections priority over manuals ofIngo Schwarze2016-04-131-8/+10
| | | | | | | | | the same name in sections with an alphabetical suffix (on OpenBSD, mostly 3p), restoring behaviour of the traditional BSD man(1) that got lost in the switch to the mandoc-based implementation. Issue reported by jsg@, using an idea by mikeb@ for the solution, and at least afresh1@ and jasper@ also seem in favour of the direction.
* fix error page indentation:Ingo Schwarze2016-04-131-1/+2
| | | | | negative indent for h1 only in div.section issue reported by mikeb@
* sed 's/the the/the/' in a comment; from krw@Ingo Schwarze2016-04-121-1/+1
|
* double word; from jmc@Ingo Schwarze2016-03-191-1/+1
|
* Make the SCRIPT_NAME logic simpler, safer, and make it actually work;Ingo Schwarze2016-03-183-64/+66
| | | | | in part based on ideas by bentley@. While here, improve the documentation.
* document short URIsIngo Schwarze2016-03-181-1/+10
|
* make man(1) mode the default rather than apropos(1) modeIngo Schwarze2016-03-171-1/+2
|
* 'accomodate' -> 'accommodate' in a comment.Ingo Schwarze2016-03-171-1/+1
| | | | From krw@, started by a diff from Mical Mazurek.
* support short URIs for man.openbsd.orgIngo Schwarze2016-03-171-8/+68
|
* unbreak reading from stdin after recent parse() restructuring;Ingo Schwarze2016-01-161-1/+1
| | | | patch from florian@
* Delete the redundant "nchild" member of struct roff_node, replacingIngo Schwarze2016-01-0812-114/+110
| | | | | | | | most uses by one, a few by two pointer checks, and only one by a tiny loop - not only making data smaller, but code shorter as well. This gets rid of an implicit invariant that confused both static analysis tools and human auditors. No functional change.
* Prefer warn(3) over perror(3) at the few places where it was used.Ingo Schwarze2016-01-082-8/+8
| | | | | It is useful to see the program name, and we have err.h compat in place anyway. Suggested by Christos Zoulas (NetBSD).
* Simplify the mparse_open() interface.Ingo Schwarze2016-01-086-29/+21
| | | | | | Just return the file descriptor or -1 on error; there is just one kind of error anyway. Suggested by Christos Zoulas (NetBSD).
* It was very surprising that a function called mparse_readfd()Ingo Schwarze2016-01-085-5/+11
| | | | | | | | | | | | | closed the file descriptor passed to it after completing its work, in particular considering the fact that it required its callers to call open(2) or mparse_open() beforehand. Change mparse_readfd() to not call close(2) and change the callers to call close(2) afterwards, more or less bringing open and close to the same level of the code and making review easier. Note that man.cgi(8) already did that, even though it was wrong in the past. Small restructuring suggested by Christos Zoulas (NetBSD).
* would be nice to warn about broken .Xr links...Ingo Schwarze2016-01-081-0/+5
|
* The root of an .EQ tree is always EQN_ROOT, never EQN_LIST,Ingo Schwarze2016-01-081-1/+1
| | | | | | so delete a redundant NULL check that confused Coverity in CID 1257471; issue reported by wiz@, patch differs from what christos@ did in NetBSD. No functional change.