Fossil SCM

Improved header comment provides addition documentation for the "translate.c" compilation tool. No changes to code.

drh 2013-07-13 17:54 UTC sbsreloaded
Commit 7e5f3062354c41918d53a5271b5b71e440c23206
1 file changed +15
--- src/translate.c
+++ src/translate.c
@@ -30,10 +30,25 @@
3030
**
3131
** This tool allows us to put raw HTML, without the special codes, in
3232
** the middle of a C program. This program then translates the text
3333
** into standard C by inserting all necessary backslashes and other
3434
** punctuation.
35
+**
36
+** Enhancement #1:
37
+**
38
+** If the last non-whitespace character prior to the first "@" of a
39
+** @-block is "=" or "," then the @-block is a string literal initializer
40
+** rather than text that is to be output via cgi_printf(). Render it
41
+** as such.
42
+**
43
+** Enhancement #2:
44
+**
45
+** Comments of the form: "/* @-comment: CC" cause CC to become a
46
+** comment character for the @-substitution. Typical values for CC are
47
+** "--" (for SQL text) or "#" (for TCL script) or "//" (for C++ code).
48
+** Lines of subsequent @-blocks that begin with CC are omitted from the
49
+** output.
3550
**
3651
*/
3752
#include <stdio.h>
3853
#include <ctype.h>
3954
#include <stdlib.h>
4055
--- src/translate.c
+++ src/translate.c
@@ -30,10 +30,25 @@
30 **
31 ** This tool allows us to put raw HTML, without the special codes, in
32 ** the middle of a C program. This program then translates the text
33 ** into standard C by inserting all necessary backslashes and other
34 ** punctuation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35 **
36 */
37 #include <stdio.h>
38 #include <ctype.h>
39 #include <stdlib.h>
40
--- src/translate.c
+++ src/translate.c
@@ -30,10 +30,25 @@
30 **
31 ** This tool allows us to put raw HTML, without the special codes, in
32 ** the middle of a C program. This program then translates the text
33 ** into standard C by inserting all necessary backslashes and other
34 ** punctuation.
35 **
36 ** Enhancement #1:
37 **
38 ** If the last non-whitespace character prior to the first "@" of a
39 ** @-block is "=" or "," then the @-block is a string literal initializer
40 ** rather than text that is to be output via cgi_printf(). Render it
41 ** as such.
42 **
43 ** Enhancement #2:
44 **
45 ** Comments of the form: "/* @-comment: CC" cause CC to become a
46 ** comment character for the @-substitution. Typical values for CC are
47 ** "--" (for SQL text) or "#" (for TCL script) or "//" (for C++ code).
48 ** Lines of subsequent @-blocks that begin with CC are omitted from the
49 ** output.
50 **
51 */
52 #include <stdio.h>
53 #include <ctype.h>
54 #include <stdlib.h>
55

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button