Browse Source

show configuration on the screen

master
Chris Cromer 3 years ago
parent
commit
e37024b041
2 changed files with 17 additions and 13 deletions
  1. +17
    -2
      main.c
  2. +0
    -11
      readconfig.c

+ 17
- 2
main.c View File

@@ -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() {


+ 0
- 11
readconfig.c View File

@@ -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…
Cancel
Save