summaryrefslogtreecommitdiffstats
path: root/out.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove some stray argument names from function prototypes,Ingo Schwarze2020-04-031-2/+4
| | | | | | for consistency with the dominant style used in mandoc. No functional change. Patch from Martin Vahlensieck <academicsolutions dot ch>.
* If a tbl(7) column contains both text cells and numeric cells,Ingo Schwarze2018-08-181-1/+2
| | | | horizontally align the numbers in the same way as groff does.
* Delete substantial amounts of codeIngo Schwarze2018-06-251-5/+0
| | | | now that we no longer use variable style= attributes.
* Implement spacing of columns as defined in the table layout;Ingo Schwarze2017-06-271-0/+1
| | | | | this is for example used by lftp(1) and, ironically, misused by our very own tbl(7) manual...
* fix column width calculation for text block cellsIngo Schwarze2017-06-121-1/+1
|
* Implement w layout specifier (minimum column width).Ingo Schwarze2017-06-081-1/+3
| | | | | Improve width calculation of text blocks. Reduces the groff/mandoc diff in Base+Xenocara by about 800 lines.
* make the internal a2roffsu() interface more powerful by returningIngo Schwarze2017-06-081-1/+2
| | | | | a pointer to the end of the parsed data, making it easier to parse subsequent bytes
* In private header files, __BEGIN_DECLS and __END_DECLS are pointless.Ingo Schwarze2015-11-071-3/+0
| | | | | | | | | | | | Because these work slightly differently on different systems, they are becoming a maintenance burden in the portable version, so delete them. Besides, one of the chief design goals of the mandoc toolbox is to make sure that nothing related to documentation requires C++. Consequently, linking mandoc against any kind of C++ program would defeat the purpose and is not supported. I don't understand why kristaps@ added them in the first place.
* header cleanup:Ingo Schwarze2014-12-011-2/+4
| | | | | | * add missing forward declarations * remove needless header inclusions * some style unification
* remove unneccessary inclusion protection; patch from deraadt@Ingo Schwarze2014-12-011-4/+0
|
* Rudimentary implementation of the e, x, and z table layout modifiersIngo Schwarze2014-10-141-1/+3
| | | | | | | 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@.
* The macro SCALE_HS_INIT() is always passed the result of strlen() orIngo Schwarze2014-08-121-1/+1
| | | | | | an equivalent number as its argument, and strlen() measures the width of a string in characters, not in basic units. No functional change right now, but important for the upcoming scaling unit fixes.
* KNF: case (FOO): -> case FOO:, remove /* LINTED */ and /* ARGSUSED */,Ingo Schwarze2014-04-201-2/+2
| | | | | remove trailing whitespace and blanks before tabs, improve some indenting; no functional change
* Remove unused function.Kristaps Dzonsons2011-07-171-1/+0
|
* Move "chars" interface out of out.h and into mandoc.h. This doesn'tKristaps Dzonsons2011-04-291-13/+0
| | | | | | | | | | change any code but for renaming functions and types to be consistent with other mandoc.h stuff. The reason for moving into libmandoc is that the rendering of special characters is part of mandoc itself---not an external part. From mandoc(1)'s perspective, this changes nothing, but for other utilities, it's important to have these part of libmandoc. Note this isn't documented [yet] in mandoc.3 because there are some parts I'd like to change around beforehand.
* Remove a2roffdeco() and mandoc_special() functions and replace them withKristaps Dzonsons2011-04-091-17/+0
| | | | | | | | | | | | | | | | | | 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.
* Step 4: merge chars.h into out.h. The functions in this file areKristaps Dzonsons2011-03-221-31/+44
| | | | | necessary to all [real] front-ends, so stop pretending it's special. While here, add some documentation to the variable types.
* Clean up date handling,Ingo Schwarze2011-03-071-2/+0
| | | | | | | | | | | | 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@
* Implement the \N'number' (numbered character) roff escape sequence.Ingo Schwarze2011-01-301-1/+2
| | | | | | | 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)
* Stuff tbl_calc() into out.c so that it can be shared by all output modesKristaps Dzonsons2011-01-051-14/+25
| | | | | | | | | | | | | | | | (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.
* Accomodate for groff's crappy behaviour wherein an unrecognisedKristaps Dzonsons2010-07-211-2/+3
| | | | | | | | | | | | | 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.
* Throw out a2roffdeco() in out.c for a readable version. The prior oneKristaps Dzonsons2010-07-181-1/+0
| | | | | | | | | | | | | 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.
* Remove "pt" from struct roffsu, as CSS (the only reason it was there) isKristaps Dzonsons2010-06-251-5/+2
| | | | | unclear about which units accept floats/integers, which leads me to assume that it handles either and rounds as appropriate.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-1/+1
|
* Add support/ignoring of \f(xy, \f[X...], \F(xy, \FX, \F[X...] roff-style ↵Kristaps Dzonsons2010-04-071-0/+2
| | | | font escapes (noted by Frantisek Holop).
* Fixed \c support for all input and output modes (documented in mandoc_char.7).Kristaps Dzonsons2009-11-121-0/+1
|
* a2roffdeco() now supports \s escapes.Kristaps Dzonsons2009-11-081-3/+9
|
* Initial abstraction of front-end decoration events (special characters, text ↵Kristaps Dzonsons2009-11-071-0/+12
| | | | decorations, etc.).
* Fixed maddening mismatch between groff and strftime mismatch of day ("%e"). ↵Kristaps Dzonsons2009-10-221-0/+3
| | | | Noted by Ulrich Sporlein.
* Had out.h roff-scale converters accept default unit scale (because -mdoc and ↵Kristaps Dzonsons2009-10-181-1/+2
| | | | -man differ).
* Scaling factor made floating point (as per groff.7) and, e.g., ↵Kristaps Dzonsons2009-10-091-3/+6
| | | | gnu/usr.bin/cvs/man/cvs.1.
* Additions to -Tman -Thtml: all structural components tested & in place.Kristaps Dzonsons2009-10-071-0/+54
| | | | Fitted both -Thtml with handling of arbitrary vertical and horizontal scaling units (see groff(7)). Undocumented until fitted into -Tascii (next release).
* Removed new-born out.{h,c} (not a good idea).Kristaps Dzonsons2009-09-211-28/+0
| | | | | Removed if 0 for HTML-mode output (why not). Added option -oxxxx for passing options to output devices.
* Tentative addition of front-end utility functions (out.h) (not sure if it's ↵Kristaps Dzonsons2009-09-211-0/+28
necessary). More -Thtml installments.