]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
13 years agoClean-up in mdoc_argv.c: make CPP-defines into an enum, document, make
Kristaps Dzonsons [Thu, 17 Mar 2011 10:59:27 +0000 (10:59 +0000)]
Clean-up in mdoc_argv.c: make CPP-defines into an enum, document, make
static arrays const, properly abort() for bogus switch cases, and be
obsessive about spacing and (void)-casting.

13 years agoClean up mdoc_pmsg invocations to make them not check the return value.
Kristaps Dzonsons [Thu, 17 Mar 2011 10:41:18 +0000 (10:41 +0000)]
Clean up mdoc_pmsg invocations to make them not check the return value.

13 years agoKill off some unused function prototypes.
Kristaps Dzonsons [Thu, 17 Mar 2011 09:28:00 +0000 (09:28 +0000)]
Kill off some unused function prototypes.

13 years agoKill off mdoc_strings.c, which is now empty. Byeeeeeeeee!
Kristaps Dzonsons [Thu, 17 Mar 2011 09:25:54 +0000 (09:25 +0000)]
Kill off mdoc_strings.c, which is now empty.  Byeeeeeeeee!

13 years agoMove mdoc_macro2len() into mdoc_validate.c as macro2len(), as that's the
Kristaps Dzonsons [Thu, 17 Mar 2011 09:24:51 +0000 (09:24 +0000)]
Move mdoc_macro2len() into mdoc_validate.c as macro2len(), as that's the
only place that it's being used.

13 years agoMove mdoc_str2sec() into mdoc_validate.c as a2sec(), as that's the only
Kristaps Dzonsons [Thu, 17 Mar 2011 09:22:39 +0000 (09:22 +0000)]
Move mdoc_str2sec() into mdoc_validate.c as a2sec(), as that's the only
place that it's being used.

13 years agoTiny optimisation in mandoc_isdelim() check.
Kristaps Dzonsons [Thu, 17 Mar 2011 09:18:12 +0000 (09:18 +0000)]
Tiny optimisation in mandoc_isdelim() check.

13 years agoMove mdoc_isdelim() into mandoc.h as mandoc_isdelim(). This allows the
Kristaps Dzonsons [Thu, 17 Mar 2011 09:16:38 +0000 (09:16 +0000)]
Move mdoc_isdelim() into mandoc.h as mandoc_isdelim().  This allows the
removal of manual delimiter checks in html.c and term.c.  Finally, add
the escaped period as a closing delimiter, removing a TODO to this
effect.

13 years agoMove mandoc_{realloc,malloc,calloc} out of libmandoc.h and into mandoc.h
Kristaps Dzonsons [Thu, 17 Mar 2011 08:49:34 +0000 (08:49 +0000)]
Move mandoc_{realloc,malloc,calloc} out of libmandoc.h and into mandoc.h
so that everybody can use them.  This follows the convention of
libXXXX.h being internal to a library and XXXX.h being the external
interface.  Not only does this allow the removal of lots of redundant
NULL-checking code, it also sets the tone for adding new mandoc-global
routines.

13 years agoMake args_checkpunct() use mdoc_isdelim() instead of mdoc_iscdelim(),
Kristaps Dzonsons [Thu, 17 Mar 2011 01:23:28 +0000 (01:23 +0000)]
Make args_checkpunct() use mdoc_isdelim() instead of mdoc_iscdelim(),
which is wrong.  Then remove mdoc_iscdelim() alltogether.

13 years agoMove check for closing punctuation into its own function. This will
Kristaps Dzonsons [Thu, 17 Mar 2011 00:58:14 +0000 (00:58 +0000)]
Move check for closing punctuation into its own function.  This will
later be modified to remove the need for iscdelim(), which will be used
to unify delimiter checks, which will then allow for the simple removal
of a TODO regarding escaped periods.

13 years agoo diaeresis is 246 (U+00F6)
Ingo Schwarze [Wed, 16 Mar 2011 22:49:55 +0000 (22:49 +0000)]
o diaeresis is 246 (U+00F6)
from Christian Weisgerber <naddy at openbsd dot org>

