OpenBSD CVS

CVS log for src/usr.bin/mandoc/Attic/man_action.c


[BACK] Up to [local] / src / usr.bin / mandoc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.29, Wed Dec 1 23:02:59 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.28: +1 -1 lines
FILE REMOVED

Merge man_action.c into man_validate.c.
Same as for mdoc_action.c, but much simpler.
Work by kristaps@, re-applying OpenBSD changes on top.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Nov 29 02:26:45 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +1 -4 lines
Diff to previous 1.27 (colored)

Now that we have proper .de support in the roff(7) library,
it is time to remove the .Sp, .Vb, and .Ve kludge
that was added to the man(7) library to build Perl manuals.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Nov 29 00:12:02 2010 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +2 -1 lines
Diff to previous 1.26 (colored)

Implement the roff .ft (change font) request for man(7).
Of course, we don't want to encourage low-level physical markup,
but pod2man(1) writes such requests, so Perl manuals contain them,
and some Xenocara and lots and lots of ports manuals use them as well.
In base and Xenocara, this will reduce mandoc -Tlint ERROR noise;
in ports, it will improve rendering of many manuals.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Oct 15 21:33:47 2010 UTC (13 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

Move tbl output from plain stdio to mandoc terminal output routines.
This fixes (1) all escape sequences and (2) some aspects of indentation.
Table column widths are still way off, though.
"move forward" deraadt@

Revision 1.25 / (download) - annotate - [select for diffs], Fri Oct 15 20:45:03 2010 UTC (13 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +17 -1 lines
Diff to previous 1.24 (colored)

Minimal glue to integrate tbl into the mandoc man(7) parser and formatter.
The output dosn't look nice yet, escape handling is still missing,
but will follow soon.
"move forward aggressively :-)" deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 25 18:05:54 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.23: +3 -2 lines
Diff to previous 1.23 (colored)

Sync to bsd.lv; in particular, pull in lots of bug fixes.
new features:
* support the .in macro in man(7)
* support minimal PDF output
* support .Sm in mdoc(7) HTML output
* support .Vb and .nf in man(7) HTML output
* complete the mdoc(7) manual
bug fixes:
* do not let mdoc(7) .Pp produce a newline before/after .Sh; reported by jmc@
* avoid double blank lines related to man(7) .sp and .br
* let man(7) .nf and .fi flush the line; reported by jsg@ and naddy@
* let "\ " produce a non-breaking space; reported by deraadt@
* discard \m colour escape sequences; reported by J.C. Roberts
* map undefined 1-character-escapes to the literal character itself
maintenance:
* express mdoc(7) arguments in terms of an enum for additional type-safety
* simplify mandoc_special() and a2roffdeco()
* use strcspn in term_word() in place of a manual loop
* minor optimisations in the -Tps and -Thtml formatting frontends

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jun 6 18:08:41 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +13 -4 lines
Diff to previous 1.22 (colored)

Merge bsd.lv release 1.10.0,
which is mostly the post-hackathon release,
bringing in the OpenBSD changes to bsd.lv,
but which also has a few additional minor fixes:

* .Lb is an in-line macro, not in_line_eoln
* .Bt, .Ud now warn when discarding arguments
* allow bad -man dates to flow verbatim into the front-ends
- so far all reported by Ulrich Spoerlein
* .Ar, .Fl and .Li starting with closing punctuation emit an empty element
* empty .Li macros print nothing, but may cause spacing
* proper EOS handling for .Bt, .Ex, .Rv, and .Ud.
* cleanup: collapse posts_xr into posts_wtext (which is the same)
* efficiency: very simple table lookup for roff.c

Revision 1.22 / (download) - annotate - [select for diffs], Mon May 24 13:42:58 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +4 -1 lines
Diff to previous 1.21 (colored)

plug second meta.source leak in .UT handling; from kristaps@

Revision 1.21 / (download) - annotate - [select for diffs], Mon May 24 12:38:08 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +4 -1 lines
Diff to previous 1.20 (colored)

fix memory leak for .AT; from kristaps@

Revision 1.20 / (download) - annotate - [select for diffs], Sun May 23 22:45:00 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +5 -4 lines
Diff to previous 1.19 (colored)

Unified error and warning message system for all of mandoc,
featuring three message levels, as agreed during the mandoc hackathon:
* FATAL parser failure, cannot produce any output from this input file:
  eventually, we hope to convert most of these to ERRORs.
* ERROR, meaning mandoc cannot cope fully with the input syntax and will
  probably lose information or produce structurally garbled output;
  it will try to produce output anyway but exit non-zero at the end,
  which is eventually intended to make the ports infrastructure happy.
* WARNING, meaning you should clean up the input file, but output
  is probably mostly OK, so this will not cause error-exit at the end.
This commit is mostly just converting the old system to the new one; before
the classification will become really reliable, we must check all messages.

In particular,
* set up a new central message string table in main.c
* drop the old message string tables from man.c and mdoc.c
* get rid of the piece-meal merr enums in libman and libmdoc
* reduce number of error/warning functions from 16 to 6 (still a lot...)

While here, handle a few problems more gracefully:
* allow .Rv and .Ex to work without a prior .Nm
* allow .An to ignore extra arguments
* allow undeclared columns in .Bl -column

Written by kristaps@.

Revision 1.19 / (download) - annotate - [select for diffs], Sun May 23 20:57:16 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.18: +84 -2 lines
Diff to previous 1.18 (colored)

implement .AT and .UC; from Joerg Sonnenberger

Revision 1.18 / (download) - annotate - [select for diffs], Thu May 20 00:58:02 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.17: +1 -4 lines
Diff to previous 1.17 (colored)

Support nested roff instructions:
* allow roff_parseln() to be re-run
* allow roff_parseln() to manipulate the line buffer offset
* support the offset in the man and mdoc libraries
* adapt .if, .ie, .el, .ig, .am* and .de* support
* interpret some instructions even in conditional-negative context
Coded by kristaps during the last day of the mandoc hackathon.

To avoid regressions in the OpenBSD tree, commit this together
with some small local additions:
* detect roff block end "\}" even on macro lines
* actually implement the ".if n" conditional
* ignore .ds, .rm and .tr in libroff

Also back my old .if/.ie/.el-handling out of libman, reverting:
man.h 1.15 man.c 1.25 man_macro.c 1.15 man_validate.c 1.19
man_action.c 1.15 man_term.c 1.28 man_html.c 1.9.

Revision 1.17 / (download) - annotate - [select for diffs], Sun May 16 00:54:03 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.16: +1 -22 lines
Diff to previous 1.16 (colored)

In theory, Kristaps never intended to write a roff parser,
but in practice, most real legacy man(7)uals are using so much
low level roff that we can't really get away without at least
partially handling some roff instructions.

As doing this in man(7) only has become messy and as even some
mdoc(7) pages need it, start a minimal partial roff preprocessor.
As a first step, move handling of .am[i], .de[i] and .ig there.
Do not use the roff preprocessor for new manuals!

Now that we have three main parser libraries - roff, man and mdoc -
each one having its own error handling is becoming messy, too.
Thus, start unifying message handling in one central place,
introducing a new generic function mmsg().

coded by kristaps@

Revision 1.16 / (download) - annotate - [select for diffs], Sat May 15 18:06:02 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.15: +7 -14 lines
Diff to previous 1.15 (colored)

removed restriction on integer manual sections in -man;
by kristaps@

Revision 1.15 / (download) - annotate - [select for diffs], Sun Apr 25 16:32:19 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.14: +4 -1 lines
Diff to previous 1.14 (colored)

Implement roff conditional instructions .if .ie .el, in man(7) only for now;
fixing OpenBSD::PackageName(3p) and friends for espie@.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Mar 26 01:22:05 2010 UTC (14 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.13: +28 -5 lines
Diff to previous 1.13 (colored)

merge 1.9.17, keeping local patches

* much improved pod2man support and low-level roff robustness
* have -Tlint imply -Wall and -fstrict
* use fewer macros and more enum in libman
* and various bug fixes

Revision 1.13 / (download) - annotate - [select for diffs], Thu Mar 25 23:23:01 2010 UTC (14 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.12: +3 -19 lines
Diff to previous 1.12 (colored)

merge 1.9.16, keeping local patches

This is mostly cleanup by kristaps@ after my rather hackish patch
to tolerate the non-text macros .na, .sp, .br in next-line scope;
plus some nesting issues fixed by him, all in man(7).
This survived a full  cd /usr/src; make man.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Mar 2 01:00:39 2010 UTC (14 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.11: +4 -1 lines
Diff to previous 1.11 (colored)

Accept the non-standard macros .Sp (similar to .sp)
and .Vb/.Ve (similar to .nf/.fi) in man(7) mode.
These are not intended to be used manually, but they allow us to
properly render man(7) code autogenerated by pod2man(1),
making Perl and OpenSSL happy in our tree.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Dec 23 22:30:17 2009 UTC (14 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +12 -30 lines
Diff to previous 1.10 (colored)

sync to 1.9.13: minor fixes:

correctness/functionality:
 - bugfix: properly ignore lines with only a dot in -man
 - bugfix: .Bl -ohang doesn't allow -width, warn about this
 - improve date string handling by new function mandoc_a2time
 - some HTML improvements
 - significant documentation additions in man.7 and mdoc.7

portability:
 - replace __dead by __attribute__((noreturn))
 - bugfix: correct .Dx rendering
 - some more library names for NetBSD

simplicity:
 - replace hand-rolled putchar(3)-loops by fwrite(3)
 - replace single-character printf(3) by putchar(3)

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 22 23:58:00 2009 UTC (14 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.9: +6 -11 lines
Diff to previous 1.9 (colored)

sync to 1.9.12, mostly portability and refactoring:

correctness/functionality:
- bugfix: do not die when overstep hits the right margin
- new option: -fign-escape
- and various HTML features

portability:
- replace bzero(3) by memset(3), which is ANSI C
- replace err(3)/warn(3) by perror(3)/exit(3), which is ANSI C
- iuse argv[0] instead of __progname
- add time.h to various files for FreeBSD compilation

simplicity:
- do not allocate header/footer data dynamically in *_term.c
- provide and use malloc frontends that error out on failure

for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/

Revision 1.9 / (download) - annotate - [select for diffs], Tue Oct 27 21:40:07 2009 UTC (14 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

sync to 1.9.11: adapt printing of dates to groff conventions,
NetBSD portability fixes and some minor bugfixes and feature enhancements;
also checked that my hyphenation code still works on top of this

Revision 1.8 / (download) - annotate - [select for diffs], Fri Sep 18 22:46:14 2009 UTC (14 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

sync to 1.9.2: Add .UC libman macro for compatibility, has no effect.
Correct .UC and .DT to not print their arguments.
Document that .UC and .DT should not be used.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Aug 22 23:17:40 2009 UTC (14 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +41 -11 lines
Diff to previous 1.6 (colored)

another large chunk of -man updates,
among others regarding .DT, .HP, .RS, .RE, .SH, .SS, and scoping,
now in sync vith release 1.9.1

Revision 1.6 / (download) - annotate - [select for diffs], Sat Aug 22 20:14:37 2009 UTC (14 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored)

Kristaps@ significantly overhauled libman.
I'm committing this in one large chunk because in contrast to -mdoc, -man
is mostly untested in OpenBSD anyway, so any fallout can be fixed in-tree.
Among others, improved support for .IP, .HP, and .TP.
Now in sync with release 1.9.0.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Aug 22 15:15:37 2009 UTC (14 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

sync to 1.8.4: support .sp in -man

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jun 23 22:05:42 2009 UTC (14 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.3: +7 -10 lines
Diff to previous 1.3 (colored)

sync to 1.7.20: error reporting functions for -man

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jun 18 23:34:53 2009 UTC (14 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +2 -3 lines
Diff to previous 1.2 (colored)

sync to 1.7.19: improved comment handling

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jun 14 23:00:57 2009 UTC (14 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +11 -13 lines
Diff to previous 1.1 (colored)

sync to 1.7.16: comments, whitespace and spelling fixes; no functional change

Revision 1.1 / (download) - annotate - [select for diffs], Mon Apr 6 20:30:40 2009 UTC (15 years, 1 month ago) by kristaps
Branch: MAIN

Initial check-in of mandoc for formatting manuals. ok deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.