Comment: | libconfig 0.2.1 Updated typos in man pages, made "SEE ALSO" more consistent Added manpage formatting for new man pages, added lc_handle_type man page |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | 0.2.1 |
Files: | files | file ages | folders |
SHA1: |
8e0181d70f453e4f4f868582ec23485c |
User & Date: | rkeene on 2006-12-17 19:40:53 |
Other Links: | manifest | tags |
2006-12-17
| ||
19:57 | libconfig 0.2.2 Fixed missing install commands for new man pages (oops) check-in: b3554bc362 user: rkeene tags: trunk, 0.2.2 | |
19:40 | libconfig 0.2.1 Updated typos in man pages, made "SEE ALSO" more consistent Added manpage formatting for new man pages, added lc_handle_type man page check-in: 8e0181d70f user: rkeene tags: trunk, 0.2.1 | |
19:40 | Subversion to Fossil Copy Commit. Please Ignore. Recording copying libconfig.3.in to lc_handle_type.3.in. check-in: 476bfb745f user: rkeene tags: trunk | |
Modified build/build_web_manpages from [30cc606ea6] to [daac12e0fd].
4 5 6 7 8 9 10 11 12 13 14 |
fi if [ ! -f libconfig.3 ]; then echo 'Could not find libconfig.3, aborting.' >&2 exit 1 fi for file in lc_cleanup lc_geterrno lc_geterrstr lc_seterrstr lc_process lc_process_file lc_register_callback lc_register_var libconfig; do man2html -H "REPLACE" -M "/ME" < ${file}.3 | grep -iv '^Content-Type:' | sed 's@"http://REPLACE/ME?\([0-9]*\)+\([^"]*\)"@"\2.htm"@;s@http://REPLACE/ME@@g' > /web/rkeene/docs/oss/libconfig/${file}.htm done |
| |
4 5 6 7 8 9 10 11 12 13 14 |
fi
if [ ! -f libconfig.3 ]; then
echo 'Could not find libconfig.3, aborting.' >&2
exit 1
fi
for file in lc_cleanup lc_geterrno lc_geterrstr lc_seterrstr lc_process lc_process_file lc_register_callback lc_register_var libconfig lc_handle_type; do
man2html -H "REPLACE" -M "/ME" < ${file}.3 | grep -iv '^Content-Type:' | sed 's@"http://REPLACE/ME?\([0-9]*\)+\([^"]*\)"@"\2.htm"@;s@http://REPLACE/ME@@g' > /web/rkeene/docs/oss/libconfig/${file}.htm
done
|
build/prep.sh became executable with contents [3f4d67e154].
Modified configure from [d01fd0ab60] to [b0751438d7].
1 2 3 4 5 6 7 8 9 10 11 ... 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 ... 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 ... 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 ... 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 ..... 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 ..... 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 ..... 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 ..... 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 |
#! /bin/sh # From configure.ac Revision . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for libconfig 0.2.0. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## ................................................................................ # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='libconfig' PACKAGE_TARNAME='libconfig' PACKAGE_VERSION='0.2.0' PACKAGE_STRING='libconfig 0.2.0' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> #if HAVE_SYS_TYPES_H # include <sys/types.h> ................................................................................ # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libconfig 0.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. ................................................................................ --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libconfig 0.2.0:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-small Enable small build of libconfig. (disabled) ................................................................................ cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF libconfig configure 0.2.0 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libconfig $as_me 0.2.0, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ................................................................................ SHLIBOBJS="" for obj in $LIBOBJS; do SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`" done ac_config_files="$ac_config_files Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # ................................................................................ echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by libconfig $as_me 0.2.0, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ ................................................................................ $config_headers Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ libconfig config.status 0.2.0 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir ................................................................................ case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lc_geterrno.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrno.3" ;; "lc_process.3" ) CONFIG_FILES="$CONFIG_FILES lc_process.3" ;; "lc_register_var.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_var.3" ;; "lc_geterrstr.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrstr.3" ;; "lc_register_callback.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_callback.3" ;; "lc_cleanup.3" ) CONFIG_FILES="$CONFIG_FILES lc_cleanup.3" ;; "lc_process_file.3" ) CONFIG_FILES="$CONFIG_FILES lc_process_file.3" ;; "libconfig.3" ) CONFIG_FILES="$CONFIG_FILES libconfig.3" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done |
| | | | | | | | | | > > |
1 2 3 4 5 6 7 8 9 10 11 ... 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 ... 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 ... 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 ... 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 ..... 17087 17088 17089 17090 17091 17092 17093 17094 17095 17096 17097 17098 17099 17100 17101 ..... 17450 17451 17452 17453 17454 17455 17456 17457 17458 17459 17460 17461 17462 17463 17464 ..... 17510 17511 17512 17513 17514 17515 17516 17517 17518 17519 17520 17521 17522 17523 17524 ..... 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 |
#! /bin/sh # From configure.ac Revision . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for libconfig 0.2.1. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## ................................................................................ # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='libconfig' PACKAGE_TARNAME='libconfig' PACKAGE_VERSION='0.2.1' PACKAGE_STRING='libconfig 0.2.1' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> #if HAVE_SYS_TYPES_H # include <sys/types.h> ................................................................................ # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libconfig 0.2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. ................................................................................ --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libconfig 0.2.1:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-small Enable small build of libconfig. (disabled) ................................................................................ cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF libconfig configure 0.2.1 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libconfig $as_me 0.2.1, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ................................................................................ SHLIBOBJS="" for obj in $LIBOBJS; do SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`" done ac_config_files="$ac_config_files Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_seterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3 lc_handle_type.3" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # ................................................................................ echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by libconfig $as_me 0.2.1, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ ................................................................................ $config_headers Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ libconfig config.status 0.2.1 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir ................................................................................ case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lc_geterrno.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrno.3" ;; "lc_process.3" ) CONFIG_FILES="$CONFIG_FILES lc_process.3" ;; "lc_register_var.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_var.3" ;; "lc_geterrstr.3" ) CONFIG_FILES="$CONFIG_FILES lc_geterrstr.3" ;; "lc_seterrstr.3" ) CONFIG_FILES="$CONFIG_FILES lc_seterrstr.3" ;; "lc_register_callback.3" ) CONFIG_FILES="$CONFIG_FILES lc_register_callback.3" ;; "lc_cleanup.3" ) CONFIG_FILES="$CONFIG_FILES lc_cleanup.3" ;; "lc_process_file.3" ) CONFIG_FILES="$CONFIG_FILES lc_process_file.3" ;; "libconfig.3" ) CONFIG_FILES="$CONFIG_FILES libconfig.3" ;; "lc_handle_type.3" ) CONFIG_FILES="$CONFIG_FILES lc_handle_type.3" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done |
Modified configure.ac from [b033e9b94a] to [bca08ee458].
1
2
3
4
5
6
7
8
9
..
40
41
42
43
44
45
46
47
|
AC_REVISION($Revision $) AC_INIT(libconfig, 0.2.0) AC_CONFIG_HEADER(config.h) dnl Find out about the host OS DC_CHK_OS_INFO dnl Checks for programs. AC_PROG_CC ................................................................................ AC_REPLACE_FUNCS(strsep strtoll getuid) AC_CHECK_FUNCS(getpwuid) dnl This MUST be last. DC_SYNC_SHLIBOBJS AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3) |
|
|
|
1
2
3
4
5
6
7
8
9
..
40
41
42
43
44
45
46
47
|
AC_REVISION($Revision $) AC_INIT(libconfig, 0.2.1) AC_CONFIG_HEADER(config.h) dnl Find out about the host OS DC_CHK_OS_INFO dnl Checks for programs. AC_PROG_CC ................................................................................ AC_REPLACE_FUNCS(strsep strtoll getuid) AC_CHECK_FUNCS(getpwuid) dnl This MUST be last. DC_SYNC_SHLIBOBJS AC_OUTPUT(Makefile lc_geterrno.3 lc_process.3 lc_register_var.3 lc_geterrstr.3 lc_seterrstr.3 lc_register_callback.3 lc_cleanup.3 lc_process_file.3 libconfig.3 lc_handle_type.3) |
Modified lc_cleanup.3.in from [efcfee978b] to [d9be810dd5].
64 65 66 67 68 69 70 71 72 73 74 75 |
} .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_seterrstr (3), .BR lc_geterrstr (3), .BR lc_geterrno (3), .BR lc_process_file (3), .BR lc_process (3) |
| | > | | |
64 65 66 67 68 69 70 71 72 73 74 75 76 |
} .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_process_file (3) |
Modified lc_geterrno.3.in from [d8407e858d] to [b2eddb899a].
86 87 88 89 90 91 92 93 94 95 |
.SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_cleanup (3), .BR lc_process_file (3), .BR lc_process (3) |
> | | |
86 87 88 89 90 91 92 93 94 95 96 |
.SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_process_file (3), .BR lc_cleanup (3) |
Modified lc_geterrstr.3.in from [36f9da08c6] to [e7698ed55d].
51 52 53 54 55 56 57 58 59 60 61 62 63 |
return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_seterrstr (3), .BR lc_geterrno (3), .BR lc_cleanup (3), .BR lc_process_file (3), .BR lc_process (3) |
| > | > | < | | |
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_process_file (3), .BR lc_cleanup (3) |
Modified lc_handle_type.3.in from [93e1c94d05] to [91ccc08f28].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
..
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
.TH LIBCONFIG 3 "25 Oct 04" "@PACKAGE_STRING@" .SH NAME libconfig \- Consistent configuration library. .SH SYNOPSIS .B #include <libconfig.h> .sp .BI "int lc_register_callback(const char *" var ", char " opt ", lc_var_type_t " type ", int (*" callback ")(const char *, const char *, const char *, const char *, lc_flags_t, void *), void *" extra ");" .BI "int lc_register_var(const char *" var ", lc_var_type_t " type ", void *" data ", char " opt ");" .BI "int lc_process(int " argc ", char **" argv ", const char *" appname ", lc_conf_type_t " type ", const char *" extra ");" .BI "lc_err_t lc_geterrno(void);" .BI "char *lc_geterrstr(void);" .BI "void lc_geterrstr(const char *" errstr ");" .SH DESCRIPTION Libconfig is a library to provide easy access to configuration data in a consistent and logical manner. Variables (registered through .BR lc_register_var (3) or .BR lc_register_callback (3)) are processed with the .BR lc_process (3) and .BR lc_process_file (3) functions. Errors can be examined through .BR lc_geterrno (3) and .BR lc_geterrstr (3). Clean-up may be performed using the .BR lc_cleanup (3) function. .SH EXAMPLE .nf #include <libconfig.h> #include <stdlib.h> #include <stdio.h> int main(int argc, char **argv) { int lc_p_ret, lc_rv_ret; char *filename = NULL; lc_rv_ret = lc_register_var("File", LC_VAR_STRING, &filename, 'f'); if (lc_rv_ret != 0) { fprintf(stderr, "Error registering variable: %i.\\n", lc_geterrno()); return(EXIT_FAILURE); } lc_p_ret = lc_process(argc, argv, "example", LC_CONF_APACHE, NULL); lc_cleanup(); ................................................................................ if (lc_p_ret != 0) { fprintf(stderr, "Error processing configuration: \\ %s\\n", lc_geterrstr()); return(EXIT_FAILURE); } if (filename != NULL) { printf("File specified was: %s\\n", filename); } else { printf("No filename specified.\\n"); } return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterr (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_cleanup (3), .BR lc_process (3), .BR lc_process_file (3) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
<
<
>
<
<
>
>
|
|
<
<
<
<
<
<
<
>
>
|
<
|
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
.TH LC_HANDLE_TYPE 3 "25 Oct 04" "@PACKAGE_STRING@" .SH NAME lc_handle_type \- Convert string representation of a value to its correct type .SH SYNOPSIS .B #include <libconfig.h> .sp .BI "int lc_handle_type(lc_var_type_t " type ", const char *" value ", void *" data ");" .SH DESCRIPTION .BR lc_handle_type (3) converts the string .I value to the correct type specified by the .I type parameter. The result is stored in the memory region passed as .IR data , which should be of the correct type. For possible values for .I type and the corresponding .I data type, see the .BR lc_register_var (3) man page. .SH "RETURN VALUE" On success 0 is returned, otherwise -1 is returned. The memory pointed to by .I data may be altered in either case. .SH EXAMPLE .nf #include <libconfig.h> #include <stdlib.h> #include <stdio.h> int callback_size(const char *shortvar, const char *var, const char *arguments, const char *value, lc_flags_t flags, void *extra) { size_t size; int lc_ht_ret; if (value == NULL) { lc_seterrstr("You must specify an argument to \\ Size."); return(LC_CBRET_ERROR); } lc_ht_ret = lc_handle_type(LC_VAR_SIZE_SIZE_T, value, &size); if (lc_ht_ret != 0) { lc_seterrstr("Invalid size specified."); return(LC_CBRET_ERROR); } printf("Size: %lu\\n", (unsigned long) size); return(LC_CBRET_OKAY); } int main(int argc, char **argv) { int lc_rc_ret, lc_p_ret; lc_rc_ret = lc_register_callback("Size", 0, LC_VAR_SIZE_SIZE_T, callback_size, NULL); if (lc_rc_ret != 0) { fprintf(stderr, "Error registering callback.\\n"); return(EXIT_FAILURE); } lc_p_ret = lc_process(argc, argv, "example", LC_CONF_APACHE, NULL); lc_cleanup(); ................................................................................ if (lc_p_ret != 0) { fprintf(stderr, "Error processing configuration: \\ %s\\n", lc_geterrstr()); return(EXIT_FAILURE); } return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_process (3), .BR lc_process_file (3), .BR lc_cleanup (3) |
Modified lc_process.3.in from [0f2dddbaaa] to [86242e9b99].
97 98 99 100 101 102 103 104 105 106 107 108 109 |
return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_seterrstr (3), .BR lc_geterrstr (3), .BR lc_cleanup (3), .BR lc_process_file (3) |
| | | | | | > |
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process_file (3), .BR lc_cleanup (3) |
Modified lc_process_file.3.in from [aecb56c52b] to [5f7c74f31b].
59 60 61 62 63 64 65 66 67 68 69 70 71 |
return(EXIT_SUCCESS);
}
.fi
.SH "SEE ALSO"
.BR libconfig (3),
.BR lc_register_var (3),
.BR lc_register_callback (3),
.BR lc_geterrno (3),
.BR lc_geterrstr (3),
.BR lc_seterrstr (3),
.BR lc_cleanup (3),
.BR lc_process (3)
|
| | | | | | > |
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_cleanup (3) |
Modified lc_register_callback.3.in from [9235a07e28] to [3bf961bc83].
218 219 220 221 222 223 224 225 226 227 228 229 230 |
.TP .B ENOMEM Memory could not be allocated to create the needed internal structures. .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_cleanup (3), .BR lc_process_file (3), .BR lc_process (3) |
| | | > | | | |
218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
.TP .B ENOMEM Memory could not be allocated to create the needed internal structures. .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_process_file (3), .BR lc_cleanup (3) |
Modified lc_register_var.3.in from [218061b43e] to [2b8548a5a1].
146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_cleanup (3), .BR lc_process_file (3), .BR lc_process (3) |
| | | | > | | | |
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_process_file (3), .BR lc_cleanup (3) |
Modified lc_seterrstr.3.in from [eb760dc316] to [4d781cbd7f].
1
2
3
4
5
6
7
8
9
10
..
13
14
15
16
17
18
19
20
21
22
23
24
25
|
.TH LC_GETERRSTR 3 "25 Oct 04" "@PACKAGE_STRING@" .SH NAME lc_geterrstr \- Set an error message from a callback. .SH SYNOPSIS .B #include <libconfig.h> .sp .BI "void lc_seterrstr(const char *" errstr ");" .SH DESCRIPTION ................................................................................ function sets a human readable error message to be returned by .BR lc_geterrstr (3) function when an error is returned from a callback function. The value is ignored if the error is not related to a callback. .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_cleanup (3), .BR lc_process_file (3), .BR lc_process (3) |
|
|
|
|
|
>
|
|
|
|
1
2
3
4
5
6
7
8
9
10
..
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
.TH LC_SETERRSTR 3 "25 Oct 04" "@PACKAGE_STRING@" .SH NAME lc_seterrstr \- Set an error message from a callback. .SH SYNOPSIS .B #include <libconfig.h> .sp .BI "void lc_seterrstr(const char *" errstr ");" .SH DESCRIPTION ................................................................................ function sets a human readable error message to be returned by .BR lc_geterrstr (3) function when an error is returned from a callback function. The value is ignored if the error is not related to a callback. .SH "SEE ALSO" .BR libconfig (3), .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_process_file (3), .BR lc_cleanup (3) |
Modified libconfig.3.in from [93e1c94d05] to [cf1d1a2d27].
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
73
74
75
76
77
78
79
80
81
82
83
84
85
|
.BI "int lc_process(int " argc ", char **" argv ", const char *" appname ", lc_conf_type_t " type ", const char *" extra ");" .BI "lc_err_t lc_geterrno(void);" .BI "char *lc_geterrstr(void);" .BI "void lc_geterrstr(const char *" errstr ");" .SH DESCRIPTION Libconfig is a library to provide easy access to configuration data in a consistent and logical manner. Variables (registered through .BR lc_register_var (3) or .BR lc_register_callback (3)) are processed with the ................................................................................ return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterr (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_cleanup (3), .BR lc_process (3), .BR lc_process_file (3) |
|
>
>
>
>
|
|
|
>
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
.BI "int lc_process(int " argc ", char **" argv ", const char *" appname ", lc_conf_type_t " type ", const char *" extra ");" .BI "lc_err_t lc_geterrno(void);" .BI "char *lc_geterrstr(void);" .BI "void lc_seterrstr(const char *" errstr ");" .BI "int lc_handle_type(lc_var_type_t " type ", const char *" value ", void *" data ");" .BI "void lc_cleanup(void);" .SH DESCRIPTION Libconfig is a library to provide easy access to configuration data in a consistent and logical manner. Variables (registered through .BR lc_register_var (3) or .BR lc_register_callback (3)) are processed with the ................................................................................ return(EXIT_SUCCESS); } .fi .SH "SEE ALSO" .BR lc_register_var (3), .BR lc_register_callback (3), .BR lc_geterrno (3), .BR lc_geterrstr (3), .BR lc_seterrstr (3), .BR lc_handle_type (3), .BR lc_process (3), .BR lc_process_file (3), .BR lc_cleanup (3) |