mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-04-05 17:39:20 +02:00
added reimport option for pilerimport
This commit is contained in:
@@ -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}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user