diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-02-17 20:00:33 +0900 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-02-17 20:00:33 +0900 |
commit | 670e03997afca107abbfc61a61f89477a9f9ab82 (patch) | |
tree | dc6b31a985104ef1180859780379408e1abdb215 /c_conf_gen/config/cs_config2.lua | |
parent | 35a421a727841319d5a998806924205ec6663bc2 (diff) | |
download | code-snippets-670e03997afca107abbfc61a61f89477a9f9ab82.tar.gz code-snippets-670e03997afca107abbfc61a61f89477a9f9ab82.zip |
c_conf_gen lua script that generates getopt code for fast argc,argv parsing. for lazy people
Diffstat (limited to 'c_conf_gen/config/cs_config2.lua')
-rw-r--r-- | c_conf_gen/config/cs_config2.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/c_conf_gen/config/cs_config2.lua b/c_conf_gen/config/cs_config2.lua new file mode 100644 index 0000000..9646834 --- /dev/null +++ b/c_conf_gen/config/cs_config2.lua @@ -0,0 +1,33 @@ +--config for empty config parsing file + +TYPE_INT = 1 +TYPE_STR = 2 +TYPE_FILE = 3 + +local M = {} + +M.project_name = "INT_STR_FILE" +M.params_list = {} + +param1 = { + type = TYPE_INT, + name = "number", + shortopt = "i:" +} +M.params_list[1] = param1 + +param2 = { + type = TYPE_STR, + name = "username", + shortopt = "s:" +} +M.params_list[2] = param2 + +param3 = { + type = TYPE_FILE, + name = "configfile", + shortopt = "f:" +} +M.params_list[3] = param3 + +return M
\ No newline at end of file |