summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Less misleading file names; ok kristaps@.Ingo Schwarze2011-11-135-9/+9
|
* another detail to implement;Ingo Schwarze2011-11-131-0/+3
| | | | long live the tricky exceptions!
* Fix two crashes that occur when walking very large (i.e. real-world) trees:Ingo Schwarze2011-11-131-4/+4
| | | | | | 1) Avoid excessive, needless recursion, lest you overflow the stack; 2) Close all dir file descriptors, lest you run out of descriptors. ok kristaps@
* Use proper infix expressions and provide a default. (Exact match.)Kristaps Dzonsons2011-11-091-11/+24
|
* Make apropos's lookup use a find(1)-like expression. I'll write more onKristaps Dzonsons2011-11-094-84/+146
| | | | | | | | | | this when it completes; this is to keep it in-tree. Right now this uses prefix notation. Ignore it. I'll make this into infix notation real soon. The goal of this (exprcomp and exprexec) is to have arbitrary logical expressions.
* Change getopt() to be more like schwarze@'s suggestions.Kristaps Dzonsons2011-11-092-43/+24
|
* Split apropos.c into db.c and apropos.h with simpler code (re-written, butKristaps Dzonsons2011-11-095-551/+860
| | | | | | | | | inspired by apropos.c and mandoc-tools' mandoc-cgi.c). This uses UTF-8 right now for its re-writing, but will soon accomodate for the regular suspects (this is a rather simple matter). I also introduce man.cgi (cgi.c), which is a standalone CGI that replaces mandoc-tools' mandoc.cgi. Right now it's just a framework.
* Const-ify some mchars arguments. I think these are non-const for historicalKristaps Dzonsons2011-11-083-10/+13
| | | | dumbness on my part.
* When the HEAD scope of .TP is broken by another block macro,Ingo Schwarze2011-11-077-44/+51
| | | | | | | | do not abort with a FATAL error, but report a report a WARNING, remove the broken .TP from the syntax tree, and prod on. Reported repeatedly by ports people, at least by brad@ and jeremy@. Also fixes rendition(4) in Xenocara. ok kristaps@
* Accomodate for \f(Cx formatting. Noted by Andreas Vogele, thanks!Kristaps Dzonsons2011-11-062-1/+10
|
* When .TH sets no data, leave the date field in the page footer blank,Ingo Schwarze2011-11-031-3/+5
| | | | | | do not use the current date. This removes a gratuitous output difference with respect to groff. ok kristaps@
* Correct .Eo spacing:Ingo Schwarze2011-11-032-2/+10
| | | | | no space between the delimiters and the enclosed text. The mdoc_html.c part was added by kristaps; ok kristaps@.
* Clean up the description of .Dt:Ingo Schwarze2011-11-011-36/+14
| | | | | | | | | | | - Volume and arch are both optional and not alternatives. - Zap verbiage about what's obvious from the synopsis. - For fixed argument strings, use .Cm, not .Ar. Using lots of input from jmc@. Also, state that the list of valid architectures varies by OS. If a downstream distribution wants to provide a specific list, maintaining a local patch is the way to go.
* Implement missing enclosures (Ao Do Qo Qq So Bro Brq)Ingo Schwarze2011-10-241-23/+23
| | | | | | | and enclosure-like in-line macros (Ad Cd Dv Er Ev Li Ms Tn). The .No macro works without explicit implementation. ok kristaps@
* Handle infinite recursion the same way as groff:Ingo Schwarze2011-10-241-8/+12
| | | | | | | When string expansion exceeds the recursion limit, drop the whole input line, instead of leaving just the string unexpanded. ok kristaps@
* Handle \N numbered character escapes the same way as groff:Ingo Schwarze2011-10-241-6/+22
| | | | | | | | | | | | | If \N is followed by a digit, ignore \N and the digit. If \N is followed by a non-digit, the next non-digit ends the character number; the two delimiters need not match. Kristaps calls that "gross, but not our fault". For now, i'm fixing \N only. Other escapes taking numeric arguments may or may not need similar handling, but \N is by far the most important for practical purposes. ok kristaps@
* Implement the missing text production macros (Bsx Bx Dx Fx Nx Ox Ux Bt Ud).Ingo Schwarze2011-10-201-18/+53
| | | | | Some macros work without explicit implementation (At Db Os St). ok kristaps@
* Fix mandoc_escape() function argument names. From a fix by AbhinavKristaps Dzonsons2011-10-181-3/+3
| | | | Upadhyay, thanks!
* Sync to groff, and add tier I and II NetBSD architectures.Ingo Schwarze2011-10-162-0/+55
| | | | ok kristaps@
* Remove a bunch of useless assignments,Ingo Schwarze2011-10-166-19/+15
| | | | | | | and assert that print_bvspace cannot be called on NULL pointers. No change in behaviour, none of these were bugs, but the code becomes easier to understand. Based on a clang report posted by joerg@; ok kristaps@.
* Always print <table> column widths in -T[x]html;Ingo Schwarze2011-10-092-72/+34
| | | | | if desired, they can be overridden in the CSS file. Suggested by kristaps@, and i always like to simplify code.
* A bit more precision and nicer wording in the descriptionsIngo Schwarze2011-10-091-7/+20
| | | | of -Ofragment and -Tman; using input from jmc@ and kristaps@.
* Make apropos results-gathering able to error out and clean up beforeKristaps Dzonsons2011-10-091-14/+16
| | | | making the utility exit non-zero.
* Remove some unnecessary variables and note that mchars_alloc never returnsKristaps Dzonsons2011-10-091-25/+7
| | | | NULL.
* Use a binary tree (for now, unbalanced) for deduping the records in theKristaps Dzonsons2011-10-091-5/+31
| | | | | | results array. This is much faster than the previous method, a linear search, at a small cost. Note that array offsets are used instead of storing the res pointer because we may realloc the results vector.
* The documented flags in mandocdb (-u, -d) were switched. Fix this.Kristaps Dzonsons2011-10-091-2/+2
|
* Critical fix in the new -Tman lookaside buffer code. Gah..VERSION.1.12.0Kristaps Dzonsons2011-10-081-1/+2
|
* Note volatility of apropos and cut out old news update.Kristaps Dzonsons2011-10-081-15/+3
|
* Tweak Makefile and add config.h to -Tman to allow cross-compiling onKristaps Dzonsons2011-10-082-4/+17
| | | | Windows (via MingW).
* Use `Mt' instead of `Aq' for email address.Kristaps Dzonsons2011-10-081-1/+2
|
* Get ready for version. I'm bumping the minor release to 1.12 becauseKristaps Dzonsons2011-10-082-4/+6
| | | | | this involves both a major functionality addition (-Tman), a new utility (apropos), and both apropos and mandocdb being built by default.
* Use mandoc_realloc() in apropos, as we're linking to libmandoc.a.Kristaps Dzonsons2011-10-081-4/+1
|
* Implement a basic -Tman `Rv', like `Ex'.Kristaps Dzonsons2011-10-081-2/+5
|
* Tidy up -Tman output. This has NO functional change: (1) introduced aKristaps Dzonsons2011-10-081-107/+175
| | | | | | | state struct instead of using global statics; (2) documented throughout the file; (3) fixed a situation of reaching past the end of our buffer for zero-length strings; (4) alpha-ordered the functions. (1) and (3) ok schwarze@. (2) and (4) are purely style and documentation.
* Lift hard-coded limit of results.Kristaps Dzonsons2011-10-071-5/+7
|
* Clean up file a bit: remove errx and err function pointers from theKristaps Dzonsons2011-10-071-117/+97
| | | | | | state struct (directly using fprintf and perror to do this); add some in-line documentation; remove state init and destroy directly to the main function.
* Make apropos and mandocdb build by default.Kristaps Dzonsons2011-10-062-7/+8
|
* Add more version notes to www.Kristaps Dzonsons2011-10-061-12/+27
|
* Nix end-of-line whitespace.Kristaps Dzonsons2011-10-061-1/+1
|
* Import apropos from mandoc-tools after inlining all source filesKristaps Dzonsons2011-10-063-1/+879
| | | | | | | (originally including extern.h, state.c, and sort.c). The apropos utility interfaces with the databases of mandocdb to provide semantic searching capabilities. It Works For Me, but will need lots of cleanup in the coming months.
* If -Tman is specified and input is -man, echo the preprocessed (`so'Kristaps Dzonsons2011-10-069-20/+141
| | | | | | | | | | | | | | replaced by file) input. This replaces earlier behaviour of doing nothing, which I found unexpected (mandoc should always output). This requires a buffer in read.c that saves the input lines before being parsed, with a special hook if `so' is invoked. This buffer is just flushed to output if -mman is the input. While mucking around doing this, I also alpha-ordered the mandoc.h functions. Ok schwarze@, with no screaming when the polished patch was published.
* Add -Ofragment mode to release notes.Kristaps Dzonsons2011-10-051-3/+4
|
* Add the -Ofragment option to -T[]x]html. This accomodates for embeddingKristaps Dzonsons2011-10-056-39/+53
| | | | | manual output in existing HTML or XHTML documents, e.g., when invoking mandoc from an SSI or CGI.
* Break schwarze@'s release notes into sections. Ok schwarze@.Kristaps Dzonsons2011-10-021-11/+17
|
* Make -T[x]html suppress output with \& (and similar zwsp points). ThisKristaps Dzonsons2011-10-021-6/+6
| | | | | fixes lynx's rendering of manuals with the \&, which were rendering as &#8203; in the text. Reported by Paul de Weerd, thanks!
* implement .Ap .Bd .Bo .Bq .D1 .Ic .Lp .Oo .Pf .Po .Ss .Sx .Sy .br .spIngo Schwarze2011-09-302-40/+134
| | | | | | | | implement .Bl -bullet add more information to the .TH line escape dots at the beginnings of lines add trailing newline character at the end of the file do not misinterpret the ROOT block as .Ap
* list the work done during s2k11Ingo Schwarze2011-09-271-0/+15
|
* even though .Bl is not callable, groff complains when it appearsIngo Schwarze2011-09-271-1/+1
| | | | | unescaped on a macro line, so lets just escape it; noticed by jmc@
* Reorganize part of the content:Ingo Schwarze2011-09-263-1067/+912
| | | | | | | | | | | | | 1) Move the LANGUAGE SYNTAX from mdoc(7) and man(7) to roff(7), it's common to both and it's actually roff syntax. 2) Move the MACRO SYNTAX down to the bottom, such that the less technical parts MANUAL STRUCTURE and MACRO OVERVIEW get to the top. Getting everything to again fit together after the reshuffling required various adjustments; also adjust and improve the DESCRIPTIONS while there. feedback and "go ahead" jmc@ kristaps@
* restore alphabetical order for the -Toutput list, and use a widthIngo Schwarze2011-09-261-33/+33
| | | | | specifier that makes it look nicer; from jmc@, ok kristaps@