-rw-r--r-- | src/cliche.1 | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/src/cliche.1 b/src/cliche.1 new file mode 100644 index 0000000..af61a15 --- a/dev/null +++ b/src/cliche.1 | |||
@@ -0,0 +1,99 @@ | |||
1 | .TH cliche 1 "August 27th, 2011" "cliche" "Klever Group (http://www.klever.net/)" | ||
2 | .hla en | ||
3 | |||
4 | .SH NAME | ||
5 | |||
6 | cliche \- A tinimalistc template preprocessor for c++ | ||
7 | |||
8 | .SH SYNOPSYS | ||
9 | |||
10 | \fBcliche\fR | ||
11 | [\fB-h\fR] [\fB--help\fR] [\fB--usage\fR] | ||
12 | [\fB-V\fR] [\fB--version\fR] | ||
13 | [\fB-L\fR] [\fB--license\fR] | ||
14 | [\fB-o\fR \fIfile\fR] [\fB--output=\fR\fIfile\fR] | ||
15 | [\fB-t\fR \fIcode\fR|\fIoutput\fR] [\fB--top=\fR\fIcode\fR|\fIoutput\fR] | ||
16 | [\fB-C\fR] [\fB-O\fR] | ||
17 | |||
18 | .SH DESCRIPTION | ||
19 | |||
20 | cliche preprocesses its input to produce c++ code streaming | ||
21 | out the template while executing embedded c++ code and | ||
22 | expressions. | ||
23 | |||
24 | An example of cliche input file may look like this: | ||
25 | |||
26 | .ti 1 | ||
27 | #include <iostream> | ||
28 | .ti 1 | ||
29 | int main() { | ||
30 | .ti 2 | ||
31 | for(int i=0;i<5;++i) { | ||
32 | .ti 3 | ||
33 | <%output> | ||
34 | .ti 4 | ||
35 | <i>Whoa, it's <b><% i %></b> already!</i><br/> | ||
36 | .ti 3 | ||
37 | </%output> | ||
38 | .ti 2 | ||
39 | } | ||
40 | .ti 1 | ||
41 | } | ||
42 | |||
43 | .SH OPTIONS | ||
44 | |||
45 | .TP | ||
46 | \fB-o\fR \fIfile\fR, \fB--output=\fR\fIfile\fR | ||
47 | Write output to the specified file. | ||
48 | .TP | ||
49 | \fB-t\fR \fIcode\fR|\fIoutput\fR, \fB--top=\fR\fIcode\fR|\fIoutput\fR | ||
50 | Expect input to have code or output (as if in <%code></%code> or <%output></%output> block) on the top-level. Code templates are suitable for feeding into compiler as is, whereas output templates may be better suited for #include. | ||
51 | .TP | ||
52 | \fB-C\fR | ||
53 | Same as \fB-t code\fR. | ||
54 | .TP | ||
55 | \fB-O\fR | ||
56 | Same as \fB-t output\fR. | ||
57 | .TP | ||
58 | \fB-h\fR, \fB--help\fR, \fB--usage\fR | ||
59 | Display short usage instructions and exit. | ||
60 | .TP | ||
61 | \fB-V\fR, \fB--version\fR | ||
62 | Report version and exit. | ||
63 | .TP | ||
64 | \fB-L\fR, \fB--license\fR | ||
65 | Show licensing terms. | ||
66 | |||
67 | .SH EXIT STATUS | ||
68 | Unsurprisingly, \fBcliche\fR returns zero in case of success and non-zero otherwise. | ||
69 | |||
70 | .SH AUTHOR | ||
71 | |||
72 | Written by Michael Krelin <hacker@klever.net> | ||
73 | |||
74 | |||
75 | .SH COPYRIGHT | ||
76 | |||
77 | Copyright (c) 2011 Klever Group (http://www.klever.net/) | ||
78 | |||
79 | Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
80 | this software and associated documentation files (the "Software"), to deal in | ||
81 | the Software without restriction, including without limitation the rights to | ||
82 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
83 | of the Software, and to permit persons to whom the Software is furnished to do | ||
84 | so, subject to the following conditions: | ||
85 | |||
86 | The above copyright notice and this permission notice shall be included in all | ||
87 | copies or substantial portions of the Software. | ||
88 | |||
89 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
90 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
91 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
92 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
93 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
94 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
95 | SOFTWARE. | ||
96 | |||
97 | .SH BUGS | ||
98 | |||
99 | You tell me. Send reports to <cliche-bugs@klever.net> | ||