initial commit

This commit is contained in:
jonathan santis
2025-05-12 16:54:26 +02:00
commit 6e73734672
2 changed files with 174 additions and 0 deletions

20
config.h Normal file
View File

@@ -0,0 +1,20 @@
#define NO_SECTION 0
#define ERROR_STR 1
#define ERROR_MAX_LEN 2
//State Machine
#define ST_INIT 0
#define ST_FOUND_LEFT_DELIMITER 1
#define ST_FOUND_RIGHT_DELIMITER 2
#define ST_FINISH 20
//LIMITS
#define MAX_LEN_SECTIONNAME 128
int loadConfig(char *file, char **str_entry,char **host,int *intervall,int size);
int checkSection(char *str,char delimiterLeft,char delimiterRight,char **sectionName);
int getStrAtPos(char *str,int fromPos,int toPos, char **name);