#
542a495f |
| 31-Dec-2018 |
schwarze <schwarze@openbsd.org> |
Cleanup, no functional change: Since the man(7) and roff(7) validators no longer use the parser state flag ROFF_NOFILL, we can finally get rid of the function man_state(), resulting in a better separ
Cleanup, no functional change: Since the man(7) and roff(7) validators no longer use the parser state flag ROFF_NOFILL, we can finally get rid of the function man_state(), resulting in a better separation of parsing and validation.
show more ...
|
#
83d65a5a |
| 31-Dec-2018 |
schwarze <schwarze@openbsd.org> |
Cleanup, minus 15 LOC, no functional change: Simplify the way the man(7) and mdoc(7) validators are called. Reset the parser state with a common function before calling them. There is no need to agai
Cleanup, minus 15 LOC, no functional change: Simplify the way the man(7) and mdoc(7) validators are called. Reset the parser state with a common function before calling them. There is no need to again reset the parser state afterwards, the parsers are no longer used after validation. This allows getting rid of man_node_validate() and mdoc_node_validate() as separate functions.
show more ...
|
#
6b86842e |
| 30-Dec-2018 |
schwarze <schwarze@openbsd.org> |
Cleanup, no functional change:
The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, whic
Cleanup, no functional change:
The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, which is already public. Move the rest of struct roff_man to the parser-internal header roff_int.h.
Since the validators need access to the parser state, call them from the top level parser during mparse_result() rather than from the main programs, also reducing code duplication.
This keeps parser internal state out of thee main programs (five in mandoc portable) and out of eight formatters.
show more ...
|
#
63f82d49 |
| 26-Aug-2018 |
schwarze <schwarze@openbsd.org> |
Support nesting of elements with next-line scope. For example, ksh93(1) needs this for .B\n.SM.
|
#
16fe0cfc |
| 17-Aug-2018 |
schwarze <schwarze@openbsd.org> |
Remove more pointer arithmetic passing via regions outside the array that is undefined according to the C standard. Robert Elz <kre at munnari dot oz dot au> pointed out i wasn't quite done yet.
|
#
6050a3da |
| 29-Apr-2017 |
schwarze <schwarze@openbsd.org> |
Parser unification: use nice ohashes for all three request and macro tables; no functional change, minus two source files, minus 200 lines of code.
|
#
14a309e3 |
| 24-Apr-2017 |
schwarze <schwarze@openbsd.org> |
Continue parser unification: * Make enum rofft an internal interface as enum roff_tok in "roff.h". * Represent mdoc and man macros in enum roff_tok. * Make TOKEN_NONE a proper enum value and use it t
Continue parser unification: * Make enum rofft an internal interface as enum roff_tok in "roff.h". * Represent mdoc and man macros in enum roff_tok. * Make TOKEN_NONE a proper enum value and use it throughout. * Put the prologue macros first in the macro tables. * Unify mdoc_macroname[] and man_macroname[] into roff_name[].
show more ...
|
#
dcd684cd |
| 07-Nov-2015 |
schwarze <schwarze@openbsd.org> |
In private header files, __BEGIN_DECLS and __END_DECLS are pointless. Because these work slightly differently on different systems, they are becoming a maintenance burden in the portable version, so
In private header files, __BEGIN_DECLS and __END_DECLS are pointless. 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.
show more ...
|
#
b3cd4c9a |
| 22-Oct-2015 |
schwarze <schwarze@openbsd.org> |
move man(7) validation into the dedicated validation phase, too
|
#
e0c8c906 |
| 23-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Get rid of two empty wrapper functions. No functional change.
|
#
e32c44d4 |
| 19-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Unify trickier node handling functions. * man_elem_alloc() -> roff_elem_alloc() * man_block_alloc() -> roff_block_alloc() The functions mdoc_elem_alloc() and mdoc_block_alloc() remain for now because
Unify trickier node handling functions. * man_elem_alloc() -> roff_elem_alloc() * man_block_alloc() -> roff_block_alloc() The functions mdoc_elem_alloc() and mdoc_block_alloc() remain for now because they need to do mdoc(7)-specific argument processing.
show more ...
|
#
69c34eaa |
| 19-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Unify some node handling functions that use TOKEN_NONE. * mdoc_word_alloc(), man_word_alloc() -> roff_word_alloc() * mdoc_word_append(), man_word_append() -> roff_word_append() * mdoc_addspan(), man_
Unify some node handling functions that use TOKEN_NONE. * mdoc_word_alloc(), man_word_alloc() -> roff_word_alloc() * mdoc_word_append(), man_word_append() -> roff_word_append() * mdoc_addspan(), man_addspan() -> roff_addtbl() * mdoc_addeqn(), man_addeqn() -> roff_addeqn() Minus 50 lines of code, no functional change.
show more ...
|
#
fa2127f9 |
| 19-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Unify node handling functions: * node_alloc() for mdoc and man_node_alloc() -> roff_node_alloc() * node_append() for mdoc and man_node_append() -> roff_node_append() * mdoc_head_alloc() and man_head_
Unify node handling functions: * node_alloc() for mdoc and man_node_alloc() -> roff_node_alloc() * node_append() for mdoc and man_node_append() -> roff_node_append() * mdoc_head_alloc() and man_head_alloc() -> roff_head_alloc() * mdoc_body_alloc() and man_body_alloc() -> roff_body_alloc() * mdoc_node_unlink() and man_node_unlink() -> roff_node_unlink() * mdoc_node_free() and man_node_free() -> roff_node_free() * mdoc_node_delete() and man_node_delete() -> roff_node_delete() Minus 130 lines of code, no functional change.
show more ...
|
#
405987fc |
| 18-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Unify {mdoc,man}_{alloc,reset,free}() into roff_man_{alloc,reset,free}(). Minus 80 lines of code, no functional change. Written on the train from Koeln to Wolfsburg returning from p2k15.
|
#
d0370668 |
| 18-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Move mdoc_hash_init() and man_hash_init() to libmandoc.h and call them from mparse_alloc() and choose_parser(), preparing unified allocation of struct roff_man.
|
#
ede1b9d0 |
| 18-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Replace the structs mdoc and man by a unified struct roff_man. Almost completely mechanical, no functional change. Written on the train from Exeter to London returning from p2k15.
|
#
2a238f45 |
| 02-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Third step towards parser unification: Replace struct mdoc_meta and struct man_meta by a unified struct roff_meta. Written of the train from London to Exeter on the way to p2k15.
|
#
3a0d07af |
| 02-Apr-2015 |
schwarze <schwarze@openbsd.org> |
Second step towards parser unification: Replace struct mdoc_node and struct man_node by a unified struct roff_node. To be able to use the tok member for both mdoc(7) and man(7) without defining all t
Second step towards parser unification: Replace struct mdoc_node and struct man_node by a unified struct roff_node. To be able to use the tok member for both mdoc(7) and man(7) without defining all the macros in roff.h, sacrifice a tiny bit of type safety and make tok an int rather than an enum. Almost mechanical, no functional change. Written on the Eurostar from Bruxelles to London on the way to p2k15.
show more ...
|
#
70a5c2d4 |
| 20-Mar-2015 |
schwarze <schwarze@openbsd.org> |
Simplify by almost halving the number of macro flags: 1. MAN_EXPLICIT was used iff fp == blk_exp, so just test fp. 2. MAN_FSCOPED was used only for TP, so just test for TP. 3. MAN_NOCLOSE was complet
Simplify by almost halving the number of macro flags: 1. MAN_EXPLICIT was used iff fp == blk_exp, so just test fp. 2. MAN_FSCOPED was used only for TP, so just test for TP. 3. MAN_NOCLOSE was completely unused. No functional change.
show more ...
|
#
9ed53694 |
| 28-Dec-2014 |
schwarze <schwarze@openbsd.org> |
mdoc(7) already uses the mandoc(1) -Ios argument in the footer line when .Os has no argument, so do the same for man(7) when .TH has less than four arguments; there is no reason to treat both differe
mdoc(7) already uses the mandoc(1) -Ios argument in the footer line when .Os has no argument, so do the same for man(7) when .TH has less than four arguments; there is no reason to treat both differently. Issue found following a question from Thomas Klausner <wiz at NetBSD>.
show more ...
|
#
eae2af84 |
| 28-Nov-2014 |
schwarze <schwarze@openbsd.org> |
Simplify by making many functions in the man(7) parser void, and some cleanup; no functional change, minus 70 lines.
|
#
3f8f0b8c |
| 27-Nov-2014 |
deraadt <deraadt@openbsd.org> |
remove unneccessary inclusion protection; ok schwarze
|
#
a1d10902 |
| 03-Nov-2014 |
schwarze <schwarze@openbsd.org> |
Allow the five man(7) font macros to concatenate their line arguments, the same way the mdoc(7) macros marked MDOC_JOIN do it. In -Thtml, this removes bogus <br/> when the font macros are used in no-
Allow the five man(7) font macros to concatenate their line arguments, the same way the mdoc(7) macros marked MDOC_JOIN do it. In -Thtml, this removes bogus <br/> when the font macros are used in no-fill mode; issue found by jsg@ in the Xcursor(3) SYNOPSIS. As a bonus, this slightly reduces the size of the syntax tree.
show more ...
|
#
492e55cd |
| 08-Aug-2014 |
schwarze <schwarze@openbsd.org> |
Simplify man(7) validation: Drop pre-handlers, they were almost unused. Drop the needless complexity of allowing more than one post-handler.
This saves one internal interface function, one static fu
Simplify man(7) validation: Drop pre-handlers, they were almost unused. Drop the needless complexity of allowing more than one post-handler.
This saves one internal interface function, one static function, one private struct definition, sixteen static arrays, and 45 lines of code. No functional change.
show more ...
|
#
28153913 |
| 08-Aug-2014 |
schwarze <schwarze@openbsd.org> |
demacrify: get rid of man_nmsg(), man_pmsg(), mdoc_nmsg(), mdoc_pmsg()
|