Up to [cvsweb.bsd.lv] / mandoc
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.34 / (download) - annotate - [select for diffs], Thu Apr 14 16:43:43 2022 UTC (2 years ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.33: +12 -1 lines
Diff to previous 1.33 (unified) to selected 1.15 (unified)
support for hunting memory leaks; designed and written last autumn, polished today
Revision 1.33 / (download) - annotate - [select for diffs], Sun Mar 3 11:01:15 2019 UTC (5 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6,
VERSION_1_14_5
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (unified) to selected 1.15 (unified)
add forgotten mparse options to two rarely used programs
Revision 1.32 / (download) - annotate - [select for diffs], Sun Dec 30 00:49:54 2018 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +8 -13 lines
Diff to previous 1.31 (unified) to selected 1.15 (unified)
Cleanup, no functional change: The struct roff_man used to be a bad mixture of internal parser state and public parsing results. Move the public results to the parsing result struct roff_meta, which is already public. Move the rest of struct roff_man to the parser-internal header roff_int.h. Since the validators need access to the parser state, call them from the top level parser during mparse_result() rather than from the main programs, also reducing code duplication. This keeps parser internal state out of thee main programs (five in mandoc portable) and out of eight formatters.
Revision 1.31 / (download) - annotate - [select for diffs], Fri Dec 14 01:18:25 2018 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.30: +2 -3 lines
Diff to previous 1.30 (unified) to selected 1.15 (unified)
Major cleanup; may imply minor changes in edge cases of error reporting. Finally, drop support for the run-time configurable mandocmsg() callback. It was over-engineered from the start, never used for anything in a decade, and repeatedly caused maintenance headaches. Consolidate reporting infrastructure into two files, mandoc.h and mandoc_msg.c, mopping up the bits and pieces that were scattered around main.c, read.c, mandoc_parse.h, libmandoc.h, the prototypes of four parsing-related functions, and both parser structs.
Revision 1.30 / (download) - annotate - [select for diffs], Thu Dec 13 11:55:46 2018 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (unified) to selected 1.15 (unified)
Cleanup, no functional change: Split the top level parser interface out of the utility header mandoc.h, into a new header mandoc_parse.h, for use in the main program and in the main parser only. Move enum mandoc_os into roff.h because struct roff_man is the place where it is stored. This allows removal of mandoc.h from seven files in low-level parsers and in formatters.
Revision 1.29 / (download) - annotate - [select for diffs], Sat Jun 24 14:38:32 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4,
VERSION_1_14_3,
VERSION_1_14_2
Changes since 1.28: +4 -3 lines
Diff to previous 1.28 (unified) to selected 1.15 (unified)
Split -Wstyle into -Wstyle and the even lower -Wbase, and add -Wopenbsd and -Wnetbsd to check conventions for the base system of a specific operating system. Mark operating system specific messages with "(OpenBSD)" at the end. Please use just "-Tlint" to check base system manuals (defaulting to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the manuals of portable software projects you maintain that are not part of OpenBSD base, to avoid bogus recommendations about base system conventions that do not apply. Issue originally reported by semarie@, solution using an idea from tedu@, discussed with jmc@ and jca@.
Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 10 13:47:00 2017 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1,
VERSION_1_13
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (unified) to selected 1.15 (unified)
unify names of AST node flags; no change of cpp output
Revision 1.27 / (download) - annotate - [select for diffs], Sat Jul 9 15:24:19 2016 UTC (7 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (unified) to selected 1.15 (unified)
getopt(3) is declared in <unistd.h>, and <getopt.h> is not needed; from Joerg Sonnenberger via Thomas Klausner, NetBSD.
Revision 1.26 / (download) - annotate - [select for diffs], Fri Jan 8 02:53:13 2016 UTC (8 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (unified) to selected 1.15 (unified)
Simplify the mparse_open() interface. Just return the file descriptor or -1 on error; there is just one kind of error anyway. Suggested by Christos Zoulas (NetBSD).
Revision 1.25 / (download) - annotate - [select for diffs], Fri Jan 8 02:13:39 2016 UTC (8 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (unified) to selected 1.15 (unified)
It was very surprising that a function called mparse_readfd() closed the file descriptor passed to it after completing its work, in particular considering the fact that it required its callers to call open(2) or mparse_open() beforehand. Change mparse_readfd() to not call close(2) and change the callers to call close(2) afterwards, more or less bringing open and close to the same level of the code and making review easier. Note that man.cgi(8) already did that, even though it was wrong in the past. Small restructuring suggested by Christos Zoulas (NetBSD).
Revision 1.24 / (download) - annotate - [select for diffs], Thu Oct 22 22:06:43 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +4 -2 lines
Diff to previous 1.23 (unified) to selected 1.15 (unified)
use the new function man_validate() here, too
Revision 1.23 / (download) - annotate - [select for diffs], Tue Oct 20 02:01:31 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (unified) to selected 1.15 (unified)
In order to become able to generate syntax tree nodes on the roff(7) level, validation must be separated from parsing and rewinding. This first big step moves calling of the mdoc(7) post_*() functions out of the parser loop into their own mdoc_validate() pass, while using a new mdoc_state() module to make syntax tree state handling available to both the parser loop and the validation pass.
Revision 1.22 / (download) - annotate - [select for diffs], Tue Oct 13 22:59:54 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +4 -5 lines
Diff to previous 1.21 (unified) to selected 1.15 (unified)
Major character table cleanup: * Use ohash(3) rather than a hand-rolled hash table. * Make the character table static in the chars.c module: There is no need to pass a pointer around, we most certainly never want to use two different character tables concurrently. * No need to keep the characters in a separate file chars.in; that merely encourages downstream porters to mess with them. * Sort the characters to agree with the mandoc_chars(7) manual page. * Specify Unicode codepoints in hex, not decimal (that's the detail that originally triggered this patch). No functional change, minus 100 LOC, and i don't see a performance change.
Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 6 18:32:19 2015 UTC (8 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (unified) to selected 1.15 (unified)
modernize style: "return" is not a function
Revision 1.20 / (download) - annotate - [select for diffs], Sat Apr 18 17:53:21 2015 UTC (9 years ago) by schwarze
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (unified) to selected 1.15 (unified)
Delete the wrapper functions mdoc_meta(), man_meta(), mdoc_node(), man_node() from the mandoc(3) semi-public interface and the internal wrapper functions print_mdoc() and print_man() from the HTML formatters. Minus 60 lines of code, no functional change.
Revision 1.19 / (download) - annotate - [select for diffs], Sat Apr 18 16:34:25 2015 UTC (9 years ago) by schwarze
Branch: MAIN
Changes since 1.18: +7 -8 lines
Diff to previous 1.18 (unified) to selected 1.15 (unified)
Profit from the unified struct roff_man and reduce the number of arguments of mparse_result() by one. No functional change. Written on the ICE Bruxelles-Koeln on the way back from p2k15.
Revision 1.18 / (download) - annotate - [select for diffs], Sat Apr 18 16:06:39 2015 UTC (9 years ago) by schwarze
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (unified) to selected 1.15 (unified)
Replace the structs mdoc and man by a unified struct roff_man. Almost completely mechanical, no functional change. Written on the train from Exeter to London returning from p2k15.
Revision 1.17 / (download) - annotate - [select for diffs], Thu Apr 2 22:48:17 2015 UTC (9 years ago) by schwarze
Branch: MAIN
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (unified) to selected 1.15 (unified)
Second step towards parser unification: Replace struct mdoc_node and struct man_node by a unified struct roff_node. To be able to use the tok member for both mdoc(7) and man(7) without defining all the macros in roff.h, sacrifice a tiny bit of type safety and make tok an int rather than an enum. Almost mechanical, no functional change. Written on the Eurostar from Bruxelles to London on the way to p2k15.
Revision 1.16 / (download) - annotate - [select for diffs], Thu Apr 2 21:36:49 2015 UTC (9 years ago) by schwarze
Branch: MAIN
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (unified)
First step towards parser unification: Replace enum mdoc_type and enum man_type by a unified enum roff_type. Almost mechanical, no functional change. Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
Revision 1.15 / (download) - annotate - [selected], Tue Feb 10 08:05:30 2015 UTC (9 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.14: +7 -7 lines
Diff to previous 1.14 (unified)
trim trailing white space, no code change; from Svyatoslav Mishyn <juef at openmailboxd dot org>, Crux Linux
Revision 1.14 / (download) - annotate - [select for diffs], Sat Feb 7 06:28:08 2015 UTC (9 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +5 -4 lines
Diff to previous 1.13 (unified) to selected 1.15 (unified)
be more careful about argc == 0
Revision 1.13 / (download) - annotate - [select for diffs], Thu Jan 15 04:26:39 2015 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +9 -9 lines
Diff to previous 1.12 (unified) to selected 1.15 (unified)
Fatal errors no longer exist. If a file can be opened, mandoc will produce some output; at worst, the output may be almost empty. Simplifies error handling and frees a message type for future use.
Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 28 17:36:19 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.11: +5 -2 lines
Diff to previous 1.11 (unified) to selected 1.15 (unified)
Make the character table available to libroff so it can check the validity of character escape names and warn about unknown ones. This requires mchars_spec2cp() to report unknown names again. Fortunately, that doesn't require changing the calling code because according to groff, invalid character escapes should not produce output anyway, and now that we warn about them, that's fine.
Revision 1.11 / (download) - annotate - [select for diffs], Sun Aug 10 23:54:41 2014 UTC (9 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_4,
VERSION_1_12
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (unified) to selected 1.15 (unified)
Get rid of HAVE_CONFIG_H, it is always defined; idea from libnbcompat. Include <sys/types.h> where needed, it does not belong in config.h. Remove <stdio.h> from config.h; if it is missing somewhere, it should be added, but i cannot find a *.c file where it is missing.
Revision 1.10 / (download) - annotate - [select for diffs], Wed Mar 19 22:20:43 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (unified) to selected 1.15 (unified)
Without the MPARSE_SO option, if the file contains nothing but a single .so request, do not read the file pointed to, but instead let mparse_result() provide the file name pointed to as a return value. To be used by makewhatis(8) in the future.
Revision 1.9 / (download) - annotate - [select for diffs], Wed Mar 19 22:05:10 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (unified) to selected 1.15 (unified)
cope with mparse_alloc() interface change
Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 5 20:41:04 2014 UTC (10 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (unified) to selected 1.15 (unified)
Cope with mparse_alloc() interface change.
Revision 1.7 / (download) - annotate - [select for diffs], Thu May 31 22:27:14 2012 UTC (11 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_3,
VERSION_1_12_2
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (unified) to selected 1.15 (unified)
catch up with the changed interface of mparse_alloc(), see mandoc.h rev 1.100
Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 1 22:25:53 2011 UTC (12 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_1,
VERSION_1_12_0,
VERSION_1_11_7
Changes since 1.5: +16 -4 lines
Diff to previous 1.5 (unified) to selected 1.15 (unified)
Finishing touches on demandoc. It now backs over ending punctuation as well as leading punctuation. Again, this isn't the same as deroff (which uses, I think, some punctuation as delimiters), but it's easier to explain and simpler to audit.
Revision 1.5 / (download) - annotate - [select for diffs], Thu Sep 1 22:09:50 2011 UTC (12 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +57 -2 lines
Diff to previous 1.4 (unified) to selected 1.15 (unified)
Make `-w' mode work much better. This is INCREDIBLY poorly specified in any other deroff manual, and as I don't think anybody actually uses deroff, I don't feel compelled to research its behaviour too much and can just do what's logical.
Revision 1.4 / (download) - annotate - [select for diffs], Thu Sep 1 20:55:50 2011 UTC (12 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.3: +40 -30 lines
Diff to previous 1.3 (unified) to selected 1.15 (unified)
Have demandoc throw away deroff's flags.
Revision 1.3 / (download) - annotate - [select for diffs], Thu Sep 1 10:49:13 2011 UTC (12 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.2: +3 -4 lines
Diff to previous 1.2 (unified) to selected 1.15 (unified)
Lint checks over demandoc.
Revision 1.2 / (download) - annotate - [select for diffs], Thu Sep 1 10:47:47 2011 UTC (12 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (unified) to selected 1.15 (unified)
Allow compilation on OpenBSD.
Revision 1.1 / (download) - annotate - [select for diffs], Thu Sep 1 10:46:28 2011 UTC (12 years, 7 months ago) by kristaps
Branch: MAIN
Diff to selected 1.15 (unified)
Add demandoc utility, a replacement for deroff.