CVS log for mandoc/Attic/man_hash.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.37, Sat Apr 29 12:45:41 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.36: +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.36 / (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.35: +7 -9 lines
Diff to previous 1.35 (colored)

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.35 / (download) - annotate - [selected], 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.34: +3 -1 lines
Diff to previous 1.34 (colored)

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

Revision 1.34 / (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.33: +7 -6 lines
Diff to previous 1.33 (colored) to selected 1.35 (colored)

modernize style: "return" is not a function

Revision 1.33 / (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.32: +5 -7 lines
Diff to previous 1.32 (colored) to selected 1.35 (colored)

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.32 / (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.31: +4 -5 lines
Diff to previous 1.31 (colored) to selected 1.35 (colored)

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.31 / (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.30: +4 -4 lines
Diff to previous 1.30 (colored) to selected 1.35 (colored)

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.30 / (download) - annotate - [select for diffs], Thu Apr 2 21:36:49 2015 UTC (8 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +2 -1 lines
Diff to previous 1.29 (colored) to selected 1.35 (colored)

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.29 / (download) - annotate - [select for diffs], Mon Dec 1 08:05:52 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3, VERSION_1_13_2
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored) to selected 1.35 (colored)

header cleanup:
* add missing forward declarations
* remove needless header inclusions
* some style unification

Revision 1.28 / (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_12_4, VERSION_1_12
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored) to selected 1.35 (colored)

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.27 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:04 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.26: +3 -4 lines
Diff to previous 1.26 (colored) to selected 1.35 (colored)

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

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

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.25 / (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.24: +6 -6 lines
Diff to previous 1.24 (colored) to selected 1.35 (colored)

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.24 / (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.23: +2 -1 lines
Diff to previous 1.23 (colored) to selected 1.35 (colored)

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.23 / (download) - annotate - [select for diffs], Sat Jul 31 23:52:58 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_10_9, VERSION_1_10_8, VERSION_1_10_7, VERSION_1_10_6, VERSION_1_10_10
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored) to selected 1.35 (colored)

Sync to OpenBSD: add missing Copyright years.
I checked that substantial changes were committed
to these files during these years.

Revision 1.22 / (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_5_PREPDF, VERSION_1_10_5, VERSION_1_10_4, VERSION_1_10_3, VERSION_1_10_2
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored) to selected 1.35 (colored)

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

Revision 1.21 / (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.20: +2 -1 lines
Diff to previous 1.20 (colored) to selected 1.35 (colored)

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.20 / (download) - annotate - [select for diffs], Sat May 15 22:49:58 2010 UTC (13 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.19: +5 -7 lines
Diff to previous 1.19 (colored) to selected 1.35 (colored)

Removed `.' entry from -man hashtable.

Revision 1.19 / (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.18: +2 -2 lines
Diff to previous 1.18 (colored) to selected 1.35 (colored)

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

Revision 1.18 / (download) - annotate - [select for diffs], Sat Mar 27 10:14:32 2010 UTC (14 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_23, VERSION_1_9_22, VERSION_1_9_21, VERSION_1_9_20, VERSION_1_9_19, VERSION_1_9_18
Changes since 1.17: +3 -2 lines
Diff to previous 1.17 (colored) to selected 1.35 (colored)

Lint fixes.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Mar 23 21:50:43 2010 UTC (14 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_17
Changes since 1.16: +41 -16 lines
Diff to previous 1.16 (colored) to selected 1.35 (colored)

libman using enum mant instead of #defines for macros.
Clean-ups, better documentation in man_hash.c.
Added extra space for "." in man_hash.c (unused for the time being).

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 1 17:14:28 2010 UTC (14 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_16, VERSION_1_9_15-pre2, VERSION_1_9_15
Changes since 1.15: +5 -1 lines
Diff to previous 1.15 (colored) to selected 1.35 (colored)

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

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 23 11:53:45 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_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.14: +3 -1 lines
Diff to previous 1.14 (colored) to selected 1.35 (colored)

FreeBSD compile fixes (uqs@spoerlein.net).

Revision 1.14 / (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_5
Changes since 1.13: +5 -4 lines
Diff to previous 1.13 (colored) to selected 1.35 (colored)

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

Revision 1.13 / (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.12: +3 -3 lines
Diff to previous 1.12 (colored) to selected 1.35 (colored)

Lintifications.

Revision 1.12 / (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.11: +10 -31 lines
Diff to previous 1.11 (colored) to selected 1.35 (colored)

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.11 / (download) - annotate - [select for diffs], Wed Aug 19 09:14:50 2009 UTC (14 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_2, VERSION_1_9_1
Changes since 1.10: +8 -8 lines
Diff to previous 1.10 (colored) to selected 1.35 (colored)

Added RS/RE macro pair (had to adjust closing rules, sec/ssec/rs/par).

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jun 18 10:32:00 2009 UTC (14 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_0, VERSION_1_8_5, VERSION_1_8_4, VERSION_1_8_3, VERSION_1_8_2, VERSION_1_8_1, VERSION_1_8_0, VERSION_1_7_24, VERSION_1_7_23, VERSION_1_7_22, VERSION_1_7_21, VERSION_1_7_20
Changes since 1.9: +8 -4 lines
Diff to previous 1.9 (colored) to selected 1.35 (colored)

Added -fno-ign-chars support to libman.
man_validate.c checks for non-tab/isprint words.
libman hashtable fixed (was ignoring .br).
Added ncount field to man_node, deprecating count() functions.
Documented use of tabs in man.7.

Revision 1.9 / (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_7_19
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.35 (colored)

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

Revision 1.8 / (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.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.35 (colored)

Fixed license email address.

Revision 1.7 / (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.6: +10 -12 lines
Diff to previous 1.6 (colored) to selected 1.35 (colored)

Using proper license template (const).

Revision 1.6 / (download) - annotate - [select for diffs], Sun Apr 5 16:34:22 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.5: +7 -7 lines
Diff to previous 1.5 (colored) to selected 1.35 (colored)

man(3) doesn't use err.h anymore.
Added .i to man(3).
Fixed up manuals.
Fixed up webpage.
Assertion fixes in man(3) (hashtable).
Fixed assertion for .IP in mandoc -man.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Apr 2 06:51:44 2009 UTC (14 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +46 -9 lines
Diff to previous 1.4 (colored) to selected 1.35 (colored)

mdoc_tokhash -> hash
Initial man hashtab (BROKEN).

Revision 1.4 / (download) - annotate - [select for diffs], Tue Mar 31 13:50:19 2009 UTC (15 years ago) by kristaps
Branch: MAIN
Changes since 1.3: +1 -5 lines
Diff to previous 1.3 (colored) to selected 1.35 (colored)

General clean-ups.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Mar 26 09:55:39 2009 UTC (15 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_5
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored) to selected 1.35 (colored)

Fixed reading whitespace for man.7 `.    TH'.
Documented this.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 23 15:41:09 2009 UTC (15 years ago) by kristaps
Branch: MAIN
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored) to selected 1.35 (colored)

-man linked to mandoc in documentation.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Mar 23 14:22:11 2009 UTC (15 years ago) by kristaps
Branch: MAIN
Diff to selected 1.35 (colored)

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