| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
in particular .sp which uses "v", when the scale is not specified;
cures groff-mandoc differences in about a dozen Xenocara manuals
|
|
|
|
| |
bug reported by bentley@
|
|
|
|
|
|
|
| |
to equalize, maximize, and ignore the width of columns.
Does not yet take vertical rulers into account,
and does not do line breaks within table cells.
Considerably improves the lftp(1) manual; issue noticed by sthen@.
|
|
|
|
|
|
|
| |
specifying a unit, the implied unit is 'n' (on the terminal, one
character position; in PostScript, half of the current font size
in points), not 'u' (roff output device basic unit). No functional
change right now, but important for the upcoming scaling unit fixes.
|
|
|
|
|
|
| |
Include <sys/types.h> where needed, it does not belong in config.h.
Remove <stdio.h> from config.h; if it is missing somewhere, it should
be added, but i cannot find a *.c file where it is missing.
|
|
|
|
|
|
| |
Write double constants as double rather than integer literals.
Remove useless explicit (double) cast done at one place and nowhere else.
No functional change.
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
|
|
| |
functions used for multiple languages (mdoc, man, roff), for example
mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary
functions. Split the auxiliaries out into their own file and header.
While here, do some #include cleanup.
|
|
|
|
|
|
|
|
| |
- avoid bad qualifier casting in roff.c, roff_parsetext()
by changing the mandoc_escape arguments to "const char const **"
- avoid bad qualifier casting in mandocdb.c, index_merge()
- do not complain about unused variables in test-*.c
- garbage collect a few unused variables elsewhere
|
|
|
|
|
|
|
| |
1) This struct almost exclusively contains the table options.
2) Information about the table as a whole is actually in "struct tbl_node".
Besides, "struct tbl" was almost impossible to search for.
So rename it to "struct tbl_opts". No functional change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead save their properties with the following column.
This simplifies layout parsing and saves a lot of code
related to column handling.
At output time, print all white space and vertical lines
separating columns before printing the following column,
and none after printing the preceding column, considerably
simplifying white space handling and width calculations.
No functional change, but it saves 150 lines of code,
and it allows the next patch to tbl_term.c, tbl_literal().
"Please check them in and I'll look into them later!" kristaps@
|
|
|
|
|
| |
to work both with and without frames and rulers.
ok kristaps@
|
|
|
|
|
|
|
|
|
|
|
|
| |
That is to say, with mingw32. This amounts to the following:
(1) break compat.c into compat_strlcpy.c and compat_strlcat.c
(2) add compat_getsubopt.c (from OpenBSD) and test-getsubopt.c
(3) add test-strptime.c for HAVE_STRPTIME
(4) add ifdef bits here and there, where necessary
(5) remove some harmless unportable stuff (u_char, localtime_r)
I've added the appropriate mdocml.zip target to the Makefile, too.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a public (mandoc.h) function mandoc_escape(), which merges the
functionality of both prior functions.
Reason: code duplication. The a2roffdeco() and mandoc_special()
functions were pretty much the same thing and both quite complex. This
allows one function to receive improvements in (e.g.) subexpression
handling and performance, instead of having to replicate functionality.
As such, the mandoc_escape() function already handles a superset of the
escapes handled in previous versions and has improvements in performance
(using strcspn(), for example) and reliable handling of subexpressions.
This code Works For Me, but may need work to catch any regressions.
Since the benefits are great (leaner code, simpler API), I'd rather have
it in-tree than floating as a patch.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
correct alignment of centered cells
adjust horizontal rule width to the new spacing
ok kristaps@
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
| |
sure signedness is correct. Verify that layouts MUST exit for data
cells.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(isn't now, but will need to be, used by -T[x]html also). Necessitated
a lot of churn in getting tbl_calc* code out of tbl_term.c and into
out.c, including renaming some structures and so on. The abstraction is
in having a pointer to a wrapper function for calculating string widths.
The char devices use term_strlen and term_len; the others will probably
just use strlen().
While at it, remove some superfluous assertions in the tbl code. This
allows all tbl manuals to clear.
Lastly, set the right-margin to be the maximum margin for each table
span. This allows big, complicated tbl-pages like terminfo to be
displayed. They're ugly, but they work.
|
|
|
|
|
| |
should be printing the contents, but for the time being, this is good
enough.
|
|
|
|
|
| |
definitely not general, but it's good enough for pod2man definitions
(after I clean up the roff, which will be addressed in later fixes).
|
| |
|
| |
|
|
|
|
| |
getting mandoc ready to handle pod2man's complex escapes.
|
|
|
|
|
|
| |
Also made sign-less \s-style escapes be ok (this is technically against
what's in the groff.7 manual, but seems pretty widespread). Noted by
Thomas Jeunet as uglifying the gcc.1 manual.
|
|
|
|
| |
-Thtml (I'm surprised to note that neither is LITERAL mode).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
single-character escape (and ONLY this type of escape) will map back
into itself:
"If a backslash is followed by a character that does not
constitute a defined escape sequence the backslash is silently
ignored and the character maps to itself."
(From groff.7.)
Found by Jason McIntyre.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was completely unmaintainable. The new one is both readable and quite
similar to mandoc_special(), which in future versions will easily allow
throwing-away of unsupported escapes (such as \m). It's also a fair bit
smaller.
DECO_SIZE has been removed: this crap, like colours, will not be
supported.
mandoc_special() also has #if 0'd switch branches for ALL groff.7
escapes and some lint fixes.
|
|
|
|
|
| |
unclear about which units accept floats/integers, which leads me to
assume that it handles either and rounds as appropriate.
|
| |
|
| |
|
|
|
|
| |
font escapes (noted by Frantisek Holop).
|
|
|
|
| |
Sonnenberger).
|
|
|
|
| |
architectures. Thanks to Joerg Sonnenberger.
|
| |
|
| |
|
| |
|
|
|
|
| |
decorations, etc.).
|
| |
|
|
|
|
| |
Noted by Ulrich Sporlein.
|
|
|
|
| |
-man differ).
|