Skip to content

Commit

Permalink
Grammar, punctuation, missing macros.
Browse files Browse the repository at this point in the history
Signed-off-by: Abhinav Upadhyay <er.abhinav.upadhyay@gmail.com>
  • Loading branch information
0-wiz-0 authored and abhinav-upadhyay committed Aug 20, 2011
1 parent f6e27c8 commit e923844
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
3 changes: 2 additions & 1 deletion init_db.3
Expand Up @@ -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.
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions makemandb.1
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions run_query.3
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions run_query_html.3
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -64,7 +64,7 @@ The value returned by
in the callback function is in HTML format, enclosed between <p> and </p> 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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion run_query_pager.3
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e923844

Please sign in to comment.