summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/Makefile
AgeCommit message (Collapse)Author
2013-10-07Yesterday, i released (portable) mandoc 1.12.2, so bump our VERSION, too.Ingo Schwarze
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.
2013-08-06Remove support for COMPILER_VERSION == gcc2.Miod Vallat
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.
2012-04-15Call this mandoc 1.12.1.Ingo Schwarze
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.
2012-01-16Backout activation of the new apropos(1)/whatis(1)/makewhatis(8).Ingo Schwarze
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@.
2012-01-10Continue using the traditional name makewhatis(8),Ingo Schwarze
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@.
2012-01-05Enable the new apropos(1), whatis(1), and makewhatis(8).Ingo Schwarze
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@
2011-11-26Resync to bsd.lv, most code from kristaps@.Ingo Schwarze
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.
2011-11-17Minimal man.conf(5) _whatdb support for mandocdb(8) and apropos(1),Ingo Schwarze
and add the standard options -M and -m to apropos(1). Including a bugfix to prevent mandocdb(8) from leaking database file descriptors.
2011-11-13Split the common code to be reused by other mandocdb clients,Ingo Schwarze
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@.
2011-10-09Sync to version 1.12.0; all code by kristaps@:Ingo Schwarze
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.
2011-10-061) Import the future apropos(1) replacement written by kristaps@.Ingo Schwarze
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.
2011-09-18sync to version 1.11.7 from kristaps@Ingo Schwarze
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
2011-09-18sync to version 1.11.5:Ingo Schwarze
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.
2011-09-17Initial, incomplete support for -TmanIngo Schwarze
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@
2011-07-31Actually, by merging individual patches, we are already in syncIngo Schwarze
with release 1.11.4. Correct this for release.
2011-05-29Merge release 1.11.3, almost all code by kristaps@:Ingo Schwarze
* 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.
2011-04-24Merge version 1.11.1:Ingo Schwarze
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.
2011-04-21Merge version 1.10.10:Ingo Schwarze
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
2011-03-20Import the foundation for eqn(7) support.Ingo Schwarze
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.
2011-01-09Sync tbl handling to bsd.lv release 1.10.9:Ingo Schwarze
* .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@.
2011-01-04Merge kristaps@' cleaner tbl integration, removing mine;Ingo Schwarze
there are still a few bugs, but fixing these will be easier in tree.
2010-12-25Yet another batch of -Thtml polishing from kristaps@:Ingo Schwarze
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.
2010-12-07Complete the merge of bsd.lv version 1.10.7:Ingo Schwarze
No more functional changes, just sync ordering, comments and white space.
2010-12-01Merge man_action.c into man_validate.c.Ingo Schwarze
Same as for mdoc_action.c, but much simpler. Work by kristaps@, re-applying OpenBSD changes on top.
2010-12-01Merge mdoc_action.c into mdoc_validate.c, because having two places to doIngo Schwarze
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.
2010-10-15Minimal glue to integrate tbl into the mandoc man(7) parser and formatter.Ingo Schwarze
The output dosn't look nice yet, escape handling is still missing, but will follow soon. "move forward aggressively :-)" deraadt@
2010-09-27Merge the last bits of 1.10.6 (released today), most were already in:Ingo Schwarze
* 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.
2010-07-31Merge bsd.lv version 1.10.5: last larger batch of bug fixes before release.Ingo Schwarze
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.
2010-07-13Merge release 1.10.4 (all code by kristaps@), providing four new features:Ingo Schwarze
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.
2010-06-29sync to bsd.lv version 1.10.3:Ingo Schwarze
* support -Tps -Opaper=a4 and -Opaper=letter * lots of mandoc.1 manual improvements
2010-06-26merge release 1.10.2Ingo Schwarze
* 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
2010-06-10minimal initial -Tps support, from kristaps@ GSOCIngo Schwarze
so far, monospace without font decoration, but it already has page headers and footers
2010-06-06Merge bsd.lv version 1.10.1 (to be released soon).Ingo Schwarze
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.
2010-06-06Merge bsd.lv release 1.10.0,Ingo Schwarze
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
2010-05-16In theory, Kristaps never intended to write a roff parser,Ingo Schwarze
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@
2010-05-14Merge 1.9.25, keeping local patches;Ingo Schwarze
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
2010-05-14merge 1.9.24, keeping local patches; some changes:Ingo Schwarze
* 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
2010-05-10Switch to using COMPILER_VERSION instead of USE_GCC3, allows for more flexibleDale Rahn
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.
2010-04-07Merge the good parts of 1.9.23,Ingo Schwarze
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.
2010-04-02merge 1.9.22, keeping local patchesIngo Schwarze
* 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
2010-04-02merge 1.9.20, keeping local patchesIngo Schwarze
* 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)
2010-03-29merge 1.9.19, keeping local patchesIngo Schwarze
* 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
2010-03-26merge 1.9.17, keeping local patchesIngo Schwarze
* 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
2010-03-25merge 1.9.16, keeping local patchesIngo Schwarze
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.
2010-01-03This is not intended to document just the mandoc(1) program, but ratherIngo Schwarze
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@
2010-01-03Install mandoc_char(7), a comprehensive overview of mandoc(1) specialIngo Schwarze
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@
2010-01-02complete the sync to 1.9.15-pre2: mostly minor fixesIngo Schwarze
* 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
2009-12-24sync to 1.9.14: rewrite escape sequence handling:Ingo Schwarze
- 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
2009-12-23sync to 1.9.13: minor fixes:Ingo Schwarze
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)
2009-12-22sync to 1.9.12, mostly portability and refactoring:Ingo Schwarze
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/