Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 17, 2026

Diff for libcfg+/doc/sgml/usage.properties.sgml between version 1.1 and 1.2

version 1.1, 2002/06/11 22:09:50 version 1.2, 2002/06/23 16:46:20
Line 12  In this chapter are functions for manipu
Line 12  In this chapter are functions for manipu
 <funcsynopsis>  <funcsynopsis>
 <funcsynopsisinfo><![CDATA[#include <cfg+.h>]]></funcsynopsisinfo>  <funcsynopsisinfo><![CDATA[#include <cfg+.h>]]></funcsynopsisinfo>
 <funcprototype>  <funcprototype>
         <funcdef>void <function>cfg_clear_property</function></funcdef>          <funcdef>int <function>cfg_clear_property</function></funcdef>
         <paramdef>CFG_CONTEXT <parameter>con</parameter></paramdef>          <paramdef>CFG_CONTEXT <parameter>con</parameter></paramdef>
         <paramdef>enum cfg_property_type <parameter>type</parameter></paramdef>          <paramdef>enum cfg_property_type <parameter>type</parameter></paramdef>
 </funcprototype>  </funcprototype>
Line 41  specified by <parameter>type</parameter>
Line 41  specified by <parameter>type</parameter>
 to property specified by <parameter>type</parameter> parameter in context  to property specified by <parameter>type</parameter> parameter in context
 <parameter>con</parameter>. Behaviour of  <parameter>con</parameter>. Behaviour of
 <function>cfg_remove_property()</function> is analogical. It removes one string  <function>cfg_remove_property()</function> is analogical. It removes one string
 from property.  from property. All these functions return <constant>1</constant> on success or
   <constant>0</constant> on not enough memory error.
   
   </para>
   <para>
   
   Note that, when you set some string of multi vals separator property, any
   whitespace you will use in that string will match any non-zero amount of
   whitespaces during parsing. For example if separator is one space, also tab will
   match, two spaces, tab will space and so forth.
   
 </para>  </para>
 <para>  <para>
   
 Types of properties, which are passed to mentioned functions as parameter  Types of properties, which are passed to mentioned functions as parameter
 <parameter>type</parameter>, are described in following tables. They are divided  <parameter>type</parameter>, are described in following tables. They are divided
 into three types. <xref linkend="usage.properties-shared.table"  into three types. The first one are <xref
 endterm="usage.properties-shared.table.title"> that affect both, comand line and  linkend="usage.properties-command-line.table"
 configuration file. Further <xref linkend="usage.properties-command-line.table"  
 endterm="usage.properties-command-line.table.title"> that affects only command  endterm="usage.properties-command-line.table.title"> that affects only command
 line and finally <xref linkend="usage.properties-config-file.table"  line. Than there are <xref linkend="usage.properties-config-file.table"
 endterm="usage.properties-config-file.table.title"> that affect only  endterm="usage.properties-config-file.table.title"> that affect only
 configuration file.  configuration file. The last type of properties are <xref
   linkend="usage.properties-virtual.table"
   endterm="usage.properties-virtual.table.title"> (also known as <firstterm>Shared
   properties</firstterm>). In example, they can affect both, comand line and
   configuration file, or set up quotation prefix and postfix in one call. They
   exist for simplyfication of real properties manipulation.
   
 </para>  </para>
 <para>  <para>
   
 <table id="usage.properties-shared.table" frame=top>  Here are properties for command line.
 <title id="usage.properties-shared.table.title">Shared properties</title>  
   <table id="usage.properties-command-line.table" frame=top>
   <title id="usage.properties-command-line.table.title">Command line related
   properties</title>
 <tgroup cols=3>  <tgroup cols=3>
 <thead>  <thead>
 <row>  <row>
Line 71  configuration file.
Line 87  configuration file.
 </thead>  </thead>
 <tbody>  <tbody>
 <row>  <row>
 <entry>CFG_QUOTE_PREFIX</entry>  <entry>CFG_LINE_QUOTE_PREFIX</entry>
 <entry>quotation prefix</entry>  <entry>command line quotation prefix</entry>
 <entry>  <entry>
   
 For changing quotation prefix use this type. Note, that you probably want  For changing command line quotation prefix use this type. Note, that you
 also set quotation postfix equivalent to this prefix. By default are standart  probably want also set quotation postfix equivalent to this prefix.  By default
 quotation characters, apostrophes (<constant>'</constant>) and inverted commans  are no strings initialized, due to simple reason. Most from often used shells
 (<constant>"</constant>), initialized (also for postfixes).  such as <application>sh</application>, <application>bash</application>,
   <application>tcsh</application> and <application>zsh</application> already
   contains quotation marks implementation so there is no need to do that thing also
   in &name; library. Although this, you can set command line quotation characters
   by appropriate <function>cfg_add_property()</function> function call.
   
 </entry>  </entry>
 </row>  </row>
 <row>  <row>
 <entry>CFG_QUOTE_POSTFIX</entry>  <entry>CFG_LINE_QUOTE_POSTFIX</entry>
 <entry>quotation postfix</entry>  <entry>command line quotation postfix</entry>
 <entry>  <entry>
   
 For changing quotation postfix use this type. Note, that you probably want also  For changing command line quotation postfix use this type. Note, that you
 set quotation prefix equivalent to this postfix. By default are standart  probably want also set quotation prefix equivalent to this postfix. By default
 quotation characters, apostrophes (<constant>'</constant>) and inverted commans  is of course also nothing initialized due to same reasons as it is in
 (<constant>"</constant>), initialized (also for prefixes).  <constant>CFG_LINE_QUOTE_POSTFIX</constant> case.
   
 </entry>  </entry>
 </row>  </row>
 </tbody>  
 </tgroup>  
 </table>  
   
 </para>  
 <para>  
   
 Here are properties for command line.  
   
 <table id="usage.properties-command-line.table" frame=top>  
 <title id="usage.properties-command-line.table.title">Command line related  
 properties</title>  
 <tgroup cols=3>  
 <thead>  
 <row>  
         <entry><parameter>type</parameter> parameter</entry>  
         <entry>Brief description</entry>  
         <entry>Description</entry>  
 </row>  
 </thead>  
 <tbody>  
 <row>  <row>
 <entry>CFG_LINE_STOP_STRING</entry>  <entry>CFG_LINE_STOP_STRING</entry>
 <entry>command line stop string</entry>  <entry>command line stop string</entry>
Line 150  used in applications. You will probably
Line 149  used in applications. You will probably
 </entry>  </entry>
 </row>  </row>
 <row>  <row>
 <entry>CFG_LINE_OPTION_ARG_SEPARATOR</entry>  <entry>CFG_LINE_NORMAL_MULTI_VALS_SEPARATOR</entry>
 <entry>command line option argument separator</entry>  <entry>normal command line multi values separator</entry>
 <entry>  <entry>
   
 For changing command line multi values separators use this type. Multi  For changing normal command line multi values separators use this type. Multi values
 values separators are strings used for separation option values initialized with  separators are strings used for separation option values initialized with one
 one argument. For example if separator is comma, one command line argument will  argument. For example if separator is comma, one command line argument will be
 be similar to this: <command>--multi=val1,val2,val3</command>. Option must have  similar to this: <command>--multi=val1,val2,val3</command>. Option must have
 <constant>CFG_MULTI_SEPARATED</constant> flag set. By default are space,  <constant>CFG_MULTI_SEPARATED</constant> flag set. By default are
 <constant>,</constant> and <constant>;</constant> initialized.  comma (<constant>,</constant>) and semicolon (<constant>;</constant>) initialized.
   
 </entry>  </entry>
 </row>  </row>
 <row>  <row>
 <entry>CFG_LINE_MULTI_VALS_SEPARATOR</entry>  <entry>CFG_LINE_LEFTOVER_MULTI_VALS_SEPARATOR</entry>
 <entry>command line multi values separator</entry>  <entry>leftover command line multi values separator</entry>
   <entry>
   
   For changing leftover command line multi values separators use this type.
   Explanation is the same as for previous type with difference, that this property
   affects only leftover arguments (arguments left on the command line without any
   option that are stored into option with <constant>CFG_LEFTOVER_ARGS</constant>
   type). By default is nothing initialized.
   
   </entry>
   </row>
   <row>
   <entry>CFG_LINE_OPTION_ARG_SEPARATOR</entry>
   <entry>command line option argument separator</entry>
 <entry>  <entry>
   
 For changing command line option argument separator use this type. Option  For changing command line option argument separator use this type. Option
 argument separators are strings used to separate option and its argument. By  argument separators are strings used to separate option and its argument. By
 default is <constant>=</constant> character used. For example  default is equal sign (<constant>=</constant>) character used. For example
 <command>--option=argument</command>. Note that on command line argument can be  <command>--option=argument</command>. Note that on command line argument can be
 initialized also as following string with no need of separator usage (like this:  initialized also as following string with no need of separator usage (like this:
 <command>--option argument</command>).  <command>--option argument</command>).
Line 199  properties</title>
Line 211  properties</title>
 </thead>  </thead>
 <tbody>  <tbody>
 <row>  <row>
   <entry>CFG_FILE_QUOTE_PREFIX</entry>
   <entry>configuration file quotation prefix</entry>
   <entry>
   
   For changing configuration file quotation prefix use this type. Note, that you
   probably want also set quotation postfix equivalent to this prefix. By default
   are standart quotation characters, apostrophes (<constant>'</constant>) and
   inverted commans (<constant>"</constant>), initialized (also for postfixes).
   
   </entry>
   </row>
   <row>
   <entry>CFG_FILE_QUOTE_POSTFIX</entry>
   <entry>configuration file quotation postfix</entry>
   <entry>
   
   For changing configuration file quotation postfix use this type. Note, that you
   probably want also set quotation prefix equivalent to this postfix. By default
   are standart quotation characters, apostrophes (<constant>'</constant>) and
   inverted commans (<constant>"</constant>), initialized (also for prefixes).
   
   </entry>
   </row>
   <row>
 <entry>CFG_FILE_STOP_PREFIX</entry>  <entry>CFG_FILE_STOP_PREFIX</entry>
 <entry>config file stop prefix</entry>  <entry>config file stop prefix</entry>
 <entry>  <entry>
Line 207  For changing configuration file stop str
Line 243  For changing configuration file stop str
 you want to stop parsing on specified string which occurs on configration file  you want to stop parsing on specified string which occurs on configration file
 line. Error code <constant>CFG_ERROR_STOP_STR_FOUND</constant> is returned from  line. Error code <constant>CFG_ERROR_STOP_STR_FOUND</constant> is returned from
 parsing function to determine this event. By default is nothing initialized. We  parsing function to determine this event. By default is nothing initialized. We
 recomend you set this property to <constant>[</constant> character for  recommend you set this property to <constant>[</constant> character, if you want
 determining section beginning (to stop parsing on section header).  to determine configuration section beginning (to stop parsing on section
   header).
   
 </entry>  </entry>
 </row>  </row>
Line 217  determining section beginning (to stop p
Line 254  determining section beginning (to stop p
 <entry>config file comment prefix</entry>  <entry>config file comment prefix</entry>
 <entry>  <entry>
   
 For changing configuration comment prefix use this type. Lines started  For changing configuration comment prefix use this type. Lines started with one
 with one of these prefixes are skipped. By default are <constant>#</constant>,  of these prefixes are skipped. By default are hash sign (<constant>#</constant>)
 <constant>;</constant> and <constant>//</constant> initialized.  and semicolon (<constant>;</constant>) initialized.
   
 </entry>  </entry>
 </row>  </row>
Line 237  line postfixes are removed from concaten
Line 274  line postfixes are removed from concaten
 </entry>  </entry>
 </row>  </row>
 <row>  <row>
 <entry>CFG_FILE_OPTION_ARG_SEPARATOR</entry>  <entry>CFG_FILE_NORMAL_MULTI_VALS_SEPARATOR</entry>
 <entry>config file option argument separator</entry>  <entry>normal config file multi values separator</entry>
 <entry>  <entry>
   
 For changing configuration file multi values separators use this type.  For changing normal configuration file multi values separators use this type.
 Multi values separators are strings used for separation option values  Multi values separators are strings used for separation option values
 initialized with one argument. For example if separator is comma one line in  initialized with one argument. For example if separator is comma one line in
 configuration fill will be similar to this: <command>multi =  configuration fill will be similar to this: <command>multi =
 val1,val2,val2</command>. Option must have  val1,val2,val2</command>. Option must have
 <constant>CFG_MULTI_SEPARATED</constant> flag set. By default are space,  <constant>CFG_MULTI_SEPARATED</constant> flag set. By default are space, comma
 <constant>,</constant> and <constant>;</constant> initialized.  (<constant>,</constant>) and semicolon (<constant>;</constant>) initialized.
   
 </entry>  </entry>
 </row>  </row>
 <row>  <row>
 <entry>CFG_FILE_MULTI_VALS_SEPARATOR</entry>  <entry>CFG_FILE_LEFTOVER_MULTI_VALS_SEPARATOR</entry>
 <entry>config file multi values separator</entry>  <entry>leftover config file multi values separator</entry>
   <entry>
   
   For changing leftover config file multi values separators use this type.
   Explanation is the same as for previous type with difference, that this property
   affects only leftover arguments (arguments left on the command line without any
   option that are stored into option with <constant>CFG_LEFTOVER_ARGS</constant>
   type). By default is space initialized. The goal is to get the similar
   functionality as it is in command line case, where leftover arguments are placed
   on command line and separated with spaces.
   
   </entry>
   </row>
   <row>
   <entry>CFG_FILE_OPTION_ARG_SEPARATOR</entry>
   <entry>config file option argument separator</entry>
 <entry>  <entry>
   
 For changing configuration file option argument separator use this type.  For changing configuration file option argument separator use this type.
 Option argument separators are strings used to separate option and its argument.  Option argument separators are strings used to separate option and its argument.
 By default is <constant>=</constant> character used. For example <command>option  By default is equal sign (<constant>=</constant>) character used. For example <command>option
 = argument</command>.  = argument</command>.
   
 </entry>  </entry>
Line 269  By default is <constant>=</constant> cha
Line 321  By default is <constant>=</constant> cha
   
   
 </para>  </para>
   <para>
   
   Here are virtual (shared) properties. In description of every virtual will be
   only written which real properties it sets. Please refer to <xref
   linkend="usage.properties-command-line.table"
   endterm="usage.properties-command-line.table.title"> table and <xref
   linkend="usage.properties-config-file.table"
   endterm="usage.properties-config-file.table.title"> table above for description
   of real properties.
   
   <table id="usage.properties-virtual.table" frame=top>
   <title id="usage.properties-virtual.table.title">Virtual properties</title>
   <tgroup cols=2>
   <thead>
   <row>
           <entry><parameter>type</parameter> parameter</entry>
           <entry>Real properties</entry>
   </row>
   </thead>
   <tbody>
   <row>
   <entry>CFG_QUOTE</entry>
   <entry>
   CFG_LINE_QUOTE_PREFIX,
   CFG_LINE_QUOTE_POSTFIX,
   CFG_FILE_QUOTE_PREFIX,
   CFG_FILE_QUOTE_POSTFIX
   </entry>
   </row>
   <row>
   <entry>CFG_LINE_QUOTE</entry>
   <entry>
   CFG_LINE_QUOTE_PREFIX,
   CFG_LINE_QUOTE_POSTFIX
   </entry>
   </row>
   <row>
   <entry>CFG_FILE_QUOTE</entry>
   <entry>
   CFG_FILE_QUOTE_PREFIX,
   CFG_FILE_QUOTE_POSTFIX
   </entry>
   </row>
   <row>
   <entry>CFG_QUOTE_PREFIX</entry>
   <entry>
   CFG_LINE_QUOTE_PREFIX,
   CFG_FILE_QUOTE_PREFIX
   </entry>
   </row>
   <row>
   <entry>CFG_QUOTE_POSTFIX</entry>
   <entry>
   CFG_LINE_QUOTE_POSTFIX,
   CFG_FILE_QUOTE_POSTFIX
   </entry>
   </row>
   <row>
   <entry>CFG_MULTI_VALS_SEPARATOR</entry>
   <entry>
   CFG_LINE_NORMAL_MULTI_VALS_SEPARATOR,
   CFG_LINE_LEFTOVER_MULTI_VALS_SEPARATOR,
   CFG_FILE_NORMAL_MULTI_VALS_SEPARATOR,
   CFG_FILE_LEFTOVER_MULTI_VALS_SEPARATOR
   </entry>
   </row>
   <row>
   <entry>CFG_LINE_MULTI_VALS_SEPARATOR</entry>
   <entry>
   CFG_LINE_NORMAL_MULTI_VALS_SEPARATOR,
   CFG_LINE_LEFTOVER_MULTI_VALS_SEPARATOR
   </entry>
   </row>
   <row>
   <entry>CFG_FILE_MULTI_VALS_SEPARATOR</entry>
   <entry>
   CFG_FILE_NORMAL_MULTI_VALS_SEPARATOR,
   CFG_FILE_LEFTOVER_MULTI_VALS_SEPARATOR
   </entry>
   </row>
   <row>
   <entry>CFG_NORMAL_MULTI_VALS_SEPARATOR</entry>
   <entry>
   CFG_LINE_NORMAL_MULTI_VALS_SEPARATOR,
   CFG_FILE_NORMAL_MULTI_VALS_SEPARATOR
   </entry>
   </row>
   <row>
   <entry>CFG_LEFTOVER_MULTI_VALS_SEPARATOR</entry>
   <entry>
   CFG_LINE_LEFTOVER_MULTI_VALS_SEPARATOR,
   CFG_FILE_LEFTOVER_MULTI_VALS_SEPARATOR
   </entry>
   </row>
   <row>
   <entry>CFG_OPTION_ARG_SEPARATOR</entry>
   <entry>
   CFG_LINE_OPTION_ARG_SEPARATOR,
   CFG_FILE_OPTION_ARG_SEPARATOR
   </entry>
   </row>
   
   </tbody>
   </tgroup>
   </table>
   
   </para>
   
 </sect1>  </sect1>
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top