13 years agoInstead of a series of hard-coded strcmps, make argv_a2arg() iterate
Kristaps Dzonsons [Wed, 16 Mar 2011 17:55:39 +0000 (17:55 +0000)]
Instead of a series of hard-coded strcmps, make argv_a2arg() iterate
over an array of possible argument types, hooking in to mdoc_argnames[].
This knocks off bytes for the duplicated strings and cleans up code
readability.

13 years agoPush exit_status into struct curparse alongside file_status.
Kristaps Dzonsons [Wed, 16 Mar 2011 15:28:35 +0000 (15:28 +0000)]
Push exit_status into struct curparse alongside file_status.

13 years agoMake lint shut up a little bit.
Kristaps Dzonsons [Tue, 15 Mar 2011 16:23:51 +0000 (16:23 +0000)]
Make lint shut up a little bit.

13 years agoRemove duplicate UNCONST definition.
Kristaps Dzonsons [Tue, 15 Mar 2011 16:15:37 +0000 (16:15 +0000)]
Remove duplicate UNCONST definition.

13 years agoClean-up: make file_status global be local to curparse. "I agree with
Kristaps Dzonsons [Tue, 15 Mar 2011 13:24:42 +0000 (13:24 +0000)]
Clean-up: make file_status global be local to curparse.  "I agree with
the direction of this particular patch", schwarze@.

13 years agoPlug memory leak of normalised-date field.
Kristaps Dzonsons [Tue, 15 Mar 2011 13:23:33 +0000 (13:23 +0000)]
Plug memory leak of normalised-date field.

13 years agomy $buf = "string"; return $string; is cool in Perl, but not in C;
Ingo Schwarze [Tue, 15 Mar 2011 03:03:54 +0000 (03:03 +0000)]
my $buf = "string"; return $string;  is cool in Perl, but not in C;
found by Ulrich Spoerlein <uqs at freebsd> using the clang static analyzer;
"ok, but please document the numbers" kristaps@

13 years agoDo not leak information about the software used
Ingo Schwarze [Mon, 7 Mar 2011 01:58:24 +0000 (01:58 +0000)]
Do not leak information about the software used
into PostScript and PDF documents behind the user's back.
Joerg Sonnenberger pointed out that almost all software
creating PostScript and PDF documents does so, even on OpenBSD,
but that doesn't make the leakage much better in my book.
According to all standards i could find, this information is optional.
Issue originally reported by deraadt@; "commit!" kristaps@.

13 years agoClean up date handling,
Ingo Schwarze [Mon, 7 Mar 2011 01:35:51 +0000 (01:35 +0000)]
Clean up date handling,
as a first step to get rid of the frequent petty warnings in this area:
 - always store dates as strings, not as seconds since the Epoch
 - for input, try the three most common formats everywhere
 - for unrecognized format, just pass the date though verbatim
 - when there is no date at all, still use the current date
Originally triggered by a one-line patch from Tim van der Molen,
<tbvdm at xs4all dot nl>, which is included here.
Feedback and OK on manual parts from jmc@.
"please check this in" kristaps@

13 years agodate handling needs cleanup
Ingo Schwarze [Sun, 27 Feb 2011 14:17:28 +0000 (14:17 +0000)]
date handling needs cleanup

13 years agoAllow compilation with pcc, which has interesting/broken handling of -W
Kristaps Dzonsons [Thu, 24 Feb 2011 14:30:15 +0000 (14:30 +0000)]
Allow compilation with pcc, which has interesting/broken handling of -W
with missing function prototypes.  Ok joerg@.

13 years agoClean up the COMPATIBILITY section;
Ingo Schwarze [Wed, 9 Feb 2011 22:53:20 +0000 (22:53 +0000)]
Clean up the COMPATIBILITY section;
heavily based on a patch from kristaps@ with some tweaks by me.
- Also talk about -Tps and -Tpdf.
- Use the same list style as in the other mandoc manuals.
- Replace a few macros by ones better suited.
- Some improvements of wording.
ok jmc@ kristaps@

