Age | Commit message (Collapse) | Author |
|
No merging is needed; basically, mandoc is developed here and mdocml.bsd.lv
is not really "upstream", but just OpenBSD plus compatibility goo. All the
same, the exercise is far from useless: NetBSD, FreeBSD, and DragonFly have
mandoc in base, NetBSD uses it by default to show manuals, and FreeBSD and
DragonFly have finally come close to switching away from groff as well.
Useful bug reports come in and help making our mandoc better.
Maybe we should list mandoc as an OpenBSD associated project on index.html.
|
|
Change the logic depending upon COMPILER_VERSION everywhere, to assume gcc4
is the norm and to explicitely test for gcc3 when a different behaviour
is required.
No functional change intended. Be sure to `make install' in share/mk before
attempting to do anything.
|
|
I refrained from merging one patch that i dislike
and one that requires additional review,
but we are now definitely much closer to 1.12.1 than to 1.12.0.
|
|
In its current state, it causes too much slowdown, in particular
during system builds, and there are other regressions.
That cannot be fixed quickly while it's enabled.
Problems pointed out by espie@, backout requested by deraadt@,
diff "looks good" to espie@.
|
|
do not rename to mandocdb(8): Even though there is some
additional functionality, the basic purpose remains the same.
Requested by espie@; "decide fast" deraadt@.
|
|
Unlink the old apropos(1), whatis(1), and makewhatis(8) from the build.
Call the new tools from pkg_create(1) and pkg_add(1).
"Please enable it now." deraadt@
|
|
In particular, support the MANPATH environment variable
and don't confuse index record numbers when working with
multiple mandoc databases at once.
Besides, remove lots of gratuitious code and whitespace differences.
|
|
and add the standard options -M and -m to apropos(1).
Including a bugfix to prevent mandocdb(8) from leaking
database file descriptors.
|
|
for example the future man.cgi, out of apropos.c (which still
contains the apropos(1) main program, command line handling, and
the terminal output formatter) into apropos_db.{h,c} (which now
contains the database searching backend code).
While here,
* Drop the -e option; to search for exact strings, use REs.
* Drop the -r option (more changes related to this coming soon).
* Use the traditional -s and -S instead of inventing our own options.
* Drop the sort option (at least for now), it got in the way.
Written by kristaps@.
|
|
Implement .Rv in -Tman.
Let -man -Tman work a bit like cat(1).
Add the -Ofragment option to -T[x]html.
Minor fixes in -T[x]html.
Lots of apropos(1) and -Tman code cleanup.
|
|
2) Link both that one and mandocdb(8) into the mandoc(1) binary.
3) Install a /usr/bin/mandocdb hardlink and the mandocdb(8) manual.
Do not replace /usr/bin/apropos by a hardlink yet because it is
not ready for production, and ports integration is still missing.
Development will be done in the tree, even the user interfaces
are still subject to change at this point.
Both jmc@ and deraadt@ agree with getting this in.
|
|
main new feature: support the roff(7) .tr request
plus various bugfixes and some refactoring
regressions are so minor that it's better to get this in
and fix them in the tree
|
|
adding an implementation of the eqn(7) language
by kristaps@
So far, only .EQ/.EN blocks are handled, in-line equations are not, and
rendering is not yet very pretty, but the parser is fairly complete.
|
|
to convert mdoc(7) documents to the man(7) language.
This is work in progress and will be developed in tree.
It does already handle the cat(1) manual,
but will hardly handle all your fancy manuals yet.
go ahead kristaps@ jmc@ millert@ deraadt@
|
|
with release 1.11.4. Correct this for release.
|
|
* Unicode output support (no Unicode input yet, though).
* Refactoring: completely handle predefined strings in roff.c.
- New function mandoc_escape() replaces a2roffdeco() and mandoc_special().
- Start using mandoc_getarg() in mdoc_argv.c.
- Clean up parsing of delimiters in mdoc(7).
* And many minor fixes and lots of cleanup.
|
|
Again lots of cleanup and maintenance work by kristaps@.
- simplify error reporting: less function pointers, more mandoc_[v]msg
- main: split document parsing out of main.c into read.c
- roff, mdoc, man: improved recognition of control characters
- roff: better handling of if/else stack overflows
- roff: add some predefined strings for backward compatibility
- mdoc, man: empty sections are not errors
- mdoc: move delimiter handling to libmdoc
- some header restructuring and some minor features and fixes
This merge causes two minor regressions
that i will fix in separate commits right afterwards.
|
|
lots of cleanup and maintenance work by kristaps@.
- move some main.c globals into struct curparse
- move mandoc_*alloc to mandoc.h such that all code can use them
- make mandoc_isdelim available to formatting frontends
- dissolve mdoc_strings.c, move the code where it is used
- make all error reporting functions void, their return values were useless
- and various minor cleanups and fixes
|
|
Written by kristaps@.
For now, i'm adding one line to each of the four frontends
to just pass the input text through to the output,
not yet interpreting any of then eqn keywords.
|
|
* .T} can be followed by a delimiter, then more data.
* Do not limit table column widths (improves terminfo(5)).
* Let numerical cells respect explicitly specified minimum cell widths.
* Let terminal output survive missing data cells.
* Parse and ignore arguments in parentheses on layout cell specifications.
* Move tbl_calc() into out.c such that it can be used by all frontends.
* Give tables an HTML class.
* Some cleanup in tbl -Thtml code.
All code by kristaps@.
|
|
there are still a few bugs, but fixing these will be easier in tree.
|
|
In particular, use <SMALL> for .SM and <CODE> for .Dl.
Use <B> for bold and <I> for italic in general.
Also call this mandoc 1.10.8 now, as it is functionally equivalent,
even though one one set of refactoring patches has not been merged
yet because it conflicts with our tbl(1) handling.
|
|
No more functional changes, just sync ordering, comments and white space.
|
|
Same as for mdoc_action.c, but much simpler.
Work by kristaps@, re-applying OpenBSD changes on top.
|
|
basically the same things just causes code duplication and confusion.
Work by kristaps@, including a few bugfixes he found during the merge,
and reapplying OpenBSD changes on top.
|
|
The output dosn't look nice yet, escape handling is still missing,
but will follow soon.
"move forward aggressively :-)" deraadt@
|
|
* ignore double-.Pp
* ignore .Pp before .Bd and .Bl (unless -compact in specified)
* avoid double blank line upon .Pp, .br and friends in literal context
* cast enums to int when passing them to exit(3) to please lint(1)
While merging, fix a regression introduced by kristaps@:
Outside literal mode, double blank lines must both be printed.
To achieve this again after kristaps@ improvements in 1.10.6,
treat such blank lines as .sp (instead of .Pp as in 1.10.5)
and drop .Pp before .sp just like dropping .Pp before .Pp.
|
|
NOT including Kristaps' .Bd -literal changes which cause regressions.
Features:
* -Tpdf now fully working
Bugfixes:
* proper handling of quoted strings by .ds in roff(7)
* allow empty .Dd
* make .Sm start no-spacing after the first output word
* underline .Ad
* minor fixes in -Thtml
and some optimisations in terminal output.
|
|
1) Proper .Bk support: allow output line breaks at input line breaks,
but keep input lines together in the output, finally fixing
synopses like aucat(1), mail(1) and tmux(1).
2) Mostly finished -Tps (PostScript) output.
3) Implement -Thtml output for .Nm blocks and .Bk -words.
4) Allow iterative interpolation of user-defined roff(7) strings.
Also contains some minor bugfixes and some performance improvements.
|
|
* support -Tps -Opaper=a4 and -Opaper=letter
* lots of mandoc.1 manual improvements
|
|
* bug fixes:
- interaction of ASCII_HYPH with special chars (found by Ulrich Spoerlein)
- handling of roff conditionals (found by Ulrich Spoerlein)
- .Bd -offset will no more default to 6n
* maintenance:
- more caching of .Bd and .Bl arguments for efficiency
- deconstify man(7) validation routines
- add FreeBSD library names (provided by Ulrich Spoerlein)
* start PostScript font-switching
|
|
so far, monospace without font decoration,
but it already has page headers and footers
|
|
The main step forward is that this now has *much* better .Bl -column
support, now supporting many manuals that previously errored out
without producing any output.
Other fixes include:
* do not die from multiple list types, use the first and warn
* in .Bl without a type, default to -item
* various tweaks to .Dt
* fix .In, .Fd, .Ft, .Fn and .Fo formatting
* some documentation fixes and additions
* and fix a couple of bugs reported by Ulrich Spoerlein:
* better support for roff block-end "\}" without a preceding dot
* .In must not break the line outside SYNOPSIS
* spelling in some error messages
While merging, fix one regression in .In spacing
that needs to go to bsd.lv, too.
|
|
which is mostly the post-hackathon release,
bringing in the OpenBSD changes to bsd.lv,
but which also has a few additional minor fixes:
* .Lb is an in-line macro, not in_line_eoln
* .Bt, .Ud now warn when discarding arguments
* allow bad -man dates to flow verbatim into the front-ends
- so far all reported by Ulrich Spoerlein
* .Ar, .Fl and .Li starting with closing punctuation emit an empty element
* empty .Li macros print nothing, but may cause spacing
* proper EOS handling for .Bt, .Ex, .Rv, and .Ud.
* cleanup: collapse posts_xr into posts_wtext (which is the same)
* efficiency: very simple table lookup for roff.c
|
|
but in practice, most real legacy man(7)uals are using so much
low level roff that we can't really get away without at least
partially handling some roff instructions.
As doing this in man(7) only has become messy and as even some
mdoc(7) pages need it, start a minimal partial roff preprocessor.
As a first step, move handling of .am[i], .de[i] and .ig there.
Do not use the roff preprocessor for new manuals!
Now that we have three main parser libraries - roff, man and mdoc -
each one having its own error handling is becoming messy, too.
Thus, start unifying message handling in one central place,
introducing a new generic function mmsg().
coded by kristaps@
|
|
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
|
|
complier picking, eg supporting gcc2, gcc3, and gcc4. based on diff by Marco,
with fixes from espie@.
ok espie@ general mumbling of approval of others.
|
|
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
|
|
* 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)
|
|
* scoping fixes for roff instructions
* accept apostroph in place of dot as a macro control character
* accept tabs between the control character and the macro name
* check that man(7) .TH titles use capital letters
|
|
* much improved pod2man support and low-level roff robustness
* have -Tlint imply -Wall and -fstrict
* use fewer macros and more enum in libman
* and various bug fixes
|
|
This is mostly cleanup by kristaps@ after my rather hackish patch
to tolerate the non-text macros .na, .sp, .br in next-line scope;
plus some nesting issues fixed by him, all in man(7).
This survived a full cd /usr/src; make man.
|
|
man(7) and mdoc(7) special characters and predefined strings in general;
just as mandoc(1) is not intending to implement new languages,
but provide standard formatting for man(7) and mdoc(7) files,
whatever "standard" may mean in this context (sigh).
So move this to the right place.
noticed by deraadt@
|
|
characters and predefined strings.
In kristaps@'s words:
"Note that mandoc_char(7) is a superset of the latest groff_char(7)
(which defines most special characters), groff(7) (more special
characters, mostly formatting), and mdoc_samples(7) (predefined
strings and other nits). Thus, some of the characters that mandoc(1)
accepts are not accepted by the groff in OpenBSD base."
This is useful because you now have everything in one place, and
in a form authoritative for mandoc(1). At least as long as we still
have groff(1) in base, we must keep groff_char(7) as well, of course.
"sure" jmc@
|
|
* bugfix: do not restore TERMP flags when leaving lists, just reset them
* and a few HTML fixes
* clarity: return width from a2width, not width+2, and adapt to it
* manual: document .Bl and .Fl
* portability: no need to escape '%' in macro names
|
|
- new function a2roffdeco
- font modes (\f) only affect the current stack point
- implement scaling (\s)
- implement space suppression (\c)
- implement non-breaking space (\~) in -Tascii
- many manual improvements
|
|
correctness/functionality:
- bugfix: properly ignore lines with only a dot in -man
- bugfix: .Bl -ohang doesn't allow -width, warn about this
- improve date string handling by new function mandoc_a2time
- some HTML improvements
- significant documentation additions in man.7 and mdoc.7
portability:
- replace __dead by __attribute__((noreturn))
- bugfix: correct .Dx rendering
- some more library names for NetBSD
simplicity:
- replace hand-rolled putchar(3)-loops by fwrite(3)
- replace single-character printf(3) by putchar(3)
|
|
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/
|