]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
14 years agoFix which escapes are used to format \".
Kristaps Dzonsons [Fri, 16 Jul 2010 10:25:54 +0000 (10:25 +0000)]
Fix which escapes are used to format \".

14 years agoAfter .Sm on, spacing ought to restart right away, before the next token,
Ingo Schwarze [Fri, 16 Jul 2010 00:03:37 +0000 (00:03 +0000)]
After .Sm on, spacing ought to restart right away, before the next token,
and not with a delay, after the next token.  But be careful not to cause
leading white space at the beginning of a line or column.
In OpenBSD, improves chmod(1), ksh(1), tar(1), ps(1) and probably many more.
ok kristaps@ and tested by jmc@ and sobrado@

14 years agodocument .Sm; prodded by kristaps@
Ingo Schwarze [Thu, 15 Jul 2010 23:50:15 +0000 (23:50 +0000)]
document .Sm; prodded by kristaps@

14 years agocorrect lots of copyright notices;
Ingo Schwarze [Tue, 13 Jul 2010 23:53:20 +0000 (23:53 +0000)]
correct lots of copyright notices;
ok kristaps@

14 years agoPre-tag checkin of release bits and shortlist. VERSION_1_10_4
Kristaps Dzonsons [Sun, 11 Jul 2010 23:07:47 +0000 (23:07 +0000)]
Pre-tag checkin of release bits and shortlist.

14 years agoremove three issues fixed near the end of the c2k10 hackathon
Ingo Schwarze [Sun, 11 Jul 2010 22:39:32 +0000 (22:39 +0000)]
remove three issues fixed near the end of the c2k10 hackathon

14 years agoRe-constitution of `ds' symbol processing. First, push the
Kristaps Dzonsons [Wed, 7 Jul 2010 15:04:54 +0000 (15:04 +0000)]
Re-constitution of `ds' symbol processing.  First, push the
roff_getstr() family of functions into roff.c with the "first_string"
directly in struct roff.  Second, pre-process each line for reserved
words in libroff, splicing and re-running a line if it has one (this
allows defined symbols to be macros).  Remove term.c's invocation of the
roff_getstrn() function.  Removed function documentation in roff.3 and
added roff.7 `ds' documentation.

14 years agoRevert Makefile to using mandoc.c instead of libmandoc.c. Remove
Kristaps Dzonsons [Tue, 6 Jul 2010 22:08:33 +0000 (22:08 +0000)]
Revert Makefile to using mandoc.c instead of libmandoc.c.  Remove
newborn libmandoc.c.

While here, remove superfluous dep of libman on mandoc.c.

14 years agoResurrect mandoc.c after bogus removal (was: libmandoc.c).
Kristaps Dzonsons [Tue, 6 Jul 2010 22:04:31 +0000 (22:04 +0000)]
Resurrect mandoc.c after bogus removal (was: libmandoc.c).

14 years agoGive -T[x]html `Bk -words' capability.
Kristaps Dzonsons [Tue, 6 Jul 2010 12:37:17 +0000 (12:37 +0000)]
Give -T[x]html `Bk -words' capability.

14 years agoBrought function arguments and style in ine with term_word() in term.c
Kristaps Dzonsons [Tue, 6 Jul 2010 11:10:53 +0000 (11:10 +0000)]
Brought function arguments and style in ine with term_word() in term.c
to make sharing of TERMP_KEEP easier.

14 years agoClarified `Bk' operation in mdoc.7.
Kristaps Dzonsons [Tue, 6 Jul 2010 11:07:21 +0000 (11:07 +0000)]
Clarified `Bk' operation in mdoc.7.

14 years agoDocumented `En', `Es', `Hf', `Ic', `Lp', `Nd', `No', `Oc', `Oo', `Op',
Kristaps Dzonsons [Tue, 6 Jul 2010 10:55:50 +0000 (10:55 +0000)]
Documented `En', `Es', `Hf', `Ic', `Lp', `Nd', `No', `Oc', `Oo', `Op',
`Pa', `Pc', `Po', `Pq', `Pp', and `Va'.

14 years agoProper `Bk -words' support: only suppress breaks within a line, but
Kristaps Dzonsons [Tue, 6 Jul 2010 10:54:05 +0000 (10:54 +0000)]
Proper `Bk -words' support: only suppress breaks within a line, but
allow end-of-line to break.  This fixes the bad behaviour found when
macros within `Bk' never break.

