summaryrefslogtreecommitdiffstats
path: root/chars.c
Commit message (Collapse)AuthorAgeFilesLines
* Add support for 1/2, 1/4, and 3/4 (needed by eqn).Kristaps Dzonsons2011-07-221-1/+1
|
* Support `size' constructs in eqn.7. Generalise mandoc_strontou to thisKristaps Dzonsons2011-07-211-2/+2
| | | | effect.
* Simplify chars.c---there's really no need for extra code to reorder theKristaps Dzonsons2011-07-071-60/+7
| | | | hash chain or an extra function for checking matches.
* Remove all references to ESCAPE_PREDEF, which is now not exposed passedKristaps Dzonsons2011-05-241-31/+0
| | | | the libroff point. This clears up a nice chunk of code.
* Remove predefined strings from the chars.in file, as they're now localKristaps Dzonsons2011-05-241-22/+11
| | | | | to predefs.in. This also makes "BOTH" entries directly into CHAR. The res2str and spec2str are now effectively the same function.
* Flip on unicode output (via \[uNNNN]) in -T[x]html. Here we go!Kristaps Dzonsons2011-05-171-2/+16
|
* Remove function calls to res() and so forth in term_word(). These wereKristaps Dzonsons2011-05-151-3/+2
| | | | | | only used once and simply bloated the binary. Also fix mchars_num2char to correctly render the character instead of using atoi(). This makes the conversation more strict, but it's more correct.
* Fix missing support for \N'n' when calculating string widths in -TasciiKristaps Dzonsons2011-05-151-0/+1
| | | | (oops). Do the same for -Thtml (oops^2).
* Make character engine (-Tascii, -Tpdf, -Tps) ready for Unicode: make bufferKristaps Dzonsons2011-05-141-1/+2
| | | | | | consist of type "int". This will take more work (especially in encode and friends), but this is a strong start. This commit also consists of some harmless lint fixes.
* Filter all \N'' values with isprint(). Ok schwarze@.Kristaps Dzonsons2011-05-011-9/+5
|
* Make mchars_num2char() return a char like it says.Kristaps Dzonsons2011-04-301-10/+10
|
* Rename mchars_init() -> mchars_alloc() for consistency.Kristaps Dzonsons2011-04-301-1/+1
|
* Remove enum mcharst, which hasn't been used in quite some time.Kristaps Dzonsons2011-04-301-3/+1
|
* Move "chars" interface out of out.h and into mandoc.h. This doesn'tKristaps Dzonsons2011-04-291-28/+20
| | | | | | | | | | 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.
* Add \*(Ai (ANSI) and \*(Px (POSIX) predefined strings, which are part ofKristaps Dzonsons2011-04-201-1/+1
| | | | | | groff's tmac.doc package. Originally noted by Matthew Dempsky. Feedback by Jason McIntyre, joerg@, and schwarze@. Also add some documentation about predefined strings, tweaked by schwarze@.
* Step 4: merge chars.h into out.h. The functions in this file areKristaps Dzonsons2011-03-221-1/+1
| | | | | necessary to all [real] front-ends, so stop pretending it's special. While here, add some documentation to the variable types.
* Move mandoc_{realloc,malloc,calloc} out of libmandoc.h and into mandoc.hKristaps Dzonsons2011-03-171-11/+2
| | | | | | | | 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.
* Implement the \N'number' (numbered character) roff escape sequence.Ingo Schwarze2011-01-301-0/+22
| | | | | | | 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)
* Churn to get parts of 'struct tbl' visible from mandoc.h: rename theKristaps Dzonsons2011-01-021-11/+11
| | | | | | | existing 'struct tbl' as 'struct tbl_node', then move all option stuff into a 'struct tbl' in mandoc.h. This conflicted with a structure in chars.c, which was renamed.
* Remove last pod2man escapes. These render ok, although \*(-- renders asKristaps Dzonsons2010-09-151-1/+1
| | | | | | O- because the underlying macro depends on \(*W, which a prior pod2man preamble `tr' macro rewrites as "-". This is an error in groff as this tramples on the real \(*W, or Greek omega.
* Churny commit to quiet lint. No functional changes.Kristaps Dzonsons2010-09-041-2/+2
|
* Remove the pod2man table entries. They can now be properly read andKristaps Dzonsons2010-08-291-1/+1
| | | | assigned within the pod2man preamble.
* Implement a simple, consistent user interface for error handling.Ingo Schwarze2010-08-201-2/+2
| | | | | | | | | | | | | | | | | We now have sufficient practical experience to know what we want, so this is intended to be final: - provide -Wlevel (warning, error or fatal) to select what you care about - provide -Wstop to stop after parsing a file with warnings you care about - provide consistent exit status codes for those warnings you care about - fully document what warnings, errors and fatal errors mean - remove all other cruft from the user interface, less is more: - remove all -f knobs along with the whole -f option - remove the old -Werror because calling warnings "fatal" is silly - always finish parsing each file, unless fatal errors prevent that This commit also includes a couple of related simplifications behind the scenes regarding error handling. Feedback and OK kristaps@; Joerg Sonnenberger (NetBSD) and Sascha Wildner (DragonFly BSD) agree with the general direction.
* Remove \*(C+ from the pre-predefined strings. It is always `ds'-definedKristaps Dzonsons2010-08-161-1/+1
| | | | | | when being used in manuals. Since we now support `ds', it's no longer necessary to account for it. From a bug report originally by Thomas Jeunet.
* Sync to OpenBSD: add missing Copyright years.Ingo Schwarze2010-07-311-1/+1
| | | | | I checked that substantial changes were committed to these files during these years.
* Remove asciisz from chars.in. It frees up a nice chunk of memory and atKristaps Dzonsons2010-07-261-9/+8
| | | | | | the overhead of running strlen() for ASCII strings (yes, I benchmarked this running mandoc_char(7) as input again and again with hundredth-second penalties... on my slow-ass alpha).
* Clean up mandoc_special() (in order later to catch \m). It also flagsKristaps Dzonsons2010-07-181-1/+2
| | | | | | several syntactic errors that weren't caught before. Also un-puke chars.c on zero-length \[].
* By letting strncmp() do its job and not helping it with a prior lengthKristaps Dzonsons2010-07-171-9/+8
| | | | | check, we can remove the hard-coded length of all escape patterns. This frees up a nice chunk of memory.
* Change chars.in HTML encoding to be a Unicode codepoint (int), which isKristaps Dzonsons2010-07-161-23/+64
| | | | later formatted in html.c.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-1/+1
|
* Fixed condition of `\}' closing a conditional at the start of the line.Kristaps Dzonsons2010-06-011-1/+1
| | | | | | | | Fixed flushed-out condition of \} causing subsequent arguments to be truncated, when in fact the whole line should be passed through (if the conditional succeeds) to the front-end and the \} ignored there. Added regression test of this behaviour.
* Modified version of Ingo Schwarze's patch for hyphen-breaking.Kristaps Dzonsons2010-05-251-0/+1
| | | | | | | Breakable hyphens are cued in the back-ends (with ASCII_HYPH) and acted upon in term.c or ignored in html.c. Also cleaned up XML decl printing (no need for extra vars).
* Added stupid pod2man reserved strings.Kristaps Dzonsons2010-03-231-1/+1
|
* Removed superfluous lookahead block in chars.c.Kristaps Dzonsons2010-01-281-12/+0
|
* Removed references to `\\' escape (noted by Jason McIntyre, Ingo Schwarze).Kristaps Dzonsons2010-01-051-1/+1
|
* Big check-in of compatibility layer. This should work on most major ↵Kristaps Dzonsons2010-01-011-0/+4
| | | | architectures. Thanks to Joerg Sonnenberger.
* Added functionality of -Tascii non-breaking `\~' space.Kristaps Dzonsons2009-11-051-2/+3
|
* Replaced putchar() loop with fwrite() (noted by Joerg Sonnenberger).Kristaps Dzonsons2009-11-011-1/+1
|
* Using perror() instead of fprintf for failure from library functions.Kristaps Dzonsons2009-10-311-2/+2
|
* Continued safe handling of allocations.Kristaps Dzonsons2009-10-301-6/+11
|
* All special characters sync'd with groff, both -Thtml and -Tascii.Kristaps Dzonsons2009-09-231-1/+1
| | | | Re-added text links to index.sgml (just for show).
* Sync'd special letters and ligatures with newest groff.Kristaps Dzonsons2009-09-231-1/+1
|
* Arrows & brackets sync'd with newest groff.Kristaps Dzonsons2009-09-231-1/+1
|
* Quotes sync'd with newest groff.Kristaps Dzonsons2009-09-231-1/+1
|
* Accent marks sync'd with current groff.Kristaps Dzonsons2009-09-221-1/+1
|
* Many more UTF-8 symbols in place.Kristaps Dzonsons2009-09-221-1/+1
| | | | | | Started partitioning chars.in into sections corresponding to mandoc_char.7. Correctly ordered Greek letters. Sync'd all mathematical and logical symbols with current groff.
* Many more characters for HMTL (mostly Greek).Kristaps Dzonsons2009-09-221-1/+1
|
* More html.Kristaps Dzonsons2009-09-171-28/+31
| | | | Initial html encodings in chars.in.
* ascii_xxx -> chars_xxx (intended to hold more than just ascii encoding).Kristaps Dzonsons2009-09-171-0/+201
More html work.