2016-10-20 20:45:07 -03:00
|
|
|
#define MEANING 30 + 12
|
2016-10-17 11:31:42 -03:00
|
|
|
|
2016-10-21 18:42:37 -03:00
|
|
|
/*
|
|
|
|
* This struct houses all the information from the .conf file.
|
|
|
|
*
|
|
|
|
* file is the output xml file
|
|
|
|
* bible is the bible we are searching for
|
|
|
|
* book is the book we are searching for
|
|
|
|
* chapter contains the name of the chapter
|
|
|
|
* chapter_numbers contains the specific chapter numbers to search for
|
|
|
|
*/
|
2016-10-13 17:19:59 -03:00
|
|
|
struct configuration {
|
2016-10-13 19:55:33 -03:00
|
|
|
char *file;
|
|
|
|
char *bible;
|
|
|
|
char *book;
|
|
|
|
char *chapter;
|
|
|
|
char *chapter_numbers;
|
2016-10-13 17:19:59 -03:00
|
|
|
} typedef CONFIG;
|
|
|
|
|
2016-10-21 18:42:37 -03:00
|
|
|
/*
|
|
|
|
* This struct houses all the data for a specific chapter.
|
|
|
|
*
|
|
|
|
* chapter is the chapter number of the struct
|
|
|
|
* current is used to track iteration in the struct
|
|
|
|
* verses is the number of verses contained in the verse variable
|
|
|
|
* verse contains the verses
|
|
|
|
*/
|
2016-10-20 20:45:07 -03:00
|
|
|
struct chapterdata {
|
2016-10-20 23:08:33 -03:00
|
|
|
int chapter;
|
2016-10-20 20:45:07 -03:00
|
|
|
int current;
|
|
|
|
int verses;
|
|
|
|
char **verse;
|
|
|
|
} typedef CHAPTER;
|
|
|
|
|
2016-10-21 18:42:37 -03:00
|
|
|
/*
|
|
|
|
* This struct contains the data for the book and it's chapters.
|
|
|
|
* current is used for iteration in the struct
|
|
|
|
* chapters is the ammount of chapters that are contained in the chapter variable
|
|
|
|
* chapter contains all of the chapters
|
|
|
|
*/
|
2016-10-20 20:45:07 -03:00
|
|
|
struct bookdata {
|
|
|
|
int current;
|
|
|
|
int chapters;
|
|
|
|
CHAPTER **chapter;
|
|
|
|
} typedef BOOK;
|
|
|
|
|
2016-10-21 18:42:37 -03:00
|
|
|
/*
|
|
|
|
* Global variables.
|
|
|
|
*
|
|
|
|
* config contains the configuration that has been loaded from the .conf file
|
|
|
|
* book contains all the information read from Biblia.txt
|
|
|
|
*/
|
2016-10-13 17:19:59 -03:00
|
|
|
CONFIG *config;
|
2016-10-20 20:45:07 -03:00
|
|
|
BOOK *book;
|
2016-10-13 17:19:59 -03:00
|
|
|
|
2016-10-21 18:42:37 -03:00
|
|
|
/*
|
|
|
|
* This function is called on exit to clean up the memory usage.
|
|
|
|
*/
|
2016-10-13 17:19:59 -03:00
|
|
|
void cleanup();
|
2016-10-21 18:42:37 -03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Print information on the program's usage. If the argument is 1, the user
|
|
|
|
* put something incorrect as an argument.
|
|
|
|
*/
|
2016-10-13 15:08:01 -03:00
|
|
|
void printusage(int error);
|