show configuration on the screen
This commit is contained in:
parent
17f620f919
commit
e37024b041
19
main.c
19
main.c
@ -5,6 +5,8 @@
|
||||
#include "main.h"
|
||||
#include "readconfig.h"
|
||||
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
atexit(cleanup);
|
||||
|
||||
@ -38,12 +40,25 @@ int main(int argc, char *argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("file: %s\n", config->file);
|
||||
printf("bible: %s\n", config->bible);
|
||||
printf("Configuración:\n");
|
||||
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;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
fprintf(stderr, "libxml2 no tiene tree support compilado\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Cleanup on aisle 3
|
||||
* */
|
||||
void cleanup() {
|
||||
|
11
readconfig.c
11
readconfig.c
@ -6,8 +6,6 @@
|
||||
#include <libxml/xinclude.h>
|
||||
#include "main.h"
|
||||
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
|
||||
int readconfig(char *config_file, CONFIG *config) {
|
||||
/* Initilize the library */
|
||||
LIBXML_TEST_VERSION
|
||||
@ -75,12 +73,3 @@ int readconfig(char *config_file, CONFIG *config) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int readconfig(char *config_file, CONFIG config) {
|
||||
fprintf(stderr, "libxml2 no tiene tree support compilado\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user