ManPages.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _ManPages_h_
  2. #define _ManPages_h_
  3. /* ManPages.h
  4. *
  5. * Copyright (C) 1996-2011,2015,2017 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "ManPage.h"
  21. #include "Collection.h"
  22. Thing_define (ManPages, Daata) {
  23. OrderedOf<structManPage> pages;
  24. autostring32vector titles;
  25. bool ground, dynamic, executable;
  26. structMelderDir rootDirectory;
  27. void v_destroy () noexcept
  28. override;
  29. void v_readText (MelderReadText text, int formatVersion)
  30. override;
  31. };
  32. autoManPages ManPages_create ();
  33. void ManPages_addPage (ManPages me, conststring32 title, conststring32 author, integer date,
  34. struct structManPage_Paragraph paragraphs []);
  35. /*
  36. All string and struct arguments must be statically allocated
  37. and not change after adding them to the ManPages.
  38. */
  39. integer ManPages_lookUp (ManPages me, conststring32 title);
  40. void ManPages_writeOneToHtmlFile (ManPages me, integer ipage, MelderFile file);
  41. void ManPages_writeAllToHtmlDir (ManPages me, conststring32 dirPath);
  42. integer ManPages_uniqueLinksHither (ManPages me, integer ipage);
  43. conststring32vector ManPages_getTitles (ManPages me);
  44. /* End of file ManPages.h */
  45. #endif