diff --git a/src/parser.h b/src/parser.h index b935755d0c9ec1db35af2dd2d9d4abcef026f75c..b4b50dddb4c7c807b034c4fd9c86035f275afa75 100644 --- a/src/parser.h +++ b/src/parser.h @@ -1,7 +1,6 @@ /******************************************************************************* * This file is part of SWIFT. - * Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk) - * 2015 Matthieu Schaller (matthieu.schaller@durham.ac.uk) + * Copyright (c) 2016 James Willis (james.s.willis@durham.ac.uk) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -22,21 +21,21 @@ #include <stdio.h> -#define MAX_LINE_SIZE 128 -#define MAX_NO_OF_PARAMS 512 +#define PARSER_MAX_LINE_SIZE 128 +#define PARSER_MAX_NO_OF_PARAMS 512 -#define COMMENT_CHAR "#" -#define VALUE_CHAR ':' -#define VALUE_STRING ":" -#define END_OF_FILE "..." +#define PARSER_COMMENT_CHAR "#" +#define PARSER_VALUE_CHAR ':' +#define PARSER_VALUE_STRING ":" +#define PARSER_END_OF_FILE "..." struct parameter { - char name [MAX_LINE_SIZE]; - char value [MAX_LINE_SIZE]; + char name [PARSER_MAX_LINE_SIZE]; + char value [PARSER_MAX_LINE_SIZE]; }; struct swift_params { - struct parameter data [MAX_NO_OF_PARAMS]; + struct parameter data [PARSER_MAX_NO_OF_PARAMS]; int count; }; @@ -48,8 +47,4 @@ void parser_get_param_float(struct swift_params *params, char *name, float *retP void parser_get_param_double(struct swift_params *params, char * name, double * retParam); void parser_get_param_string(struct swift_params *params, char *name, char *retParam); -/* Private functions. */ -static void parse_line(FILE *fp, struct swift_params *params); -static int count_char(char *str, char val); - #endif /* SWIFT_PARSER_H */