summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Suppress duplicate "Page: 1 1" -Tps printing and instead relay onKristaps Dzonsons2010-07-051-5/+1
| | | | PS_NEWPAGE to do the job for us. Noted by Dillo.
* Assert my copyright, making it explicit that i'm granting the same licenseIngo Schwarze2010-07-0411-7/+18
| | | | | on those parts of the code and text that i have written as Kristaps is. "fine with me" kristaps@
* Cache column sizes and char pointer into mdoc_bl. Finally get rid ofKristaps Dzonsons2010-07-045-54/+24
| | | | the loops here and there to track down the MDOC_Column arguments.
* gv(1) doesn't remember the last set font when displaying new pages, soKristaps Dzonsons2010-07-041-6/+24
| | | | | print it out for each new page. This also prevents superfluous printings of the font before the %%Page: comment has been displayed.
* Set line-height to be 1.4em. Removed check for minimum margins that are noKristaps Dzonsons2010-07-042-18/+6
| | | | longer important.
* Suppress printing blank eof pages in -Tps. Delay printing of Page:Kristaps Dzonsons2010-07-041-9/+13
| | | | until actual text is ready to be displayed.
* Suppress printing of newlines/space at start of new -Tps page.Kristaps Dzonsons2010-07-042-16/+33
| | | | | Also renamed "psstate" -> "flags" (was wrongly implying some sort of state machine).
* Backed out margin calculations in favour of much simpler rule of thumb:Kristaps Dzonsons2010-07-042-19/+12
| | | | margins are 1/9 the length/width.
* Auto-margins. Documented in mandoc.1. Also bumped line-height and madeKristaps Dzonsons2010-07-042-13/+43
| | | | sure header and footer accomodate for said line-height.
* Allow empty `Fo' to get by without an assertion.Kristaps Dzonsons2010-07-031-1/+3
|
* Note to myself on what I need to do regarding inter-library functions.Kristaps Dzonsons2010-07-031-0/+9
|
* Rudimentary implementation of user-defined strings;Ingo Schwarze2010-07-034-1/+192
| | | | | | no time for more refinement right now. In particular, fixes terminfo(3) and mdoc.samples(7). ok kristaps@, who will add the HTML frontend bits
* The roff escape function "\s" is definitely not urgent,Ingo Schwarze2010-07-031-0/+9
| | | | but it is used in the tree and we should not forget.
* Not only for -tag lists, but for -hang, -ohang, -inset, -diag,Ingo Schwarze2010-07-021-6/+3
| | | | | | | and -item list as well, empty bodies are OK, they do not even warrant a warning, much less the error they were throwing. According to kristaps, joerg@ also brought this up some time ago. ok kristaps@ jmc@
* Cached `An' arguments in struct mdoc_an. Note that this isn't aKristaps Dzonsons2010-07-023-29/+32
| | | | pointer like the other data members, as there's no need to copy it around.
* Fix: was checking HEAD for arguments.Kristaps Dzonsons2010-07-021-4/+6
|
* Add documentation for Bf/Ef.Kristaps Dzonsons2010-07-021-0/+38
|
* Stash `Bf' parameters into struct mdoc_bf.Kristaps Dzonsons2010-07-028-71/+100
|
* Lint fixes.Kristaps Dzonsons2010-07-024-4/+8
|
* Lint tweak.Kristaps Dzonsons2010-07-021-0/+1
|
* Added TODO to sanitise `Nm' blocks such that HEAD optionally containsKristaps Dzonsons2010-07-021-0/+4
| | | | only a TEXT element consisting of the name.
* Implemented -Thtml bits for handling `Nm' blocks.Kristaps Dzonsons2010-07-021-8/+61
|
* Remove my own dumb FIXME and mark a static function defn as static.Kristaps Dzonsons2010-07-011-3/+2
|
* Make struct_bl and struct_bd into pointers. This removes the need to doKristaps Dzonsons2010-07-017-118/+132
| | | | | | | | | | | copying on internals after modification. Even more importantly, if an ENDBODY token is provided, it would have been impossible for post-change copying of the data to take place in the BLOCK. This allows it to happen by dint of pointers. Also did some bikeshedding in mdoc_term.c: checking against enum type and explicitly casting to the "post" function to void. This is for my own readability.
* In the mdoc(7) parser, inspect roff registers early such that all partsIngo Schwarze2010-07-014-15/+34
| | | | | | | | | | | | of the parser can use the resulting cues. In particular, this allows to use .nr nS to force SYNOPSIS-style .Nm indentation outside the SYNOPSIS as needed by ifconfig(8). To actually make this useable, .Pp must rewind .Nm, or the rest of the section would end up indented. Implement a quick hack for now, a generic solution can be designed later. ok kristaps@ and tested by sobrado@
* Prevent validator from puking on ENDBODY `Bl' nodes.Kristaps Dzonsons2010-07-011-0/+2
|
* Correct handling of trailing punctuation in MDOC_DELIM blk_full HEADs.Ingo Schwarze2010-07-011-0/+3
| | | | | | | The bug was uncovered by SYNOPSIS .Nm as this happened to be the first block with this particular combination of properties. Found the hard way by kristaps@ in NetBSD gcc-contrib(1), fix by me.
* Improve .Nm indentation in the SYNOPSIS;Ingo Schwarze2010-07-015-16/+127
| | | | | | | kristaps@ will do the missing HTML part soon. "looks nicer" jmc@ "seems perfect to me" sobrado@ "slap it in" kristaps@
* More reality-checks for the p->end type.Kristaps Dzonsons2010-07-012-3/+3
|
* p->end is an enum: treat it as such.Kristaps Dzonsons2010-07-011-2/+2
|
* First, I'm defaulting to 11-point font, which renders much nicer (theKristaps Dzonsons2010-07-012-16/+51
| | | | | | | | | | | "Internet" vaguely suggests using 11- or 9-Point for serifed fonts). This verified on GNU/Linux, Mac OSX, Windows, and OpenBSD. Noted in mandoc.1. Then added a3, a4, a5, letter, legal, and custom page dimensions. These seem to be the main players. Noted in mandoc.1. Lintified the casting.
* "Tweak previous": "badly nested" becomes badly-nested, some typosKristaps Dzonsons2010-07-011-17/+24
| | | | corrected, and a bit of clarity for my own sake.
* remove a couple of issues that have been fixedIngo Schwarze2010-06-301-27/+1
|
* Now using Times AFM provided by Dillo. Verified on OpenBSD by me and Mac OSXKristaps Dzonsons2010-06-302-272/+272
| | | | by M. Deksters.
* 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.