aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Flip on -Tutf8 backend support. This forces the UTF-8 LC_CTYPE and doesKristaps Dzonsons2011-05-203-7/+21
| | | | | | little else. Also remove the check for __STDC_ISO_10646__. It turns out that very few systems---even those that support it---actually declare this and it's just causing problems instead of being useful.
* Allow non-ASCII terminal encodings to accept unicode values for theKristaps Dzonsons2011-05-201-18/+62
| | | | | special characters, if possible. This is broken into a separate switch statement for clarity.
* Some release notes (this isn't signalling an impending release; I justKristaps Dzonsons2011-05-191-1/+13
| | | | want to get some notes in).
* It seems that __STDC_ISO_10646__ isn't defined even where it can beKristaps Dzonsons2011-05-192-4/+13
| | | | | | | | defined, so remove the check for it and leave it up to people compiling the software (DOWNSTREAM) to take care of this. This will eventually need to be fixed up with a proper non-10646 converter and so on, but this is a simple start. While here, strengthen then language in the Makefile to this effect.
* Make any un-recognised font be considered a call for the Roman font.Kristaps Dzonsons2011-05-183-8/+9
| | | | | This makes sequences of \f[unknown] \fP not completely puke. From a TODO by schwarze@.
* Add TODO entry for standalone `.' in tbl pages (pointed out by YuriKristaps Dzonsons2011-05-182-2/+6
| | | | Pankov). Also fix typo in Makefile, same reporter. Thanks!
* Locale support. I'm checking this in to clean up fall-out in-tree, butKristaps Dzonsons2011-05-174-23/+141
| | | | | | | | | | | | | | | | | | | | | | | | it looks pretty good. Basically, the -Tlocale option propogates into term_ascii.c, where we set locale-specific console call-backs IFF (1) setlocale() works; (2) locale support is compiled in (see Makefile for -DUSE_WCHAR); (3) the internal structure of wchar_t maps directly to Unicode codepoints as defined by __STDC_ISO_10646__; and (4) the console supports multi-byte characters. To date, this configuration only supports GNU/Linux. OpenBSD doesn't export __STDC_ISO_10646__ although I'm told by stsp@openbsd.org that it should (it has the correct map). Apparently FreeBSD is the same way. NetBSD? Don't know. Apple also supports this, but doesn't define the macro. Special-casing! Benchmark: -Tlocale incurs less than 0.2 factor overhead when run through several thousand manuals when UTF8 output is enabled. Native mode (whether directly -Tascii or through no locale or whatever) is UNCHANGED: the function callbacks are the same as before. Note. If the underlying system does NOT support STDC_ISO_10646, there is a "slow" version possible with iconv or other means of flipping from a Unicode codepoint to a wchar_t.
* Add mode for -Tlocale. This mode, with this commit, behaves exactlyKristaps Dzonsons2011-05-178-45/+45
| | | | | | | like -Tascii. While adding this, inline term_alloc() (was a one-liner), remove some switches around the terminal encoding for the symbol table (unnecessary), and split out ascii_alloc() into ascii_init(), which is also called from locale_init().
* In tbl layouts, we puked if a space didn't followed a vertical barKristaps Dzonsons2011-05-171-1/+18
| | | | | | (found by Yuri Pankov). This was due to looking for modifiers for the vertical bar. This has been fixed, along with other special-key layout types.
* Documentation: note COMPATIBILITY of -Tascii `?' printing in mandoc.1Kristaps Dzonsons2011-05-172-6/+13
| | | | | and remove some long-fixed notes in sthe same section. Also, add an `Lb' for the mandoc library to mandoc.3 (noted by Sascha Wildner).
* Flip on printing `?' at Unicode codepoints in -Tascii, -Tpdf, and -Tps.Kristaps Dzonsons2011-05-171-2/+10
| | | | | | The reasoning behind printing SOMETHING at a Unicode codepoint is because the input is not "wrong" (we suppress printing of "wrong" things). It's just that ASCII can't handle it.
* Flip on unicode output (via \[uNNNN]) in -T[x]html. Here we go!Kristaps Dzonsons2011-05-174-9/+42
|
* Clean-up fallout: differentiate ID's and HREF's (where to put the `#').Kristaps Dzonsons2011-05-172-5/+5
| | | | Make buffmt functions internally bufinit(), too.
* Cleanups in -T[x]html: make html_idcat() use the buffer and be calledKristaps Dzonsons2011-05-174-67/+45
| | | | | | bufcat_id(), then collapse it into a little function without so much crap. Next, make bufinit() only be called when we really need to do so, and not simply before pre/post calls.
* Clean-ups in -T[x]html: inline print_num(), as it was just a singleKristaps Dzonsons2011-05-174-71/+31
| | | | | | | | | | conditional; same for print_xmltype() and print_doctype(), same reason; make bufncat() be static, as it was only being called from html.c; have bufcat() simply call through to strlcat(). Finally, assert() whenever we truncate. Also rename buffmt() -> bufcat_fmt() to differentiate from buffmt_man et al., which do not concatenate.
* Clean up -T[x]html by using a table instead of a switch statement forKristaps Dzonsons2011-05-171-42/+17
| | | | | the roff units. Also remove a comment about CSS and number types (they all accept decimal numbers).
* Remove function calls to res() and so forth in term_word(). These wereKristaps Dzonsons2011-05-152-57/+19
| | | | | | 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-153-7/+14
| | | | (oops). Do the same for -Thtml (oops^2).
* Support groff's escape for Unicode input. SeeKristaps Dzonsons2011-05-153-4/+27
| | | | | | http://mdocml.bsd.lv/archives/tech/0368.html For the time being, we just throw it away.
* Use strcspn() in term_strlen(). Clarifies the code.Kristaps Dzonsons2011-05-151-11/+11
|
* Get rid of an "#if 0" that I don't anticipate being fixed ever (nor doesKristaps Dzonsons2011-05-151-43/+1
| | | | it really need to be fixed, anyway).
* Move struct termp_ps into term_ps.c; remove the engine union in struct termp,Kristaps Dzonsons2011-05-152-202/+199
| | | | | | which only held one entry; finally (as per the first), make "ps" member into a pointer managed by term_ps.c. This frees up a nice chunk of memory during run-time and in the binary.
* Continuing last commit with the style-sheet change.Kristaps Dzonsons2011-05-141-19/+21
|
* Fix makewhatis.1 to have the correct name (it was MANDOC-DB, oops).Kristaps Dzonsons2011-05-141-3/+3
|
* Make index.sgml look more like mandoc-cgi, which I find looks much cleanerKristaps Dzonsons2011-05-141-58/+17
| | | | and nicer.
* Make www style.css link up to example.style.css much nicer.Kristaps Dzonsons2011-05-141-41/+34
|
* Make some values "int" that were "size_t". These are primarily used forKristaps Dzonsons2011-05-142-26/+30
| | | | indexing into arrays, so this removes lots of casts from size_t to int.
* Make character engine (-Tascii, -Tpdf, -Tps) ready for Unicode: make bufferKristaps Dzonsons2011-05-146-24/+28
| | | | | | 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.
* Give -Thtml and -Txhtml the gift of recognising escapes when calculatingKristaps Dzonsons2011-05-143-8/+45
| | | | | widths (e.g., `Bl -tag -width "\s[blahblah]bar"). This has long since been done for -Tascii but escaped noticed with -T[x]html.
* Move roff.c's strtol into libmandoc.h for use by other parts of the codeKristaps Dzonsons2011-05-143-30/+43
| | | | (which will come).
* Last sneak-in: incorrect www link.VERSION_1_11_2Kristaps Dzonsons2011-05-131-2/+2
|
* Ooops, forgot to install makewhatis manual.Kristaps Dzonsons2011-05-131-1/+6
|
* Version up! 1.11.2. Let's go...Kristaps Dzonsons2011-05-131-2/+2
|
* More release notes.Kristaps Dzonsons2011-05-131-1/+2
|
* Rename mandoc-db to makewhatis. On the suggestion of schwarze@; I agree.Kristaps Dzonsons2011-05-134-34/+45
| | | | Add initial version notes.
* Don't let Linux-isms creep into Makefile.Kristaps Dzonsons2011-05-121-1/+1
|
* Correctly catch `Vt' semicolon in mandoc-db.Kristaps Dzonsons2011-05-121-3/+4
|
* Lint fixes: remove unused function variables and pass in proper enumKristaps Dzonsons2011-05-121-8/+7
| | | | values instead of ints.
* Make sure that we check for the \(en, \(em, \-, and - separators forKristaps Dzonsons2011-05-121-4/+9
| | | | the heuristic dance to grab manual descriptions from man documents.
* Grok manual architecture in mandoc-db.c.Kristaps Dzonsons2011-05-042-3/+13
|
* Add configurations (`Cd') to mandoc-db mining.Kristaps Dzonsons2011-05-042-5/+42
| | | | | Also put some notes into index.sgml to the effect that mandoc-db exists, but is not linked to the build.
* Pick up authors in mandoc-db.Kristaps Dzonsons2011-05-032-5/+28
|
* Have mandoc-db grok `Dt'/`TH' manual title as well.Kristaps Dzonsons2011-05-031-1/+7
|
* Back out stripping of non-predef and non-special escape sequences fromKristaps Dzonsons2011-05-021-5/+4
| | | | | input (this is not yet possible with mandoc_escape(), which depends on nil-terminated strings).
* Have mandoc-db strip out escapes that aren't special or predefinedKristaps Dzonsons2011-05-011-16/+55
| | | | characters. This is a work-in-progress that has some issues.
* Documenting the mchars_XXXX part of mandoc.h.Kristaps Dzonsons2011-05-011-2/+88
|
* Remove mdoc.template. It's already embedded in man(7) and mdoc(7); noKristaps Dzonsons2011-05-011-42/+0
| | | | need to have it floating around separately.
* Document the fact that \N'' accepts only printable characters.Kristaps Dzonsons2011-05-011-2/+5
|
* Filter all \N'' values with isprint(). Ok schwarze@.Kristaps Dzonsons2011-05-011-10/+6
|
* Make mchars_num2char() return a char like it says.Kristaps Dzonsons2011-04-304-23/+21
|