Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wednesday, May 21 2002, Michael Koch (man-di)

        * Updated AUTHORS file
	* Made some text files more readable
	* removed generated file from CVS
  • Loading branch information...
commit 0a86b912eb0d3ec0d3d30219728dbd7a0abe40b6 1 parent 47aa6cc
Michael Koch authored
Showing with 83 additions and 90 deletions.
  1. +7 −1 AUTHORS
  2. +5 −0 ChangeLog
  3. +71 −30 README
  4. +0 −5 TODO
  5. +0 −54 varconf.spec
View
8 AUTHORS
@@ -1,3 +1,9 @@
-Joseph A. Zupko <jaz147@psu.edu>
+Current Maintainers:
+====================
+James Turner <james@worldforge.org>
+Michael Koch <konqueror@gmx.de>
+Original authors:
+=================
+Joseph A. Zupko <jaz147@psu.edu>
Stefanus Du Toit <sdt@gmx.net>
View
5 ChangeLog
@@ -1,5 +1,10 @@
ChangeLog for varconf
+Wednesday, May 21 2002, Michael Koch (man-di)
+ * Updated AUTHORS file
+ * Made some text files more readable
+ * removed generated file from CVS
+
Saturday, May 11 2002, Joel Schander (nullstar)
* Added comments after member functions in Config.h. Wasn't clear
on purpose of setParameterLookup() so didn't add anything.
View
101 README
@@ -3,17 +3,28 @@ Varconf - STAGE Configuration System (c)1999-2001
1. Overview
-----------
-Varconf is a configuration system designed for the STAGE server. Varconf can parse configuration files, command-line arguments and environment variables. It supports callbacks and can store its configuration information in separate Config objects or in one global configuration instance.
+Varconf is a configuration system designed for the STAGE server.
+Varconf can parse configuration files, command-line arguments and environment
+variables. It supports callbacks and can store its configuration information
+in separate Config objects or in one global configuration instance.
2. Disclaimer
-------------
-None of the authors of this package nor anyone involved with the World Forge project is liable for any damages caused by the use of varconf. If your computer, you, or anyone around you self-combusts as a result of running this program, locate the nearest fire-extinguisher and don't call us. :)
+None of the authors of this package nor anyone involved with the World Forge
+project is liable for any damages caused by the use of varconf. If your
+computer, you, or anyone around you self-combusts as a result of running this
+program, locate the nearest fire-extinguisher and don't call us. :)
3. Installation
---------------
-The libsigc++ callback library needs to be compiled and installed before compiling varconf. The library can be aquired at http://sourceforge.net/projects/libsigc/. Varconf requires version 1.0.0 or greater of libsigc++.
+The libsigc++ callback library needs to be compiled and installed before
+compiling varconf. The library can be aquired at
+
+http://sourceforge.net/projects/libsigc/.
+
+Varconf requires version 1.0.0 or greater of libsigc++.
3.1 Basic Installation
@@ -24,12 +35,17 @@ sh autogen.sh
make
make install
-This will place the libraries in /usr/local/lib/varconf and the header files in /usr/local/include/varconf
+This will place the libraries in /usr/local/lib/varconf
+and the header files in /usr/local/include/varconf
4. Definitions
--------------
-Configuration data refers to varconf's internal handling of section names, item names and item values. Each of these components has the same meaning as they would in any standard configuration file. Each of these components comes from configuration files, environment variables or command-line arguments.
+Configuration data refers to varconf's internal handling of section names,
+item names and item values. Each of these components has the same meaning
+as they would in any standard configuration file. Each of these components
+comes from configuration files, environment variables or command-line
+arguments.
4.1 Configuration Data
@@ -94,7 +110,8 @@ ignored.
4.3 - Command-Line Arguments
----------------------------
-A single command-line argument can be a short-form argument or short-form argument value, a long-form argument or ignored data.
+A single command-line argument can be a short-form argument or short-form
+argument value, a long-form argument or ignored data.
{sn} denotes a short-name of one of either 'a'-'z', 'A'-'Z' or '0'-'9'.
{nm} denotes a name consisting of 'a'-'z', 'A'-'Z', '0'-'9', '_' or '-'.
@@ -119,31 +136,41 @@ Syntax for long-form argument:
4.4 - Environment Variables
---------------------------
-To allow varconf to input an environmental variable as configuration data, precede its name with a prefix and then specify that prefix when calling the function. ie:
+To allow varconf to input an environmental variable as configuration data,
+precede its name with a prefix and then specify that prefix when calling
+the function. ie:
Variables:
WF_ONE=Oh
WF_TWO=Happy
WF_THREE=Day
-Use prefix 'WF_' to retrieve the three variables as configuration data. They will be stored as items 'one', 'two' and 'three' respectively.
+Use prefix 'WF_' to retrieve the three variables as configuration data.
+They will be stored as items 'one', 'two' and 'three' respectively.
5. Library Usage
----------------
-Varconf is not very verbose about errors. Typically, malformed config data is either completely ignored or converted into a compatible form. A typo won't crash the library but it might lead to some very odd configuration items. ie:
+Varconf is not very verbose about errors. Typically, malformed config data
+is either completely ignored or converted into a compatible form.
+A typo won't crash the library but it might lead to some very odd
+configuration items. ie:
Command-line argument:
--section_name:: second colon treated as item name and converted to
'_'; item '_' would be created without value under
section "section_name"
-While this makes reporting typos to the user difficult, it makes parsing of configuration data more efficient in the library. A future solution to this might be the addition of warnings when the configuration data set method receives erroneous data.
+While this makes reporting typos to the user difficult, it makes parsing
+of configuration data more efficient in the library. A future solution to
+this might be the addition of warnings when the configuration data set method
+receives erroneous data.
5.1 Configuration Instance
--------------------------
-Configuration data can be stored in separate configuration objects or in a single global instance.
+Configuration data can be stored in separate configuration objects or in a
+single global instance.
Separate Objects:
@@ -153,26 +180,37 @@ Global Instance:
*Config::inst()
-Note that the method Config::inst() will automatically initialize the global data if not already created.
+Note that the method Config::inst() will automatically initialize the
+global data if not already created.
5.2 libsigc++
-------------
-Varconf uses libsigc++ for its callback routines and error reporting. Please see the libsigc++ documentation for specific details on interacting with libsigc++ signals.
+Varconf uses libsigc++ for its callback routines and error reporting.
+Please see the libsigc++ documentation for specific details on interacting
+with libsigc++ signals.
Four libsigc++ signals are provided by varconf.
- .sig - callback method with no details. Indicates that configuration data has been changed but does not specify what has been changed.
- .sigv - callback method that reports section and item name that has been changed. Only useful when working with a single configuration
- instance.A
- .sigsv - callback method that reports section, item name and the address of the configuration object under which the change was made.
- Useful when using multiple configuration instances.
+
+ .sig - callback method with no details. Indicates that configuration data
+ has been changed but does not specify what has been changed.
+
+ .sigv - callback method that reports section and item name that
+ has been changed. Only useful when working with a single
+ configuration instance.A
+
+ .sigsv - callback method that reports section, item name and the address of
+ the configuration object under which the change was made. Useful
+ when using multiple configuration instances.
.sige - reports error messages in a single string.
5.3 Configuration Files
-----------------------
-Varconf can read file-formed config data either directly from a file or from any input stream. It can also write configuration data directly to a file or to an output stream.
+Varconf can read file-formed config data either directly from a file or from
+any input stream. It can also write configuration data directly to a file
+or to an output stream.
To read from a file:
@@ -182,7 +220,8 @@ To read from an input stream:
config_object.parseStream( istream&);
- Note that this method may throw an error of type ParseError. See the ParseError.cc file or the ParseError.h file for more information.
+ Note that this method may throw an error of type ParseError.
+ See the ParseError.cc file or the ParseError.h file for more information.
To write to a file:
@@ -196,29 +235,31 @@ To write to a stream:
5.4 Command-line Arguments
--------------------------
-To parse a set of command-line arguments call the following method with the number of arguments and multi-dimension array of command-line arguments.
+To parse a set of command-line arguments call the following method with the
+number of arguments and multi-dimension array of command-line arguments.
config_object.getCmdline( int argc, char** argv);
-Note that before shortname arguments ('-a') can be used, each must be registered with a long name using the setParameterLookup method. ie:
+Note that before shortname arguments ('-a') can be used, each must be
+registered with a long name using the setParameterLookup method. ie:
config_object.setParameterLookup( 'f', "foo", true);
-The last argument is a bool specifying whether the argument requires a value or not. If true, varconf will look at the command-line argument directly following the shortform argument to see if there is a value there. If false, varconf will store the argument with no value.
+The last argument is a bool specifying whether the argument requires a value
+or not. If true, varconf will look at the command-line argument directly
+following the shortform argument to see if there is a value there. If false,
+varconf will store the argument with no value.
-Note that if a shortform argument is found but does not exist in the table, it will be ignored without warning.
+Note that if a shortform argument is found but does not exist in the table,
+it will be ignored without warning.
5.5 Environment Variables
-------------------------
-To read in all environment variables with a specific prefix, call the following function with that prefix:
+To read in all environment variables with a specific prefix, call the
+following function with that prefix:
config_object.getEnv( prefix);
ie: config_object.getEnv( "WF_"); reads in all environment variables
starting with "WF_"
-
-
-
-
-
View
5 TODO
@@ -5,8 +5,3 @@ TODO for varconf
* Make ParseError useful.
* Add Observer class back in.
* Revise documentation.
-
-
-
-
-
View
54 varconf.spec
@@ -1,54 +0,0 @@
-%define name varconf
-%define version 0.5.2
-%define release 1
-%define serial 1
-%define prefix /usr
-%define sysconfdir /etc
-
-Summary: A config handling library.
-Name: %{name}
-Version: %{version}
-Release: %{release}
-Serial: %{serial}
-Copyright: LGPL
-Group: Amusements/Games
-Source: %{name}-%{version}.tar.gz
-BuildRoot: /var/tmp/%{name}-%{version}-buildroot
-Requires: libsigc++ >= 1.0.0
-
-%description
-varconf is a configuration system originally designed for the STAGE server. varconf can parse configuration files, command-line arguments and environment variables. It supports callbacks through libsigc++ 1.0.0 or greater and can store configuration data in configuration objects or one global configuration instance.
-
-%prep
-%setup
-
-%build
-if [ -x ./configure ]; then
- CFLAGS=$RPM_OPT_FLAGS ./configure --prefix=%{prefix}
-else
- CFLAGS=$RPM_OPT_FLAGS ./autogen.sh --prefix=%{prefix}
-fi
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT%{prefix} install
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%{prefix}/include/varconf/Config.h
-%{prefix}/include/varconf/parse_error.h
-%{prefix}/include/varconf/variable.h
-%{prefix}/include/varconf/varconf.h
-%{prefix}/include/varconf/dynbase.h
-%{prefix}/include/varconf/dyntypes.h
-%{prefix}/include/varconf/dyncmp.h
-%{prefix}/include/varconf/dynvar.h
-%{prefix}/lib/libvarconf.a
-%{prefix}/lib/libvarconf.la
-%{prefix}/lib/libvarconf.so
-%{prefix}/lib/libvarconf.so.0
-%{prefix}/lib/libvarconf.so.0.5.2
Please sign in to comment.
Something went wrong with that request. Please try again.