aboutsummaryrefslogtreecommitdiff
path: root/mktpl/README
blob: 85a2fe3d4b06a9600fe99ea1c08e7a99f75e30ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
                              README

`mktpl' is a simple UNIX program that compiles template files (.t)
to C files (.tc). Template files support special syntax (<% ... %>)
that may contain C code.

For example, the template

	This will be printed.
	<%
	/* This C code will be executed. */
	for(i = 0; i<10; i++) printf("Hello World!\n");
	strcpy(s, "This");
	%>
	<%= s %> will be evaluated and printed as a string.

is compiled to the following C code:

	printf("This will be printed.\n	");
	/* This C code will be executed. */
	for(i = 0; i<10; i++) printf("Hello World!\n");
	strcpy(s, "This");
	
	printf("\n");
	printf("%s",  s );
	printf(" will be evaluated and printed as a string.");