1: /******************************************************************************
2: ezht - Copyright (C) 2004 Tradcrafts
3: This file is part of the ezht.
4:
5: ezht is free software; you can redistribute it and/or modify
6: it under the terms of the GNU General Public License as published by the
7: Free Software Foundation; either version 2 of the License, or (at your
8: option) any later version.
9:
10: ezht is distributed in the hope that it will be useful, but
11: WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13: more details.
14:
15: You should have received a copy of the GNU General Public License along with
16: this program; see the file COPYING. If not, write to the Free Software
17: Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
18: ******************************************************************************/
19:
20: #ifndef _STACK_H_
21: #define _STACK_H_
22:
23: #include <vector>
24: #include <list>
25: #include <string>
26:
27: void stack_init();
28: void stack_push(const char *stackname, const char *body);
29: void stack_pop(const char *stackname);
30:
31: const char *stack_peep(const char *elementname,const char *default_body);
32:
33: #define STACKNAME_LANG "lang"
34: #define LANG stack_peep(STACKNAME_LANG,"ja")
35:
36: #define STACKNAME_DOCNAME "docname"
37: #define DOCNAME stack_peep(STACKNAME_DOCNAME,"Untitled")
38:
39: #define STACKNAME_HT_HEAD "head"
40: #define HT_HEAD stack_peep(STACKNAME_HT_HEAD,"")
41:
42: #define STACKNAME_BODY_HEADER "body-header"
43: #define BODY_HEADER stack_peep(STACKNAME_BODY_HEADER,"")
44:
45: #define STACKNAME_BODY_FOOTER "body-footer"
46: #define BODY_FOOTER stack_peep(STACKNAME_BODY_FOOTER,"")
47:
48: #define STACKNAME_BODY_ATTRIBUTES "body-attributes"
49: #define BODY_ATTRIBUTES stack_peep(STACKNAME_BODY_ATTRIBUTES,"")
50:
51:
52:
53: #define STACKNAME_INDEXFILE_INTRODUCTION "indexfile-introduction"
54: #define INDEXFILE_INTRODUCTION stack_peep(STACKNAME_INDEXFILE_INTRODUCTION,"")
55:
56: #define STACKNAME_SECTION_BAR_COLOR "section-bar-color"
57: #define SECTION_BAR_COLOR stack_peep(STACKNAME_SECTION_BAR_COLOR,"silver")
58:
59: #define STACKNAME_SECTION_MARK "section-mark"
60: #define SECTION_MARK stack_peep(STACKNAME_SECTION_MARK,"#")
61:
62: #define STACKNAME_NUMBER_SEPARATOR "number-separator"
63: #define NUMBER_SEPARATOR stack_peep(STACKNAME_NUMBER_SEPARATOR,".")
64:
65: #define STACKNAME_CHARSET "charset"
66: #ifdef unix
67: #define CHARSET stack_peep(STACKNAME_CHARSET,"EUC-JP")
68: #else
69: #define CHARSET stack_peep(STACKNAME_CHARSET,"Shift_JIS")
70: #endif
71:
72: #define STACKNAME_TEXT_INDEX "text-index"
73: #define TEXT_INDEX stack_peep(STACKNAME_TEXT_INDEX,"Index")
74:
75: #define STACKNAME_TEXT_RELATION "text-relation"
76: #define TEXT_RELATION stack_peep(STACKNAME_TEXT_RELATION,"<strong>See also:</strong>")
77:
78: #define STACKNAME_TEXT_SECTION_DISJOINED "text-section-disjoined"
79: #define TEXT_SECTION_DISJOINED stack_peep(STACKNAME_TEXT_SECTION_DISJOINED,"See -->")
80:
81: #define STACKNAME_ANCHOR_INDEX "anchor-index"
82: #define ANCHOR_INDEX stack_peep(STACKNAME_ANCHOR_INDEX,"Index")
83:
84: #define STACKNAME_ANCHOR_UP "anchor-up"
85: #define ANCHOR_UP stack_peep(STACKNAME_ANCHOR_UP,"Up")
86:
87: #define STACKNAME_ANCHOR_PREV "anchor-prev"
88: #define ANCHOR_PREV stack_peep(STACKNAME_ANCHOR_PREV,"<Prev")
89:
90: #define STACKNAME_ANCHOR_NEXT "anchor-next"
91: #define ANCHOR_NEXT stack_peep(STACKNAME_ANCHOR_NEXT,"Next>")
92:
93: #define STACKNAME_ANCHOR_BACK "anchor-back"
94: #define ANCHOR_BACK stack_peep(STACKNAME_ANCHOR_BACK,"Back")
95:
96: #define STACKNAME_INDEXFILE "indexfile"
97: #define INDEXFILE stack_peep(STACKNAME_INDEXFILE,"index.html")
98:
99: #define STACKNAME_FILENAME_PREFIX "filename-prefix"
100: #define FILENAME_PREFIX stack_peep(STACKNAME_FILENAME_PREFIX,"doc")
101:
102: #define STACKNAME_FILENAME_SUFFIX "filename-suffix"
103: #define FILENAME_SUFFIX stack_peep(STACKNAME_FILENAME_SUFFIX,".html")
104:
105: #define STACKNAME_FILENAME_RULE "filename-rule"
106: #define FILENAME_RULE stack_peep(STACKNAME_FILENAME_RULE,"section")
107:
108: #define STACKNAME_INCLUDE_FILTER "include-filter"
109: #define INCLUDE_FILTER stack_peep(STACKNAME_INCLUDE_FILTER,"")
110:
111: #define STACKNAME_INCLUDE_HEADER "include-header"
112: #define INCLUDE_HEADER stack_peep(STACKNAME_INCLUDE_HEADER,"")
113:
114: #define STACKNAME_INCLUDE_FOOTER "include-footer"
115: #define INCLUDE_FOOTER stack_peep(STACKNAME_INCLUDE_FOOTER,"")
116:
117: #define STACKNAME_TAB_SPACES "tab-spaces"
118: #define TAB_SPACES stack_peep(STACKNAME_TAB_SPACES,"8")
119:
120:
121: void cmd_push(std::vector<std::string> &arg);
122: void cmd_pop(std::vector<std::string> &arg);
123: void cmd_autopop(std::list<std::string> &autopop_list, std::vector<std::string> &args);
124:
125: #endif