aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* no more _subdir; Jan Stary <hans at stare dot cz>Ingo Schwarze2015-09-211-20/+2
|
* for portability, use (char *)NULL in execlp(3) as discussed on tech@ OpenBSDIngo Schwarze2015-09-161-3/+3
| | | | (didn't blow up anywhere yet, but better safe than sorry)
* Avoid .Ns right after .Pf, it's pointless.Ingo Schwarze2015-09-141-3/+3
|
* Remove the warning about children of .Vt blocks because actually,Ingo Schwarze2015-09-144-38/+6
| | | | | | | .Vt type global_variable No = Dv defined_constant ; is the best way to specify in the SYNOPSIS how a global variable is initialized in the rare case where that matters. Issue noticed by jmc@.
* The .Dv macro actually forces normal font.Ingo Schwarze2015-09-141-2/+2
|
* Fill mode changes don't break next-line scope in all cases,Ingo Schwarze2015-09-042-4/+18
| | | | | | in particular not for tagged paragraphs. Issue found by Christian Neukirchen <chneukirchen at gmail dot com> in the exiv2(1) manual page.
* Recommend an unambiguous escape for minus signs instead of \-.Ingo Schwarze2015-09-021-7/+7
| | | | | | | | | | | | | | | | | | | | | | Historically, \- was used in troff for three cases: flags/pathnames, en dashes, and minus signs. mandoc_char(7) currently recommends it for minus signs, recommends \(en for en dashes, and doesn't mention flags/pathnames. In the old days, nroff rendered \- as ASCII '-', and troff rendered it as en dash/minus (which were visually indistinguishable). In Unicode, en dashes and minus signs are semantically distinct and encoded differently (U+2013 for en dash, U+2212 for minus), and often rendered differently too. Meanwhile ASCII '-' has been renamed "hyphen-minus" and fonts typically render it closest to a hyphen, not a minus. There is very little consistency across roff implementations and output formats for what Unicode character \- corresponds to. So at least for minus signs, change the recommendation to the unambiguous \(mi escape. from bentley@, ok jmc@ (after reams of discussion)
* Drop leading, internal, and trailing blank characters in \o (overstrike)Ingo Schwarze2015-08-301-2/+8
| | | | | | escape sequences; that's cleaner for all output modes, and it's required to prevent the PostScript/PDF formatter from dying on assertions. Bug found by jsg@ with afl.
* If an .Fo macro lacks its mandatory argument, don't die on an assertion.Ingo Schwarze2015-08-301-4/+3
| | | | Bug found by jsg@ with afl.
* If we have to reparse the text line because we spring an input line trap,Ingo Schwarze2015-08-291-17/+18
| | | | | | we must not escape breakable hyphens yet, or mparse_buf_r() in read.c will complain and replace the escaped hyphens with question marks. Bug found in ocserv(8) following a report from Kurt Jaeger <pi at FreeBSD>.
* Parse and ignore the escape sequences \, and \/ (italic corrections).Ingo Schwarze2015-08-292-3/+13
| | | | | | | | Actually using these is very stupid because they are groff extensions and other roff(7) implementations typically print unintended characters at the places where they are used. Nevertheless, some manuals contain them, for example ocserv(8). Problem reported by Kurt Jaeger <pi at FreeBSD>.
* Implement the escape sequence \\$*, expanding to all argumentsIngo Schwarze2015-08-292-18/+31
| | | | | | of the current user-defined macro. This is another missing feature required for ocserv(8). Problem reported by Kurt Jaeger <pi at FreeBSD>.
* Minimal implementation of the read-only number register \n(.$Ingo Schwarze2015-08-291-9/+19
| | | | | | which returns the number of arguments of the current macro. This is one of the missing features required for ocserv(8). Problem reported by Kurt Jaeger <pi at FreeBSD>.
* Including <ohash.h> requires including <stdint.h> before,Ingo Schwarze2015-08-291-1/+4
| | | | | and "config.h" was missing as well. Patch from Svyatoslav Mishyn <juef and openmailbox dot org>, Crux Linux.
* tedu@ reports tbl(7) issues in synaptics(4)Ingo Schwarze2015-08-291-1/+15
|
* Remove the hack of scrolling forward and backward with +G1G thatIngo Schwarze2015-07-283-84/+99
| | | | | | | | | | many (jmc@, millert@, espie@, deraadt@) considered revolting. Instead, when using a pager, since we are using a temporary file for tags anyway, use another temporary file for the formatted page(s), as suggested by millert@ and similar to what the traditional BSD man(1) did, except that we use only one single temporary output file rather than one for each formatted manual page, such that searching (both with / and :t) works across all the displayed files.
* Simplify and make tag_put() more efficient by integrating tag_get()Ingo Schwarze2015-07-253-46/+19
| | | | | into it and by only handling NUL-terminated strings. Minus 25 lines of code, no functional change.
* implement tagging for .ErIngo Schwarze2015-07-251-2/+16
|
* basic tag support for function names; written at YYCIngo Schwarze2015-07-251-3/+18
|
* basic support for tag priorities; written at YYCIngo Schwarze2015-07-253-10/+12
|
* When creation of the temporary tags file fails, call the pagerIngo Schwarze2015-07-213-21/+17
| | | | | | | | without the -T option, because otherwise the pager won't even start. Fixing a bug reported by jca@. While here, shorten the code by two lines and delete one internal interface function.
* Do not fork and exec gunzip(1), just link with libz instead.Ingo Schwarze2015-07-198-148/+54
| | | | | | | As discussed with deraadt@, that's cleaner and will help tame(2). Something like this was also suggested earlier by bapt at FreeBSD. Minus 50 lines of code, deleting one interface function (mparse_wait), no functional change intended.
* If we aren't on a tty, clear the pager flag up front.Ingo Schwarze2015-07-191-3/+6
| | | | Just to clean up code structure, no functional change.
* Insist that manual page file name extensions must begin with a digit,Ingo Schwarze2015-07-181-2/+2
| | | | | lest pkg.conf(5) be shown when pkg(5) is asked for; issue reported by Michael Reed <m dot reed at mykolab dot com>.
* another portability todoIngo Schwarze2015-07-181-1/+8
|
* clean up the temporary file when the process dies from a signalIngo Schwarze2015-07-181-1/+17
|
* Initial, still somewhat experimental implementation to leverageIngo Schwarze2015-07-179-36/+299
| | | | | | | | | | | | | | | less(1) -T and :t ctags(1)-like functionality to jump to the definitions of various terms inside manual pages. To be polished in the tree, so bear with me and report issues. Technically, if less(1) is used as a pager, information is collected by the mdoc(7) terminal formatter, first stored using the ohash library, then ultimately written to a temporary file which is passed to less via -T. No change intended for other output formatters or when running without a pager. Based on an idea from Kristaps using feedback from many, in particular phessler@ nicm@ millert@ halex@ doug@ kspillner@ deraadt@.
* Fix the "depend" target and regenerate Makefile.depend:Ingo Schwarze2015-07-142-25/+8
| | | | | | | * do not process the test-*.c files, they are not built via make * add the missing compat_stringlist.c and soelim.c * read.c now uses roff_int.h * roff.c no longer uses libmdoc.h
* headers should not contain macrosIngo Schwarze2015-07-141-1/+5
|
* Ignore blank characters at the beginning of a conditional block,Ingo Schwarze2015-06-271-1/+3
| | | | | that is, after "\{". Issue found by Markus <Waldeck at gmx dot de> in bash(1).
* delete some TODO entries that were already fixedIngo Schwarze2015-06-261-23/+11
|
* nice idea for eqn(7) from CDBUG.Ingo Schwarze2015-06-181-1/+6
|
* two new tasks i heard about at BSDCanIngo Schwarze2015-06-101-1/+11
|
* Avoid warning "defined but not used" when compiling with HAVE_MANPATH.Ingo Schwarze2015-06-101-1/+5
| | | | Issue found on Debian by Markus <Waldeck at gmx dot de>.
* Avoid warning "unused variable" when compiling without HAVE_WCHAR.Ingo Schwarze2015-06-101-1/+3
| | | | Issue found on Debian by Markus <Waldeck at gmx dot de>.
* Implement the roff(7) `r' (register exists) conditional.Ingo Schwarze2015-05-312-10/+39
| | | | | Missing feature found by Markus <Waldeck at gmx dot de> in Debian's bash(1) manual page.
* This one needs config.h too, if only for __BEGIN_DECLS.Ingo Schwarze2015-05-211-1/+2
| | | | Found on Solaris 11 in the OpenCSW cluster.
* add forgotten glueIngo Schwarze2015-05-211-1/+11
|
* Link compat_reallocarray.o into soelim; needed onIngo Schwarze2015-05-211-3/+3
| | | | platforms having neither stringlist nor compat_reallocarray.
* Remove clauses 3 and 4 from Christos Zoulas' BSD license.Ingo Schwarze2015-05-203-13/+5
| | | | | This is safe because Christos did that himself in NetBSD in 2008. No code change.
* fix integer overflows by using reallocarray(3)Ingo Schwarze2015-05-201-3/+4
|
* * fix roff terminology in .NdIngo Schwarze2015-05-201-4/+8
| | | | | * remove .Xr to self * add AUTHORS section
* Use PATH_MAX rather than the non-standard MAXPATHLEN.Ingo Schwarze2015-05-201-3/+3
|
* * remove FreeBSDismsIngo Schwarze2015-05-209-50/+102
| | | | | | | * purge and sort headers * add build and compat glue * and LICENSE information for soelim(1)
* Initial revisionIngo Schwarze2015-05-204-0/+433
|
* Do not let the -m option or MANPATH with leading, trailing, or doubleIngo Schwarze2015-05-071-6/+8
| | | | | | | | | colon override the default manpath, let them add to the default manpath. Only override the default manpath by the -M option, by MANPATH without leading, trailing, or double colon, or by "manpath" in man.conf(5). Problem reported by Jan Stary <hans at stare dot cz>. Patch OK'ed by millert@.
* mdoc_valid_post() may indirectly call roff_node_unlink() which mayIngo Schwarze2015-05-011-2/+2
| | | | | | | | | | | set ROFF_NEXT_CHILD, which is desirable for the final call to mdoc_valid_post() - in case the target itself gets deleted, the parse point may need this adjustment - but not for the intermediate calls - if intermediate nodes get deleted, that mustn't clobber the parse point. So move setting ROFF_NEXT_SIBLING to the proper place in rew_last(). This fixes the assertion failure in jsg@'s afl test case 108/Apr27.
* Setting the "last" member of struct roff_node was done at an extremelyIngo Schwarze2015-05-012-5/+4
| | | | | | | | weird place. Move it to the obviously correct place. Surprisingly, this didn't cause any misformatting in the test suite or in any base system manuals, but i cannot believe the code was really correct for all conceivable input, and it would be very hard to verify. At the very least, it cannot have worked for man(7).
* Minor bug fix: When .Pp rewinds .Nm, rewind the whole block,Ingo Schwarze2015-05-011-2/+2
| | | | | not just the body. In some unusual edge cases, this caused the .Pp to become a sibling of the .Nm body inside the .Nm block.
* If a block body gets broken, that's no good reason to extend theIngo Schwarze2015-04-291-2/+4
| | | | | | | scope of the end macro. Instead, only keep the tail scope open if the end macro macro calls an explicit macro and actually breaks that. This corrects syntax tree structure and fixes an assertion found by jsg@ with afl (test case 098/Apr27).