X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=ucw%2Fdoc%2Fconf.txt;h=71358a81c71344b75851d809f9b71df4c06202d1;hb=df17c554147ac4d68ead793d60ca1f8208bd2e6f;hp=c89136082a98fada89556b61f93d9df5bd0459d1;hpb=525cfaad2da3938626887e6543f43fc4618721a1;p=libucw.git diff --git a/ucw/doc/conf.txt b/ucw/doc/conf.txt index c8913608..71358a81 100644 --- a/ucw/doc/conf.txt +++ b/ucw/doc/conf.txt @@ -30,6 +30,7 @@ from command line. * <> * <> * <> + * <> * <> - <> * <> @@ -103,14 +104,14 @@ configuration files. #include #include - static byte short_opts[] = CF_SHORT_OPTS "v"; + static char short_opts[] = CF_SHORT_OPTS "v"; static struct option long_opts[] = { CF_LONG_OPTS { "verbose", 0, 0, 'v' }, { NULL, 0, 0, 0 } }; - int verbose; + static int verbose; int main(int argc, char *argv[]) { cf_def_file = "default.cf"; @@ -151,7 +152,7 @@ are three ways to do that: + For example, you can have an static array of five unsigned integers: + - static uns array = { 1, 2, 3, 4, 5 }; + static uns array[] = { 1, 2, 3, 4, 5 }; + static struct cf_section section = { CF_ITEMS { @@ -163,7 +164,7 @@ For example, you can have an static array of five unsigned integers: *Dynamic arrays*:: Similar to static array, but you provide pointer to pointer to the given item (eg. if you want dynamic array of - `int` s, you give `**int`). The parser allocates an array of needed + integers, you give `**int`). The parser allocates an array of needed size. You can use the <> macro to find out the number of elements actually loaded. +