"Excellent" schwarze@

14 years agoMove register information into mandoc.h, which is where it should have
Kristaps Dzonsons [Mon, 5 Jul 2010 20:10:22 +0000 (20:10 +0000)]
Move register information into mandoc.h, which is where it should have
been in the first place (mandoc.h contains system-wide declarations).

14 years agoRenamed mandoc.c to libmandoc.c. This is in the efforts of getting a
Kristaps Dzonsons [Mon, 5 Jul 2010 20:00:55 +0000 (20:00 +0000)]
Renamed mandoc.c to libmandoc.c.  This is in the efforts of getting a
cleaner namespace for functions across the entire system (mandoc.h:
getting parsed-string values, or declarations necessary for the AST
data), and compiler functions (libmandoc.h: back-end functions and
declarations).

14 years agoManual clean-ups. Add syntax message for `Bd', `Bk', and `Bl'.
Kristaps Dzonsons [Mon, 5 Jul 2010 13:12:32 +0000 (13:12 +0000)]
Manual clean-ups.  Add syntax message for `Bd', `Bk', and `Bl'.
Document `Eo' and `Ec'.  Add context-end notes `Ec' and `Fc'.

14 years agoRemove caching TODO: this has been committed.
Kristaps Dzonsons [Mon, 5 Jul 2010 10:45:14 +0000 (10:45 +0000)]
Remove caching TODO: this has been committed.

14 years agoSuppress duplicate "Page: 1 1" -Tps printing and instead relay on
Kristaps Dzonsons [Mon, 5 Jul 2010 08:46:09 +0000 (08:46 +0000)]
Suppress duplicate "Page: 1 1" -Tps printing and instead relay on
PS_NEWPAGE to do the job for us.  Noted by Dillo.

14 years agoAssert my copyright, making it explicit that i'm granting the same license
Ingo Schwarze [Sun, 4 Jul 2010 22:04:04 +0000 (22:04 +0000)]
Assert my copyright, making it explicit that i'm granting the same license
on those parts of the code and text that i have written as Kristaps is.
"fine with me" kristaps@

14 years agoCache column sizes and char pointer into mdoc_bl. Finally get rid of
Kristaps Dzonsons [Sun, 4 Jul 2010 21:59:30 +0000 (21:59 +0000)]
Cache column sizes and char pointer into mdoc_bl.  Finally get rid of
the loops here and there to track down the MDOC_Column arguments.

14 years agogv(1) doesn't remember the last set font when displaying new pages, so
Kristaps Dzonsons [Sun, 4 Jul 2010 20:17:42 +0000 (20:17 +0000)]
gv(1) doesn't remember the last set font when displaying new pages, so
print it out for each new page.  This also prevents superfluous
printings of the font before the %%Page: comment has been displayed.

14 years agoSet line-height to be 1.4em. Removed check for minimum margins that are no
Kristaps Dzonsons [Sun, 4 Jul 2010 20:06:59 +0000 (20:06 +0000)]
Set line-height to be 1.4em.  Removed check for minimum margins that are no
longer important.

14 years agoSuppress printing blank eof pages in -Tps. Delay printing of Page:
Kristaps Dzonsons [Sun, 4 Jul 2010 19:57:26 +0000 (19:57 +0000)]
Suppress printing blank eof pages in -Tps.  Delay printing of Page:
until actual text is ready to be displayed.

14 years agoSuppress printing of newlines/space at start of new -Tps page.
Kristaps Dzonsons [Sun, 4 Jul 2010 19:42:25 +0000 (19:42 +0000)]
Suppress printing of newlines/space at start of new -Tps page.

Also renamed "psstate" -> "flags" (was wrongly implying some sort of
state machine).

14 years agoBacked out margin calculations in favour of much simpler rule of thumb:
Kristaps Dzonsons [Sun, 4 Jul 2010 19:24:00 +0000 (19:24 +0000)]
Backed out margin calculations in favour of much simpler rule of thumb:
margins are 1/9 the length/width.

14 years agoAuto-margins. Documented in mandoc.1. Also bumped line-height and made
Kristaps Dzonsons [Sun, 4 Jul 2010 10:53:04 +0000 (10:53 +0000)]
Auto-margins.  Documented in mandoc.1.  Also bumped line-height and made
sure header and footer accomodate for said line-height.

14 years agoAllow empty `Fo' to get by without an assertion.
Kristaps Dzonsons [Sat, 3 Jul 2010 17:17:15 +0000 (17:17 +0000)]
Allow empty `Fo' to get by without an assertion.

14 years agoNote to myself on what I need to do regarding inter-library functions.
Kristaps Dzonsons [Sat, 3 Jul 2010 16:09:03 +0000 (16:09 +0000)]
Note to myself on what I need to do regarding inter-library functions.

14 years agoRudimentary implementation of user-defined strings;
Ingo Schwarze [Sat, 3 Jul 2010 16:02:12 +0000 (16:02 +0000)]
Rudimentary implementation of user-defined strings;
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

14 years agoThe roff escape function "\s" is definitely not urgent,
Ingo Schwarze [Sat, 3 Jul 2010 00:48:09 +0000 (00:48 +0000)]
The roff escape function "\s" is definitely not urgent,
but it is used in the tree and we should not forget.

14 years agoNot only for -tag lists, but for -hang, -ohang, -inset, -diag,
Ingo Schwarze [Fri, 2 Jul 2010 17:42:23 +0000 (17:42 +0000)]
Not only for -tag lists, but for -hang, -ohang, -inset, -diag,
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@

14 years agoCached `An' arguments in struct mdoc_an. Note that this isn't a
Kristaps Dzonsons [Fri, 2 Jul 2010 15:03:14 +0000 (15:03 +0000)]
Cached `An' arguments in struct mdoc_an.  Note that this isn't a
pointer like the other data members, as there's no need to copy it around.

14 years agoFix: was checking HEAD for arguments.
Kristaps Dzonsons [Fri, 2 Jul 2010 13:12:47 +0000 (13:12 +0000)]
Fix: was checking HEAD for arguments.

14 years agoAdd documentation for Bf/Ef.
Kristaps Dzonsons [Fri, 2 Jul 2010 13:07:46 +0000 (13:07 +0000)]
Add documentation for Bf/Ef.

14 years agoStash `Bf' parameters into struct mdoc_bf.
Kristaps Dzonsons [Fri, 2 Jul 2010 12:54:33 +0000 (12:54 +0000)]
Stash `Bf' parameters into struct mdoc_bf.

14 years agoLint fixes.
Kristaps Dzonsons [Fri, 2 Jul 2010 10:53:28 +0000 (10:53 +0000)]
Lint fixes.

14 years agoLint tweak.
Kristaps Dzonsons [Fri, 2 Jul 2010 10:50:50 +0000 (10:50 +0000)]
Lint tweak.

14 years agoAdded TODO to sanitise `Nm' blocks such that HEAD optionally contains
Kristaps Dzonsons [Fri, 2 Jul 2010 10:43:21 +0000 (10:43 +0000)]
Added TODO to sanitise `Nm' blocks such that HEAD optionally contains
only a TEXT element consisting of the name.

14 years agoImplemented -Thtml bits for handling `Nm' blocks.
Kristaps Dzonsons [Fri, 2 Jul 2010 10:42:46 +0000 (10:42 +0000)]
Implemented -Thtml bits for handling `Nm' blocks.

14 years agoRemove my own dumb FIXME and mark a static function defn as static.
Kristaps Dzonsons [Thu, 1 Jul 2010 23:01:47 +0000 (23:01 +0000)]
Remove my own dumb FIXME and mark a static function defn as static.

14 years agoMake struct_bl and struct_bd into pointers. This removes the need to do
Kristaps Dzonsons [Thu, 1 Jul 2010 22:56:17 +0000 (22:56 +0000)]
Make struct_bl and struct_bd into pointers.  This removes the need to do
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.

14 years agoIn the mdoc(7) parser, inspect roff registers early such that all parts
Ingo Schwarze [Thu, 1 Jul 2010 22:35:54 +0000 (22:35 +0000)]
In the mdoc(7) parser, inspect roff registers early such that all parts
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@

14 years agoPrevent validator from puking on ENDBODY `Bl' nodes.
Kristaps Dzonsons [Thu, 1 Jul 2010 21:44:47 +0000 (21:44 +0000)]
Prevent validator from puking on ENDBODY `Bl' nodes.

14 years agoCorrect handling of trailing punctuation in MDOC_DELIM blk_full HEADs.
Ingo Schwarze [Thu, 1 Jul 2010 21:12:00 +0000 (21:12 +0000)]
Correct handling of trailing punctuation in MDOC_DELIM blk_full HEADs.
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.

14 years agoImprove .Nm indentation in the SYNOPSIS;
Ingo Schwarze [Thu, 1 Jul 2010 15:38:56 +0000 (15:38 +0000)]
Improve .Nm indentation in the SYNOPSIS;
kristaps@ will do the missing HTML part soon.
"looks nicer" jmc@
"seems perfect to me" sobrado@
"slap it in" kristaps@

14 years agoMore reality-checks for the p->end type.
Kristaps Dzonsons [Thu, 1 Jul 2010 14:34:03 +0000 (14:34 +0000)]
More reality-checks for the p->end type.

14 years agop->end is an enum: treat it as such.
Kristaps Dzonsons [Thu, 1 Jul 2010 14:28:12 +0000 (14:28 +0000)]
p->end is an enum: treat it as such.

14 years agoFirst, I'm defaulting to 11-point font, which renders much nicer (the
Kristaps Dzonsons [Thu, 1 Jul 2010 14:23:45 +0000 (14:23 +0000)]
First, I'm defaulting to 11-point font, which renders much nicer (the
"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.

14 years ago"Tweak previous": "badly nested" becomes badly-nested, some typos
Kristaps Dzonsons [Thu, 1 Jul 2010 09:33:39 +0000 (09:33 +0000)]
"Tweak previous": "badly nested" becomes badly-nested, some typos
corrected, and a bit of clarity for my own sake.

14 years agoremove a couple of issues that have been fixed
Ingo Schwarze [Wed, 30 Jun 2010 23:57:30 +0000 (23:57 +0000)]
remove a couple of issues that have been fixed

14 years agoNow using Times AFM provided by Dillo. Verified on OpenBSD by me and Mac OSX
Kristaps Dzonsons [Wed, 30 Jun 2010 20:57:41 +0000 (20:57 +0000)]
Now using Times AFM provided by Dillo.  Verified on OpenBSD by me and Mac OSX
by M. Deksters.

14 years agoimprove error reporting:
Ingo Schwarze [Wed, 30 Jun 2010 20:32:15 +0000 (20:32 +0000)]
improve error reporting:
* 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@

14 years agoCorrect dimensions for DocumentMedia. Noted by schwarze@, as gv(1) was
Kristaps Dzonsons [Wed, 30 Jun 2010 15:05:02 +0000 (15:05 +0000)]
Correct dimensions for DocumentMedia.  Noted by schwarze@, as gv(1) was
puking on input.

14 years agoEmbedding Charter proportional-width glyphs. Nice-looking output.
Kristaps Dzonsons [Wed, 30 Jun 2010 13:16:25 +0000 (13:16 +0000)]
Embedding Charter proportional-width glyphs.  Nice-looking output.

14 years agoPostScript can now handle scaled glyph sizes (see "scale" in struct
Kristaps Dzonsons [Wed, 30 Jun 2010 13:00:00 +0000 (13:00 +0000)]
PostScript can now handle scaled glyph sizes (see "scale" in struct
termp_ps) to arbitrarily scale font.  Tested with 10 (default), 12, 14.

14 years agoPushed normalisation of scaling units into term_hspan().
Kristaps Dzonsons [Wed, 30 Jun 2010 12:30:36 +0000 (12:30 +0000)]
Pushed normalisation of scaling units into term_hspan().

14 years agoMove term_hspan() calculation into the output devices, where it belongs.
Kristaps Dzonsons [Wed, 30 Jun 2010 12:27:55 +0000 (12:27 +0000)]
Move term_hspan() calculation into the output devices, where it belongs.

14 years agoPush paper calculation out of getsubopt() loop. Make all points be AFM
Kristaps Dzonsons [Wed, 30 Jun 2010 11:45:21 +0000 (11:45 +0000)]
Push paper calculation out of getsubopt() loop.  Make all points be AFM
glyph units to make positioning more precise.

14 years agoClosing of full blocks (Bd Bf Bk Bl It Fo Nd Rs Sh Ss) may never be
Ingo Schwarze [Wed, 30 Jun 2010 04:05:02 +0000 (04:05 +0000)]
Closing of full blocks (Bd Bf Bk Bl It Fo Nd Rs Sh Ss) may never be
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.

14 years agolet's not forget the remaining badly nested block issue,
Ingo Schwarze [Tue, 29 Jun 2010 22:35:01 +0000 (22:35 +0000)]
let's not forget the remaining badly nested block issue,
even though there are no more urgent problems

14 years agofix a typo in the function declaration;
Ingo Schwarze [Tue, 29 Jun 2010 19:45:06 +0000 (19:45 +0000)]
fix a typo in the function declaration;
seems like gcc3 didn't catch it :-(
thanks to thib@ and kristaps@ for reporting

14 years agoConsiderably simplify block rewind rules; no functional change intended.
Ingo Schwarze [Tue, 29 Jun 2010 19:24:14 +0000 (19:24 +0000)]
Considerably simplify block rewind rules; no functional change intended.
* 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@

14 years agoSupport for badly nested blocks, written around the time of
Ingo Schwarze [Tue, 29 Jun 2010 19:20:38 +0000 (19:20 +0000)]
Support for badly nested blocks, written around the time of
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@

14 years agoInter-release tag. VERSION_1_10_3
Kristaps Dzonsons [Tue, 29 Jun 2010 15:00:44 +0000 (15:00 +0000)]
Inter-release tag.

14 years agoRemove some incorrect data from mandoc.1 (that of non-macro lines and
Kristaps Dzonsons [Tue, 29 Jun 2010 14:55:41 +0000 (14:55 +0000)]
Remove some incorrect data from mandoc.1 (that of non-macro lines and
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.

14 years agoAdd in -Opaper=xxx support for -Tps postscript. This doesn't have any
Kristaps Dzonsons [Tue, 29 Jun 2010 14:53:14 +0000 (14:53 +0000)]
Add in -Opaper=xxx support for -Tps postscript.  This doesn't have any
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).

14 years agoGive -Tps better PostScript hinting. Note that we're using Adobe-3.0
Kristaps Dzonsons [Tue, 29 Jun 2010 14:18:05 +0000 (14:18 +0000)]
Give -Tps better PostScript hinting.  Note that we're using Adobe-3.0
constructs.  Push the stupid CPP defines for page boundaries and margins
into proper variables.  Give enum termfont a proper TERMFONT__MAX.

14 years agoClean-up of variable-width glyph support. Adds no new code; only
Kristaps Dzonsons [Mon, 28 Jun 2010 23:26:09 +0000 (23:26 +0000)]
Clean-up of variable-width glyph support.  Adds no new code; only
restructured to make a bit more readable.  Also removed an unused entry
in the PS engine structure.

14 years agoThis enables variable glyph-width output. The checkin will be followed
Kristaps Dzonsons [Mon, 28 Jun 2010 22:46:21 +0000 (22:46 +0000)]
This enables variable glyph-width output.  The checkin will be followed
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.

14 years agoNotes: this must be done later. \b in the input will cause havoc.
Kristaps Dzonsons [Mon, 28 Jun 2010 14:39:17 +0000 (14:39 +0000)]
Notes: this must be done later.  \b in the input will cause havoc.

14 years agoInitial encoding of glyph widths. From /usr/X11R6/lib/X11/fonts/Type1.
Kristaps Dzonsons [Mon, 28 Jun 2010 13:45:28 +0000 (13:45 +0000)]
Initial encoding of glyph widths.  From /usr/X11R6/lib/X11/fonts/Type1.
These continues proportional-width glyph encoding.

14 years agoTiny commit clarifying flushln() documentation as to what refers to
Kristaps Dzonsons [Mon, 28 Jun 2010 09:48:44 +0000 (09:48 +0000)]
Tiny commit clarifying flushln() documentation as to what refers to
visual screen output and what's an array index (getting closer to
variable-width fonting).

14 years agominor .Bk fixes:
Ingo Schwarze [Sun, 27 Jun 2010 17:53:27 +0000 (17:53 +0000)]
minor .Bk fixes:
* 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 ;)

14 years agoremove .Bk which is done
Ingo Schwarze [Sun, 27 Jun 2010 17:31:38 +0000 (17:31 +0000)]
remove .Bk which is done
while here, add .ds as a desideratum

14 years agoAllow registers to be unset. Implement and document the `.nr nS val'.
Kristaps Dzonsons [Sun, 27 Jun 2010 16:36:22 +0000 (16:36 +0000)]
Allow registers to be unset.  Implement and document the `.nr nS val'.

14 years agoFollowing clue-stick applied by schwarze@, back out const-ness of regset
Kristaps Dzonsons [Sun, 27 Jun 2010 16:18:13 +0000 (16:18 +0000)]
Following clue-stick applied by schwarze@, back out const-ness of regset
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.

14 years agoDownstream maintainers: this removes UGLY! I don't want diverging
Kristaps Dzonsons [Sun, 27 Jun 2010 15:52:41 +0000 (15:52 +0000)]
Downstream maintainers: this removes UGLY!  I don't want diverging
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.

14 years agoDocument .Bk and .Ek; reminded by kristaps@.
Ingo Schwarze [Sun, 27 Jun 2010 13:30:51 +0000 (13:30 +0000)]
Document .Bk and .Ek; reminded by kristaps@.

14 years agoBasic implementation of .Bk/.Ek; from OpenBSD.
Ingo Schwarze [Sun, 27 Jun 2010 01:26:20 +0000 (01:26 +0000)]
Basic implementation of .Bk/.Ek; from OpenBSD.
OK and one stylistic tweak by kristaps@.

14 years agoMechanical diff allowing the const struct regset to propogate through
Kristaps Dzonsons [Sat, 26 Jun 2010 16:07:08 +0000 (16:07 +0000)]
Mechanical diff allowing the const struct regset to propogate through
libman and libmdoc.

14 years agoChurn-ish check-in getting mdoc_parseln() and man_parseln() to accept a
Kristaps Dzonsons [Sat, 26 Jun 2010 15:36:37 +0000 (15:36 +0000)]
Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept a
const struct regset pointer.  No functionality.

14 years agoFirst step of adding register support. This is inspired by a significant
Kristaps Dzonsons [Sat, 26 Jun 2010 15:22:19 +0000 (15:22 +0000)]
First step of adding register support.  This is inspired by a significant
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.

14 years agoRemove "pt" from struct roffsu, as CSS (the only reason it was there) is
Kristaps Dzonsons [Fri, 25 Jun 2010 19:50:23 +0000 (19:50 +0000)]
Remove "pt" from struct roffsu, as CSS (the only reason it was there) is
unclear about which units accept floats/integers, which leads me to
assume that it handles either and rounds as appropriate.

14 years agoAllow OpenBSD's nroff to process mandoc.1 without puking on long `It'
Kristaps Dzonsons [Fri, 25 Jun 2010 19:02:48 +0000 (19:02 +0000)]
Allow OpenBSD's nroff to process mandoc.1 without puking on long `It'
lines.

