aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Kill off some unused function prototypes.Kristaps Dzonsons2011-03-171-4/+1
|
* Kill off mdoc_strings.c, which is now empty. Byeeeeeeeee!Kristaps Dzonsons2011-03-172-37/+3
|
* Move mdoc_macro2len() into mdoc_validate.c as macro2len(), as that's theKristaps Dzonsons2011-03-172-97/+98
| | | | only place that it's being used.
* Move mdoc_str2sec() into mdoc_validate.c as a2sec(), as that's the onlyKristaps Dzonsons2011-03-173-43/+41
| | | | place that it's being used.
* Tiny optimisation in mandoc_isdelim() check.Kristaps Dzonsons2011-03-171-3/+3
|
* Move mdoc_isdelim() into mandoc.h as mandoc_isdelim(). This allows theKristaps Dzonsons2011-03-179-159/+97
| | | | | | 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.
* Move mandoc_{realloc,malloc,calloc} out of libmandoc.h and into mandoc.hKristaps Dzonsons2011-03-178-61/+23
| | | | | | | | 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.
* Make args_checkpunct() use mdoc_isdelim() instead of mdoc_iscdelim(),Kristaps Dzonsons2011-03-173-62/+64
| | | | which is wrong. Then remove mdoc_iscdelim() alltogether.
* Move check for closing punctuation into its own function. This willKristaps Dzonsons2011-03-171-25/+42
| | | | | | 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.
* o diaeresis is 246 (U+00F6)Ingo Schwarze2011-03-161-2/+2
| | | | from Christian Weisgerber <naddy at openbsd dot org>
* Instead of a series of hard-coded strcmps, make argv_a2arg() iterateKristaps Dzonsons2011-03-161-74/+43
| | | | | | 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.
* Push exit_status into struct curparse alongside file_status.Kristaps Dzonsons2011-03-161-7/+8
|
* Make lint shut up a little bit.Kristaps Dzonsons2011-03-1510-24/+28
|
* Remove duplicate UNCONST definition.Kristaps Dzonsons2011-03-151-2/+1
|
* Clean-up: make file_status global be local to curparse. "I agree withKristaps Dzonsons2011-03-151-29/+28
| | | | the direction of this particular patch", schwarze@.
* Plug memory leak of normalised-date field.Kristaps Dzonsons2011-03-151-1/+3
|
* my $buf = "string"; return $string; is cool in Perl, but not in C;Ingo Schwarze2011-03-151-17/+23
| | | | | found by Ulrich Spoerlein <uqs at freebsd> using the clang static analyzer; "ok, but please document the numbers" kristaps@
* Do not leak information about the software usedIngo Schwarze2011-03-071-3/+1
| | | | | | | | | 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@.
* Clean up date handling,Ingo Schwarze2011-03-0717-198/+172
| | | | | | | | | | | | 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@
* date handling needs cleanupIngo Schwarze2011-02-271-2/+10
|
* Allow compilation with pcc, which has interesting/broken handling of -WKristaps Dzonsons2011-02-241-4/+4
| | | | with missing function prototypes. Ok joerg@.
* Clean up the COMPATIBILITY section;Ingo Schwarze2011-02-091-24/+32
| | | | | | | | | 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@
* Add stub for eqn.7 manual and flip it on. Also note COMPATIBILITY issueKristaps Dzonsons2011-02-097-23/+123
| | | | of how we considered .TS (etc.) macros and how the preprocessors do.
* EQN blocks are now printed in all modes. This is simply a printing ofKristaps Dzonsons2011-02-096-14/+37
| | | | the concatenated string (in -T[x]html, it gets a SPAN, too).
* Consolidate "rc" value in main.c around addspan, addeqn, and parseln.Kristaps Dzonsons2011-02-091-14/+14
|
* Allow -man to process EQN as well. Also fix a segfault in missing caseKristaps Dzonsons2011-02-098-12/+50
| | | | statements in the post-handler for EQN in -mdoc and -man.
* Allow EQN data to be pushed down into libmdoc via mdoc_addeqn(). OnlyKristaps Dzonsons2011-02-0910-17/+57
| | | | the adding itself is implemented; equation data is not yet shown.
* Put tbl_alloc function right into the addspan() one, as this is the onlyKristaps Dzonsons2011-02-082-40/+19
| | | | place that it's called.
* The macro .Ns has no effect at the beginning of an input line;Ingo Schwarze2011-02-072-13/+15
| | | | ok kristaps@ jmc@.
* Fix a regression caused by mdoc_term.c 1.214 / mdoc_html.c 1.148:Ingo Schwarze2011-02-062-5/+9
| | | | | Inside .Bk or inside the SYNOPSIS, Unix variant macros cleared the keep flag.
* Some pre-handlers produce output, so reorder the code to set upIngo Schwarze2011-02-061-21/+26
| | | | | | keep flags before they are called. Without this bugfix, .Bk was ineffective in some cases. "looks reasonable" kristaps@
* Use tbl_span line number for warnings/errors.Kristaps Dzonsons2011-02-062-5/+4
|
* Let the line-number of a tbl_span be remembered.Kristaps Dzonsons2011-02-065-21/+20
|
* Add initial libmdoc and libman top-most machinery for accepting TBLKristaps Dzonsons2011-02-069-10/+38
| | | | | directives. For now this will just ignore them (except for -Ttree, which just notes that an EQN's been accepted).
* Add initial EQN support to mandoc. This parses, then throws away, dataKristaps Dzonsons2011-02-067-17/+180
| | | | | | | | 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.
* TODO note on that `.TS', `.TE' etc. aren't real roff macros and troffKristaps Dzonsons2011-02-031-1/+7
| | | | won't recognise them when invoked as e.g. `. TS' (we, however, do).
* If `Ns' is specified on its own line, it should be ignored. This isKristaps Dzonsons2011-02-027-15/+28
| | | | | shitty groff behaviour. Do the same, but raise a warning to this effect. This from a TODO noted by schwarze@.
* Note an error found in the wild.Kristaps Dzonsons2011-01-311-1/+4
|
* Implement the \N'number' (numbered character) roff escape sequence.Ingo Schwarze2011-01-307-11/+125
| | | | | | | 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)
* When in a <PRE>, don't print out the <BR> before lines that have leadingKristaps Dzonsons2011-01-292-6/+21
| | | | whitespace.
* Remove unnecessary conditional...Kristaps Dzonsons2011-01-252-6/+4
|
* Arguments to `Bsx' and friends are separated by a non-breaking space.Kristaps Dzonsons2011-01-253-9/+16
| | | | This removes a TODO raised by schwarze@.
* Push capitalisation of `Bx' second argument into validator, where it belongs.Kristaps Dzonsons2011-01-253-18/+28
|
* Properly uppercase the first-letter of the `Bx' second argument.Kristaps Dzonsons2011-01-252-7/+17
|
* Have `Bx' accept two arguments, not just one, and join these argumentsKristaps Dzonsons2011-01-254-22/+40
| | | | with "xxBSD-yy"
* Avoid double blank line before a table preceded by .PP.Ingo Schwarze2011-01-251-1/+4
| | | | ok kristaps@
* Since tbl_data() can now produce multiple spans, let parsebuf()Ingo Schwarze2011-01-254-14/+24
| | | | | | | 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@
* Do not skip data after horizontal lines in the layout.Ingo Schwarze2011-01-251-17/+45
| | | | | | | | | | 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@
* correct horizontal spacing of data cellsIngo Schwarze2011-01-252-11/+14
| | | | | | correct alignment of centered cells adjust horizontal rule width to the new spacing ok kristaps@
* If %B is specified, quote %T. Noted by schwarze@ in the TODO.Kristaps Dzonsons2011-01-254-14/+9
|