aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Move mandoc_isdelim() back into libmdoc.h. This fixes an unreportedKristaps Dzonsons2011-03-2212-142/+184
| | | | | | | | | error where (1) -man pages were punctuating delimiters (e.g., `.B a ;') and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its own line) would also be punctuated. This introduces a small amount of complexity of mdoc_{html,term}.c must manage their own spacing with running print_word() or print_text(). The check for delimiting now happens in mdoc_macro.c's dword().
* Add some documentation and clean up mdoc.h/man.h.Kristaps Dzonsons2011-03-222-134/+78
|
* Have the default include/lib install path end with "mandoc" to preventKristaps Dzonsons2011-03-221-4/+4
| | | | clobbering other stuff that may have the same name.
* Note the TODO file on the website. Also install index.html (oops).Kristaps Dzonsons2011-03-222-5/+9
|
* Add a FATAL error for when no manual type was assigned (you can repeatKristaps Dzonsons2011-03-223-10/+7
| | | | this for yourself by having a file consisting only of comments).
* Be a bit more specific on where we compile. Are there any ANSI-CKristaps Dzonsons2011-03-221-3/+3
| | | | | compilers where we don't compile? I'm pretty sure that mmap() is non-standard (we'll fail, e.g., on mingw32).
* As mentioned: ChangeLog isn't being built any more.Kristaps Dzonsons2011-03-221-43/+0
|
* Step 5: re-write Makefile and relax. This restructures the Makefile toKristaps Dzonsons2011-03-221-315/+277
| | | | | | | | do actual dependency checking for headers and to build everything nicer (www properly depends on mandoc, etc.). Note that the ChangeLog isn't being built any more: if people are interested, they can visit the source-changes mailing list archive.
* Step 4: merge chars.h into out.h. The functions in this file areKristaps Dzonsons2011-03-228-84/+55
| | | | | necessary to all [real] front-ends, so stop pretending it's special. While here, add some documentation to the variable types.
* Step 3: consolidate manuals. The parse functions in mdoc.h, roff.h, andKristaps Dzonsons2011-03-227-877/+367
| | | | | | | | man.h are now part of libmandoc.h, so remove these from their respective manuals (they're no longer public-facing and we don't need a libmandoc.3 (yet?)). Before that, move the juicy data (parse tree syntax) into new-born mandoc.3. Peck around in Makefile and index.sgml to reflect reality.
* Step 2: blow away roff.h, as all of its functions have been moved intoKristaps Dzonsons2011-03-224-31/+5
| | | | libmandoc.h and there's nothing left.
* Step 1 of restructuring: libmandoc.h. Move all compiler-set-specificKristaps Dzonsons2011-03-227-96/+96
| | | | | | | | | | stuff into libmandoc.h, including old mdoc.h/man.h/roff.h functions now used by read.c. The motivation behind this is to tighten the relationship between the underlying compilers while keeping parse data hidden from general callers (e.g., main.c). While here, also move register values from mandoc.h into libmandoc.h as noted by schwarze@. See above for explanation.
* main.c doesn't need roff.h anymore.Kristaps Dzonsons2011-03-211-2/+1
|
* Let read.c worry about the currently-open file instead of having thisKristaps Dzonsons2011-03-203-40/+6
| | | | | | information duplicated in main.c. For the time being, remove evt_close and evt_open, as the only known mparse interface (main.c) doesn't need them.
* Consolidate messages. Have all parse-time messages (in libmdoc,Kristaps Dzonsons2011-03-2023-248/+248
| | | | | | | | | libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the time being in libmandoc.h. This requires struct mparse to be passed into the allocation routines instead of mandocmsg and a void pointer. Then, move some of the functionality of the old mmsg() into read.c's mparse_mmsg() (check against wlevel and setting of file_status) and use main.c's mmsg() as simply a printing tool.
* Change around include ordering for compilation on OpenBSD.Kristaps Dzonsons2011-03-201-2/+2
|
* Split the document parsing sequence out of main.c and into read.c,Kristaps Dzonsons2011-03-204-610/+711
| | | | | | | | putting the interface into mandoc.h. This effectively makes the function of main.c be command-line handling, invoking the parser, and sending its output to the output handler. The sequence of parsing (pfile(), pdesc(), etc.) has changed very little but for clean-up of some state variables (curp->fd, etc.).
* Bumped internal version. There will be no formal release with this: itKristaps Dzonsons2011-03-201-2/+2
| | | | | precedes some major structural changes for easier roll-back in the case of errors or whatnot.
* .RS w/o line args is not seriousVERSION_1_10_10Ingo Schwarze2011-03-191-1/+5
|
* Note the development status of eqn.7 and tbl.7.Kristaps Dzonsons2011-03-172-4/+24
|
* "Reserved Characters" isn't correct since `\.' and `\*(Ba' aren'tKristaps Dzonsons2011-03-171-11/+14
| | | | characters. Use "Reserved Terms" instead.
* Note that mdoc_valids[] is static.Kristaps Dzonsons2011-03-171-2/+2
|
* mandocmsg finally has no return value.Kristaps Dzonsons2011-03-172-8/+6
|
* Clean-up in libman: make all calls to man_*msg not check return value.Kristaps Dzonsons2011-03-174-22/+20
| | | | Also convert man_vmsg to return void.
* Clean-up in libmdoc: fix last checks for mdoc_*msg return value, thenKristaps Dzonsons2011-03-174-24/+22
| | | | | make mdoc_vmsg not return an int. libmdoc is now completely clean of return-value checks from the message subsystem.
* Clean-up in mdoc_argv.c args_checkpunct().Kristaps Dzonsons2011-03-171-28/+22
|
* Clean-up in mdoc_argv.c: make CPP-defines into an enum, document, makeKristaps Dzonsons2011-03-171-34/+18
| | | | | static arrays const, properly abort() for bogus switch cases, and be obsessive about spacing and (void)-casting.
* Clean up mdoc_pmsg invocations to make them not check the return value.Kristaps Dzonsons2011-03-171-14/+7
|
* 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@