summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* In tbl(7) -T html output,Ingo Schwarze2018-11-257-73/+140
| | | | | | | | | | span cells horizontally and vertically as requested by the layout. Does not handle spans requested in the data section yet. To be able to do this, record the number of rows spanned in the first data cell (struct tbl_dat) of a vertical span. Missing feature reported by Pali dot Rohar at gmail dot com.
* HTML formatting of .IPIngo Schwarze2018-11-251-0/+6
|
* Implement horizontal and vertical alignment of tbl(7) cell contentIngo Schwarze2018-11-243-10/+36
| | | | | in -T html output. This does not handle spanned cells yet. Missing feature reported by Pali dot Rohar at gmail dot com.
* When a font escape appears in the middle of a string,Ingo Schwarze2018-11-231-1/+4
| | | | | make sure it doesn't cause output of bogus whitespace. Fixing a bug reported by Pali dot Rohar at gmail dot com.
* Correct and shorten the description of the sort order of apropos(1)Ingo Schwarze2018-11-221-18/+2
| | | | | | | | results. As a matter of fact, which manpath the page comes from does not matter in that context. That only matters for the priority of pages in man(1) mode (without -a, -f, and -k). Noticed while working on a patch from Yuri Pankov <yuripv at FreeBSD>.
* In apropos(1) output, stop sorting .Nm search results by nameIngo Schwarze2018-11-223-9/+2
| | | | | | | | | | priorities (bits). The obscure feature wasn't documented and merely confused people - for example Edward Tomasz Napierala <trasz at FreeBSD>, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227408. Smaller patch provided by Yuri Pankov <yuripv at FreeBSD>, but i'm also retiring the now unused "bits" member from struct manpage. Simplification is good.
* In -T locale (the default), -T ascii, and -T utf8 mode, provide a newIngo Schwarze2018-11-227-12/+60
| | | | | | | | | | | | | | | output option -O tag[=term] to move right to the definition of "term" when opening the manual page in a pager, effectively porting the -T html fragment name feature - https://man.openbsd.org/ksh#ulimit - to the terminal. Try: $ man -O tag uvm_sysctl $ man -O tag=ulimit ksh $ man -O tag 3 compress Feature development triggered by a question from kn@. Klemens also tested, provided feedback that resulted in improvements, and provided an OK.
* Improve POSIX compliance by making case-insensitive extendedIngo Schwarze2018-11-192-13/+31
| | | | | | | | | | | | | | | | | regular expressions the default in man(1) -k searches, also matching what the man-db package used by many Linux distributions does. Originally requested by Wolfram Schneider <wosch at FreeBSD> via Yuri Pankov <yuripv at FreeBSD>. Feedback and OK cheloha@, and no objections when shown on tech@. Thanks to cheloha@ for pointing out that POSIX requires this behaviour and for the suggestion to explicitly say that *extended* regular expressions are used here. While here, unify spelling of case-[in]sensitive, fix a typo, update the EXAMPLES, and add a STANDARDS section.
* Correctly construct empty lists in dbm_page_get().Ingo Schwarze2018-11-191-3/+3
| | | | | | | | | | Original commit message by the author of this bugfix patch, bluhm@: lstmatch() expects a list of strings separated by \0 and terminated with \0\0. In the NULL case dbm_page_get() returned only simple strings so correct processing was depending on data layout. Use an additional \0 to terminate the single string lists. Found by mandoc regress since llvm linker on amd64 arranges strings differently.
* in -man -Thtml, vertical spacing is required before .IPIngo Schwarze2018-10-251-0/+6
|
* Implement the \f(CW and \f(CR (constant width font) escape sequencesIngo Schwarze2018-10-257-1/+21
| | | | | | | | | for HTML output. Somewhat relevant because pod2man(1) relies on this. Missing feature reported by Pali dot Rohar at gmail dot com. Note that constant width font was already correctly selected before this when required by semantic markup. Only attempting physical markup with the low-level escape sequence was ineffective.
* The ctags(1) file format uses whitespace as a field delimiter, andIngo Schwarze2018-10-231-9/+26
| | | | | | | | | | | there is no escaping mechanism, so tags cannot contain whitespace. Consequently, we used to simply not tag macro arguments containing space characters. Instead, let's tag the first word, unless there is a proper match for that word somewhere else. For example, this makes ":tquery" work in ntpd.conf(5). Feature suggested by kn@, who also thinks the implementation looks reasonable and works in his testing.
* Input lines that are not blank but generate no output,Ingo Schwarze2018-10-231-2/+5
| | | | | | | | | | | for example lines containing nothing but "\&", are significant in no-fill mode and can be represented by blank lines inside <pre>. Fixing a bug that Pali dot Rohar at gmail dot com found in pod2man(1) output, for example Email::Address::XS(3p). While here, inside no-fill mode, there is no need to encode totally blank input lines by emulating .PP - just let them through as we are inside <pre> anyway.
* Rewrite parse_path_info() to be four lines shorter, simplify ownershipIngo Schwarze2018-10-191-46/+40
| | | | | | | | of allocated strings, do not write to the input string, and improve diagnostic output. The confusing error message "invalid arch" as a reaction to mistyping the release name was noticed by tb@, who likes the new code and message.
* update DESCRIPTION and COMPATIBILITY, mostly correcting statementsIngo Schwarze2018-10-041-18/+17
| | | | from the past that are no longer true
* Stop abusing subsections to represent the list of escape sequences;Ingo Schwarze2018-10-041-95/+101
| | | | | | instead, use .Bl -tag like everywhere else. The same was already done for requests quite some time ago. Also, consistently mark up escape sequences with .Ic, just like requests.
* When a subsection header contains no letters but only specialIngo Schwarze2018-10-041-1/+3
| | | | characters, skip the TOC entry. Issue reported by kristaps@.
* add DESCRIPTION and .Ss to the toc; suggested by espie@Ingo Schwarze2018-10-021-6/+22
|
* enable the equivalent of -O toc in man.cgi(8)Ingo Schwarze2018-10-021-1/+2
|
* Add an option -T html -O toc to add a brief table of contents nearIngo Schwarze2018-10-028-10/+47
| | | | | the top of HTML pages containing at least two non-standard sections. Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.
* Support a second argument to -O man,Ingo Schwarze2018-10-025-11/+26
| | | | | | selecting the format according to local existence of the file. Suggested by kristaps@ during EuroBSDCon 2018. Written on the train Frankfurt-Karlsruhe returning from EuroBSDCon.
* Render the eqn(7) "sqrt" function as U+221A in UTF-8 output.Ingo Schwarze2018-10-024-9/+6
| | | | | | This also agrees with what groff does. Suggested by an attendee of EuroBSDCon 2018 in Bucuresti. Written on the plane Bucuresti-Frankfurt returning from EuroBSDCon.
* Add missing URI encoding when writing HTTP redirects,Ingo Schwarze2018-10-011-4/+32
| | | | | | fixing a bug reported by <jungleboogie0 at gmail dot com> on bugs@. While here, fully validate the arch name such that we do not have to URI encode that one.
* feature suggestions from EuroBSDCon 2018Ingo Schwarze2018-09-231-0/+14
|
* Reduce excessive right padding in tagged list heads.Ingo Schwarze2018-08-271-1/+1
| | | | | | The 1.2em was an approximate equivalent of the 2n traditionally used for terminal display, but it is much too wide for HTML rendering. Issue reported by mikeb@.
* Support nesting of elements with next-line scope.Ingo Schwarze2018-08-264-56/+61
| | | | For example, ksh93(1) needs this for .B\n.SM.
* Rudimentary implementation of the roff(7) .char (output glyphIngo Schwarze2018-08-2512-6/+160
| | | | | | | | | definition) request, used for example by groff_hdtbl(7). This simplistic implementation may interact incorrectly with the .tr (input character translation) request. But come on, you are not only using .char *and* .tr, but you do so with respect to the same character in the same manual page?
* If man(7) next-line scope is open and the line ends with \c,Ingo Schwarze2018-08-253-20/+59
| | | | the scope remains open. Needed for example for groff_man(7).
* Rudimentary implementation of the roff(7) .while request.Ingo Schwarze2018-08-2424-204/+479
| | | | | | | | | | | Needed for example by groff_hdtbl(7). There are two limitations: It does not support nested .while requests yet, and each .while loop must start and end in the same scope. The roff_parseln() return codes are now more flexible and allow OR'ing options.
* The upcoming .while request will have to re-execute roff(7) linesIngo Schwarze2018-08-239-136/+78
| | | | | | | parsed earlier, so they will have to be saved for reuse - but the read.c preparser does not know yet whether a line contains a .while request before passing it to the roff parser. To cope with that, save all parsed lines for now. Even shortens the code by 20 lines.
* Implement the roff(7) .shift and .return requests,Ingo Schwarze2018-08-2321-195/+449
| | | | | | | | | | | | | | for example used by groff_hdtbl(7) and groff_mom(7). Also correctly interpolate arguments during nested macro execution even after .shift and .return, implemented using a stack of argument arrays. Note that only read.c, but not roff.c can detect the end of a macro execution, and the existence of .shift implies that arguments cannot be interpolated up front, so unfortunately, this includes a partial revert of roff.c rev. 1.337, moving argument interpolation back into the function roff_res().
* Implement the \\$@ escape sequence (insert all macro arguments,Ingo Schwarze2018-08-212-4/+23
| | | | | | | | | | | | quoted) in addition to the already supported \\$* (similar, but unquoted). Then use \\$@ to improve the implementation of the .als request (macro alias). Needed by groff_hdtbl(7). Gosh, it feels like the manual pages of the groff package are exercising every bloody roff(7) feature under the sun. In the manual page source code itself, not merely in the implementation of the used macro packages, that is.
* Improve the ASCII rendering of \(Po (Pound Sterling)Ingo Schwarze2018-08-2118-96/+92
| | | | | and of the playing card suits to match groff, using feedback from Ralph Corderoy <ralph at inputplus dot co dot uk>.
* Fix some issues found looking at groff_char(7):Ingo Schwarze2018-08-2110-13/+18
| | | | | | * Add two missing characters, \('Y and \('y. * The Weierstrass p is not capital, see http://unicode.org/notes/tn27/. * Add a groff-compatible ASCII transliteration for U+02DC: "~".
* \f[] means \fP, not \fRIngo Schwarze2018-08-201-4/+7
|
* Expand \n(.$ (the number of macro arguments) right in roff_userdef(),Ingo Schwarze2018-08-201-7/+34
| | | | | | | | before even reparsing the expanded macro. That is the least dirty way to fix the bug that \(.$ remained set after execution of the user-defined macro ended. Any other way to fix it would probably require changes to read.c, which really shouldn't be bothered with such roff(7) internals.
* Disable one test for now that is broken after the addition of \).Ingo Schwarze2018-08-192-4/+3
| | | | | | | | It is not broken because of \), which is correctly implemented, but the addition merely reveals a hidden bug elsewhere, almost certainly in \\ handling. Given that \\ is among the most mysterious escape sequences and using it is very strongly discouraged in manual pages, fixing that is not urgent - and may be hard.
* Add the \) special character, a variant of \& so arcane that iIngo Schwarze2018-08-191-0/+1
| | | | | intentionally leave it undocumented. Abused for example in the groff(7) manual page.
* Do alignment of non-numeric strings in numeric cells the same wayIngo Schwarze2018-08-192-58/+101
| | | | | | as groff, and also honour the explicit alignment indicator "\&". This required an almost complete rewrite of both the measurement function and the formatter function for numeric cells.
* do not print horizontal lines inside vertical spansIngo Schwarze2018-08-191-6/+20
|
* Mostly complete implementation of the 'c' (character available)Ingo Schwarze2018-08-193-14/+60
| | | | | | | | | | | roff conditional, except that the .char request still isn't supported and that behaviour differs from groff in many edge cases. But at least valid character names and numbers are now distinguished from invalid ones. This also fixes the bug that parsing of the 'c' conditional was incomplete, which resulted in leaking the tested character to the input parser at the beginning of the body when the condition was inverted.
* Bugfix: When a line ends with '\ \"', don't strip the trailing spaceIngo Schwarze2018-08-181-1/+2
| | | | because that turned it into a bogus line continuation.
* support the highly surprising escape sequence \# (line continuationIngo Schwarze2018-08-182-1/+14
| | | | with comment); used for example by gropdf(1)
* paragraphs can contain .MT and .UR blocksIngo Schwarze2018-08-181-1/+2
|
* If a tbl(7) column contains both text cells and numeric cells,Ingo Schwarze2018-08-182-4/+10
| | | | horizontally align the numbers in the same way as groff does.
* .RE causes a line break even if .RS is not openIngo Schwarze2018-08-181-0/+6
|
* .SY causes a one-column indentation even without any argumentIngo Schwarze2018-08-181-1/+1
|
* Do not allocate a column for decimal points if all numbers are integers.Ingo Schwarze2018-08-182-12/+8
|
* Unsurprisingly, zero-width non-breaking spaces have... width 0.Ingo Schwarze2018-08-181-2/+1
|
* end of sentence detection after .ME and .UE, useful for some GNU manualsIngo Schwarze2018-08-181-0/+2
|