aboutsummaryrefslogtreecommitdiffstats
path: root/src/inirw_internal.h
diff options
context:
space:
mode:
authorM.Gergő2020-05-17 06:39:32 +0200
committerM.Gergő2020-05-17 06:39:32 +0200
commitcd28b1ec07c8ad615078a1ec55f4f9dfc6b92504 (patch)
treef4d82760e50427b27199a7bdcf9a2152a98f8c87 /src/inirw_internal.h
parentc37572d6135b21fbb36ef4e28743eac5268224df (diff)
downloadlightconfini-cd28b1ec07c8ad615078a1ec55f4f9dfc6b92504.tar.gz
lightconfini-cd28b1ec07c8ad615078a1ec55f4f9dfc6b92504.zip
New Read function (Own)
Diffstat (limited to 'src/inirw_internal.h')
-rw-r--r--src/inirw_internal.h34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/inirw_internal.h b/src/inirw_internal.h
index a75a70b..c569fd7 100644
--- a/src/inirw_internal.h
+++ b/src/inirw_internal.h
@@ -1,13 +1,13 @@
#ifndef INI_READ_H_INCLUDED
#define INI_READ_H_INCLUDED
-/* #include "deftypes.h" */
#include <stdint.h> /* int64_t*/
+#include "lightconfini.h"
+/*
+typedef struct lcini_data {
-typedef struct lci_data {
-
- enum nodeState {lci_EMPTY, lci_READY, lci_CONTINUE, lci_MULTILINE, lci_ERROR } nodeState;
+ enum nodeState {lcini_EMPTY, lcini_READY, lcini_CONTINUE, lcini_MULTILINE, lcini_ERROR } nodeState;
int32_t lineNum;
int32_t lineLen;
@@ -20,7 +20,7 @@ typedef struct lci_data {
char *value;
int32_t valueLen;
int32_t valueStartPos;
- enum valueDraw {lci_EMPTYVAL, lci_SIMPLEVAL, lci_MULTILINEVAL, lci_DQUOTEDVAL} valueDraw;
+ enum valueDraw {lcini_EMPTYVAL, lcini_SIMPLEVAL, lcini_MULTILINEVAL, lcini_DQUOTEDVAL} valueDraw;
char *comment;
int32_t commentLen;
int32_t commentStartPos;
@@ -28,23 +28,22 @@ typedef struct lci_data {
char *errorMsg;
int32_t errorMsgLen;
- struct lci_data *next;
-} lci_data;
-
-
+ struct lcini_data *next;
+} lcini_data;
+*/
-struct lci_data *iniReadOut(const char *filename);
-/* int64_t getFileMaxLineLen(FILE *tfd); */
+/*
+struct lcini_data *iniReadOut(const char *filename);
char *strResize(char *ptr, size_t oldsize, size_t newsize);
-lci_data *destroyNodes( lci_data *head);
-lci_data *createNode( lci_data *head, int64_t lineLen );
+lcini_data *destroyNodes( lcini_data *head);
+lcini_data *createNode( lcini_data *head, int64_t lineLen );
size_t getFileMaxLineLen(FILE *tfd);
-
+*/
#if defined(ini_read_c) || defined(ini_write_c)
enum ini_states {Start, BgnSp, CommEndW, SectEndW, SectEndD, EqW1, EqW2, ValPSP, ValW, ValFSP, DqmW, Bslsh, Error, Stop };
size_t strNullLen(const char *str);
-struct lci_data *iniFSM(struct lci_data *data, const unsigned char *in, int32_t len);
+struct lcini_data *iniFSM(struct lcini_data *data, const char *in, int32_t len);
int eescape(int c);
int isascalnum(int c); /* Check if input is ASCII Alpha-numeric */
int checkspace(int c); /* Only for ASCII characters */
@@ -60,9 +59,8 @@ int unescape(int c);
#endif /* ini_read_c, ini_write_c*/
-
+/*
char *lciGETtoStr( const char *section, const char *param, char *dest, size_t dstlen );
-/*int lciGETtoStrlen(const char *section, const char *param, ...); */
int8_t lciGETtoInt8( const char *filename, const char *section, const char *param);
int16_t lciGETtoInt16(const char *filename, const char *section, const char *param);
int32_t lciGETtoInt32(const char *filename, const char *section, const char *param);
@@ -71,7 +69,7 @@ int64_t lciGETtoInt64(const char *filename, const char *section, const char *
double lciGETtoDlb(const char *filename, const char *section, const char *param);
float lciGETtoFlt(const char *filename, const char *section, const char *param);
long int lciGETtoLng(const char *filename, const char *section, const char *param);
-
+*/