diff options
author | M.Gergő | 2020-05-22 13:40:45 +0200 |
---|---|---|
committer | M.Gergő | 2020-05-22 13:40:45 +0200 |
commit | 75cde2390efe114893268da743ca86ac1fcd3571 (patch) | |
tree | b7ff8024ec81592388449b50ccd41a5669bb489a /src/lightconfini.h | |
parent | ee15e1da29eea49057ea3b87ac861e6a2f1fea96 (diff) | |
download | lightconfini-75cde2390efe114893268da743ca86ac1fcd3571.tar.gz lightconfini-75cde2390efe114893268da743ca86ac1fcd3571.zip |
New functions: lciniGetStr(), lciniGETShort()
Diffstat (limited to 'src/lightconfini.h')
-rw-r--r-- | src/lightconfini.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lightconfini.h b/src/lightconfini.h index e2b4e2d..b2cdf03 100644 --- a/src/lightconfini.h +++ b/src/lightconfini.h @@ -29,8 +29,8 @@ typedef struct lcini_data { typedef struct lcini_shortret{ - uint8_t *ret; - int32_t retlen; + char *ret; + int retlen; enum retType{lcini_shortretOK, lcini_shortretERROR, lcini_shortretEMPTY} retType; } lcini_shortret; @@ -45,10 +45,10 @@ struct lcini_data *lciniReadOut(const char *filename); int lciniReadOutOwn(const char *filename); lcini_data *lciniGet(lcini_data *head, const char *section, const char *parameter); /* FETCH requested value TO an lcini_data object, FROM lcini_data list*/ -char *lciniGetStr(lcini_data *head, const char *section, const char *parameter, char *dst, int dstlen); /* FETCH requested value TO null-terminated-string, FROM lcini_data list */ +int lciniGetStr(lcini_data *head, const char *section, const char *parameter, char *dst, int dstlen); /* FETCH requested value TO null-terminated-string, FROM lcini_data list */ lcini_shortret *lciniGetShort(lcini_data *head, const char *section, const char *parameter); /* FETCH requested value TO shortret object, FROM lcini_data list*/ lcini_shortret *lciniGetFromFileShort(const char *filename, const char *section, const char *parameter); /* FETCH requested value TO shortret object FROM file */ -char *lciniGetFromFileStr(const char *filename, const char *section, const char *parameter, char *buff, int len); +int lciniGetFromFileStr(const char *filename, const char *section, const char *parameter, char *buff, int len); @@ -57,5 +57,8 @@ lcini_data *lciniDestroyNodes( lcini_data *head); lcini_data *lciniCreateNode( lcini_data *head, int lineLen ); size_t lciniFileMaxLineLen(FILE *tfd); +lcini_shortret *lciniMKShortRet(int bufflen); +void lciniDestroyShortRet(lcini_shortret *dt); + #endif /* LIGHTCONFINI_H_INCLUDED */ |