From 89bd6c4dbb49ed8e6a540bb934ac7ac1ded1940e Mon Sep 17 00:00:00 2001 From: Dmitri Pal Date: Sun, 18 Mar 2012 14:46:37 -0400 Subject: Metadata collection is gone After some more thinking I decided not to use metadata collection. It seems to be an overhead. Patch does following: * Replaces metadata collection in file context structure with standard file stats * Removes all operations against old metadata collection * Defines new flags for data to collect * Creates a function that consolidates common operations between open and reopen functions. --- ini/ini_config_priv.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ini/ini_config_priv.h') diff --git a/ini/ini_config_priv.h b/ini/ini_config_priv.h index 1880c3f..84742c7 100644 --- a/ini/ini_config_priv.h +++ b/ini/ini_config_priv.h @@ -22,6 +22,9 @@ #ifndef INI_CONFIG_PRIV_H #define INI_CONFIG_PRIV_H +#include +#include +#include #include "collection.h" /* Configuration object */ @@ -45,21 +48,19 @@ struct ini_cfgfile { char *filename; /* File stream */ FILE *file; - /* File descriptor that is passed in */ - int fd; /* Error level */ int error_level; /* Collision flags - define how to merge things */ uint32_t collision_flags; - /* Collision flags - define how to merge things */ + /* What meta data to collect */ uint32_t metadata_flags; /**********************/ /* Internal variables */ /**********************/ /* Collection of errors detected during parsing */ struct collection_item *error_list; - /* Metadata about the file */ - struct collection_item *metadata; + /* File stats */ + struct stat file_stats; /* Count of error lines */ unsigned count; }; -- cgit