I can't get your code to even compile. I added the necessary includes even you .h but I get alot of errors
Code:
In file included from fileio.c:24:
fileio.h:30: warning: no semicolon at end of struct or union
fileio.h:30: error: syntax error before '=' token
fileio.c: In function `write_config_file':
fileio.c:33: warning: implicit declaration of function `set_config_xml'
fileio.c: In function `create_dir':
fileio.c:43: warning: implicit declaration of function `mkdir'
fileio.c:43: error: `S_IRUSR' undeclared (first use in this function)
fileio.c:43: error: (Each undeclared identifier is reported only once
fileio.c:43: error: for each function it appears in.)
fileio.c:43: error: `S_IWUSR' undeclared (first use in this function)
fileio.c:43: error: `S_IXUSR' undeclared (first use in this function)
fileio.c: In function `get_config_xml':
fileio.c:98: error: `xmlDocPtr' undeclared (first use in this function)
fileio.c:98: error: syntax error before "doc"
fileio.c:99: error: `xmlNodePtr' undeclared (first use in this function)
fileio.c:102: error: `doc' undeclared (first use in this function)
fileio.c:102: warning: implicit declaration of function `xmlParseFile'
fileio.c:104: warning: implicit declaration of function `err_msg'
fileio.c:108: error: `cur' undeclared (first use in this function)
fileio.c:108: warning: implicit declaration of function `xmlDocGetRootElement'
fileio.c:111: warning: implicit declaration of function `xmlFreeDoc'
fileio.c:120: warning: implicit declaration of function `xmlGetProp'
fileio.c:120: error: syntax error before "xmlChar"
fileio.c:121: error: syntax error before "xmlChar"
fileio.c: In function `check_file':
fileio.c:155: error: storage size of `filestat' isn't known
fileio.c:157: warning: implicit declaration of function `stat'
fileio.c:155: warning: unused variable `filestat'
fileio.c: In function `readconf':
fileio.c:190: error: invalid application of `sizeof' to an incomplete type
fileio.c:197: error: dereferencing pointer to incomplete type
fileio.c:198: error: dereferencing pointer to incomplete type
fileio.c:202: warning: implicit declaration of function `err_quit'
fileio.c:205: error: dereferencing pointer to incomplete type
fileio.c:222: error: dereferencing pointer to incomplete type
fileio.c:225: error: dereferencing pointer to incomplete type
fileio.c:228: error: dereferencing pointer to incomplete type
fileio.c:230: error: dereferencing pointer to incomplete type
fileio.c:232: error: invalid application of `sizeof' to an incomplete type
fileio.c:233: error: dereferencing pointer to incomplete type
fileio.c:234: error: dereferencing pointer to incomplete type
fileio.c:235: error: dereferencing pointer to incomplete type
fileio.c:243: error: dereferencing pointer to incomplete type
fileio.c:245: error: dereferencing pointer to incomplete type
fileio.c:246: error: dereferencing pointer to incomplete type
fileio.c:256: error: dereferencing pointer to incomplete type
fileio.c:262: error: dereferencing pointer to incomplete type
any luck fixing it yet?
oh and compiled with
Code:
gcc -Wall -g fileio.c -o fileio `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`