context_stack.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Copyright 2010, 2011, 2012, 2013, 2014, 2015
  2. Free Software Foundation, Inc.
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. enum context {
  14. ct_NONE,
  15. ct_line,
  16. ct_def,
  17. ct_preformatted,
  18. ct_rawpreformatted,
  19. ct_menu,
  20. ct_math,
  21. ct_footnote,
  22. ct_caption,
  23. ct_shortcaption,
  24. ct_inlineraw
  25. };
  26. /* Contexts where an empty line doesn't start a new paragraph. */
  27. /* line 492 */
  28. #define in_paragraph_context(c) \
  29. !((c) == ct_math \
  30. || (c) == ct_menu \
  31. || (c) == ct_def \
  32. || (c) == ct_preformatted \
  33. || (c) == ct_rawpreformatted \
  34. || (c) == ct_inlineraw)
  35. void push_context (enum context c);
  36. enum context pop_context ();
  37. enum context current_context (void);
  38. void reset_context_stack (void);
  39. void push_region (ELEMENT *r);
  40. ELEMENT *pop_region (void);
  41. ELEMENT *current_region (void);
  42. enum command_id current_region_cmd (void);
  43. void reset_region_stack (void);