Skip to content

Commit

Permalink
= src/Makefile: Don't generate docs by default. We don't want pacpars…
Browse files Browse the repository at this point in the history
…er users to depend on doxygen to build and use pacparser.

= docs/man/man3: Add manpages to the source package itself.
  • Loading branch information
manugarg committed May 16, 2013
1 parent 2777fc7 commit f6749f0
Show file tree
Hide file tree
Showing 15 changed files with 226 additions and 1 deletion.
9 changes: 9 additions & 0 deletions docs/man/man3/deprecated.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.TH "deprecated" 3 "Thu May 16 2013" "Pacparser" \" -*- nroff -*-
.ad l
.nh
.SH NAME
deprecated \- Deprecated List
.IP "\fBGlobal \fBpacparser_parse_pac\fP (const char *pacfile)\fP" 1c
Use pacparser_parse_pac_file instead\&.
.PP

204 changes: 204 additions & 0 deletions docs/man/man3/pacparser.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
.TH "pacparser" 3 "Thu May 16 2013" "Pacparser" \" -*- nroff -*-
.ad l
.nh
.SH NAME
pacparser
.PP
API for pacparser library\&. A library to make web software PAC (proxy autoconfig) files intelligent\&. See http://code.google.com/p/pacparser for more information\&.

.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef int(* \fBpacparser_error_printer\fP )(const char *fmt, va_list argp)"
.br
.RI "\fIType definition for pacparser_error_printer\&. \fP"
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBpacparser_init\fP (void)"
.br
.RI "\fIInitializes pac parser\&. \fP"
.ti -1c
.RI "int \fBpacparser_parse_pac_file\fP (const char *pacfile)"
.br
.RI "\fIParses the given PAC file\&. \fP"
.ti -1c
.RI "int \fBpacparser_parse_pac_string\fP (const char *pacstring)"
.br
.RI "\fIParses the given PAC script string\&. \fP"
.ti -1c
.RI "int \fBpacparser_parse_pac\fP (const char *pacfile)"
.br
.RI "\fIParses the gievn pac file\&. \fP"
.ti -1c
.RI "char * \fBpacparser_find_proxy\fP (const char *url, const char *host)"
.br
.RI "\fIFinds proxy for the given URL and Host\&. \fP"
.ti -1c
.RI "char * \fBpacparser_just_find_proxy\fP (const char *pacfile, const char *url, const char *host)"
.br
.RI "\fIFinds proxy for the given PAC file, URL and Host\&. \fP"
.ti -1c
.RI "void \fBpacparser_cleanup\fP (void)"
.br
.RI "\fIDestroys JavaSctipt context\&. \fP"
.ti -1c
.RI "void \fBpacparser_setmyip\fP (const char *ip)"
.br
.RI "\fISets my IP address\&. \fP"
.ti -1c
.RI "void \fBpacparser_set_error_printer\fP (\fBpacparser_error_printer\fP func)"
.br
.RI "\fISets error printing function\&. \fP"
.ti -1c
.RI "void \fBpacparser_enable_microsoft_extensions\fP (void)"
.br
.RI "\fIEnable Microsoft PAC extensions\&. \fP"
.ti -1c
.RI "char * \fBpacparser_version\fP (void)"
.br
.RI "\fIReturns pacparser version\&. \fP"
.in -1c
.SH "Detailed Description"
.PP
API for pacparser library\&. A library to make web software PAC (proxy autoconfig) files intelligent\&. See http://code.google.com/p/pacparser for more information\&.

\fBAuthor:\fP
.RS 4
Manu Garg [email protected]
.RE
.PP

.SH "Function Documentation"
.PP
.SS "int pacparser_init (void)"

.PP
Initializes pac parser\&. \fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
Initializes JavaScript engine and does few basic initializations specific to pacparser\&.
.SS "int pacparser_parse_pac_file (const char *pacfile)"

.PP
Parses the given PAC file\&. \fBParameters:\fP
.RS 4
\fIpacfile\fP PAC file to parse\&.
.RE
.PP
\fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
Reads the given PAC file and evaluates it in the JavaScript context created by pacparser_init\&.
.SS "int pacparser_parse_pac_string (const char *pacstring)"

.PP
Parses the given PAC script string\&. \fBParameters:\fP
.RS 4
\fIpacstring\fP PAC string to parse\&.
.RE
.PP
\fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
Evaulates the given PAC script string in the JavaScript context created by pacparser_init\&.
.SS "int pacparser_parse_pac (const char *pacfile)"

.PP
Parses the gievn pac file\&. \fBDeprecated\fP
.RS 4
Use pacparser_parse_pac_file instead\&.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIpacfile\fP PAC file to parse\&.
.RE
.PP
\fBReturns:\fP
.RS 4
0 on failure and 1 on success\&.
.RE
.PP
Same as pacparser_parse_pac_file\&. Included only for backward compatibility\&.
.SS "char* pacparser_find_proxy (const char *url, const char *host)"

.PP
Finds proxy for the given URL and Host\&. \fBParameters:\fP
.RS 4
\fIurl\fP URL to find proxy for\&.
.br
\fIhost\fP Host part of the URL\&.
.RE
.PP
\fBReturns:\fP
.RS 4
proxy string on sucess and NULL on error\&.
.RE
.PP
Finds proxy for the given URL and Host\&. This function should be called only after pacparser engine has been initialized (using pacparser_init) and pac script has been parsed (using pacparser_parse_pac_file or pacparser_parse_pac_string)\&.
.SS "char* pacparser_just_find_proxy (const char *pacfile, const char *url, const char *host)"

.PP
Finds proxy for the given PAC file, URL and Host\&. \fBParameters:\fP
.RS 4
\fIpacfile\fP PAC file to parse\&.
.br
\fIurl\fP URL to find proxy for\&.
.br
\fIhost\fP Host part of the URL\&.
.RE
.PP
\fBReturns:\fP
.RS 4
proxy string on success and NULL on error\&.
.RE
.PP
This function is a wrapper around functions pacparser_init, pacparser_parse_pac_file, pacparser_find_proxy and pacparser_cleanup\&. If you just want to find out proxy for a given set of pac file, url and host, this is the function to call\&. This function takes care of all the initialization and cleanup\&.
.SS "void pacparser_cleanup (void)"

.PP
Destroys JavaSctipt context\&. This function should be called once you're done with using pacparser engine\&.
.SS "void pacparser_setmyip (const char *ip)"

.PP
Sets my IP address\&. \fBParameters:\fP
.RS 4
\fIip\fP Custom IP address\&.
.RE
.PP
Sets my IP address to a custom value\&. This is the IP address returned by myIpAddress() javascript function\&.
.SS "void pacparser_set_error_printer (\fBpacparser_error_printer\fPfunc)"

.PP
Sets error printing function\&. \fBParameters:\fP
.RS 4
\fIfunc\fP Printing function\&.
.RE
.PP
Sets error variadic-argument printing function\&. If not set the messages are printed to stderr\&. If messages begin with DEBUG: or WARNING:, they are not fatal error messages, otherwise they are\&. May be called before \fBpacparser_init()\fP\&.
.SS "void pacparser_enable_microsoft_extensions (void)"

.PP
Enable Microsoft PAC extensions\&. Enables a subset of Microsoft PAC extensions - dnsResolveEx, myIpAddressEx, isResolvableEx\&. These functions are used by Google Chrome and IE to work with IPv6\&. More info: http://code.google.com/p/pacparser/issues/detail?id=4
.SS "char* pacparser_version (void)"

.PP
Returns pacparser version\&. \fBReturns:\fP
.RS 4
version string if version defined, '' otherwise\&.
.RE
.PP
Version string is determined at the time of build\&. If built from a released package, version corresponds to the latest release (git) tag\&. If built from the repository, it corresponds to the head revision of the repo\&.
.SH "Author"
.PP
Generated automatically by Doxygen for Pacparser from the source code\&.
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_cleanup.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_enable_microsoft_extensions.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_error_printer.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_find_proxy.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_init.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_just_find_proxy.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_parse_pac.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_parse_pac_file.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_parse_pac_string.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_set_error_printer.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_setmyip.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
1 change: 1 addition & 0 deletions docs/man/man3/pacparser_version.3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man3/pacparser.3
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ BIN_PREFIX = $(PREFIX)/bin
MAN_PREFIX = $(PREFIX)/share/man

.PHONY: clean pymod install-pymod
all: testpactester docs
all: testpactester

spidermonkey/js/src: spidermonkey/js-?.?.?.tar.gz
tar xzvf spidermonkey/js-?.?.?.tar.gz -C spidermonkey
Expand Down

0 comments on commit f6749f0

Please sign in to comment.