OpenBSD CVS

CVS log for src/usr.bin/mandoc/Attic/apropos_db.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.12, Tue Dec 31 00:40:19 2013 UTC (10 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED

Replace the Berkeley-DB based mandocdb(8) by an SQLite3-based version,
aiming for more flexible development and optimization options.
Kristaps started this during the summer 2012, i did some very heavy
bugfixing during t2k13 and finally, during the last few days,
got it to a state where it is ripe for in-tree development.
Beware, neither the user interfaces nor the database formats
are expected to be stable just yet.

Will not be installed or activated until further discussion.
No functional change to mandoc(1).

"As long as it remains off until we decide the cost, fine." deraadt@

Revision 1.11 / (download) - annotate - [select for diffs], Sun Apr 15 11:54:47 2012 UTC (12 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.10: +18 -4 lines
Diff to previous 1.10 (colored)

Simplify by not pre-filtering the result vector for satisfied matches:
we can do this in the frontend; from kristaps@.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Dec 19 02:26:33 2011 UTC (12 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.9: +8 -2 lines
Diff to previous 1.9 (colored)

Improvements from kristaps@:
(1) Make the database format simpler and smaller by
- storing the file type as a single character and
- storing paths relative to the dir containing the database.
The latter allows to move trees around.
Both together typically save 15-25% of the index size.
(2) Make sure apropos(1) "any" really covers all search keys.
(3) Make manpath_parseline() static, drop manpath_parseconf() completely.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Nov 28 00:16:38 2011 UTC (12 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

Implement whatis(1) as a special apropos(1) mode as a part of
the mandoc(1) binary; not yet enabled for the general public.
Intended to replace src/usr.bin/whatis at a later time.
Coded by kristaps@, with a few tweaks by me.

To test this:
 $ mandocdb  # unless you have already done so earlier
 $ sudo ln -s /usr/bin/mandoc /usr/bin/whatis.m
 $ whatis.m mandoc apropos whatis
 $ whatis.m man

Revision 1.8 / (download) - annotate - [select for diffs], Sun Nov 27 23:11:32 2011 UTC (12 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

Save the manual type (mdoc, man, or cat) in the index file
of the mandoc databases, as suggested by kristaps@.
Given the well-structured code, this is surprisingly simple.

This changes the mandoc.index database format.
Run "sudo mandocdb" to regenerate your databases.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Nov 26 16:41:35 2011 UTC (12 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +8 -3 lines
Diff to previous 1.6 (colored)

Resync to bsd.lv, most code from kristaps@.
In particular, support the MANPATH environment variable
and don't confuse index record numbers when working with
multiple mandoc databases at once.
Besides, remove lots of gratuitious code and whitespace differences.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Nov 18 01:10:03 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.5: +4 -15 lines
Diff to previous 1.5 (colored)

Support parenthised subexpressions in apropos(1);
written by kristaps@, massive conflict resolution by me.
Lightly tested, putting it in for polishing it in-tree.
This concludes p2k11 for me, thanks robert@!

Revision 1.5 / (download) - annotate - [select for diffs], Thu Nov 17 14:52:32 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Minimal man.conf(5) _whatdb support for mandocdb(8) and apropos(1),
and add the standard options -M and -m to apropos(1).
Including a bugfix to prevent mandocdb(8) from leaking
database file descriptors.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Nov 16 13:23:27 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +4 -4 lines
Diff to previous 1.3 (colored)

Support multiple search terms, and logical operations -a and -o
to combine them.  The default remains -o; usual precedence applies.
No explicit grouping by parentheses yet.
from kristaps@

Revision 1.3 / (download) - annotate - [select for diffs], Sun Nov 13 11:07:10 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Rewrite the expression parser for a more concise syntax:

 apropos [search_type[,...]=]substring
 apropos search_type[,...][,i]~regex

... and expression evaluation must take the search type into account.

This allows to:
* drop the global -I option and
* drop the enum match, just using a boolean int.

"go ahead" kristaps@

Revision 1.2 / (download) - annotate - [select for diffs], Sun Nov 13 10:40:52 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +1 -15 lines
Diff to previous 1.1 (colored)

Inventing new keywords for mostly the same thing when a well-established
set of keywords already exists is a bad idea, so reuse the mdoc(7)
macro names as apropos(1) search types.  This is a gain in brevity
as well.  Some time ago, kristaps@ agreed in principle.

The search type bit field constants are used by both mandocdb(8) and
apropos(1) and should better stay in sync, so give them their own
header file.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 13 10:28:38 2011 UTC (12 years, 6 months ago) by schwarze
Branch: MAIN

Split the common code to be reused by other mandocdb clients,
for example the future man.cgi, out of apropos.c (which still
contains the apropos(1) main program, command line handling, and
the terminal output formatter) into apropos_db.{h,c} (which now
contains the database searching backend code).

... and actually commit the two new files.  Oops.

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.