13 years agoAdd stub for eqn.7 manual and flip it on. Also note COMPATIBILITY issue
Kristaps Dzonsons [Wed, 9 Feb 2011 10:03:02 +0000 (10:03 +0000)]
Add stub for eqn.7 manual and flip it on.  Also note COMPATIBILITY issue
of how we considered .TS (etc.) macros and how the preprocessors do.

13 years agoEQN blocks are now printed in all modes. This is simply a printing of
Kristaps Dzonsons [Wed, 9 Feb 2011 09:52:47 +0000 (09:52 +0000)]
EQN blocks are now printed in all modes.  This is simply a printing of
the concatenated string (in -T[x]html, it gets a SPAN, too).

13 years agoConsolidate "rc" value in main.c around addspan, addeqn, and parseln.
Kristaps Dzonsons [Wed, 9 Feb 2011 09:33:43 +0000 (09:33 +0000)]
Consolidate "rc" value in main.c around addspan, addeqn, and parseln.

13 years agoAllow -man to process EQN as well. Also fix a segfault in missing case
Kristaps Dzonsons [Wed, 9 Feb 2011 09:18:15 +0000 (09:18 +0000)]
Allow -man to process EQN as well.  Also fix a segfault in missing case
statements in the post-handler for EQN in -mdoc and -man.

13 years agoAllow EQN data to be pushed down into libmdoc via mdoc_addeqn(). Only
Kristaps Dzonsons [Wed, 9 Feb 2011 09:05:52 +0000 (09:05 +0000)]
Allow EQN data to be pushed down into libmdoc via mdoc_addeqn().  Only
the adding itself is implemented; equation data is not yet shown.

13 years agoPut tbl_alloc function right into the addspan() one, as this is the only
Kristaps Dzonsons [Tue, 8 Feb 2011 07:40:23 +0000 (07:40 +0000)]
Put tbl_alloc function right into the addspan() one, as this is the only
place that it's called.

13 years agoThe macro .Ns has no effect at the beginning of an input line;
Ingo Schwarze [Mon, 7 Feb 2011 00:05:40 +0000 (00:05 +0000)]
The macro .Ns has no effect at the beginning of an input line;
ok kristaps@ jmc@.

13 years agoFix a regression caused by mdoc_term.c 1.214 / mdoc_html.c 1.148:
Ingo Schwarze [Sun, 6 Feb 2011 23:02:31 +0000 (23:02 +0000)]
Fix a regression caused by mdoc_term.c 1.214 / mdoc_html.c 1.148:
Inside .Bk or inside the SYNOPSIS, Unix variant macros cleared
the keep flag.

13 years agoSome pre-handlers produce output, so reorder the code to set up
Ingo Schwarze [Sun, 6 Feb 2011 22:33:38 +0000 (22:33 +0000)]
Some pre-handlers produce output, so reorder the code to set up
keep flags before they are called.
Without this bugfix, .Bk was ineffective in some cases.
"looks reasonable" kristaps@

13 years agoUse tbl_span line number for warnings/errors.
Kristaps Dzonsons [Sun, 6 Feb 2011 22:05:20 +0000 (22:05 +0000)]
Use tbl_span line number for warnings/errors.

13 years agoLet the line-number of a tbl_span be remembered.
Kristaps Dzonsons [Sun, 6 Feb 2011 22:02:58 +0000 (22:02 +0000)]
Let the line-number of a tbl_span be remembered.

