summaryrefslogtreecommitdiffstats
path: root/mdoc_man.c
Commit message (Collapse)AuthorAgeFilesLines
...
* basic implementation of -Tman .Bl -tagIngo Schwarze2012-07-101-5/+5
| | | | | while here, do some minor outflags cleanup OpenBSD rev. 1.30
* multiple fixes to -Tascii .HP rendering:Ingo Schwarze2012-07-101-8/+22
| | | | | | | | | | | | | | | | | | * do not add an excessive blank line before the block * in literal mode, start a new line after the tag getting this to work requires some general (print_man_node) fixes: * in literal mode, break the output line at the end of each input line, not just after those input lines ending in text * but don't break it when there was no output on the line * and adjust the margins after the .HP tag these general fixes require an adjustment to -Tascii .TP rendering: * set up NOBREAK mode before the body, not after the head finally, based on all this, implement -Tman .Bl -hang in terms of .HP OpenBSD rev. 1.84 and 1.29, respectively
* * implement -Tman .Bl -item -inset -diag -ohang -dash -hyphen -enum .ItIngo Schwarze2012-07-101-8/+121
| | | | | | | | | | * fix -Tman .Bl -bullet .It * adjust the -Tascii .Bl -bullet -dash -hyphen .It default and minimum width to new groff standards, it changed from 4n (in groff 1.15) to 2n (in groff 1.21) * same for -Tascii -enum, it changed from 5n to 2n * use -hang formatting for -Tascii -enum -width 2n * for -Tascii -enum, the default is -width 3n
* fix -Tascii .Fd line breakingIngo Schwarze2012-07-091-3/+22
| | | | | and implement -Tman .Fd OpenBSD rev. 1.27 and 1.143, respectively
* implement -Tman .Eo and .Ec; OpenBSD rev. 1.26Ingo Schwarze2012-07-091-3/+12
|
* Implement -Tman .Bf.Ingo Schwarze2012-07-091-5/+41
| | | | | | | | To get the spacing right, * avoid man(7) code line breaks at places where no spacing is allowed * allow spacing right after .Sm on * allow spacing after empty .Fl at the end of an input line OpenBSD rev. 1.25
* fix -Tman font handling for:Ingo Schwarze2012-07-091-66/+146
| | | | | | .Ad .Ar .Cd .Cm .Dv .Em .Er .Ev .Fa .Fl .Fn .Fo .Ft .Ic .In .Lk .Li .Ms .Mt .Nm .Pa .Sx .Sy .Tn .Va .Vt OpenBSD rev. 1.24
* implement -Tman .No and .Mt; OpenBSD rev. 1.23Ingo Schwarze2012-07-091-14/+26
|
* fix .Lk for -Tascii and implement it for -TmanIngo Schwarze2012-07-081-1/+30
| | | | OpenBSD rev. 1.22 and 1.142, respectively
* fix vertical spacing for -Tman SYNOPSIS .Fn .Fo .Ft .In .Nm .Va .VtIngo Schwarze2012-07-081-11/+64
| | | | OpenBSD rev. 1.21
* implement -Tman .AnIngo Schwarze2012-07-081-1/+29
| | | | | also reset -[no]split mode at .Sh AUTHORS in -Tascii OpenBSD rev. 1.20 and 1.141, respectively
* Add flags to insert a .sp or .br request before the next output,Ingo Schwarze2012-07-081-49/+29
| | | | | | shortening some frequent idioms and preparing for better vertical spacing in the SYNOPSIS; no functional change intended. OpenBSD rev. 1.19
* Instead of adding one integer variable for each global boolean output flagIngo Schwarze2012-07-081-180/+176
| | | | | | | and passing around a structure containing them into each and every function, just use a single static bitfield. In preparation for adding more output flags to support more features. OpenBSD rev. 1.18
* implement -Tman .VaIngo Schwarze2012-07-081-2/+2
| | | | | and fix -Tman .Vt for the non-SYNOPSIS case OpenBSD rev. 1.17
* implement -Tman .Vt; OpenBSD rev. 1.15 and 1.16Ingo Schwarze2012-07-081-1/+41
|
* Basic implementation of -Tman .Fo and .Fa;Ingo Schwarze2012-07-081-16/+81
| | | | | | | again, some blank lines still missing from the output. While here, remove the trailing semicolon from .Fn when outside .Sh SYNOPSIS. OpenBSD rev. 1.14
* rudimentary support for -Tman .Ft and .Fn;Ingo Schwarze2012-07-071-2/+48
| | | | | some blank lines are still missing from the output OpenBSD rev. 1.13
* basic support for -Tman .In; OpenBSD rev. 1.12Ingo Schwarze2012-07-071-1/+32
|
* after .Lb in library section, break the line in the final outputIngo Schwarze2012-07-071-1/+13
|
* implement -Tman .Bk; OpenBSD rev. 1.10Ingo Schwarze2012-07-071-4/+35
|
* implement -Tman .Sm; OpenBSD rev. 1.9Ingo Schwarze2012-07-071-3/+19
|
* implement -Tman .Bd -offset and -compact; OpenBSD rev. 1.8Ingo Schwarze2012-07-071-1/+35
|
* minor -mdoc -Tman fixesIngo Schwarze2012-07-071-2/+9
| | | | | | | | | * right after .Ns, avoid breaking the line in man code * after .Fl without arguments, do not insert a blank into man code * before each .Nm in .Sh SYNOPSIS, insert a .br into man code * skip .Pp arguments, don't copy them to man code OpenBSD rev. 1.7
* 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@
* 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@
* Tweak Makefile and add config.h to -Tman to allow cross-compiling onKristaps Dzonsons2011-10-081-0/+4
| | | | Windows (via MingW).
* 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.
* If -Tman is specified and input is -man, echo the preprocessed (`so'Kristaps Dzonsons2011-10-061-0/+8
| | | | | | | | | | | | | | 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.
* implement .Ap .Bd .Bo .Bq .D1 .Ic .Lp .Oo .Pf .Po .Ss .Sx .Sy .br .spIngo Schwarze2011-09-301-40/+133
| | | | | | | | 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
* do not assign pointers to literal stringsIngo Schwarze2011-09-201-2/+2
| | | | | to variables that might be changed; from kristaps@
* Initial, incomplete support for -TmanIngo Schwarze2011-09-171-0/+426
to convert mdoc(7) documents to the man(7) language. This is work in progress and will be developed in tree. It does already handle the cat(1) manual, but will hardly handle all your fancy manuals yet. go ahead kristaps@ jmc@ millert@ deraadt@