aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename five static functions to make the classification of functionsIngo Schwarze2016-04-151-16/+16
| | | | | as parsers, page generators, and result generators more obvious. No functional change.
* prefer warn[x](3) over fprintf(3) where appropriateIngo Schwarze2016-04-151-23/+19
|
* Fix parsing of PATH_INFO if both a section directory and anIngo Schwarze2016-04-151-18/+14
| | | | architecture subdirectory are specified. Issue reported by tb@.
* Make HTML tags lower case for better stylistic agreement with whatIngo Schwarze2016-04-151-97/+97
| | | | html.c does.
* In the architectures dropdown, move aviion, ia64, solbourne, and vaxIngo Schwarze2016-04-151-10/+10
| | | | down to the currently unsupported entries.
* If PATH_INFO contains a complete and correct path to a manual pageIngo Schwarze2016-04-151-3/+4
| | | | | | | | | 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-21/+24
|
* for .Xr links, use short PATH_INFO style URIsIngo Schwarze2016-04-141-7/+3
|
* Fix a process group race.Ingo Schwarze2016-04-141-3/+9
| | | | | | | 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-2/+5
|
* in -man -Thtml, .nf does not preserve indentationIngo Schwarze2016-04-141-1/+6
|
* Give manuals in purely numerical sections priority over manuals ofIngo Schwarze2016-04-131-13/+15
| | | | | 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-9/+11
| | | | | | | | | 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-2/+3
| | | | | 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-2/+2
|
* double word; from jmc@Ingo Schwarze2016-03-191-3/+3
|
* Make the SCRIPT_NAME logic simpler, safer, and make it actually work;Ingo Schwarze2016-03-183-66/+68
| | | | | in part based on ideas by bentley@. While here, improve the documentation.
* document short URIsIngo Schwarze2016-03-181-3/+12
|
* make man(1) mode the default rather than apropos(1) modeIngo Schwarze2016-03-171-2/+3
|
* 'accomodate' -> 'accommodate' in a comment.Ingo Schwarze2016-03-171-2/+2
| | | | From krw@, started by a diff from Mical Mazurek.
* support short URIs for man.openbsd.orgIngo Schwarze2016-03-171-9/+69
|
* unbreak reading from stdin after recent parse() restructuring;Ingo Schwarze2016-01-161-2/+2
| | | | patch from florian@
* Delete the redundant "nchild" member of struct roff_node, replacingIngo Schwarze2016-01-0812-124/+120
| | | | | | | | 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-10/+10
| | | | | 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-35/+27
| | | | | | 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-11/+17
| | | | | | | | | | | | | 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-1/+6
|
* The root of an .EQ tree is always EQN_ROOT, never EQN_LIST,Ingo Schwarze2016-01-081-2/+2
| | | | | | 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-2/+2
| | | | | 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-1/+2
| | | | | 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-14/+29
| | | | | | | 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-8/+6
| | | | Patch from bentley@.
* Don't retain the search query in the resulting manual links.Ingo Schwarze2016-01-041-56/+3
| | | | | Clean, simple URLs are best. Patch from bentley@.
* remove NULL-checks before free(); from mmcc@Ingo Schwarze2015-12-231-5/+3
|
* pledge(2) style:Ingo Schwarze2015-12-152-15/+23
| | | | | | | 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-8/+24
| | | | | | 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-26/+68
| | | | | 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-5/+35
| | | | | | | | | | | | | | | 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-16/+32
| | | | | | | | 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-2/+10
| | | | | 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-3/+4
|
* soelim(1) use getline(3) and err(3), and err(3) uses getprogname(3);Ingo Schwarze2015-11-071-2/+6
| | | | 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-2/+94
| | | | for systems lacking it
* Modernization, no functional change intended:Ingo Schwarze2015-11-0711-193/+97
| | | | | | 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-11/+28
| | | | | 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-97/+30
| | | | | | | | | | | | 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-7/+2
| | | | 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-3/+5
| | | | 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-8/+67
| | | | issue reported by Svyatoslav Mishyn, Peter Bray, and Daniel Levai.