13 years agoAdd initial libmdoc and libman top-most machinery for accepting TBL
Kristaps Dzonsons [Sun, 6 Feb 2011 21:44:36 +0000 (21:44 +0000)]
Add initial libmdoc and libman top-most machinery for accepting TBL
directives.  For now this will just ignore them (except for -Ttree,
which just notes that an EQN's been accepted).

13 years agoAdd initial EQN support to mandoc. This parses, then throws away, data
Kristaps Dzonsons [Sun, 6 Feb 2011 20:36:36 +0000 (20:36 +0000)]
Add initial EQN support to mandoc.  This parses, then throws away, data
between EQ and EN roff blocks.  EQN is different from TBL in that data
after .EQ is unilaterally considered an equation until an .EN.  Thus,
there's no need to jump through hoops in having table spans and so on.
This is ONLY the parse code framework in libroff.  EQN is not yet passed
into the backends.

13 years agoTODO note on that `.TS', `.TE' etc. aren't real roff macros and troff
Kristaps Dzonsons [Thu, 3 Feb 2011 10:24:21 +0000 (10:24 +0000)]
TODO note on that `.TS', `.TE' etc. aren't real roff macros and troff
won't recognise them when invoked as e.g. `.   TS' (we, however, do).

13 years agoIf `Ns' is specified on its own line, it should be ignored. This is
Kristaps Dzonsons [Wed, 2 Feb 2011 21:40:45 +0000 (21:40 +0000)]
If `Ns' is specified on its own line, it should be ignored.  This is
shitty groff behaviour.  Do the same, but raise a warning to this
effect.  This from a TODO noted by schwarze@.

13 years agoNote an error found in the wild.
Kristaps Dzonsons [Mon, 31 Jan 2011 12:52:43 +0000 (12:52 +0000)]
Note an error found in the wild.

13 years agoImplement the \N'number' (numbered character) roff escape sequence.
Ingo Schwarze [Sun, 30 Jan 2011 16:05:37 +0000 (16:05 +0000)]
Implement the \N'number' (numbered character) roff escape sequence.
Don't use it in new manuals, it is inherently non-portable, but we
need it for backward-compatibility with existing manuals, for example
in Xenocara driver pages.
ok kristaps@ jmc@ and tested by Matthieu Herrb (matthieu at openbsd dot org)

13 years agoWhen in a <PRE>, don't print out the <BR> before lines that have leading
Kristaps Dzonsons [Sat, 29 Jan 2011 14:49:44 +0000 (14:49 +0000)]
When in a <PRE>, don't print out the <BR> before lines that have leading
whitespace.

13 years agoRemove unnecessary conditional...
Kristaps Dzonsons [Tue, 25 Jan 2011 17:32:04 +0000 (17:32 +0000)]
Remove unnecessary conditional...

13 years agoArguments to `Bsx' and friends are separated by a non-breaking space.
Kristaps Dzonsons [Tue, 25 Jan 2011 16:20:24 +0000 (16:20 +0000)]
Arguments to `Bsx' and friends are separated by a non-breaking space.
This removes a TODO raised by schwarze@.

13 years agoPush capitalisation of `Bx' second argument into validator, where it belongs.
Kristaps Dzonsons [Tue, 25 Jan 2011 15:46:05 +0000 (15:46 +0000)]
Push capitalisation of `Bx' second argument into validator, where it belongs.

13 years agoProperly uppercase the first-letter of the `Bx' second argument.
Kristaps Dzonsons [Tue, 25 Jan 2011 15:28:56 +0000 (15:28 +0000)]
Properly uppercase the first-letter of the `Bx' second argument.

13 years agoHave `Bx' accept two arguments, not just one, and join these arguments
Kristaps Dzonsons [Tue, 25 Jan 2011 15:17:18 +0000 (15:17 +0000)]
Have `Bx' accept two arguments, not just one, and join these arguments
with "xxBSD-yy"

13 years agoAvoid double blank line before a table preceded by .PP.
Ingo Schwarze [Tue, 25 Jan 2011 12:35:09 +0000 (12:35 +0000)]
Avoid double blank line before a table preceded by .PP.
ok kristaps@

13 years agoSince tbl_data() can now produce multiple spans, let parsebuf()
Ingo Schwarze [Tue, 25 Jan 2011 12:24:27 +0000 (12:24 +0000)]
Since tbl_data() can now produce multiple spans, let parsebuf()
generate man(7) or mdoc(7) nodes for all these spans,
not only for the last one.
Restores the horizontal lines in the cpu(4/hppa) tables.
ok kristaps@

13 years agoDo not skip data after horizontal lines in the layout.
Ingo Schwarze [Tue, 25 Jan 2011 12:16:22 +0000 (12:16 +0000)]
Do not skip data after horizontal lines in the layout.
Instead, let one line of input data add two new spans
to the tbl tree during one single call of tbl_data().
Note that this causes the horizontal line to get parsed
into the tbl tree, but not yet used in the output,
which will be fixed next.
Avoids data loss in cpu(4/hppa).
ok kristaps@

13 years agocorrect horizontal spacing of data cells
Ingo Schwarze [Tue, 25 Jan 2011 12:07:30 +0000 (12:07 +0000)]
correct horizontal spacing of data cells
correct alignment of centered cells
adjust horizontal rule width to the new spacing
ok kristaps@

13 years agoIf %B is specified, quote %T. Noted by schwarze@ in the TODO.
Kristaps Dzonsons [Tue, 25 Jan 2011 10:37:49 +0000 (10:37 +0000)]
If %B is specified, quote %T.  Noted by schwarze@ in the TODO.

13 years agoIgnore .ns (no-space mode), .ps (change point size), .ta (tab control)
Ingo Schwarze [Tue, 25 Jan 2011 01:12:02 +0000 (01:12 +0000)]
Ignore .ns (no-space mode), .ps (change point size), .ta (tab control)
for now.  All of these just cause a bit too much or too little
whitespace, but no serious formatting problems.
Triggered by reports from brad@.

13 years agoAs noticed by deraadt@, it goes without saying that text files
Ingo Schwarze [Tue, 25 Jan 2011 00:40:14 +0000 (00:40 +0000)]
As noticed by deraadt@, it goes without saying that text files
on a UNIX system use UNIX conventions, and UNIX tools working
on them expect that.
ok jmc@

13 years agoSkip carriage return before newline, if any.
Ingo Schwarze [Mon, 24 Jan 2011 23:41:55 +0000 (23:41 +0000)]
Skip carriage return before newline, if any.
As pointed out by Joerg Sonnenberger, this is useful
because we use mmap(3) and look for '\n' by hand.
"check it in" kristaps@

13 years agoBetter explain roff(7) macro argument quoting;
Ingo Schwarze [Mon, 24 Jan 2011 23:17:19 +0000 (23:17 +0000)]
Better explain roff(7) macro argument quoting;
ok jmc@.

13 years agoresults of some systematic comparisons
Ingo Schwarze [Mon, 24 Jan 2011 01:34:56 +0000 (01:34 +0000)]
results of some systematic comparisons

13 years agonot implemented: adjustment
Ingo Schwarze [Sun, 23 Jan 2011 15:35:10 +0000 (15:35 +0000)]
not implemented: adjustment

13 years agoFix another regression caused by the reorg of print_man_node() in rev. 1.97:
Ingo Schwarze [Sun, 23 Jan 2011 14:54:21 +0000 (14:54 +0000)]
Fix another regression caused by the reorg of print_man_node() in rev. 1.97:
End-of-sentence spacing got lost for man(7) after plain text lines.

13 years agosome more reports from brad@
Ingo Schwarze [Sat, 22 Jan 2011 23:27:06 +0000 (23:27 +0000)]
some more reports from brad@

13 years agomissing: .ns, .UR; reported by brad@
Ingo Schwarze [Sat, 22 Jan 2011 20:36:02 +0000 (20:36 +0000)]
missing: .ns, .UR; reported by brad@

13 years agosort missing features, no change of content
Ingo Schwarze [Sat, 22 Jan 2011 20:24:53 +0000 (20:24 +0000)]
sort missing features, no change of content

13 years agoLots of in-line macros require arguments but were not marked as such.
Ingo Schwarze [Sat, 22 Jan 2011 14:05:33 +0000 (14:05 +0000)]
Lots of in-line macros require arguments but were not marked as such.
Check prompted by kristaps@.

13 years agoCheck argument count validation for all in_line() macros.
Ingo Schwarze [Sat, 22 Jan 2011 14:00:52 +0000 (14:00 +0000)]
Check argument count validation for all in_line() macros.
Most empty in_line() macros are already removed by the parser,
so there is no need to check again in mdoc_validate.c.
This also downgrades almost all remaining argument count issues
from ERROR to WARNING.
ok kristaps@

13 years agoWhen finding the roff .it request (line trap),
Ingo Schwarze [Sat, 22 Jan 2011 13:16:02 +0000 (13:16 +0000)]
When finding the roff .it request (line trap),
make it clear that you cannot use mandoc to format that page (yet).
Triggered by a report from brad@, ok kristaps@.

14 years ago"decimalpoint" is in fact supported.
Kristaps Dzonsons [Mon, 17 Jan 2011 21:29:04 +0000 (21:29 +0000)]
"decimalpoint" is in fact supported.

14 years agoRefrain from throwing fatal errors for
Ingo Schwarze [Mon, 17 Jan 2011 00:21:29 +0000 (00:21 +0000)]
Refrain from throwing fatal errors for
* .br .sp .nf .fi .na with arguments - just skip the arguments
* .TH lacking arguments - use empty strings instead like groff
* .TH with excessive arguments - skip those
Reminded by joerg@, ok kristaps@.

14 years agoWhen processing a blank text line, do not break out of text processing
Ingo Schwarze [Sun, 16 Jan 2011 20:12:45 +0000 (20:12 +0000)]
When processing a blank text line, do not break out of text processing
into macro processing code.  Fixing a regression introduced in 1.95,
found because it caused segfaults in my regression suite.
OK kristaps@

14 years agoImplement the roff .rm request (remove macro).
Ingo Schwarze [Sun, 16 Jan 2011 04:00:34 +0000 (04:00 +0000)]
Implement the roff .rm request (remove macro).
Using the new roff_getname() function, this is really simple.
Breaks mandoc of the habit of reporting an error in each pod2man(1) preamble.
Reminded by a report from brad@; ok kristaps@.

14 years agoChange how -Thtml behaves with tables: use multiple rows, with widths
Kristaps Dzonsons [Thu, 13 Jan 2011 14:30:13 +0000 (14:30 +0000)]
Change how -Thtml behaves with tables: use multiple rows, with widths
set by COL, until an external macro is encountered.  At this point in
time, close out the table and process the macro.  When the first table
row is again re-encountered, re-start the table.  This requires a bit of
tracking added to "struct html", but the change is very small and
follows the logic of meta-fonts.  This all follows a bug-report by
joerg@.

14 years agoIncorporate same fix for -man post-validation deletion of nodes. This
Kristaps Dzonsons [Wed, 12 Jan 2011 17:00:07 +0000 (17:00 +0000)]
Incorporate same fix for -man post-validation deletion of nodes.  This
isn't known to cause any problems, but better safe than sorry.

14 years agoDowngrade -man message of ignored empty paragraph to MANDOC_IGNPAR. The
Kristaps Dzonsons [Wed, 12 Jan 2011 16:55:22 +0000 (16:55 +0000)]
Downgrade -man message of ignored empty paragraph to MANDOC_IGNPAR.  The
change in man_macro.c was from an assertion caused by a subtle problem:
(1) macro is removed, causing m->last to be m->last->parent; (2) by jumping
to the m->last->parent after post-validation, the original
m->last->parent is skipped; (3) the rewinder climbs to the root of the
tree and aborts.

The original issue recorded in the TODO by schwarze@, reminded by Brad
Smith.

14 years agoMake out-of-context `fi' invocations not cause an error, but just a
Kristaps Dzonsons [Wed, 12 Jan 2011 15:50:42 +0000 (15:50 +0000)]
Make out-of-context `fi' invocations not cause an error, but just a
warning.  From a TODO by schwarze@, originally noted by Brad Smith.

14 years agoBring in -Tascii comments for -Thtml MANH_LITERAL line-breaking stuff.
Kristaps Dzonsons [Wed, 12 Jan 2011 15:41:09 +0000 (15:41 +0000)]
Bring in -Tascii comments for -Thtml MANH_LITERAL line-breaking stuff.

14 years agoMake sure that -Thtml doesn't break within literal lines. This is the
Kristaps Dzonsons [Wed, 12 Jan 2011 15:31:17 +0000 (15:31 +0000)]
Make sure that -Thtml doesn't break within literal lines.  This is the
same logic as the -Tascii case.  Also remove the TODO.

14 years agoMake -man -Tascii not break within literal lines, e.g.,
Kristaps Dzonsons [Wed, 12 Jan 2011 15:23:25 +0000 (15:23 +0000)]
Make -man -Tascii not break within literal lines, e.g.,

 .nf
 .B hello world
 .fi

Also, clean up the print_man_node() function a little bit.  This problem
has long since been in the TODO and was recently noted again by Brad
Smith.  The -T[x]html fix will follow...

14 years agoIf the first character of free-form text is whitespace, then a newline
Kristaps Dzonsons [Wed, 12 Jan 2011 10:43:22 +0000 (10:43 +0000)]
If the first character of free-form text is whitespace, then a newline
shall precede outputted text (surprise!).

14 years agoNote that "^" needs an empty cell, while "s" does not.
Kristaps Dzonsons [Tue, 11 Jan 2011 14:15:56 +0000 (14:15 +0000)]
Note that "^" needs an empty cell, while "s" does not.

14 years agoAdd support for "^" vertical spanners. Unlike GNU tbl, raise
Kristaps Dzonsons [Tue, 11 Jan 2011 14:12:01 +0000 (14:12 +0000)]
Add support for "^" vertical spanners.  Unlike GNU tbl, raise
error-class messages when data is being ignored by specifying it in "^"
cells (either as-is or in blocks).

Also note again that horizontal spanners aren't really supported...

14 years agoDon't let `in' creep past the right margin.
Kristaps Dzonsons [Tue, 11 Jan 2011 00:39:00 +0000 (00:39 +0000)]
Don't let `in' creep past the right margin.

From an assertion noted by Brad (at comstyle).

14 years agoRefactoring in preparation for .rm support:
Ingo Schwarze [Tue, 11 Jan 2011 00:11:45 +0000 (00:11 +0000)]
Refactoring in preparation for .rm support:
Unify parsing of names given as roff request arguments into a new
function roff_getname(), which is rather different from the parsing
function for normal arguments, mandoc_getarg(), because names cannot
be quoted and cannot contain whitespace or escaped characters.
The new function now throws an ERROR when finding escaped characters
in a name.
"I'm fine with this." kristaps@

14 years agoClarify what members may be NULL or not in calculating widths. Make
Kristaps Dzonsons [Mon, 10 Jan 2011 15:31:00 +0000 (15:31 +0000)]
Clarify what members may be NULL or not in calculating widths.  Make
sure signedness is correct.  Verify that layouts MUST exit for data
cells.

14 years agoMake dp->string always consist of a value.
Kristaps Dzonsons [Mon, 10 Jan 2011 14:56:06 +0000 (14:56 +0000)]
Make dp->string always consist of a value.

14 years agoFirst, make extra data cells be thrown away. This makes "dp->layout"
Kristaps Dzonsons [Mon, 10 Jan 2011 14:40:30 +0000 (14:40 +0000)]
First, make extra data cells be thrown away.  This makes "dp->layout"
always hold, which cleans up the table stuff a bit.

Second, set a "spans" value per data cell consisting of the number of
skipped TBL_CELL_SPAN layout cells.

Third, make tbl_term.c understand how to skip over spanned sections when
iterating over the header queue.

What remains is to calculate the widths of spanned cells.

14 years agosome minor issues reported by brad@
Ingo Schwarze [Mon, 10 Jan 2011 03:43:47 +0000 (03:43 +0000)]
some minor issues reported by brad@

14 years agoWhen a row of data is being parsed and it's a line or double-line
Kristaps Dzonsons [Sun, 9 Jan 2011 23:14:41 +0000 (23:14 +0000)]
When a row of data is being parsed and it's a line or double-line
(instead of data), re-use the last "layout" pointer instead of advancing
to the next one.

This fixes a segfault report by joerg@.

14 years agoRemove lots of issues that have been resolved,
Ingo Schwarze [Sun, 9 Jan 2011 18:45:46 +0000 (18:45 +0000)]
Remove lots of issues that have been resolved,
and rephrase some that have been partially resolved.

14 years agoAdd some unsigned char casts for tolower() usage
Joerg Sonnenberger [Sun, 9 Jan 2011 05:38:23 +0000 (05:38 +0000)]
Add some unsigned char casts for tolower() usage

14 years agoNote that we support the "a" key.
Kristaps Dzonsons [Sat, 8 Jan 2011 17:30:03 +0000 (17:30 +0000)]
Note that we support the "a" key.

14 years agoThe numerical column type centres on the *last* decimal point.
Kristaps Dzonsons [Sat, 8 Jan 2011 17:16:48 +0000 (17:16 +0000)]
The numerical column type centres on the *last* decimal point.

14 years agoGive the "n" cell type knowledge of its spacing.
Kristaps Dzonsons [Sat, 8 Jan 2011 17:00:27 +0000 (17:00 +0000)]
Give the "n" cell type knowledge of its spacing.

14 years agoMeh, 2010->2011. Changed the live index.html file so as not to confuse
Kristaps Dzonsons [Fri, 7 Jan 2011 15:22:21 +0000 (15:22 +0000)]
Meh, 2010->2011.  Changed the live index.html file so as not to confuse
people (although the tagged 1.10.9 release will show 2010).

14 years agoOops: get rid of stray whitespace. VERSION_1_10_9
Kristaps Dzonsons [Fri, 7 Jan 2011 15:07:21 +0000 (15:07 +0000)]
Oops: get rid of stray whitespace.

14 years agoFixes: T} can be followed by a delimiter then more data. Make this
Kristaps Dzonsons [Fri, 7 Jan 2011 14:59:52 +0000 (14:59 +0000)]
Fixes: T} can be followed by a delimiter then more data. Make this
work and add documentation for it.

