summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* This code wasted memory by allocating sizeof(enum termfont *)Ingo Schwarze2016-01-071-1/+1
| | | | | where only sizeof(enum termfont) is needed. Fixes CID 1288941. From christos@ via wiz@, both at NetBSD.
* Recursive "define" was not detected because "lim" was neverIngo Schwarze2016-01-071-0/+1
| | | | | incremented, causing infinite loops. Fixing CID 1288962. From christos@ via wiz@, both at NetBSD.
* Improve handling of .Va and .Vt macros.Ingo Schwarze2016-01-041-13/+28
| | | | | | | tedu@ noticed that no Vt= database entries were generated. Serguey Parkhomovsky suggested the deletion of parse_mdoc_body(). tb@ noticed that the fix requires more than just adding TYPE_Vt to the MDOC_Vt mask in the mdoc_handler array.
* Generate simpler in-page links: just replace spaces with underscores.Ingo Schwarze2016-01-042-6/+4
| | | | Patch from bentley@.
* Don't retain the search query in the resulting manual links.Ingo Schwarze2016-01-041-55/+2
| | | | | Clean, simple URLs are best. Patch from bentley@.
* remove NULL-checks before free(); from mmcc@Ingo Schwarze2015-12-231-4/+2
|
* pledge(2) style:Ingo Schwarze2015-12-152-13/+21
| | | | | | | Make sure to always use the idiom 'if (pledge("' such that it can easily be searched for. No functional change. Requested by deraadt@ some time ago.
* No point in trying to go on when elementary database operationsIngo Schwarze2015-11-263-6/+22
| | | | | | like preparing queries or binding variables fail; that won't yield useful results anyway but may generate huge pointless error messages. Issue reported by deraadt@.
* Fix multiple issues regarding process group and signal mask handlingIngo Schwarze2015-11-203-23/+65
| | | | | found by tb@ and millert@; parts of the code, in particular in tag.c, by millert@; OK millert@.
* Fix an issue reported by deraadt@: When hitting Ctrl-Backslash (= SIGQUIT)Ingo Schwarze2015-11-141-4/+34
| | | | | | | | | | | | | | | in the less(1) spawned by man(1), man(1) died uncleanly, leaving behind its temp files, and killed less(1) uncleanly as well with SIGPIPE, leaving the terminal in the wrong state. Fix this by giving less(1) its own process group and handing it control of the terminal, but in such a way that Ctrl-z (= SIGSTOP) still works: In that case, let man(1) stop itself, too, and let it continue the pager when it continues itself. Joint work with millert@ who contributed most of the expertise required, and also most parts of the code. OK deraadt@ millert@
* Simplify the logic in mandoc_normdate() and add some comments.Ingo Schwarze2015-11-121-15/+31
| | | | | | | | Also add a comment in time2a() explaining why it isn't possible to use just one single call to strftime(). Do some style cleanup while here. No functional change. Triggered by a very different patch from des@FreeBSD.
* Never use LC_ALL. On the one hand, it can cause misformatting.Ingo Schwarze2015-11-121-1/+9
| | | | | On the other hand, it is a security risk because it might cause buffer overflows. Use LC_CTYPE only, that's all we need.
* move compat_reallocarray.o into SOELIM_OBJS, no functional changeIngo Schwarze2015-11-071-2/+3
|
* soelim(1) use getline(3) and err(3), and err(3) uses getprogname(3);Ingo Schwarze2015-11-071-1/+5
| | | | found on Solaris 10 at OpenCSW
* The sh(1) "test" builtin on Solaris 10 doesn't have -e,Ingo Schwarze2015-11-071-3/+3
| | | | | even though that's required by POSIX. Use -w and -r, that's just as good.
* provide a simple stand-alone implementation of getline(3)Ingo Schwarze2015-11-075-1/+93
| | | | for systems lacking it
* Modernization, no functional change intended:Ingo Schwarze2015-11-0711-186/+90
| | | | | | Use the POSIX function getline(3) rather than the slightly dangerous BSD function fgetln(3). Remove the related compatibility code.
* Without HAVE_ERR, don't try to include <err.h>, it probably isn't there.Ingo Schwarze2015-11-0710-1/+18
| | | | | In that case, the required prototypes are in "config.h". Patch from Peter Bray <pdb_ml at yahoo dot com dot au>.
* In private header files, __BEGIN_DECLS and __END_DECLS are pointless.Ingo Schwarze2015-11-0723-79/+12
| | | | | | | | | | | | Because these work slightly differently on different systems, they are becoming a maintenance burden in the portable version, so delete them. Besides, one of the chief design goals of the mandoc toolbox is to make sure that nothing related to documentation requires C++. Consequently, linking mandoc against any kind of C++ program would defeat the purpose and is not supported. I don't understand why kristaps@ added them in the first place.
* garbage collect unused EXAMPLEDIR, forgotten in the CSS cleanup;Ingo Schwarze2015-11-073-5/+0
| | | | noticed by Peter Bray <pdb_ml at yahoo dot com dot au>
* Install the soelim(1) binary and manual to the right places.Ingo Schwarze2015-11-071-2/+4
| | | | Bug reported by Peter Bray <pdb_ml at yahoo dot com dot au>.
* In ./configure, select a RE syntax for word boundaries supported by libc;Ingo Schwarze2015-11-065-6/+65
| | | | issue reported by Svyatoslav Mishyn, Peter Bray, and Daniel Levai.
* merge pledge(2) support from OpenBSDIngo Schwarze2015-11-065-0/+53
|
* Use getprogname(3) rather than __progname.Ingo Schwarze2015-11-068-31/+76
| | | | | | | Suggested by Joerg@ Sonnenberger (NetBSD). Last year, deraadt@ confirmed on tech@ that this "has the potential to be more portable", and micro-optimizing for speed is not relevant here. Also gets rid of one global variable.