CVS log for mandoc/Attic/mdoc_hash.c

[BACK] Up to [cvsweb.bsd.lv] / mandoc

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.29, Sat Apr 29 12:45:42 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.28: +1 -1 lines
FILE REMOVED

Parser unification: use nice ohashes for all three request and macro tables;
no functional change, minus two source files, minus 200 lines of code.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Apr 24 23:06:18 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +7 -7 lines
Diff to previous 1.27 (unified)

Continue parser unification:
* Make enum rofft an internal interface as enum roff_tok in "roff.h".
* Represent mdoc and man macros in enum roff_tok.
* Make TOKEN_NONE a proper enum value and use it throughout.
* Put the prologue macros first in the macro tables.
* Unify mdoc_macroname[] and man_macroname[] into roff_name[].

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jul 15 18:03:45 2016 UTC (7 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.26: +3 -1 lines
Diff to previous 1.26 (unified)

add missing prototypes, no code change;
noticed by Christos Zoulas with -Wmissing-prototypes

Revision 1.26 / (download) - annotate - [select for diffs], Tue Oct 6 18:32:19 2015 UTC (8 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.25: +8 -7 lines
Diff to previous 1.25 (unified)

modernize style: "return" is not a function

Revision 1.25 / (download) - annotate - [select for diffs], Sun Apr 19 14:00:19 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (unified)

Decouple the token code for "no request or macro" from the individual
high-level parsers to allow further unification of functions that
only need to recognize this code, but that don't care about different
high-level macrosets beyond that.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Apr 18 17:01:58 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +4 -5 lines
Diff to previous 1.23 (unified)

Move mdoc_hash_init() and man_hash_init() to libmandoc.h
and call them from mparse_alloc() and choose_parser(),
preparing unified allocation of struct roff_man.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Apr 2 22:48:17 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Thu Apr 2 21:36:50 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Sun Aug 10 23:54:41 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3, VERSION_1_13_2, VERSION_1_12_4, VERSION_1_12
Changes since 1.20: +1 -3 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:05 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.19: +3 -2 lines
Diff to previous 1.19 (unified)

KNF: case (FOO):  ->  case FOO:, remove /* LINTED */ and /* ARGSUSED */,
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change

Revision 1.19 / (download) - annotate - [select for diffs], Sun Mar 23 11:25:26 2014 UTC (10 years ago) by schwarze
Branch: MAIN
Changes since 1.18: +1 -2 lines
Diff to previous 1.18 (unified)

The files mandoc.c and mandoc.h contained both specialised low-level
functions used for multiple languages (mdoc, man, roff), for example
mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary
functions.  Split the auxiliaries out into their own file and header.
While here, do some #include cleanup.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jul 24 18:15:14 2011 UTC (12 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_3, VERSION_1_12_2, VERSION_1_12_1, VERSION_1_12_0, VERSION_1_11_7, VERSION_1_11_6, VERSION_1_11_5
Changes since 1.17: +8 -8 lines
Diff to previous 1.17 (unified)

Scary-looking but otherwise harmless changes allow me to build for Windows.
That is to say, with mingw32.  This amounts to the following:

 (1) break compat.c into compat_strlcpy.c and compat_strlcat.c
 (2) add compat_getsubopt.c (from OpenBSD) and test-getsubopt.c
 (3) add test-strptime.c for HAVE_STRPTIME
 (4) add ifdef bits here and there, where necessary
 (5) remove some harmless unportable stuff (u_char, localtime_r)

I've added the appropriate mdocml.zip target to the Makefile, too.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Mar 22 14:33:05 2011 UTC (13 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_4, VERSION_1_11_3, VERSION_1_11_2, VERSION_1_11_1
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (unified)

libmdoc.h and libman.h were including mdoc.h and man.h, respectively.
Don't have them do that (includes in header files = faugh), and have
individual files directly include these files.

Revision 1.16 / (download) - annotate - [select for diffs], Sat Jun 19 20:46:28 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_9, VERSION_1_10_8, VERSION_1_10_7, VERSION_1_10_6, VERSION_1_10_5_PREPDF, VERSION_1_10_5, VERSION_1_10_4, VERSION_1_10_3, VERSION_1_10_2, VERSION_1_10_10
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (unified)

Churn as I finish email address migration kth.se -> bsd.lv.

Revision 1.15 / (download) - annotate - [select for diffs], Mon May 17 22:11:42 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_1
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (unified)

Enable the unified error/warning enumeration in mandoc.h that's
stringified in main.c.

Allow `An' to handle an argument and child (with a warning).

Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a
warning).

Allow inconsistent column syntax to only raise a warning.

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 8 07:30:19 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_25, VERSION_1_9_24
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (unified)

Lint fixes (type-safety for enums via -cefuh).

Revision 1.13 / (download) - annotate - [select for diffs], Wed Mar 31 07:13:53 2010 UTC (14 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_23, VERSION_1_9_22
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (unified)

Macro types enum-ated (enum mdoct) (for easier debugging in gdb of "tok" values).
Initial check-in of Ingo Schwarze's patch for Xo/Xc handling (in blocks ifdef'd "UGLY").
Put Oc-close-Op parts into UGLY ifdef blocks.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jan 1 17:14:29 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_21, VERSION_1_9_20, VERSION_1_9_19, VERSION_1_9_18, VERSION_1_9_17, VERSION_1_9_16, VERSION_1_9_15-pre2, VERSION_1_9_15
Changes since 1.11: +5 -1 lines
Diff to previous 1.11 (unified)

Big check-in of compatibility layer.  This should work on most major architectures. Thanks to Joerg Sonnenberger.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Sep 17 07:41:28 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_9, VERSION_1_9_8, VERSION_1_9_7, VERSION_1_9_6, VERSION_1_9_5, VERSION_1_9_15-pre1, VERSION_1_9_14, VERSION_1_9_13, VERSION_1_9_12, VERSION_1_9_11, VERSION_1_9_10
Changes since 1.10: +5 -4 lines
Diff to previous 1.10 (unified)

ascii_xxx -> chars_xxx (intended to hold more than just ascii encoding).
More html work.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Sep 16 20:49:06 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (unified)

Lintifications.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Sep 16 14:40:56 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.8: +34 -113 lines
Diff to previous 1.8 (unified)

Lookup hashes are now static tables, ordered first-level by second character, then randomly along a chain.  Improves performance by a small fraction and considerably cleans up hash sources.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Jul 20 20:49:22 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_2, VERSION_1_9_1, VERSION_1_9_0, VERSION_1_8_5, VERSION_1_8_4, VERSION_1_8_3
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (unified)

FreeBSD includes fix (uqs@sporlein.net).

Revision 1.7 / (download) - annotate - [select for diffs], Fri Jul 17 11:00:18 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_2, VERSION_1_8_1
Changes since 1.6: +4 -1 lines
Diff to previous 1.6 (unified)

Fixed hash assertion.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 17 10:56:27 2009 UTC (14 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.5: +47 -58 lines
Diff to previous 1.5 (unified)

Hash now accepts `br'.  This needs work (way to sparse).

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jun 16 19:55:28 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_0, VERSION_1_7_24, VERSION_1_7_23, VERSION_1_7_22, VERSION_1_7_21, VERSION_1_7_20, VERSION_1_7_19
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (unified)

Removed MAN___: moved MAN_br to its index (comments not passed into parser).
Fix: hashtable not fully formed after removal of MDOC___.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 10 20:18:43 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_17, VERSION_1_7_16, VERSION_1_7_15, VERSION_1_7_14
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (unified)

Fixed license email address.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Apr 12 19:45:26 2009 UTC (14 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_13
Changes since 1.2: +10 -12 lines
Diff to previous 1.2 (unified)

Using proper license template (const).

Revision 1.2 / (download) - annotate - [select for diffs], Thu Apr 2 06:51:44 2009 UTC (14 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_12, VERSION_1_7_10, OPENBSD_CHECKIN
Changes since 1.1: +5 -6 lines
Diff to previous 1.1 (unified)

mdoc_tokhash -> hash
Initial man hashtab (BROKEN).

Revision 1.1 / (download) - annotate - [select for diffs], Mon Mar 23 14:22:11 2009 UTC (15 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_5

First addition of -man macro support.
Abstraction of mdoc.

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.




CVSweb