show configuration on the screen

This commit is contained in:
Chris Cromer 2016-10-13 17:31:50 -03:00
parent 17f620f919
commit e37024b041
2 changed files with 17 additions and 13 deletions

19
main.c
View File

@ -5,6 +5,8 @@
#include "main.h" #include "main.h"
#include "readconfig.h" #include "readconfig.h"
#ifdef LIBXML_TREE_ENABLED
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
atexit(cleanup); atexit(cleanup);
@ -38,12 +40,25 @@ int main(int argc, char *argv[]) {
return 1; return 1;
} }
printf("file: %s\n", config->file); printf("Configuración:\n");
printf("bible: %s\n", config->bible); printf("Archivo: %s\n", config->file);
printf("Biblia: %s\n", config->bible);
printf("Libro: %s\n", config->book);
printf("Nombre de capitulo: %s\n", config->chapter);
printf("Numeros de capitulo: %s\n", config->chapter_numbers);
return 0; return 0;
} }
#else
int main(int argc, char *argv[]) {
fprintf(stderr, "libxml2 no tiene tree support compilado\n");
return 1;
}
#endif
/* Cleanup on aisle 3 /* Cleanup on aisle 3
* */ * */
void cleanup() { void cleanup() {

View File

@ -6,8 +6,6 @@
#include <libxml/xinclude.h> #include <libxml/xinclude.h>
#include "main.h" #include "main.h"
#ifdef LIBXML_TREE_ENABLED
int readconfig(char *config_file, CONFIG *config) { int readconfig(char *config_file, CONFIG *config) {
/* Initilize the library */ /* Initilize the library */
LIBXML_TEST_VERSION LIBXML_TEST_VERSION
@ -75,12 +73,3 @@ int readconfig(char *config_file, CONFIG *config) {
return 0; return 0;
} }
#else
int readconfig(char *config_file, CONFIG config) {
fprintf(stderr, "libxml2 no tiene tree support compilado\n");
return 1;
}
#endif