diff options
author | Wojtek Kosior <wk@koszkonutek-tmp.pl.eu.org> | 2021-04-30 00:33:56 +0200 |
---|---|---|
committer | Wojtek Kosior <wk@koszkonutek-tmp.pl.eu.org> | 2021-04-30 00:33:56 +0200 |
commit | aa4d426b4d3527d7e166df1a05058c9a4a0f6683 (patch) | |
tree | 4ff17ce8b89a2321b9d0ed4bcfc37c447bcb6820 /iniparser-4.1/example/parse.c | |
download | smtps-and-pop3s-console-program-master.tar.gz smtps-and-pop3s-console-program-master.zip |
Diffstat (limited to 'iniparser-4.1/example/parse.c')
-rw-r--r-- | iniparser-4.1/example/parse.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/iniparser-4.1/example/parse.c b/iniparser-4.1/example/parse.c new file mode 100644 index 0000000..37d07aa --- /dev/null +++ b/iniparser-4.1/example/parse.c @@ -0,0 +1,24 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#include "iniparser.h" + +int main(int argc, char * argv[]) +{ + dictionary * ini ; + char * ini_name ; + + if (argc<2) { + ini_name = "twisted.ini"; + } else { + ini_name = argv[1] ; + } + + ini = iniparser_load(ini_name); + iniparser_dump(ini, stdout); + iniparser_freedict(ini); + + return 0 ; +} |