summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Delete the unused flag TERMP_IGNDELIMIngo Schwarze2013-12-243-22/+10
| | | | | and the empty callback termp_igndelim_pre(). Sort the remaining termp flags.
* Implement SYNOPSIS .Fn indentation for -Tman.Ingo Schwarze2013-12-241-1/+4
|
* It turns out SYNOPSIS mode does not imply .Bk in general,Ingo Schwarze2013-12-244-38/+27
| | | | | | but only within .Nm blocks. Simplify the code accordingly. Triggered by research done by Franco Fichtner.
* When deciding whether two consecutive macros are on the same input line,Ingo Schwarze2013-12-246-9/+16
| | | | | | | | we have to compare the line where the first one *ends* (not where it begins) to the line where the second one starts. This fixes the bug that .Bk allowed output line breaks right after block macros spanning more than one input line, even when the next macro follows on the same line.
* Implement a long-standing desideratum,Ingo Schwarze2013-12-232-3/+30
| | | | | | hanging indentation for .Fn in SYNOPSIS mode, exploiting the new trailspace feature by deliberately *NOT* using it.
* Polishing the worms in my favourite can, term_flushln().Ingo Schwarze2013-12-224-29/+49
| | | | | | | | | | | The TERMP_TWOSPACE flag i introduced in August 2009 was idiosyncratic and served only a very narrow purpose. Replace it by a more intuitive and more general termp attribute "trailspace", to be used together with TERMP_NOBREAK, to request a minimum amount of whitespace at the end of the current column. Adapt all code to the new interface. No functional change intended; code reviews to confirm that are welcome *eg*.
* Fix end-of-sentence spacing after the DragonFly text production macro.Ingo Schwarze2013-12-221-1/+1
| | | | Patch from Franco Fichtner <franco at lastsummer dot de>.
* Implement end-of-sentence spacing at the end of man(7) macro lines.Ingo Schwarze2013-12-221-0/+9
| | | | Patch from Franco Fichtner <franco at lastsummer dot de> (DragonFly).
* Document the alternative syntax \C'uXXXX' for Unicode characters.Ingo Schwarze2013-12-221-3/+3
| | | | Forgotten when committing mandoc.c rev. 1.70.
* In quoted macro arguments, double quotes can be quoted by doubling them.Ingo Schwarze2013-12-152-5/+12
| | | | | | | | | For a long time, we handle this in roff(7) and man(7) macros. Now add correct handling for the mdoc(7) case, too. Closely based on a patch by Tsugutomo dot ENAMI at jp dot sony dot com, see http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=48438 received via Thomas Klausner (wiz@), slightly tweaked by me.
* bentley@ looked at sbcl(1) and found new tasks for us...Ingo Schwarze2013-12-151-0/+9
|
* The "value" argument to the roff(7) .nr requests ends right beforeIngo Schwarze2013-12-154-11/+27
| | | | | | | | the first non-digit character. While here, implement and document an optional sign, requesting increment or decrement, as documented in the Ossanna/Kernighan/Ritter troff manual and supported by groff. Reported by bentley@ on discuss@.
* My audit of mandoc revealed one missing (unsigned char) castIngo Schwarze2013-11-211-1/+1
| | | | | in an isspace() argument containing arbitrary char data. Thanks to deraadt@ for triggering the audit.
* In the parser, when closing an explicit block that is not open,Ingo Schwarze2013-11-112-4/+8
| | | | | | | | close below-subsection implicit scopes that may still be open. In the formatter, make sure indentation is reset when leaving a scope, not only when entering the next one. Improves the formatting of gpg(1); issue reported by jca on ports.
* Ignore blank lines right after .SH and .SS.Ingo Schwarze2013-11-101-5/+11
| | | | Improves the rendering of gpg(1); issue reported by jca on ports.
* Support the alternative syntax \C'uXXXX' for Unicode characters.Ingo Schwarze2013-11-101-1/+4
| | | | | | | | | | It is already documented in the Heirloom troff manual, and groff handles it as well. Bug reported by Bjarni Ingi Gislason <bjarniig at rhi dot hi dot is> on <bug-groff at gnu dot org>. Well, admittedly, that bug was reported against groff, but mandoc was even more broken than groff with respect to this syntax...
* clarify that \[uXXXX] wants uppercase hex digitsIngo Schwarze2013-11-101-1/+6
|
* missing features: line length and italic correctionIngo Schwarze2013-11-101-0/+6
|
* While answering a question asked by espie@, i noticed that .Fd is notIngo Schwarze2013-11-021-7/+28
| | | | | completely obsolete, but still somewhat useful for listing preprocessor directives, in particular in the SYNOPSIS.
* The man(7) language has no syntax to specify architectures, but itIngo Schwarze2013-10-271-10/+11
| | | | | | | | | | can still be used to write architecture-specific manuals, of course. So just derive the architecture a man(7) manual belongs to from the directory where it is located and refrain from warning about each and every architecture-specific man(7) manual found. While here, delete some trailing whitespace in the neighbourhood.
* The code in ofmerge() only tried the source parsers if at least oneIngo Schwarze2013-10-271-1/+1
| | | | | | | | | | | | | | | | | | | of the path (/man1/ .. /man9/) or the file name suffix (*.1 .. *.9) indicated a source manual. That missed source manuals with unusual names in unusual locations. Instead, as the existing comment right above already suggests, try the source parsers unless both the path and the file name suffix unambiguously indicate a preformatted manual (/cat*/*.0). This change is not expensive in practice because no real-world system will have large numbers of preformatted pages outside /cat*/*.0. The only way to make information loss even less probable would be to try the source parsers on all files, even /cat*/*.0, which wouldn't buy us much because no real-world system will call source manuals /cat*/*.0, but it will be expensive in practice, because many real-world systems have large numbers of preformatted pages called /cat*/*.0.
* delete duplicate NULL check and polish style;Ingo Schwarze2013-10-271-5/+5
| | | | no functional change
* Parse and ignore .hw (hyphenation points in words); this is safe becauseIngo Schwarze2013-10-222-0/+5
| | | | | | we don't do hyphenation anyway, so there is no point in throwing an ERROR when encountering .hw. Real-world usage of the request found by naddy@ in sysutils/dwdiff(1).
* There are three kinds of input lines: text lines, macros takingIngo Schwarze2013-10-214-103/+171
| | | | | | | | | | | | | | | positional arguments (like Dt Fn Xr) and macros taking text as arguments (like Nd Sh Em %T An). In the past, even the latter put each word of their arguments into its own MDOC_TEXT node; instead, concatenate arguments unless delimiters, keeps or spacing mode prevent that. Regarding mandoc(1), this is internal refactoring, no output change intended. Regarding mandocdb(8), this fixes yet another regression introduced when switching from DB to SQLite: The ability to search for strings crossing word boundaries was lost and is hereby restored. At the same time, database sizes and build times are both reduced by a bit more than 5% each.
* Fix another regression introduced when switching from DB to SQLite:Ingo Schwarze2013-10-201-28/+71
| | | | The ~ operator has to do regular expression search, not globbing.
* Fix a regression introduced when switching from DB to SQLite:Ingo Schwarze2013-10-191-5/+33
| | | | The = operator has to do substring search, not word search.
* Fix an assertion in dbindex(): Null strings are never entered into theIngo Schwarze2013-10-181-1/+1
| | | | string table. Fortunately, they never need UTF-8 translation either.
* Manuals to be checked with "mandocdb -t" need not be in the currentIngo Schwarze2013-10-181-1/+1
| | | | directory or one of its subdirectories.
* Implement the .UR/.UE block (uniform resource identifier) introduced in theIngo Schwarze2013-10-176-2/+83
| | | | | | | | man-ext macros by Eric S. Raymond, enabled by default in groff_man(7). Usual disclaimer: You don't write new man(7) code, so you are not going to use these, either. Improves e.g. the bzr(1) and etherape(1) manuals. Thanks to naddy@ for bringing these to my attention.
* Parse and ignore the .fam (font family) request.Ingo Schwarze2013-10-142-0/+8
| | | | | Fixes irunner(1) in devel/ipython and uim-xim(1) in inputmethods/uim. Thanks to naddy@ for bringing these to my attention.
* merge from VERSION_1_12: new section about mandoc history, with linksIngo Schwarze2013-10-131-3/+30
|
* mention the three unreleased versions since 1.10.3Ingo Schwarze2013-10-131-13/+24
|
* add libppath; Thomas Klausner, NetBSD rev. 1.4, Aug 29, 2011Ingo Schwarze2013-10-131-0/+1
|
* add libefi and simplify some namesIngo Schwarze2013-10-131-2/+3
| | | | | from FreeBSD ports SVN rev. 293734, Ulrich Spoerlein March 24, 2012 in case of conflicts with NetBSD, i keep the simpler NetBSD names
* sync SUSv2/SUSv3 entries with groffIngo Schwarze2013-10-131-2/+2
| | | | | | reduces groff-mandoc-differences for several pthread_*(3) manuals noticed by Franco Fichtner <franco at lastsummer dot de> dragonfly.git/commitdiff/370c546b87777b40b5fc862491555ef71b4ee130
* more DragonFly libraries; Franco Fichtner <franco at lastsummer dot de>Ingo Schwarze2013-10-131-0/+13
| | | | dragonfly.git/commit/107cb94cae2c24ce3f6851ce0ed24b80d64e3ec8
* Thomas Klausner <wiz at NetBSD dot org> finally succeeded to buildIngo Schwarze2013-10-111-4/+35
| | | | on SmartOS and sent these additional patches, thanks!
* merge from VERSION_1_12:Ingo Schwarze2013-10-101-5/+20
| | | | | link supplementary information on mandoc and Alpine Linux port was upgraded to 1.12.2
* Printf size_t vars with %zu, not %ld;Ingo Schwarze2013-10-071-4/+4
| | | | | from Antonio Huete Jimenez <tuxillo at quantumachine dot net> via Franco Fichtner (both DragonFly).
* Put VERSION into config.h.Ingo Schwarze2013-10-061-1/+2
| | | | | | This makes life easier for downstream maintainers having more than one Makefile, for example DragonFly and FreeBSD. Suggested by Franco Fichtner <franco at lastsummer dot de>.
* We don't do hyphenation, but we allow breaking the line at hyphens that areIngo Schwarze2013-10-061-19/+61
| | | | | | | | | | | | already there in the middle of words. So far, we only allowed this on text lines. Now it turns out some macros allow this for their arguments, too, in particular .Nd and most of the .%? citation macros. Issue found by Franco Fichtner <franco at lastsummer dot de> while doing systematic groff-mandoc comparisons in the DragonFly base system, THANKS! While here, garbage collect two empty prevalidator function pointer lists and sort a couple of function declarations.
* Franco Fichtner moved DragonFly to 1.12.2.Ingo Schwarze2013-10-061-1/+1
|
* The .Lb arguments wants a "lib" prefix;Ingo Schwarze2013-10-062-2/+2
| | | | | from Sascha Wildner via Franco Fichtner (DragonFly); also fixing the same in the mdoc(7) example while i'm about it.
* If there is random stuff inside a .Bl block body before the first .It,Ingo Schwarze2013-10-062-26/+59
| | | | | | | | | | | do not throw a FATAL error and do not die, but just throw a WARNING and move the stuff out of the .Bl block. This bug felt completely 2008-ish; meanwhile, such bugs from the Kristaps-doesnt-like-syntax-errors-so-lets-just-give-up--Era are becoming rare, but this was one of the last survivors. Thanks to bentley@ for reminding me to finally fix this.
* Support simple numerical conditions.Ingo Schwarze2013-10-051-3/+91
| | | | | | | | | | | Original code from Christos Zoulas, NetBSD rev. 1.11-1.13, April 3, 2013. I tweaked the code as follows: * In roff_getnum(), don't skip a minus that isn't followed by a digit. * In roff_getop(), do not handle "!=", groff doesn't support it either. * In roff_evalcond(), treat negative numbers as false, like groff. Besides, make the interfaces of roff_getnum() and roff_getop() more similar to each other and simplify parts of the code a bit.
* ROFFRULE_ALLOW = 0, ROFFRULE_DENY = 1 was confusing,Ingo Schwarze2013-10-051-2/+2
| | | | | so exchange the two entries in enum roffrule; no functional change; from Christos Zoulas, NetBSD rev. 1.11, April 4, 2013.
* Avoid code duplication in roff_parseln() as suggested byIngo Schwarze2013-10-051-10/+5
| | | | | | Christos Zoulas in NetBSD rev. 1.11; i'm even going a step further and making this yet a bit shorter. No functional change.
* Expand references to number registers in exactly the same way asIngo Schwarze2013-10-052-33/+54
| | | | | | | | | | references to user-defined strings. While here, make number registers signed int, like in groff. Inspired by NetBSD roff.c rev. 1.8 and read.c rev. 1.7 written by Christos Zoulas on March 21, 2013, but implemented in a completely different way, without hacking into read.c, where this functionality really doesn't belong.
* Support setting arbitrary roff(7) number registers,Ingo Schwarze2013-10-054-46/+69
| | | | | | | | | | | | | | preserving read support for the ".nr nS" SYNOPSIS state register. Inspired by NetBSD roff.c rev. 1.18 (Christos Zoulas, March 21, 2013), but implemented differently. I don't want to have yet another different implementation of a hash table in mandoc - it would be the second one in roff.c alone and the fifth one in mandoc grand total. Instead, i designed and implemented roff_setreg() and roff_getreg() to be similar to roff_setstrn() and roff_getstrn(). Once we feel the need to optimize, we can introduce one common hash table implementation for everything in mandoc.
* sync with NetBSDIngo Schwarze2013-10-051-3/+9
|