Also make tbl_term() not puke if the number of data cells is less than
the number of layout cells (which happens from time to time).  This
still needs work because we should pad out empty cells so that the
borders all work out.

14 years agoQuiesce lint with some type handling. Does not change anything.
Kristaps Dzonsons [Fri, 7 Jan 2011 13:20:58 +0000 (13:20 +0000)]
Quiesce lint with some type handling.  Does not change anything.

14 years agoVersion bits. Here we go...
Kristaps Dzonsons [Fri, 7 Jan 2011 13:10:03 +0000 (13:10 +0000)]
Version bits.  Here we go...

14 years agoTiny bits in place for tbl horizontal spans. This will wait for the next
Kristaps Dzonsons [Fri, 7 Jan 2011 13:03:48 +0000 (13:03 +0000)]
Tiny bits in place for tbl horizontal spans.  This will wait for the next
release to be implemented in full.

14 years agoMake -literal displays only have 8-character displays. From a
Kristaps Dzonsons [Thu, 6 Jan 2011 14:05:12 +0000 (14:05 +0000)]
Make -literal displays only have 8-character displays.  From a
low-hanging TODO added by schwarze@ on 15/08/10.

14 years agoRemove delims from struct tbl (not used anywhere and never will be).
Kristaps Dzonsons [Thu, 6 Jan 2011 13:45:47 +0000 (13:45 +0000)]
Remove delims from struct tbl (not used anywhere and never will be).

14 years agoClean-up www page a bit.
Kristaps Dzonsons [Thu, 6 Jan 2011 13:45:28 +0000 (13:45 +0000)]
Clean-up www page a bit.