aboutsummaryrefslogtreecommitdiff
path: root/mktpl/README
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-18 02:25:16 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-18 02:25:16 +0200
commitf8ef7e4a7c538bf392237c6c29caa9dedca6e29e (patch)
tree5a69b89d1f8879381e5714b54d32206dd45877e9 /mktpl/README
parentc1e3206968f9878f8b7883cc7c313cd930c86d04 (diff)
downloadcforum-f8ef7e4a7c538bf392237c6c29caa9dedca6e29e.tar.gz
Add README for mktpl
Diffstat (limited to 'mktpl/README')
-rw-r--r--mktpl/README26
1 files changed, 26 insertions, 0 deletions
diff --git a/mktpl/README b/mktpl/README
new file mode 100644
index 0000000..85a2fe3
--- /dev/null
+++ b/mktpl/README
@@ -0,0 +1,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.");