From f8ef7e4a7c538bf392237c6c29caa9dedca6e29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 18 Sep 2021 02:25:16 +0200 Subject: Add README for mktpl --- mktpl/README | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 mktpl/README (limited to 'mktpl/README') 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."); -- cgit v1.2.3