A few "bug" reports, from the C header file :
(The way it is, it's impossible to compile a program using it)
three things :
- you can't use '::' in C. you have to use confilb__function and not conflib::function
- you can't use the word 'default' as a variable name (default is a C keyword) ; I've corrected this by using 'defaut', the french word for 'default'
- you have to put a semi-colon at the end of the prototypes
I don't know if using the library will work (but it should), my program is not enough developed to allow me to test that, but after correction of these three kind of mistakes, the C file which includes Conflib_C's header compiles just fine.
Here's a diff between the Header you provide, and the one I got after corrections :
--- ./ConfLib_C.h 2004-11-09 13:27:02.000000000 +0100
+++ /home/squale/developpement/prog_ti/KryptonII/v2/v2.1.01/sources/libs/ConfLib_C.h 2004-11-15 21:36:11.000000000 +0100
@@ -10 +10 @@
-long conflib::get_num_key(const char *file, const char *section, const char *key, long default, const short *error)
+long conflib__get_num_key(const char *file, const char *section, const char *key, long defaut, const short *error);
@@ -22 +22 @@
-short conflib__add_num_key(const char *file, const char *section, const char *key, long value)
+short conflib__add_num_key(const char *file, const char *section, const char *key, long value);
@@ -33 +33 @@
-short conflib::remove_key(const char *file, const char *section, const char *key)
+short conflib__remove_key(const char *file, const char *section, const char *key);
@@ -45 +45 @@
-short conflib__get_string_key(const char *file, const char *section, const char *key, const char *value, long max_length, const char *default)
+short conflib__get_string_key(const char *file, const char *section, const char *key, const char *value, long max_length, const char *defaut);
@@ -59 +59 @@
-short conflib__add_string_key(const char *file, const char *section, const char *key, const char *value)
+short conflib__add_string_key(const char *file, const char *section, const char *key, const char *value);
[edit] thanks to StoopidGuy for correcting two mistakes of english which were changing the meaning of my sentences.