From ec27430eb51daee1cc02c8d27a60a8000be9f4bf Mon Sep 17 00:00:00 2001 From: ManikandanChockalingam Date: Fri, 13 Jul 2018 02:23:28 +0530 Subject: file parser: Replace hash functions with list (#67) file parser: Replace hash functions with list Signed-off-by: ManikandanC Signed-off-by: S. Hameed Signed-off-by: Saya Sugiura --- src/shared/dlt_config_file_parser.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/shared/dlt_config_file_parser.h') diff --git a/src/shared/dlt_config_file_parser.h b/src/shared/dlt_config_file_parser.h index c38a8b8..45fd150 100644 --- a/src/shared/dlt_config_file_parser.h +++ b/src/shared/dlt_config_file_parser.h @@ -59,7 +59,6 @@ #ifndef _DLT_CONFIG_FILE_PARSER_H_ #define _DLT_CONFIG_FILE_PARSER_H_ -#include /* definitions */ #define DLT_CONFIG_FILE_PATH_MAX_LEN 100 /* absolute path including filename */ @@ -68,13 +67,20 @@ #define DLT_CONFIG_FILE_SECTIONS_MAX 100 #define DLT_CONFIG_FILE_KEYS_MAX 25 /* Maximal keys per section */ +typedef struct DltConfigKeyData +{ + char *key; + char *data; + struct DltConfigKeyData *next; +} DltConfigKeyData; + /* Config file section structure */ typedef struct { int num_entries; /* number of entries */ char *name; /* name of section */ char *keys; /* keys */ - struct hsearch_data data; /* hash table object used by hsearch_r */ + DltConfigKeyData *list; } DltConfigFileSection; typedef struct -- cgit v1.2.1