Check-in [9f254f7f02]
Overview
Comment:Subversion to Fossil Copy Commit. Please Ignore. Recording copying lc_geterrstr.3.in to lc_seterrstr.3.in.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9f254f7f02995ba3e3a66dfe8676b1bf81f67332
User & Date: rkeene on 2006-12-16 17:06:07
Other Links: manifest | tags
Context
2006-12-16
17:06
Added an lc_seterrstr() function check-in: f953f16a77 user: rkeene tags: trunk
17:06
Subversion to Fossil Copy Commit. Please Ignore. Recording copying lc_geterrstr.3.in to lc_seterrstr.3.in. check-in: 9f254f7f02 user: rkeene tags: trunk
2006-12-15
23:33
Added additional bounds checking to conf_apache (needs more) check-in: b83e2d07b5 user: rkeene tags: trunk
Changes

build/prep.sh became a regular file with contents [3f4d67e154].


Added lc_seterrstr.3.in version [72b9664bc6].

            1  +.TH LC_GETERRSTR 3 "25 Oct 04" "@PACKAGE_STRING@"
            2  +.SH NAME
            3  +lc_geterrstr \- Retrieve a human readable error message.
            4  +
            5  +.SH SYNOPSIS
            6  +.B #include <libconfig.h>
            7  +.sp
            8  +.BI "char *lc_geterrstr(void);"
            9  +
           10  +.SH DESCRIPTION
           11  +The
           12  +.BR lc_geterrstr (3)
           13  +function returns a string describing the last error code set.
           14  +
           15  +.SH EXAMPLE
           16  +.nf
           17  +#include <libconfig.h>
           18  +#include <stdlib.h>
           19  +#include <stdio.h>
           20  +
           21  +int main(int argc, char **argv) {
           22  +	int lc_p_ret, lc_rv_ret;
           23  +	char *filename = NULL;
           24  +
           25  +	lc_rv_ret = lc_register_var("File", LC_VAR_STRING,
           26  +	                            &filename, 'f');
           27  +
           28  +	if (lc_rv_ret != 0) {
           29  +		fprintf(stderr, "Error registering variable: %s.\\n",
           30  +		        lc_geterrstr());
           31  +		return(EXIT_FAILURE);
           32  +	}
           33  +
           34  +	lc_p_ret = lc_process(argc, argv, "example", LC_CONF_APACHE,
           35  +	                      NULL);
           36  +
           37  +	lc_cleanup();
           38  +
           39  +	if (lc_p_ret != 0) {
           40  +		fprintf(stderr, "Error processing configuration: \\
           41  +		        %s\\n", lc_geterrstr());
           42  +		return(EXIT_FAILURE);
           43  +	}
           44  +
           45  +	if (filename != NULL) {
           46  +		printf("File specified was: %s\\n", filename);
           47  +	} else {
           48  +		printf("No filename specified.\\n");
           49  +	}
           50  +
           51  +	return(EXIT_SUCCESS);
           52  +}
           53  +.fi
           54  +
           55  +.SH "SEE ALSO"
           56  +.BR lc_register_var (3),
           57  +.BR lc_register_callback (3),
           58  +.BR lc_geterrno (3),
           59  +.BR lc_cleanup (3),
           60  +.BR lc_process_file (3),
           61  +.BR lc_process (3)