14 years agoInitial chunks for variable-width fonts. Pushes all width calculations
Kristaps Dzonsons [Fri, 25 Jun 2010 18:53:14 +0000 (18:53 +0000)]
Initial chunks for variable-width fonts.  Pushes all width calculations
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.

14 years agoFix slipped in after tag: install PS files with installwww. VERSION_1_10_2
Kristaps Dzonsons [Sat, 19 Jun 2010 20:51:50 +0000 (20:51 +0000)]
Fix slipped in after tag: install PS files with installwww.

14 years agoChurn as I finish email address migration kth.se -> bsd.lv.
Kristaps Dzonsons [Sat, 19 Jun 2010 20:46:27 +0000 (20:46 +0000)]
Churn as I finish email address migration kth.se -> bsd.lv.

14 years agoVersion notes for 1.10.2.
Kristaps Dzonsons [Sat, 19 Jun 2010 20:43:35 +0000 (20:43 +0000)]
Version notes for 1.10.2.

14 years agoRemoved finished TODOs
Kristaps Dzonsons [Sun, 13 Jun 2010 22:44:33 +0000 (22:44 +0000)]
Removed finished TODOs

14 years agoRemove arg_getattrs(), as we only have arg_getattr()-like calls now that
Kristaps Dzonsons [Sun, 13 Jun 2010 22:05:43 +0000 (22:05 +0000)]
Remove arg_getattrs(), as we only have arg_getattr()-like calls now that
-width is cached.

