Program to generate an xml file based on a provided text file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.6KB

  1. #define MEANING 30 + 12
  2. /*
  3. * This struct houses all the information from the .conf file.
  4. *
  5. * file is the output xml file
  6. * bible is the bible we are searching for
  7. * book is the book we are searching for
  8. * chapter contains the name of the chapter
  9. * chapter_numbers contains the specific chapter numbers to search for
  10. */
  11. struct configuration {
  12. char *file;
  13. char *bible;
  14. char *book;
  15. char *chapter;
  16. char *chapter_numbers;
  17. } typedef CONFIG;
  18. /*
  19. * This struct houses all the data for a specific chapter.
  20. *
  21. * chapter is the chapter number of the struct
  22. * current is used to track iteration in the struct
  23. * verses is the number of verses contained in the verse variable
  24. * verse contains the verses
  25. */
  26. struct chapter_data {
  27. int chapter;
  28. int current;
  29. int verses;
  30. char **verse;
  31. } typedef CHAPTER;
  32. /*
  33. * This struct contains the data for the book and it's chapters.
  34. * current is used for iteration in the struct
  35. * chapters is the ammount of chapters that are contained in the chapter variable
  36. * chapter contains all of the chapters
  37. */
  38. struct book_data {
  39. int current;
  40. int chapters;
  41. CHAPTER **chapter;
  42. } typedef BOOK;
  43. /*
  44. * Global variables.
  45. *
  46. * config contains the configuration that has been loaded from the .conf file
  47. * book contains all the information read from Biblia.txt
  48. */
  49. CONFIG *config;
  50. BOOK *book;
  51. /*
  52. * This function is called on exit to clean up the memory usage.
  53. */
  54. void cleanup();
  55. /*
  56. * Print information on the program's usage. If the argument is 1, the user
  57. * put something incorrect as an argument.
  58. */
  59. void print_usage(int error);