summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* improve error reporting:Ingo Schwarze2010-06-302-33/+53
| | | | | | | | | * avoid error exit code after mere warnings * add ERROR: and FATAL: to messages when appropriate * sort the code in mmsg() to make it easier on the eye * make the mandocerrs[] list easier to maintain * update a few comments in mandoc.h ok kristaps@
* Correct dimensions for DocumentMedia. Noted by schwarze@, as gv(1) wasKristaps Dzonsons2010-06-301-5/+4
| | | | puking on input.
* Embedding Charter proportional-width glyphs. Nice-looking output.Kristaps Dzonsons2010-06-301-288/+288
|
* PostScript can now handle scaled glyph sizes (see "scale" in structKristaps Dzonsons2010-06-302-17/+28
| | | | termp_ps) to arbitrarily scale font. Tested with 10 (default), 12, 14.
* Pushed normalisation of scaling units into term_hspan().Kristaps Dzonsons2010-06-304-20/+13
|
* Move term_hspan() calculation into the output devices, where it belongs.Kristaps Dzonsons2010-06-304-47/+124
|
* Push paper calculation out of getsubopt() loop. Make all points be AFMKristaps Dzonsons2010-06-302-30/+31
| | | | glyph units to make positioning more precise.
* Closing of full blocks (Bd Bf Bk Bl It Fo Nd Rs Sh Ss) may never beIngo Schwarze2010-06-301-3/+42
| | | | | | | | | | delayed: It must either succeed right away or fail outright. As noticed by Kristaps, neglecting to fail properly when required could make invalid input screw up the syntax tree and ultimately trigger assertions in other, unrelated parts of the program. This fix tested by and OK by kristaps@. While here, comment the rather tricky function rew_dohalt(). This function will probably need more tweaks later on.
* let's not forget the remaining badly nested block issue,Ingo Schwarze2010-06-291-0/+3
| | | | even though there are no more urgent problems
* fix a typo in the function declaration;Ingo Schwarze2010-06-291-1/+1
| | | | | seems like gcc3 didn't catch it :-( thanks to thib@ and kristaps@ for reporting
* Considerably simplify block rewind rules; no functional change intended.Ingo Schwarze2010-06-291-206/+69
| | | | | | | | | | * Let rew_alt() always succeed, obsoleting tons of case statements. * Merge rew_dobreak() into rew_dohalt(). * Encode all rewinding cases uniformly in terms of "enum rew". Required because i'm too dumb to get SYNOPSIS .Nm rewinding right without cleaning this up first. "get it in" kristaps@
* Support for badly nested blocks, written around the time ofIngo Schwarze2010-06-298-86/+320
| | | | | | | | | | | | | | | | | | | | | | | | | the Rostock mandoc hackathon and tested and polished since, supporting constructs like: .Ao Bo Ac Bc (exp breaking exp) .Aq Bo eol Bc (imp breaking exp) .Ao Bq Ac eol (exp breaking imp) .Ao Bo So Bc Ac Sc (double break, inner before outer) .Ao Bo So Ac Bc Sc (double break, outer before inner) .Ao Bo Ac So Bc Sc (broken breaker) .Ao Bo So Bc Do Ac Sc Dc (broken double breaker) There are still two known issues which are tricky: 1) Breaking two identical explicit blocks (Ao Bo Bo Ac or Aq Bo Bo eol) fails outright, triggering a bogus syntax error. 2) Breaking a block by two identical explicit blocks (Ao Ao Bo Ac Ac Bc or Ao Ao Bq Ac Ac eol) still has a minor rendering error left: "<ao1 <ao2 [bo ac2> ac1> bc]>" should not have the final ">". We can fix these later in the tree, let's not grow this diff too large. "get it in" kristaps@
* Inter-release tag.VERSION.1.10.3Kristaps Dzonsons2010-06-291-2/+2
|
* Remove some incorrect data from mandoc.1 (that of non-macro lines andKristaps Dzonsons2010-06-291-140/+106
| | | | | | spacing, which is for mdoc.7/man.7 anyway). Also document -Opage=xxx and push the per-output options into the output subsections. Makes the manual shorter and more readable.
* Add in -Opaper=xxx support for -Tps postscript. This doesn't have anyKristaps Dzonsons2010-06-293-3/+25
| | | | | | functional changes beyond the getsubopt() parse in term_ps.c. If you want to test this (it only does -Opaper=a4 and -Opaper=letter; adding more is trivial), make sure you specify (e.g.) -sPAPERSIZE=a4 to gs(1).
* Give -Tps better PostScript hinting. Note that we're using Adobe-3.0Kristaps Dzonsons2010-06-293-28/+73
| | | | | constructs. Push the stupid CPP defines for page boundaries and margins into proper variables. Give enum termfont a proper TERMFONT__MAX.
* Clean-up of variable-width glyph support. Adds no new code; onlyKristaps Dzonsons2010-06-283-25/+29
| | | | | restructured to make a bit more readable. Also removed an unused entry in the PS engine structure.
* This enables variable glyph-width output. The checkin will be followedKristaps Dzonsons2010-06-282-26/+27
| | | | | | by a [functionless] clean-up in term_ps.c, but this makes the appropriate changes to "enable" initial proportional-width functionality in term.c and fixes some areas of term_ps.c that were causing errors.
* Notes: this must be done later. \b in the input will cause havoc.Kristaps Dzonsons2010-06-282-0/+10
|
* Initial encoding of glyph widths. From /usr/X11R6/lib/X11/fonts/Type1.Kristaps Dzonsons2010-06-281-14/+341
| | | | These continues proportional-width glyph encoding.
* Tiny commit clarifying flushln() documentation as to what refers toKristaps Dzonsons2010-06-281-3/+4
| | | | | visual screen output and what's an array index (getting closer to variable-width fonting).
* minor .Bk fixes:Ingo Schwarze2010-06-272-6/+16
| | | | | | | | * do not print invalid arguments verbatim (no groffs prints them, either) * do not trigger TERMP_PREKEEP twice * do not die from invlid arguments (groff won't die, either) * continue to ignore even valid arguments (just like groff) ok kristaps@ on the previous version, before removing my last bug ;)
* remove .Bk which is doneIngo Schwarze2010-06-271-8/+12
| | | | while here, add .ds as a desideratum
* Allow registers to be unset. Implement and document the `.nr nS val'.Kristaps Dzonsons2010-06-275-13/+41
|
* Following clue-stick applied by schwarze@, back out const-ness of regsetKristaps Dzonsons2010-06-2711-23/+38
| | | | | | | | | passed in to libmdoc and libman. Fix mdoc.3 and man.3 EXAMPLE sections to include regset. Add MDOC_SYNPRETTY flag cueing front-end to nicely format certain values as if SEC_SYNOPSIS were the current section.
* Downstream maintainers: this removes UGLY! I don't want divergingKristaps Dzonsons2010-06-2716-121/+111
| | | | | | | | | functionality and UGLY works quite well thanks to schwarze@'s careful attention. This also backs out function-prototype changes for struct regset, instead stuffing a pointer to the regset directly into struct mdoc/man/roff.
* Document .Bk and .Ek; reminded by kristaps@.Ingo Schwarze2010-06-271-0/+21
|
* Basic implementation of .Bk/.Ek; from OpenBSD.Ingo Schwarze2010-06-273-3/+30
| | | | OK and one stylistic tweak by kristaps@.
* Mechanical diff allowing the const struct regset to propogate throughKristaps Dzonsons2010-06-266-40/+67
| | | | libman and libmdoc.
* Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept aKristaps Dzonsons2010-06-2616-14/+35
| | | | const struct regset pointer. No functionality.
* First step of adding register support. This is inspired by a significantKristaps Dzonsons2010-06-268-13/+162
| | | | | | patch by schwarze@. This commit adds support to libroff parsing `nr' into register set defined in regs.h. This will propogate into libmdoc and libman in later commits.
* Remove "pt" from struct roffsu, as CSS (the only reason it was there) isKristaps Dzonsons2010-06-255-12/+9
| | | | | unclear about which units accept floats/integers, which leads me to assume that it handles either and rounds as appropriate.
* Allow OpenBSD's nroff to process mandoc.1 without puking on long `It'Kristaps Dzonsons2010-06-251-6/+10
| | | | lines.
* Initial chunks for variable-width fonts. Pushes all width calculationsKristaps Dzonsons2010-06-256-85/+133
| | | | | | | | in mdoc_term.c and man_term.c down into term.c. This is still not implemented in term.c, although stubs for width calculations are in place. From now on, offset, rmargin, and other layout variables are abstract screen widths. They will resolve to the the familiar values for -Tascii but -Tps will eventually use points instead of chars.
* Fix slipped in after tag: install PS files with installwww.VERSION.1.10.2Kristaps Dzonsons2010-06-191-1/+1
|
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-1945-45/+45
|
* Version notes for 1.10.2.Kristaps Dzonsons2010-06-192-2/+13
|
* Removed finished TODOsKristaps Dzonsons2010-06-131-27/+3
|
* Remove arg_getattrs(), as we only have arg_getattr()-like calls now thatKristaps Dzonsons2010-06-131-44/+14
| | | | -width is cached.
* Switch on cached -width usage in front-ends.Kristaps Dzonsons2010-06-132-12/+13
|
* Allow -width for lists to be cached in mdoc_bl. This requires someKristaps Dzonsons2010-06-134-52/+67
| | | | | | trickery because widths may be on-the-fly recalculated. I don't like how these are split between mdoc_action.c and mdoc_validate.c, but for the time being, it'll do.
* Small optimisations in mdoc_action list processing. Cleanups making wayKristaps Dzonsons2010-06-131-37/+35
| | | | for "width" cached argument.
* Cached `Bl -offset' into mdoc_bl. Removed erroneous "-offset defaultsKristaps Dzonsons2010-06-126-65/+46
| | | | | to 6n if no value is specified" and added regression tests for `Bl' testing against the empty -offset argument.
* Reverted to mdoc_term.c 1.149 (`It' does not inherit `Bl's cache,Kristaps Dzonsons2010-06-121-7/+10
| | | | | obviously, which was causing fallout) and again remove the loop code. Tested more thoroughly.
* Moved `Bl -compact' into cached data. This allowed the removal ofKristaps Dzonsons2010-06-124-30/+29
| | | | scanning the argv list in print_bvspace(), and thus the parent pointer.
* `Bl' is now using a struct instead of a single enum mdoc_list for itsKristaps Dzonsons2010-06-126-25/+31
| | | | cached values. You can probably guess where this is going.
* Removed stipulation that an empty `Bd -offset' will default to 6n. NotKristaps Dzonsons2010-06-127-33/+80
| | | | | | | sure where this came about. Added regression tests to convince myself that this is so. Also consolidated COMPATIBILITY notes regarding `Bd'. Added COMPATIBILITY note to the effect that old groff pukes on `Bd -compact -ragged' (regression test will fail on old groff).
* Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed inKristaps Dzonsons2010-06-126-56/+120
| | | | | | the "data" union in mdoc_node. Allows me to remove some ugly loops in the front-end and duplicate tests in mdoc_action.c. Add a regression test to make sure we're not doing anything bad (more to come).
* Added enum mdoc_disp (similar to enum mdoc_list). Display types are nowKristaps Dzonsons2010-06-128-87/+77
| | | | | | | | | | | only calculated once in mdoc_validate.c. Noted that `Bd -file xxx' is not supported: it now raises a fatal warning. This is noted in mdoc.7. Empty `Bd' now defaults to LIST_ragged, which is not quite what groff does, but close enough (gross just throws away the `Bd' and gets upset when it encounters an `Ed').
* Add FreeBSD libraries (provided by Ulrich Spoerlein).Kristaps Dzonsons2010-06-111-0/+25
|