/* This file defines functional behaviour  */
/*     see the ini.c file for examples     */

DO NOT USE THIS SAM, INSTEAD USE sini.c
DO NOT USE THIS SAM, INSTEAD USE sini.c
DO NOT USE THIS SAM, INSTEAD USE sini.c
DO NOT USE THIS SAM, INSTEAD USE sini.c
DO NOT USE THIS SAM, INSTEAD USE sini.c

/* ************ ini.h ************ */
#define INI_VERSION "1.0a1"

/* you can free any of the pointers in this structure IF you set it to NULL afterwards. */
typedef struct INI_FILE_JESSES_IMPLEMENTATION{
	int number_missing;      /* is number of missing identifiers from INI file */
	char *error_message;     /* error message, points to a malloc structure */
	char *filename;          /* filename of the loaded file, points to a malloc structure*/
	char *output;            /* output buffer, points to a malloc structure, is set on an get_ini call */
	int output_strlen;       /* the length of the string in the output buffer */
	int output_len;          /* the length of the output buffer */
	int output_max_len;      /* maximum possible size of output_strlen */
	void *version_specific_data_storage;     /* is set on load, where the data is stored, points to a malloc structure */ 
	int version_specific_data_storage_size;  /* is set on load, size in bytes */ 
}Ini_File;


int load_ini_file(Ini_File **ini_file, char *filename, char **Ini_Identifiers);  
/* load_ini_file returns TRUE(1) or FALSE(0) if successful or not. 
   failure message (if any) is in (*ini_file)->error_message.
   Ini_Identifiers MUST BE a null terminated char * list. 
   ini file identifiers are case insensitive
*/

char *get_ini(Ini_File *My_Ini_File, int enumd_identifier);
/* the return value is equivelent to My_Ini_File->output.
   if you free the returned value, set {My_Ini_File->output = NULL;}
   if the symbol was not defined in the ini file, get_ini returns a
   pointer to empty string.
*/

void ini_close(Ini_File **My_Ini_File); 
/* just frees the pointers if not null, and sets them to NULL
	(*My_Ini_File)->My_Ini_File
	(*My_Ini_File)->error_message
	(*My_Ini_File)->filename
	(*My_Ini_File)->output
	(*My_Ini_File)->version_specific_data_storage
	*My_Ini_File
*/
/* ************ ini.h ************ */
