Skip to content
Snippets Groups Projects
Commit 11cd7eaf authored by James Willis's avatar James Willis
Browse files

Removed private static functions, prefixed constants with PARSER_ and changed name in copyright.

parent 653193b8
No related branches found
No related tags found
1 merge request!129Parameter file
/******************************************************************************* /*******************************************************************************
* This file is part of SWIFT. * This file is part of SWIFT.
* Copyright (c) 2012 Pedro Gonnet (pedro.gonnet@durham.ac.uk) * Copyright (c) 2016 James Willis (james.s.willis@durham.ac.uk)
* 2015 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
* *
* This program is free software: you can redistribute it and/or modify * 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 * it under the terms of the GNU Lesser General Public License as published
...@@ -22,21 +21,21 @@ ...@@ -22,21 +21,21 @@
#include <stdio.h> #include <stdio.h>
#define MAX_LINE_SIZE 128 #define PARSER_MAX_LINE_SIZE 128
#define MAX_NO_OF_PARAMS 512 #define PARSER_MAX_NO_OF_PARAMS 512
#define COMMENT_CHAR "#" #define PARSER_COMMENT_CHAR "#"
#define VALUE_CHAR ':' #define PARSER_VALUE_CHAR ':'
#define VALUE_STRING ":" #define PARSER_VALUE_STRING ":"
#define END_OF_FILE "..." #define PARSER_END_OF_FILE "..."
struct parameter { struct parameter {
char name [MAX_LINE_SIZE]; char name [PARSER_MAX_LINE_SIZE];
char value [MAX_LINE_SIZE]; char value [PARSER_MAX_LINE_SIZE];
}; };
struct swift_params { struct swift_params {
struct parameter data [MAX_NO_OF_PARAMS]; struct parameter data [PARSER_MAX_NO_OF_PARAMS];
int count; int count;
}; };
...@@ -48,8 +47,4 @@ void parser_get_param_float(struct swift_params *params, char *name, float *retP ...@@ -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_double(struct swift_params *params, char * name, double * retParam);
void parser_get_param_string(struct swift_params *params, char *name, char *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 */ #endif /* SWIFT_PARSER_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment