OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24, Sat Apr 29 12:43:55 2017 UTC (7 years ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +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.23 / (download) - annotate - [select for diffs], Mon Apr 24 23:06:09 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.22: +7 -7 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Fri Jul 15 18:02:32 2016 UTC (7 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.21: +3 -1 lines
Diff to previous 1.21 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Tue Oct 6 18:30:44 2015 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.20: +8 -7 lines
Diff to previous 1.20 (colored)

modernize style: "return" is not a function; ok cmp(1)

Revision 1.20 / (download) - annotate - [select for diffs], Sun Apr 19 13:59:37 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.19: +6 -6 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sat Apr 18 17:01:28 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.18: +4 -5 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Thu Apr 2 22:06:17 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (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.17 / (download) - annotate - [select for diffs], Thu Apr 2 21:03:18 2015 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Fri Nov 28 19:25:03 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.15: +1 -1 lines
Diff to previous 1.15 (colored)

Add some missing OpenBSD RCS markers
and a few missing <sys/types.h> inclusions; no code change.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Apr 20 16:44:44 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Fri Mar 21 22:17:01 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +1 -2 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Sun Sep 18 15:54:48 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.12: +13 -13 lines
Diff to previous 1.12 (colored)

sync to version 1.11.7 from kristaps@
main new feature: support the roff(7) .tr request
plus various bugfixes and some refactoring

regressions are so minor that it's better to get this in
and fix them in the tree

Revision 1.12 / (download) - annotate - [select for diffs], Sun Apr 24 16:22:02 2011 UTC (13 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

Merge version 1.11.1:
Again lots of cleanup and maintenance work by kristaps@.
- simplify error reporting: less function pointers, more mandoc_[v]msg
- main: split document parsing out of main.c into read.c
- roff, mdoc, man: improved recognition of control characters
- roff: better handling of if/else stack overflows
- roff: add some predefined strings for backward compatibility
- mdoc, man: empty sections are not errors
- mdoc: move delimiter handling to libmdoc
- some header restructuring and some minor features and fixes
This merge causes two minor regressions
that i will fix in separate commits right afterwards.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jul 31 23:42:04 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Correct Copyright lines in the rarely touched files:
* add missing years (only where substantial changes were committed)
* update Kristaps' email address in the remaining places
No code changes.

Revision 1.10 / (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.9: +2 -1 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Fri May 14 01:54:37 2010 UTC (14 years ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

merge 1.9.24, keeping local patches; some changes:
* preserve multiple consecutive space characters in input
* do not restrict .Cd and .Rv to certain sections (requested by Joerg)
* do not run lookup() on quoted words
* enum return types for mdoc_args and mdoc_argv
* fix auto-closing of LINK tag in -Txhtml (from Daniel Friesel)
* various lint and manual fixes

Revision 1.8 / (download) - annotate - [select for diffs], Fri Apr 2 12:39:47 2010 UTC (14 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

merge 1.9.22, keeping local patches
* convert mdoc tokens from #define to enum
* fix a segfault with .Xo/.Xc in explicit blocks
* Thorn is \*(Th, not \*(TH; noticed by Joerg Sonnenberger

Revision 1.7 / (download) - annotate - [select for diffs], Tue Mar 2 00:38:59 2010 UTC (14 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.6: +9 -9 lines
Diff to previous 1.6 (colored)

Proper inter-sentence spacing for mdoc(7).
When a text line or a non-block macro line in the source code ends
in any of ".!?", consider that an end of sentence (EOS).
This makes Jason's rule "new sentence, new line" even more important.
Let the parser detect the EOS and insert a token into the AST.
Let the -Tascii frontend render the EOS token as a double space before
the next word.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Sep 21 21:11:37 2009 UTC (14 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +38 -116 lines
Diff to previous 1.5 (colored)

sync to 1.9.5: lookup hashes are now static tables
shortening the code, and, according to kristaps@, speeding it up

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 9 18:01:15 2009 UTC (14 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +3 -1 lines
Diff to previous 1.4 (colored)

sync to 1.8.3: u_char needs <sys/types.h>;
found in FreeBSD by uqs at sporlein dot net

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 26 01:08:13 2009 UTC (14 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +48 -56 lines
Diff to previous 1.3 (colored)

sync to 1.8.1: modify macro hash tables to deal with lowercase macro names;
kristaps@ thinks the tables are too sparse and need more work later

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
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.2: +2 -2 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.