14 years agoSwitch on cached -width usage in front-ends.
Kristaps Dzonsons [Sun, 13 Jun 2010 21:41:58 +0000 (21:41 +0000)]
Switch on cached -width usage in front-ends.

14 years agoAllow -width for lists to be cached in mdoc_bl. This requires some
Kristaps Dzonsons [Sun, 13 Jun 2010 21:02:48 +0000 (21:02 +0000)]
Allow -width for lists to be cached in mdoc_bl.  This requires some
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.

14 years agoSmall optimisations in mdoc_action list processing. Cleanups making way
Kristaps Dzonsons [Sun, 13 Jun 2010 20:05:12 +0000 (20:05 +0000)]
Small optimisations in mdoc_action list processing.  Cleanups making way
for "width" cached argument.

14 years agoCached `Bl -offset' into mdoc_bl. Removed erroneous "-offset defaults
Kristaps Dzonsons [Sat, 12 Jun 2010 12:38:01 +0000 (12:38 +0000)]
Cached `Bl -offset' into mdoc_bl.  Removed erroneous "-offset defaults
to 6n if no value is specified" and added regression tests for `Bl'
testing against the empty -offset argument.

14 years agoReverted to mdoc_term.c 1.149 (`It' does not inherit `Bl's cache,
Kristaps Dzonsons [Sat, 12 Jun 2010 12:21:41 +0000 (12:21 +0000)]
Reverted to mdoc_term.c 1.149 (`It' does not inherit `Bl's cache,
obviously, which was causing fallout) and again remove the loop code.
Tested more thoroughly.

14 years agoMoved `Bl -compact' into cached data. This allowed the removal of
Kristaps Dzonsons [Sat, 12 Jun 2010 12:10:55 +0000 (12:10 +0000)]
Moved `Bl -compact' into cached data.  This allowed the removal of
scanning the argv list in print_bvspace(), and thus the parent pointer.

14 years ago`Bl' is now using a struct instead of a single enum mdoc_list for its
Kristaps Dzonsons [Sat, 12 Jun 2010 11:58:22 +0000 (11:58 +0000)]
`Bl' is now using a struct instead of a single enum mdoc_list for its
cached values.  You can probably guess where this is going.

14 years agoRemoved stipulation that an empty `Bd -offset' will default to 6n. Not
Kristaps Dzonsons [Sat, 12 Jun 2010 11:41:50 +0000 (11:41 +0000)]
Removed stipulation that an empty `Bd -offset' will default to 6n.  Not
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).

14 years agoCache all of `Bd's resolved arguments into mdoc_bd, which is stashed in
Kristaps Dzonsons [Sat, 12 Jun 2010 11:21:44 +0000 (11:21 +0000)]
Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed in
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).