| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
by kristaps@
|
|
|
|
|
|
|
|
|
|
| |
Only OPEN are drawn before the beginning of a macro;
this is new, before this, MIDDLE ('|') were drawn in front, too.
Only CLOSE are pushed after the end of a macro (as before).
ok kristaps@
This allows us to finally enable handling of leading punctuation
without regressions.
|
|
|
|
| |
from bsd.lv mandoc.c 1.13 and mdoc_macro.c 1.64
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which is simpler and more powerful than mine, and remove mine.
* man(7) now has EOS handling, too
* put EOS detection into its own function in libmandoc
* use node and termp flags to communicate the EOS condition
* no more EOS pseudo-macro
* no more non-printable EOS marker character on the formatter level
This slightly breaks EOS detection after trailing punctuation
in mdoc(7) macros, but that will be restored soon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this does not merge kristaps' end-of-sentences handling yet,
i will check that separately. This one includes:
* handle \*(Ba as a delimiter
* introduce ARGS_PEND for .Bl -column .It end-of-line special casing
* section ordering: expect EXIT STATUS at the right place
* line break fixes in SYNOPSIS
* allow literal contexts to have arbitrary line lengths
* the input file column number can not be used to identify the beginning
of a line because white space is allowed after the initial '.'
* proper leading spaces in -man -Tascii mode
* do not let Lb break lines in -mdoc -Thtml LIBRARY
|
|
|
|
|
|
|
|
|
| |
* preserve multiple consecutive space characters in input
* do not restrict .Cd and .Rv to certain sections (requested by Joerg)
* do not run lookup() on quoted words
* enum return types for mdoc_args and mdoc_argv
* fix auto-closing of LINK tag in -Txhtml (from Daniel Friesel)
* various lint and manual fixes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
avoid the bad parts of 1.9.23, and keep local patches.
Input in general:
* Basic handling of roff-style font escapes \f, \F.
* Quoted punctuation does not count as punctuation.
mdoc(7) parser:
* Make .Pf callable; noted by Claus Assmann.
* Let .Bd and .Bl ignore unknown arguments; noted by deraadt@.
* Do not warn when .Er is used outside certain sections.
* Replace mdoc_node_free[list] by mdoc_node_delete.
* Replace #define by enum for rew*() return values.
man(7) parser:
* When .TH is missing, use default section and date.
Output in general:
* Curly braces do not count as punctuation.
* No space after .Fl w/o args when a macro follows on the same line.
HTML output:
* Unify PAIR_*_INIT macros, introduce new PAIR_ID_INIT().
* Print whitespace after, not before .Vt .Fn .Ft .Fo.
Checked that all manuals in base still build.
|
|
|
|
|
|
| |
* convert mdoc tokens from #define to enum
* fix a segfault with .Xo/.Xc in explicit blocks
* Thorn is \*(Th, not \*(TH; noticed by Joerg Sonnenberger
|
|
|
|
| |
We must investigate the fallout before enabling this.
|
|
|
|
|
|
|
|
| |
* prevent roff instructions in man(7) from clobbering scopes and line modes
(noted by Sascha Wildner)
* handle leading punctuation in mdoc(7) blocks and line macros
(looks good in principle, but is causing some fallout in OpenBSD,
so i will disable it locally for now with the next commit)
|
|
|
|
|
|
|
|
|
| |
When a text line or a non-block macro line in the source code ends
in any of ".!?", consider that an end of sentence (EOS).
This makes Jason's rule "new sentence, new line" even more important.
Let the parser detect the EOS and insert a token into the AST.
Let the -Tascii frontend render the EOS token as a double space before
the next word.
|
|
|
|
|
|
|
|
| |
macros after closing delimiters only, not after opening ones. Besides,
neither roff nor old nor new groff consider braces { } as delimiters.
This fixes some frequent misrenderings by mandoc,
for example ".Ql (" being rendered as "`'(" instead of "`('".
|
|
|
|
|
| |
The trick is to not switch from the .It header to the body at EOL, but,
in case an explicit block macro follows, at the end of the block.
|
|
|
|
|
|
|
|
|
| |
* corrected .Vt handling (spotted by Joerg Sonnenberger)
* corrected .Xr argument handling (based on my patch)
* removed \\ escape sequence (because it is for low-level roff only)
* warn about trailing whitespace (suggested by jmc@)
* -Txhtml support
* and some general cleanup and doc improvements
|
|
|
|
|
|
|
| |
each should be rendered with its own dash.
Fixes regress/usr.bin/mandoc/mdoc/Fl/multiarg.in;
ok kristaps@ and merged upstream in rev. 1.39.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
correctness/functionality:
- bugfix: do not die when overstep hits the right margin
- new option: -fign-escape
- and various HTML features
portability:
- replace bzero(3) by memset(3), which is ANSI C
- replace err(3)/warn(3) by perror(3)/exit(3), which is ANSI C
- iuse argv[0] instead of __progname
- add time.h to various files for FreeBSD compilation
simplicity:
- do not allocate header/footer data dynamically in *_term.c
- provide and use malloc frontends that error out on failure
for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/
|
|
|
|
|
| |
NetBSD portability fixes and some minor bugfixes and feature enhancements;
also checked that my hyphenation code still works on top of this
|
|
|
|
| |
shortening the code, and, according to kristaps@, speeding it up
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
1) If a macro is not parsed, do not parse it. Of course, without
parsing it, we cannot produce "macro-like parameter" warnings,
but these were useless anyway.
2) If a macro is not callable, do not print a useless warning when
it occurs as a parameter, just display the raw characters.
3) Below .Bl -column, check whether macros are callable.
4) Like groff, allow whitespace after the initial dot on macro lines.
|
| |
|
| |
|
| |
|
|
|
|
| |
by using the normal argument parsing from mdoc_argv.c
|
|
|
|
| |
no functional change, but shorter code
|
|
|
|
|
| |
kristaps@ says many SYNOPSIS sections use this; my impression is
that's not in OpenBSD, but it won't do much harm here, either
|
|
|
|
| |
trailing terms and do not error out any more, try: .Ed foo
|
| |
|
|
|
|
| |
and use \(en instead of \- for .Nd
|
| |
|
|
|
|
|
|
| |
define additional warning macro mdoc_nwarn()
remove obsolete warning functions mdoc_warn(), pwarn(), vwarn(), nwarn()
remove various now unused "enum mdoc_warn" and "enum mwarn"
|
|
|
|
|
| |
and use the so improved mdoc_nerr() at many places;
get rid of now unused static functions perr()
|
|
|
|
| |
and use the so improved mdoc_nerr() at many places
|
|
|
|
|
| |
use it as a new argument to mdoc_err(), the same way as for for man_err(),
and use string tables instead of switch statements to select error messages
|
|
|
|
| |
mdoc_verr is not using enum mdoc_warn, so use it at a few more places
|
|
|
|
| |
remove type from mdoc_vwarn arguments, and use this function where apropriate
|
| |
|
|
|
|
| |
and some tweaks to .Lk
|
| |
|
|
|