Changeset 768 in MondoRescue for trunk/mondo/mondo/test/test-conf.c
- Timestamp:
- Aug 8, 2006, 3:51:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/test/test-conf.c
r531 r768 8 8 #include <stdio.h> 9 9 #include "my-stuff.h" 10 #include " libmondo-conf.h"10 #include "mr_conf.h" 11 11 12 12 int g_main_pid = 0; … … 19 19 char *s = NULL; 20 20 21 if ((ret = mr conf_open("mondo.conf")) != 0) {21 if ((ret = mr_conf_open("mondo.conf")) != 0) { 22 22 fprintf(stderr,"Unable to open conf file (%d)\n",ret); 23 23 exit(-1); 24 24 } 25 if ((i = mr conf_iread("testinteger")) == 0) {25 if ((i = mr_conf_iread("testinteger")) == 0) { 26 26 fprintf(stderr,"Unable to get integer\n"); 27 27 exit(-1); 28 28 } 29 29 fprintf(stdout, "Integer : ***%d***\n",i); 30 if ((f = mr conf_fread("testfloat")) == 0.0) {30 if ((f = mr_conf_fread("testfloat")) == 0.0) { 31 31 fprintf(stderr,"Unable to get float\n"); 32 32 exit(-1); 33 33 } 34 34 fprintf(stdout, "Float : ***%f***\n",f); 35 if (! (s = mr conf_sread("teststring"))) {35 if (! (s = mr_conf_sread("teststring"))) { 36 36 fprintf(stderr,"Unable to get string\n"); 37 37 exit(-1); … … 39 39 fprintf(stdout, "String : ***%s***\n",s); 40 40 paranoid_free(s); 41 mr conf_close();41 mr_conf_close(); 42 42 exit(0); 43 43 }
Note:
See TracChangeset
for help on using the changeset viewer.