Overview
Comment: | Updated man pages. Updated Makefile.in to delete new man pages. Updated configure.ac to check for fopen_net() instead of open_net(). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
5eff930a35f54e8958b1c37be6e0b143 |
User & Date: | rkeene on 2004-11-24 23:40:13 |
Other Links: | manifest | tags |
Context
2004-12-03
| ||
12:19 | Merged patches from Mirko Buffoni <mirko.buffoni@synthesys.it> That fixed installation and RPM `spec file' issues. check-in: 1c4c941633 user: rkeene tags: trunk | |
2004-11-24
| ||
23:40 | Updated man pages. Updated Makefile.in to delete new man pages. Updated configure.ac to check for fopen_net() instead of open_net(). check-in: 5eff930a35 user: rkeene tags: trunk | |
23:13 | Added an optional dependency to libopennet. If libopennet is used fopen_net is used instead of fopen. Made lc_process_file() a publicly callable function. Added a (blank!) man page for it. Made lc_cleanup() a publicly callable function, and removed calls to it from lc_process(). Added a (blank!) man page for it. check-in: cff8496e42 user: rkeene tags: trunk | |
Changes
Modified Makefile.in from [2f13fb7b2e] to [40dfe8fe47].
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + | test-lc: $(LIBS) test-lc.c $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(filter %.c, $?) $(LDFLAGS) -Wl,-R -Wl,. -L. -lconfig .PHONY: clean distclean install clean: rm -f *.o $(BINS) $(LIBS) libconfig.h *~ test-lc distclean: clean |
︙ |
Modified README from [a14993d947] to [0dae6d03cb].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | Tested platforms: Mac OS X 10.1 HP-UX 11.11 NetBSD 1.6.1 FreeBSD 4.8 OpenBSD 3.4 SunOS 5.9 Linux (Slackware, RedHat, Fedora Core, Debian) IRIX 6.5 |
Modified config.h.in from [f405f5e957] to [093c4e8a7f].
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | /* Define to 1 if you have the `getpwuid' function. */ #undef HAVE_GETPWUID /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H |
︙ |
Modified configure from [306d8f9a52] to [fd25645a6f].
︙ | |||
15667 15668 15669 15670 15671 15672 15673 | 15667 15668 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 15681 15682 15683 15684 15685 15686 15687 15688 15689 15690 15691 15692 15693 15694 15695 15696 15697 15698 15699 15700 15701 15702 15703 15704 15705 | - - - + + + - + - + | LIBSPEC=$withval else # Not specified LIBSPECFLAGS=`pkg-config --libs libopennet 2>/dev/null` LIBSPECCFLAGS=`pkg-config --cflags libopennet 2>/dev/null` |
︙ | |||
15718 15719 15720 15721 15722 15723 15724 | 15718 15719 15720 15721 15722 15723 15724 15725 15726 15727 15728 15729 15730 15731 15732 15733 15734 15735 15736 15737 15738 15739 15740 15741 15742 15743 15744 15745 | - + - + - - - + + + | (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then |
︙ | |||
15910 15911 15912 15913 15914 15915 15916 | 15910 15911 15912 15913 15914 15915 15916 15917 15918 15919 15920 15921 15922 15923 15924 15925 15926 15927 15928 15929 15930 15931 15932 15933 15934 15935 15936 15937 15938 15939 15940 15941 15942 15943 15944 15945 15946 15947 15948 | - - - + + + - + - + | *) if test "${LIBSPEC}" = "yes"; then true else LIBSPECFLAGS="-L${LIBSPEC}/lib ${LIBSPECFLAGS}" LIBSPECCFLAGS="-I${LIBSPEC}/include ${LIBSPECCFLAGS}" fi |
︙ | |||
15961 15962 15963 15964 15965 15966 15967 | 15961 15962 15963 15964 15965 15966 15967 15968 15969 15970 15971 15972 15973 15974 15975 15976 15977 15978 15979 15980 15981 15982 15983 15984 15985 15986 15987 15988 | - + - + - - - + + + | (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then |
︙ |
Modified configure.ac from [298ad28fdd] to [d2f6f7f2f1].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | DC_DO_TYPE(int32_t, signed, 4) DC_DO_TYPE(uint16_t, unsigned, 2) DC_DO_TYPE(int16_t, signed, 2) AC_REPLACE_FUNCS(strsep strtoll) AC_CHECK_FUNCS(getpwuid) |
︙ |
Modified lc_geterrno.3.in from [f1a44ec899] to [cd34ea9cd7].
︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 | 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | + + + | 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) { |
︙ |
Modified lc_geterrstr.3.in from [1700112ee5] to [72b9664bc6].
︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | + + + | fprintf(stderr, "Error registering variable: %s.\\n", lc_geterrstr()); 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) { |
︙ |
Modified lc_process.3.in from [14e5602803] to [95fe0e123b].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | .TH LC_PROCESS 3 "25 Oct 04" "@PACKAGE_STRING@" .SH NAME lc_process \- Begin processing configuration files. .SH SYNOPSIS .B #include <libconfig.h> .sp .BI "int lc_process(int " argc ", char **" argv ", const char *" appname ", lc_conf_type_t " type ", const char *" extra ");" .SH DESCRIPTION The .BR lc_process (3) function begins processing of the command line arguments, environment variables, and command line options. The .I argc and .I argv parameters should be in the same format as passed to the .B main function of your program. The .I appname parameter should be a reasonable form of the name of the application. The .I type parameter should describe the format of the configuration file (see below). The .I extra parameter should list any extra configuration files to process. Valid type parameter values: .TP LC_CONF_SECTION This type of configuration file is similar to the Windows INI-file style. An example configuration file: .nf [section] variable = value .fi .TP LC_CONF_APACHE This type of configuration file is similar to the Apache configuration file. An example configuration file: .nf <Section argument> variable value </Section> .fi .TP LC_CONF_SPACE This is a simple, flat configuration file. It has no section headers. An example configuration file: .nf variable value .fi .SH "RETURN VALUE" On success 0 is returned, otherwise -1 is returned. .SH EXAMPLE .nf #include <libconfig.h> |
︙ | |||
31 32 33 34 35 36 37 38 39 40 41 42 43 44 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | + + + | 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) { |
︙ |
Modified lc_process_file.3.in from [da39a3ee5e] to [ea98de7617].
|
Modified lc_register_callback.3.in from [91e00aa66a] to [cea18abe88].
︙ | |||
202 203 204 205 206 207 208 209 210 211 212 213 214 215 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | + + + | 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); |
︙ |
Modified lc_register_var.3.in from [aade6a66d6] to [e33efd4ec7].
︙ | |||
113 114 115 116 117 118 119 120 121 122 123 124 125 126 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | + + + | 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) { |
︙ |
Modified libconfig.3.in from [70716a9252] to [08444a4029].
︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + | 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); } |
︙ |