Module Name: src Committed By: abhinav Date: Tue May 24 18:06:42 UTC 2016
Modified Files: src/usr.sbin/makemandb: apropos-utils.3 close_db.3 init_db.3 run_query.3 Removed Files: src/usr.sbin/makemandb: run_query_html.3 run_query_pager.3 Log Message: Bring man pages in sync with reality. Remove man pages run_query_html.3 and run_query_pager.3 as the corresponding functions have been removed from apropos-utils.c Ok by wiz@ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/makemandb/apropos-utils.3 \ src/usr.sbin/makemandb/run_query.3 cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/makemandb/close_db.3 cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makemandb/init_db.3 cvs rdiff -u -r1.2 -r0 src/usr.sbin/makemandb/run_query_html.3 \ src/usr.sbin/makemandb/run_query_pager.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/makemandb/apropos-utils.3 diff -u src/usr.sbin/makemandb/apropos-utils.3:1.3 src/usr.sbin/makemandb/apropos-utils.3:1.4 --- src/usr.sbin/makemandb/apropos-utils.3:1.3 Tue Apr 2 18:35:28 2013 +++ src/usr.sbin/makemandb/apropos-utils.3 Tue May 24 18:06:42 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: apropos-utils.3,v 1.3 2013/04/02 18:35:28 wiz Exp $ +.\" $NetBSD: apropos-utils.3,v 1.4 2016/05/24 18:06:42 abhinav Exp $ .\" .\" Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com> .\" All rights reserved. @@ -29,7 +29,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 2, 2013 +.Dd May 23, 2016 .Dt APROPOS-UTILS 3 .Os .Sh NAME @@ -38,7 +38,7 @@ .Sh SYNOPSIS .In apropos-utils.h .Ft sqlite3 * -.Fn init_db "int db_flag" +.Fn init_db "mandb_access_mode db_flag" "const char * manconf" .Ft void .Fn close_db "sqlite3 *db" .Ft int @@ -56,6 +56,6 @@ develop applications on top of it. .Sh SEE ALSO .Xr close_db 3 , .Xr init_db 3 , -.Xr run_query 3 , +.Xr run_query 3 .Sh AUTHORS .An Abhinav Upadhyay Index: src/usr.sbin/makemandb/run_query.3 diff -u src/usr.sbin/makemandb/run_query.3:1.3 src/usr.sbin/makemandb/run_query.3:1.4 --- src/usr.sbin/makemandb/run_query.3:1.3 Sat Oct 18 08:33:31 2014 +++ src/usr.sbin/makemandb/run_query.3 Tue May 24 18:06:42 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: run_query.3,v 1.3 2014/10/18 08:33:31 snj Exp $ +.\" $NetBSD: run_query.3,v 1.4 2016/05/24 18:06:42 abhinav Exp $ .\" .\" Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com> .\" All rights reserved. @@ -29,7 +29,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 3, 2011 +.Dd May 23, 2016 .Dt RUN_QUERY 3 .Os .Sh NAME @@ -40,7 +40,7 @@ and process the results in a callback fu .Sh SYNOPSIS .In apropos-utils.h .Ft int -.Fn run_query "sqlite3 *db" "const char **snippet_args" "query_args *args" +.Fn run_query "sqlite3 *db" "query_format fmt" "query_args *args" .Sh DESCRIPTION The .Fn run_query @@ -60,32 +60,16 @@ function takes following arguments: .It Fa sqlite3 *db Handle to the database connection which can be obtained by calling .Fn init_db . -.It Fa const char *snippet_args -An array of strings which specify the -delimiters to the matching text in snippet. -It is an optional argument and caller can supply a -.Dv NULL -value for it, in which case, a default value of -.Brq \&"\&", \&"\&", \&"...\&" -will be used. -The 3 members of the array specify the following values: -.Bl -enum -offset indent -.It -The first element marks the beginning of each matching token in the snippet. -.It -The second element the end of each matching token in the snippet. -.It -The third element is used to delimit the beginning and end of the snippet. +.It Fa query_format fmt +An enum value +indicating the output format. +Currently you can specify following values: +.Bl -hang -width compact +.It Dv APROPOS_PAGER +.It Dv APROPOS_TERM +.It Dv APROPOS_HTML +.It Dv APROPOS_NONE .El -For example for highlighting matching tokens in HTML style mark-up, use this -value: -.Bd -literal -offset indent - const char **snippet_args = { - "<b>", - "</b>", - "..." - }; -.Ed .It Fa query_args *args .Ft query_args is a struct which is defined in @@ -120,6 +104,8 @@ For example if the value of nrec is m an n records from the result-set will be omitted and rest m-n (or less) records will be available for processing inside the callback. Use a negative value if you don't wish to offset any records. +.It Li int legacy +If the output should be in legacy format (similary to classic apropos). .It Li const char *machine The machine architecture to which the searches should be restricted. Specify NULL if the search should not be restricted a particular machine architecture. @@ -195,7 +181,7 @@ args.machine = NULL; args.callback = &query_callback; args.callback_data = NULL; args.errmsg = &errmsg; -if (run_query(db, NULL, &args) < 0) +if (run_query(db, APROPOS_PAGER, &args) < 0) errx(EXIT_FAILURE, "%s", errmsg); } @@ -217,8 +203,6 @@ query_callback(void *data, const char *s .Sh SEE ALSO .Xr apropos-utils 3 , .Xr close_db 3 , -.Xr init_db 3 , -.Xr run_query_html 3 , -.Xr run_query_pager 3 +.Xr init_db 3 .Sh AUTHORS .An Abhinav Upadhyay Index: src/usr.sbin/makemandb/close_db.3 diff -u src/usr.sbin/makemandb/close_db.3:1.1 src/usr.sbin/makemandb/close_db.3:1.2 --- src/usr.sbin/makemandb/close_db.3:1.1 Tue Feb 7 19:13:32 2012 +++ src/usr.sbin/makemandb/close_db.3 Tue May 24 18:06:42 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: close_db.3,v 1.1 2012/02/07 19:13:32 joerg Exp $ +.\" $NetBSD: close_db.3,v 1.2 2016/05/24 18:06:42 abhinav Exp $ .\" .\" Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com> .\" All rights reserved. @@ -29,7 +29,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 17, 2011 +.Dd May 23, 2016 .Dt CLOSE_DB 3 .Os .Sh NAME @@ -55,8 +55,6 @@ The Sqlite FTS database which contains a .Sh SEE ALSO .Xr apropos-utils 3 , .Xr init_db 3 , -.Xr run_query 3 , -.Xr run_query_html 3 , -.Xr run_query_pager 3 +.Xr run_query 3 .Sh AUTHORS .An Abhinav Upadhyay Index: src/usr.sbin/makemandb/init_db.3 diff -u src/usr.sbin/makemandb/init_db.3:1.2 src/usr.sbin/makemandb/init_db.3:1.3 --- src/usr.sbin/makemandb/init_db.3:1.2 Sat Oct 6 15:33:59 2012 +++ src/usr.sbin/makemandb/init_db.3 Tue May 24 18:06:42 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: init_db.3,v 1.2 2012/10/06 15:33:59 wiz Exp $ +.\" $NetBSD: init_db.3,v 1.3 2016/05/24 18:06:42 abhinav Exp $ .\" .\" Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com> .\" All rights reserved. @@ -29,7 +29,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 5, 2011 +.Dd May 22, 2016 .Dt INIT_DB 3 .Os .Sh NAME @@ -38,7 +38,7 @@ .Sh SYNOPSIS .In apropos-utils.h .Ft sqlite3 * -.Fn init_db "int db_flag" "char *manconf" +.Fn init_db "mandb_access_mode db_flag" "const char *manconf" .Sh DESCRIPTION The .Fn init_db @@ -95,8 +95,6 @@ tag. .Sh SEE ALSO .Xr apropos-utils 3 , .Xr close_db 3 , -.Xr run_query 3 , -.Xr run_query_html 3 , -.Xr run_query_pager 3 +.Xr run_query 3 .Sh AUTHORS .An Abhinav Upadhyay