diff --git a/init_db.3 b/init_db.3 index 3746f5c..b833c29 100644 --- a/init_db.3 +++ b/init_db.3 @@ -52,7 +52,7 @@ which will also release any resources being used by it. .Pp The argument .Fa db_flag -should be supplied one of the following macros as it's value: +should be supplied one of the following macros as its value: .Bl -hang -width .It Dv DB_READONLY This will open the database in read only mode. @@ -62,6 +62,7 @@ This will open the database in read and write mode. .It Dv DB_CREATE This will open the database in read/write mode, and this will also create the database schema if it does not exist already. +.El .Sh RETURN VALUES On successful execution the .Fn init_db diff --git a/makemandb.1 b/makemandb.1 index 9cb5c29..e622918 100644 --- a/makemandb.1 +++ b/makemandb.1 @@ -43,8 +43,9 @@ The .Nm utility traverses the list of directories containing man pages, parses them -with the help of libmandoc and builds an Sqlite database apropos.db to support -full text searches. +with the help of libmandoc and builds an Sqlite database +.Pa apropos.db +to support full text searches. It obtains this list of directories using the .Op Fl p option of diff --git a/run_query.3 b/run_query.3 index b8b6aec..8c74707 100644 --- a/run_query.3 +++ b/run_query.3 @@ -60,18 +60,17 @@ function takes following arguments: .Pp .Fa sqlite3 *db Ta Handle to the database connection which can be obtained by calling -.Fn init_db +.Fn init_db . .Pp .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 +value for it, in which case, a default value of .Brq \&"\&", \&"\&", \&"...\&" will be used. -The 3 members of array specify following values: +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. @@ -93,7 +92,7 @@ value: .Fa query_args *args query_args is a struct which is defined in apropos-utils.h. -It has following fields: +It has the following fields: .Bl -column -offset indent "Struct Field" "Field Description" .It Li const char *search_str Ta This is the query as entered by the user. You may want to pre-process it to do sanitization etc. @@ -154,6 +153,7 @@ function will return 0 and in case of an error \-1 will be returned. .Bl -hang -width /var/db/man.db -compact .It Pa /var/db/man.db The Sqlite FTS database which maintains an index of the manual pages. +.El .Sh EXAMPLES Following is a code excerpt of how apropos.c uses run_query. .Bd -literal -offset indent diff --git a/run_query_html.3 b/run_query_html.3 index 7ab0fff..ced42da 100644 --- a/run_query_html.3 +++ b/run_query_html.3 @@ -38,7 +38,7 @@ .Nd Runs a query against .Pa /var/db/man.db and returns the results in HTML format which can be -processed inside a callback function. +processed inside a callback function .Sh SYNOPSIS .In apropos-utils.h .Ft int @@ -48,7 +48,7 @@ The .Fn run_query_html is very much similar to .Fn run_query -but with following two differences. +but with the following two differences. .Bl -enum -offset indent .It Li .Nm @@ -64,7 +64,7 @@ The value returned by in the callback function is in HTML format, enclosed between

and

tags. .El For more details, refer to the manual page of -.Xr run_query 3 +.Xr run_query 3 . .Sh RETURN VALUES On successful execution the .Fn run_query_html @@ -73,6 +73,7 @@ function will return 0 and in case of an error \-1 will be returned. .Bl -hang -width -compact .It Pa /var/db/man.db The Sqlite FTS database which maintains an index of the manual pages. +.El .Sh EXAMPLES Following is a code excerpt of how .Nm diff --git a/run_query_pager.3 b/run_query_pager.3 index 18729a5..27b232d 100644 --- a/run_query_pager.3 +++ b/run_query_pager.3 @@ -42,7 +42,7 @@ piped to pager like .Xr more 1 or .Xr less 1 -inside the callback function. +inside the callback function .Sh SYNOPSIS .In apropos-utils.h .Ft int @@ -74,6 +74,7 @@ function will return 0 and in case of an error \-1 will be returned. .Bl -hang -width -compact .It Pa /var/db/man.db The Sqlite FTS database which maintains an index of the manual pages. +.El .Sh EXAMPLES Following is a code excerpt of how .Nm