added reimport option for pilerimport

This commit is contained in:
SJ
2016-04-05 21:10:09 +02:00
parent 67891084e4
commit 65fc0b377e
47 changed files with 314 additions and 208 deletions

View File

@@ -17,7 +17,7 @@ int string_parser(char *src, char *target, int limit){
return 0;
};
int multi_line_string_parser(char *src, char *target, int limit){
int multi_line_string_parser(char *src, char *target, unsigned int limit){
if(strlen(src) > 0 && strlen(target) + strlen(src) + 3 < limit){
strncat(target, src, limit-strlen(target));
strncat(target, "\r\n", limit-strlen(target));
@@ -28,14 +28,14 @@ int multi_line_string_parser(char *src, char *target, int limit){
return 1;
};
int int_parser(char *src, int *target, int limit){
int int_parser(char *src, int *target){
*target = strtol(src, (char **) NULL, 10);
return 0;
};
int float_parser(char *src, float *target, int limit){
int float_parser(char *src, float *target){
*target = strtof(src, (char **) NULL);
return 0;
@@ -110,7 +110,7 @@ struct _parse_rule config_parse_rules[] =
{ "verbosity", "integer", (void*) int_parser, offsetof(struct __config, verbosity), "1", sizeof(int)},
{ "workdir", "string", (void*) string_parser, offsetof(struct __config, workdir), WORK_DIR, MAXVAL-1},
{NULL, NULL, NULL, 0, 0}
{NULL, NULL, NULL, 0, 0, 0}
};