aboutsummaryrefslogtreecommitdiffstats
path: root/prg2lout.c
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-05-19 00:42:48 +0200
committerMatěj Cepl <mcepl@cepl.eu>2024-05-19 00:42:48 +0200
commiteb3942e15700f3f4f61b4e46917ae8fbe614e524 (patch)
treebe0c003fa8a0dead8d9dc921050ba13a56d1a9dd /prg2lout.c
parent71d625f730d872791eef74d7999e1be28d5e5c7e (diff)
downloadlout-master.tar.gz
Lout 3.41.HEADmaster
http://jeffreykingston.id.au/lout/lout-3.41.tar.gz
Diffstat (limited to 'prg2lout.c')
-rw-r--r--prg2lout.c573
1 files changed, 285 insertions, 288 deletions
diff --git a/prg2lout.c b/prg2lout.c
index 44fddd6..f1afe74 100644
--- a/prg2lout.c
+++ b/prg2lout.c
@@ -140,9 +140,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define FALSE 0
-#define TRUE 1
-#define BOOLEAN unsigned
+#include <stdbool.h>
#define MAX_CHAR 256
#define is_whitespace(ch) ((ch)==' ' || (ch)=='\t' || (ch)=='\n' || (ch)=='\f')
#define U (unsigned char *)
@@ -414,7 +412,7 @@ U "%s", U "%t", U "%u", U "%v", U "%w", U "%x", U "%y", U "%z", U "%_"
/* "broken" multi-line token, print this command after each fragment */
/* */
/* start_line_only */
-/* A Boolean field. If TRUE, this token is to be recognized only */
+/* A Boolean field. If true, this token is to be recognized only */
/* if it occurs at the very start of a line. */
/* */
/* starts[] */
@@ -510,11 +508,11 @@ U "%s", U "%t", U "%u", U "%v", U "%w", U "%x", U "%y", U "%z", U "%_"
/* is ignored, since ends2[] explains how the token ends. */
/* */
/* end_start_line_only */
-/* A BOOLEAN field. If true, the end delimiter is to be recognized */
+/* A bool field. If true, the end delimiter is to be recognized */
/* only if it occurs at the very start of a line. */
/* */
/* want_two_ends */
-/* A Boolean feature used only by Perl; TRUE means that end_delimiter */
+/* A Boolean feature used only by Perl; true means that end_delimiter */
/* (or ends2[]) has to be encountered twice before the token ends, */
/* rather than the usual once. Used by PerSTypeToken to recognise */
/* */
@@ -535,7 +533,7 @@ typedef struct token_rec {
unsigned char *name;
int print_style;
unsigned char *command, *alternate_command, *following_command;
- BOOLEAN start_line_only;
+ bool start_line_only;
unsigned char *starts[MAX_STARTS];
unsigned char *starts2[MAX_STARTS2];
unsigned char *brackets2[MAX_STARTS2];
@@ -547,8 +545,8 @@ typedef struct token_rec {
unsigned char *end_inner_escape;
unsigned char *bracket_delimiter;
unsigned char *end_delimiter;
- BOOLEAN end_start_line_only;
- BOOLEAN want_two_ends;
+ bool end_start_line_only;
+ bool want_two_ends;
/* The following options are initialized by the program, so don't you */
unsigned char chtype[MAX_CHAR]; /* char types within token */
@@ -569,7 +567,7 @@ TOKEN CStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "\"" }, /* strings begin with a " character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -581,8 +579,8 @@ TOKEN CStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "\"", /* strings end with a " character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN CCharacterToken = {
@@ -591,7 +589,7 @@ TOKEN CCharacterToken = {
U "@PS", /* Lout command for formatting characters */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "'" }, /* characters begin with a ' character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -603,8 +601,8 @@ TOKEN CCharacterToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "'", /* characters end with a ' character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -614,7 +612,7 @@ TOKEN EiffelStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "\"" }, /* strings begin with a " character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -626,8 +624,8 @@ TOKEN EiffelStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "\"", /* strings end with a " character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN EiffelCharacterToken = {
@@ -636,7 +634,7 @@ TOKEN EiffelCharacterToken = {
U "@PS", /* Lout command for formatting characters */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "'" }, /* characters begin with a ' character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -648,8 +646,8 @@ TOKEN EiffelCharacterToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "'", /* characters end with a ' character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -659,7 +657,7 @@ TOKEN PythonDblStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "\"" }, /* strings begin with a " character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -671,8 +669,8 @@ TOKEN PythonDblStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "\"", /* strings end with a " character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PythonSnglStringToken = {
@@ -681,7 +679,7 @@ TOKEN PythonSnglStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "'" }, /* strings begin with a ' character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -693,8 +691,8 @@ TOKEN PythonSnglStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "'", /* strings end with a ' character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PythonTriSnglStringToken = {
@@ -703,7 +701,7 @@ TOKEN PythonTriSnglStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "'''" }, /* strings begin with ''' */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -715,8 +713,8 @@ TOKEN PythonTriSnglStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "'''", /* strings end with ''' */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PythonTriDblStringToken = {
@@ -725,7 +723,7 @@ TOKEN PythonTriDblStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "\"\"\"" }, /* strings begin with """ */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -737,8 +735,8 @@ TOKEN PythonTriDblStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "\"\"\"", /* strings end with """ */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN HaskellStringToken = {
@@ -747,7 +745,7 @@ TOKEN HaskellStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "\"" }, /* strings begin with a " character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -759,8 +757,8 @@ TOKEN HaskellStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "\"", /* strings end with a " character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN HaskellCharacterToken = {
@@ -769,7 +767,7 @@ TOKEN HaskellCharacterToken = {
U "@PS", /* Lout command for formatting characters */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "'" }, /* characters begin with a ' character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -781,8 +779,8 @@ TOKEN HaskellCharacterToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "'", /* characters end with a ' character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -798,7 +796,7 @@ TOKEN IdentifierToken = {
U "@PI", /* Lout command for formatting identifiers */
U "@PK", /* Alternate command (for keywords) */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ SepLetters, U "_" }, /* identifiers begin with any letter or _ */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -810,8 +808,8 @@ TOKEN IdentifierToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* identifiers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN HaskellIdentifierToken = {
@@ -820,7 +818,7 @@ TOKEN HaskellIdentifierToken = {
U "@PI", /* Lout command for formatting identifiers */
U "@PK", /* Alternate command (for keywords) */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ SepLetters, U "_", U "`" }, /* identifiers begin with any letter or _ */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -832,8 +830,8 @@ TOKEN HaskellIdentifierToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* identifiers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -849,7 +847,7 @@ TOKEN NumberToken = {
U "@PN", /* Lout command for formatting numbers */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ SepDigits }, /* numbers must begin with a digit */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -861,8 +859,8 @@ TOKEN NumberToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* numbers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -879,7 +877,7 @@ TOKEN NumberToken = {
U "@PO", /* Lout command for formatting this */ \
U "", /* no alternate command */ \
U "", /* no following command */ \
- FALSE, /* token not just start of line */ \
+ false, /* token not just start of line */ \
{ start }, /* token begins with any of these */ \
{ NULL }, /* no start2 needed */ \
{ NULL }, /* so no brackets2 either */ \
@@ -889,8 +887,8 @@ TOKEN NumberToken = {
U "", U "", /* no inner escape; no end inner esc */ \
U "", /* no bracketing delimiter */ \
U "", /* no ending delimiter */ \
- FALSE, /* end not have to be at line start */ \
- FALSE, /* don't end delimiter twice to stop */ \
+ false, /* end not have to be at line start */ \
+ false, /* don't end delimiter twice to stop */ \
}
TOKEN NonpareilOperatorToken =
@@ -912,7 +910,7 @@ TOKEN CCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "/*" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -924,8 +922,8 @@ TOKEN CCommentToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "*/", /* comments end with this character pair */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN CPPCommentToken = {
@@ -934,7 +932,7 @@ TOKEN CPPCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "//" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -946,8 +944,8 @@ TOKEN CPPCommentToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* no end delimiter (end of line will end it) */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -957,7 +955,7 @@ TOKEN EiffelCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "--" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -969,8 +967,8 @@ TOKEN EiffelCommentToken = {
U "'", /* end of "inner escape" in Eiffel comment */
U "", /* no bracketing delimiter */
U "", /* no ending delimiter; end of line will end it */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN BlueCommentToken = {
@@ -979,7 +977,7 @@ TOKEN BlueCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "==", U "--" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -991,8 +989,8 @@ TOKEN BlueCommentToken = {
U "'", /* end of "inner escape" in Blue comment */
U "", /* no bracketing delimiter */
U "", /* no ending delimiter; end of line will end it */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN NonpareilCommentToken = {
@@ -1001,7 +999,7 @@ TOKEN NonpareilCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "#" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1013,8 +1011,8 @@ TOKEN NonpareilCommentToken = {
U "'", /* end of "inner escape" in Nonpareil comment */
U "", /* no bracketing delimiter */
U "", /* no end delimiter (end of line will end it) */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PythonCommentToken = {
@@ -1023,7 +1021,7 @@ TOKEN PythonCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "#" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1035,8 +1033,8 @@ TOKEN PythonCommentToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* no end delimiter (end of line will end it) */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN HaskellLineCommentToken = {
@@ -1045,7 +1043,7 @@ TOKEN HaskellLineCommentToken = {
U "@PCL", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "--" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1057,8 +1055,8 @@ TOKEN HaskellLineCommentToken = {
U "'", /* end of "inner escape" in Haskell comment */
U "", /* no bracketing delimiter */
U "", /* no ending delimiter; end of line will end it */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN HaskellCommentToken = {
@@ -1067,7 +1065,7 @@ TOKEN HaskellCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "{-" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1079,8 +1077,8 @@ TOKEN HaskellCommentToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "-}", /* comments end with this character pair */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1098,7 +1096,7 @@ TOKEN CCommentEscapeToken = {
U "", /* no Lout command since we are printing raw */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "/*@" }, /* escape comments begin with this delimiter */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1110,8 +1108,8 @@ TOKEN CCommentEscapeToken = {
U "", /* so no end of "inner escape" either */
U "", /* no bracketing delimiter */
U "*/", /* comments end with this character pair */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN CPPCommentEscapeToken = {
@@ -1120,7 +1118,7 @@ TOKEN CPPCommentEscapeToken = {
U "", /* no Lout command since we are printing raw */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "//@" }, /* escape comments begin with this delimiter */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1132,8 +1130,8 @@ TOKEN CPPCommentEscapeToken = {
U "", /* so no end of "inner escape" either */
U "", /* no bracketing delimiter */
U "", /* no end delimiter (end of line will end it) */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1143,7 +1141,7 @@ TOKEN EiffelCommentEscapeToken = {
U "", /* no Lout command since we are printing raw */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "--@" }, /* escape comments begin with this delimiter */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1155,8 +1153,8 @@ TOKEN EiffelCommentEscapeToken = {
U "", /* so no end of "inner escape" either */
U "", /* no bracketing delimiter */
U "", /* no ending delimiter; end of line will end it */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN BlueCommentEscapeToken = {
@@ -1165,7 +1163,7 @@ TOKEN BlueCommentEscapeToken = {
U "", /* no Lout command since we are printing raw */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "==@", U "--@" }, /* escape comments begin with these delimiters */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1177,8 +1175,8 @@ TOKEN BlueCommentEscapeToken = {
U "", /* so no end of "inner escape" either */
U "", /* no bracketing delimiter */
U "", /* no ending delimiter; end of line will end it */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PythonCommentEscapeToken = {
@@ -1187,7 +1185,7 @@ TOKEN PythonCommentEscapeToken = {
U "", /* no Lout command since we are printing raw */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "#@" }, /* escape comments begin with this delimiter */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1199,8 +1197,8 @@ TOKEN PythonCommentEscapeToken = {
U "", /* so no end of "inner escape" either */
U "", /* no bracketing delimiter */
U "", /* no ending delimiter; end of line will end it */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN HaskellCommentEscapeToken = {
@@ -1209,7 +1207,7 @@ TOKEN HaskellCommentEscapeToken = {
U "",
U "",
U "",
- FALSE,
+ false,
{ U "{-@" },
{ NULL },
{ NULL },
@@ -1221,8 +1219,8 @@ TOKEN HaskellCommentEscapeToken = {
U "",
U "",
U "-}",
- FALSE,
- FALSE,
+ false,
+ false,
};
TOKEN HaskellLineCommentEscapeToken = {
@@ -1231,7 +1229,7 @@ TOKEN HaskellLineCommentEscapeToken = {
U "", /* no Lout command since we are printing raw */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "--@" }, /* escape comments begin with this delimiter */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1243,8 +1241,8 @@ TOKEN HaskellLineCommentEscapeToken = {
U "", /* so no end of "inner escape" either */
U "", /* no bracketing delimiter */
U "", /* no ending delimiter; end of line will end it */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1261,7 +1259,7 @@ TOKEN HaskellLineCommentEscapeToken = {
U command, /* Lout command for formatting this */ \
U "", /* no alternate command */ \
U "", /* no following command */ \
- FALSE, /* token not just start of line */ \
+ false, /* token not just start of line */ \
{ U str }, /* token begins (and ends!) with this */ \
{ NULL }, /* no start2 needed */ \
{ NULL }, /* so no brackets2 either */ \
@@ -1271,8 +1269,8 @@ TOKEN HaskellLineCommentEscapeToken = {
U "", U "", /* no inner escape; no end inner esc */ \
U "", /* no bracketing delimiter */ \
U "", /* no ending delimiter */ \
- FALSE, /* end not have to be at line start */ \
- FALSE, /* don't end delimiter twice to stop */ \
+ false, /* end not have to be at line start */ \
+ false, /* don't end delimiter twice to stop */ \
}
TOKEN HashToken = FixedToken("#", "@PO");
@@ -1344,7 +1342,7 @@ TOKEN PythonDecoratorToken = FixedToken( "@", "@PO" );
U command, /* Lout command for formatting this */ \
U "", /* no alternate command */ \
U "", /* following command */ \
- FALSE, /* token not just start of line */ \
+ false, /* token not just start of line */ \
{ U str }, /* token begins (and ends!) with this */ \
{ NULL }, /* no start2 needed */ \
{ NULL }, /* so no bracket2 either */ \
@@ -1354,8 +1352,8 @@ TOKEN PythonDecoratorToken = FixedToken( "@", "@PO" );
U "", U "", /* no inner escape; no end inner esc */ \
U "", /* no bracketing delimiter */ \
U "", /* no ending delimiter */ \
- FALSE, /* end not have to be at line start */ \
- FALSE, /* don't end delimiter twice to stop */ \
+ false, /* end not have to be at line start */ \
+ false, /* don't end delimiter twice to stop */ \
}
TOKEN StarToken = NoParameterToken("*", "{@PA}");
@@ -1378,7 +1376,7 @@ TOKEN RubyIdentifierToken = {
U "@PI", /* Lout command for formatting identifiers */
U "@PK", /* Alternate command (for keywords) */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ SepLetters, U "_", U "$",
U "@@", U "@" }, /* identifiers begin with these */
{ NULL }, /* no start2 needed */
@@ -1391,8 +1389,8 @@ TOKEN RubyIdentifierToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* identifiers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN RubyGenDelimStringToken = {
@@ -1401,7 +1399,7 @@ TOKEN RubyGenDelimStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "%", U "%q", U "%Q", U "%w",
U "%r", U "%x" }, /* generalized strings begin with these */
{ SepPunct }, /* start2 can be any punctuation character */
@@ -1414,8 +1412,8 @@ TOKEN RubyGenDelimStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* will be using bracket2 for bracket delimiter */
U "", /* will be using end2 for the end delimiter here */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1431,7 +1429,7 @@ TOKEN RSLIdentifierToken = {
U "@PI", /* Lout command for formatting identifiers */
U "@PK", /* Alternate command (for keywords) */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ SepLetters, U "_", U "`" }, /* identifiers begin with any letter or _ */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no brackets2 either */
@@ -1443,8 +1441,8 @@ TOKEN RSLIdentifierToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* identifiers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN RSLProductToken = FixedToken("><", "@A sym{multiply} @PO" ) ;
@@ -1545,7 +1543,7 @@ TOKEN PerlSingleQuoteStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "'" }, /* strings begin with a ' character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -1556,8 +1554,8 @@ TOKEN PerlSingleQuoteStringToken = {
U "", U "", /* no "inner escapes"; no end innner escape */
U "", /* no bracketing delimiter */
U "\'", /* strings end with a ' character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PerlDoubleQuoteStringToken = {
@@ -1566,7 +1564,7 @@ TOKEN PerlDoubleQuoteStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "\"" }, /* strings begin with a " character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -1577,8 +1575,8 @@ TOKEN PerlDoubleQuoteStringToken = {
U "", U "", /* no "inner escapes"; no end innner escape */
U "", /* no bracketing delimiter */
U "\"", /* strings end with a " character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PerlBackQuoteStringToken = {
@@ -1587,7 +1585,7 @@ TOKEN PerlBackQuoteStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "`" }, /* strings begin with a ` character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -1598,8 +1596,8 @@ TOKEN PerlBackQuoteStringToken = {
U "", U "", /* no "inner escapes"; no end innner escape */
U "", /* no bracketing delimiter */
U "`", /* strings end with a ` character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1609,7 +1607,7 @@ TOKEN PerlQTypeStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "q", U "qq", U "qx", U "qw", U "qr", U "m" },/* q-type string begins */
{ SepPunct }, /* start2 can be any punctuation character */
{ BktPunct }, /* bracketing delimiters to match SepPunct */
@@ -1621,8 +1619,8 @@ TOKEN PerlQTypeStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* will be using bracket2 for bracket delimiter */
U "", /* will be using end2 for the end delimiter here */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PerlSTypeStringToken = {
@@ -1631,7 +1629,7 @@ TOKEN PerlSTypeStringToken = {
U "@PS", /* Lout command for formatting strings */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "s", U "y", U "tr" }, /* s-type strings begin with these */
{ SepPunct }, /* start2 can be any punctuation character */
{ BktPunct }, /* bracketing delimiters to match SepPunct */
@@ -1643,8 +1641,8 @@ TOKEN PerlSTypeStringToken = {
U "", /* and so there is no end innner escape either */
U "", /* will be using bracket2 for bracket delimiter */
U "", /* will be using end2 for the end delimiter here */
- FALSE, /* end delimiter does not have to be at line start */
- TRUE, /* need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ true, /* need to see end delimiter twice to stop */
};
@@ -1667,7 +1665,7 @@ TOKEN PerlSTypeStringToken = {
U com, /* the command */ \
U "", /* no alternate command */ \
U "@PS{\"/\"}", /* following command (final /) */ \
- FALSE, /* token allowed not just start of line */ \
+ false, /* token allowed not just start of line */ \
{ U start }, /* preceding token in this case */ \
{ U "/", U " /", U "\t/", U " /", U " \t/", U "\t /", U "\t\t/" }, \
{ U "", U "", U "", U "", U "", U "", U "" }, \
@@ -1679,8 +1677,8 @@ TOKEN PerlSTypeStringToken = {
U "", /* no end innner escape either */ \
U "", /* will be using bracket2 here */ \
U "", /* will be using end2 here */ \
- FALSE, /* no need to end at line start */ \
- FALSE, /* don't want end delimiter twice */ \
+ false, /* no need to end at line start */ \
+ false, /* don't want end delimiter twice */ \
}
@@ -1709,7 +1707,7 @@ TOKEN PerlRegExpStartLineToken =
U "@PS", /* the command */
U "", /* no alternate command */
U "", /* no following command */
- TRUE, /* token allowed only at start of line */
+ true, /* token allowed only at start of line */
{ U "/" }, /* starting delimiter (so easy!) */
{ NULL }, /* no start2 */
{ NULL }, /* so no bracket2 either */
@@ -1721,8 +1719,8 @@ TOKEN PerlRegExpStartLineToken =
U "", /* no end innner escape either */
U "", /* no bracketing delimiter */
U "/", /* ending delimiter */
- FALSE, /* no need to end at line start */
- FALSE, /* don't want end delimiter twice */
+ false, /* no need to end at line start */
+ false, /* don't want end delimiter twice */
};
@@ -1742,7 +1740,7 @@ TOKEN PerlRegExpStartLineToken =
startcom, /* the command */ \
"", /* no alternate command */ \
endcom, /* following command */ \
- FALSE, /* token allowed not just start of line */ \
+ false, /* token allowed not just start of line */ \
{ startstr }, /* starting delimiter */ \
{ NULL }, /* no start2 */ \
{ NULL }, /* so no bracket2 either */ \
@@ -1752,8 +1750,8 @@ TOKEN PerlRegExpStartLineToken =
"", "", /* no inner escapes */ \
"", /* no bracketing delimiter */ \
endstr, /* token ends with this */ \
- TRUE, /* must be found at line start */ \
- FALSE, /* don't want end delimiter twice */ \
+ true, /* must be found at line start */ \
+ false, /* don't want end delimiter twice */ \
}
#define sEOT "\n@PS{\"EOT\"}\n"
@@ -1800,7 +1798,7 @@ TOKEN HereBLAbq = X("<<``", "\n", "@PO{<<}@PS{\"``\"}@PS", sBLA);
U "@PS", /* here documents are strings */ \
U "", /* no alternate command */ \
U "", /* no following command */ \
- FALSE, /* token allowed not just start of line */ \
+ false, /* token allowed not just start of line */ \
{ U startstr }, /* starting delimiter */ \
{ NULL }, /* no start2 */ \
{ NULL }, /* no bracket2 */ \
@@ -1810,8 +1808,8 @@ TOKEN HereBLAbq = X("<<``", "\n", "@PO{<<}@PS{\"``\"}@PS", sBLA);
U "", U "", /* no inner escapes */ \
U "", /* no bracketing delimiter */ \
U endstr, /* token ends with this */ \
- TRUE, /* must be found at line start */ \
- FALSE, /* don't want end delimiter twice */ \
+ true, /* must be found at line start */ \
+ false, /* don't want end delimiter twice */ \
}
TOKEN HereEOTuq = HereToken("<<EOT", "EOT\n");
@@ -1862,7 +1860,7 @@ TOKEN PerlIdentifierToken = {
U "@PI", /* Lout command for formatting identifiers */
U "@PK", /* Alternate command (for keywords) */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ SepLetters, U "_", U "$", U "@", PercentLetters}, /* ident. starts */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -1874,8 +1872,8 @@ TOKEN PerlIdentifierToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* identifiers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1885,7 +1883,7 @@ TOKEN PerlSpecialIdentifierToken = {
U "@PI", /* Lout command for formatting identifiers */
U "", /* Alternate command (for keywords) */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{
/* Taken from 5.6.0's perlvar.pod */
/* NB special variables that begin $^, e.g. $^D can also be written as */
@@ -1911,8 +1909,8 @@ TOKEN PerlSpecialIdentifierToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* identifiers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1941,7 +1939,7 @@ TOKEN PerlLiteralNumberToken = {
U "@PN", /* Lout command for formatting numbers */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ SepDigits }, /* numbers must begin with a digit */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -1953,8 +1951,8 @@ TOKEN PerlLiteralNumberToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* numbers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PerlHexNumberToken = {
@@ -1963,7 +1961,7 @@ TOKEN PerlHexNumberToken = {
U "@PN", /* Lout command for formatting numbers */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "0x" }, /* hex numbers must begin with 0x */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -1975,8 +1973,8 @@ TOKEN PerlHexNumberToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* numbers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -1986,7 +1984,7 @@ TOKEN PerlBinaryNumberToken = {
U "@PN", /* Lout command for formatting numbers */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "0b" }, /* binary numbers must begin with 0b */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -1998,8 +1996,8 @@ TOKEN PerlBinaryNumberToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* numbers do not end with a delimiter */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2019,7 +2017,7 @@ TOKEN PerlCommentToken = {
U "@PC", /* Lout command for formatting comments */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "#" }, /* comments begin with this character */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2031,8 +2029,8 @@ TOKEN PerlCommentToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "", /* no end delimiter (end of line will end it) */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PerlCommentEscapeToken = {
@@ -2041,7 +2039,7 @@ TOKEN PerlCommentEscapeToken = {
U "", /* no Lout command since we are printing raw */
U "", /* no alternate command */
U "", /* no following command */
- FALSE, /* token allowed anywhere, not just start of line */
+ false, /* token allowed anywhere, not just start of line */
{ U "#@" }, /* comments begin with this character pair */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2053,8 +2051,8 @@ TOKEN PerlCommentEscapeToken = {
U "", /* so no end of "inner escape" either */
U "", /* no bracketing delimiter */
U "", /* no end delimiter (end of line will end it) */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2079,7 +2077,7 @@ TOKEN PerlPodToken = {
U "@DP @Pod", /* Lout command for formatting Pod */
U "", /* no alternate command */
U "@DP\n", /* following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=", U "=pod" }, /* pod insert begins with either of these */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2091,8 +2089,8 @@ TOKEN PerlPodToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "=cut", /* pod comments end with this string */
- TRUE, /* end delimiter must be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ true, /* end delimiter must be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2133,7 +2131,7 @@ TOKEN PerlRange3Token = FixedToken( "...", "@PO" ) ;
U command, /* Lout command for formatting this */ \
U "", /* no alternate command */ \
U "", /* no following command */ \
- FALSE, /* token not just start of line */ \
+ false, /* token not just start of line */ \
{ U str }, /* token begins (and ends!) with this */ \
{ U " ", U "\t" }, /* plus a white space char */ \
{ U "", U "" }, /* no bracket2 though */ \
@@ -2143,8 +2141,8 @@ TOKEN PerlRange3Token = FixedToken( "...", "@PO" ) ;
U "", U "", /* no inner escape; no end inner esc */ \
U "", /* no bracketing delimiter */ \
U "", /* no ending delimiter */ \
- FALSE, /* end not have to be at line start */ \
- FALSE, /* don't end delimiter twice to stop */ \
+ false, /* end not have to be at line start */ \
+ false, /* don't end delimiter twice to stop */ \
}
TOKEN PerlFileTestrToken = FlagToken( "-r", "@PO" ) ;
@@ -2207,7 +2205,7 @@ TOKEN PodVerbatimLineToken = {
PRINT_WHOLE_QUOTED, /* printing the whole paragraph quoted */
U "@PV ", /* Lout command for formatting verbatim line */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "\t", U " " }, /* command begins with this */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2217,8 +2215,8 @@ TOKEN PodVerbatimLineToken = {
U "", U "", /* no "inner escapes" within verbatim lines */
U "", /* no bracketing delimiter */
U "", /* ends at end of line */
- FALSE, /* don't need to be at start of line to end it */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* don't need to be at start of line to end it */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PodEmptyLineToken = {
@@ -2226,7 +2224,7 @@ TOKEN PodEmptyLineToken = {
PRINT_COMMAND_ONLY, /* printing just the command */
U "@PPG\n", /* Lout command for formatting Pod empty line */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "\n" }, /* command begins with this */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2236,8 +2234,8 @@ TOKEN PodEmptyLineToken = {
U "", U "", /* no inner escape */
U "", /* no bracketing delimiter */
U "", /* token will end with the end of the line */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2269,7 +2267,7 @@ TOKEN PodIgnoreToken = {
U "", /* Lout command for formatting Pod cut (nothing) */
U "", /* no alternate command */
U "", /* no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=pod", U "=cut" }, /* command begins with this */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2281,8 +2279,8 @@ TOKEN PodIgnoreToken = {
U "", /* and so there is no end innner escape either */
U "", /* no bracketing delimiter */
U "\n", /* token will end with the end of the line */
- TRUE, /* end delimiter (\n) has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ true, /* end delimiter (\n) has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2297,7 +2295,7 @@ TOKEN PodHeading1Token = {
PRINT_NODELIMS_INNER, /* print without delimiters, formatting inner */
U "@PHA", /* Lout command for formatting Pod heading */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{U "=head1", U "head1"}, /* command begins with this */
{ U " ", U "\t" }, /* helps to skip following white space */
{ U "", U "" }, /* no bracket2 */
@@ -2307,8 +2305,8 @@ TOKEN PodHeading1Token = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "\n\n", /* token will end with the first blank line */
- FALSE, /* end delimiter (\n) has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter (\n) has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PodHeading2Token = {
@@ -2316,7 +2314,7 @@ TOKEN PodHeading2Token = {
PRINT_NODELIMS_INNER, /* print without delimiters, formatting inner */
U "@PHB", /* Lout command for formatting Pod heading */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=head2" }, /* command begins with this */
{ U " ", U "\t" }, /* helps to skip following white space */
{ U "", U "" }, /* no bracket2 */
@@ -2326,8 +2324,8 @@ TOKEN PodHeading2Token = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "\n\n", /* token will end with the first blank line */
- FALSE, /* end delimiter (\n) has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter (\n) has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PodHeading3Token = {
@@ -2335,7 +2333,7 @@ TOKEN PodHeading3Token = {
PRINT_NODELIMS_INNER, /* print without delimiters, formatting inner */
U "@PHC", /* Lout command for formatting Pod heading */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=head3" }, /* command begins with this */
{ U " ", U "\t" }, /* helps to skip following white space */
{ U "", U "" }, /* no bracket2 */
@@ -2345,8 +2343,8 @@ TOKEN PodHeading3Token = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "\n\n", /* token will end with the first blank line */
- FALSE, /* end delimiter (\n) has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter (\n) has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2362,7 +2360,7 @@ TOKEN PodOverToken = {
U "@RawTaggedList gap{@PLG}indent{@PLI}rightindent{@PLRI}labelwidth{@PLLW ",
U "", /* no alternate command */
U "} // {", /* open brace to match } at first item */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=over" }, /* command begins with this */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2372,8 +2370,8 @@ TOKEN PodOverToken = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "\n", /* token will end with the end of the line */
- TRUE, /* end delimiter (\n) has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ true, /* end delimiter (\n) has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PodItemToken = {
@@ -2382,7 +2380,7 @@ TOKEN PodItemToken = {
U "@Null //}\n@DTI {@PLL", /* Lout command for formatting Pod item */
U "", /* no alternate command */
U "} {", /* open brace to enclose the item content */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=item" }, /* command begins with this */
{ U " ", U "\t" }, /* helps to skip following white space */
{ U "", U "" }, /* no bracket2 */
@@ -2391,8 +2389,8 @@ TOKEN PodItemToken = {
U "", U "", /* no escape character; nothing legal after escape */
U "", U "", /* no inner escapes; no end inner escape */
U "", U "", /* see brackets2[]; see ends2[] */
- FALSE, /* end delimiter (\n) must already be at start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter (\n) must already be at start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PodBackToken = {
@@ -2400,7 +2398,7 @@ TOKEN PodBackToken = {
PRINT_COMMAND_ONLY, /* printing just the command */
U "@Null // }\n@EndList\n", /* Lout command for formatting Pod back */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=back" }, /* command begins with this */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2410,8 +2408,8 @@ TOKEN PodBackToken = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "\n", /* token will end with the next blank line */
- TRUE, /* end delimiter (\n) has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ true, /* end delimiter (\n) has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2428,7 +2426,7 @@ TOKEN PodBackToken = {
U command, /* Lout command for formatting Pod item */ \
U "", /* no alternate command */ \
U "}} {", /* open brace to enclose the item content*/ \
- TRUE, /* token allowed at start of line only */ \
+ true, /* token allowed at start of line only */ \
{ U "=item", U "=item ", U "=item\t", /* starts */ \
U "=item ", U "=item \t", U "=item\t ", U "=item\t\t" }, /* */ \
{ U tag }, /* the tag we recognize */ \
@@ -2438,8 +2436,8 @@ TOKEN PodBackToken = {
U "", U "", /* no escape character */ \
U "", U "", /* no inner escapes; no end inner escape */ \
U "", U "", /* see brackets2[]; see ends2[] */ \
- FALSE, /* end delimiter (\n) already at start */ \
- FALSE, /* don't need to see end delimiter twice */ \
+ false, /* end delimiter (\n) already at start */ \
+ false, /* don't need to see end delimiter twice */ \
}
TOKEN PodItemBullet = PodNarrowItemToken("*", "@Null //}\n@TI {@PLL {*");
@@ -2470,7 +2468,7 @@ TOKEN PodForToken = {
PRINT_COMMAND_ONLY, /* printing just the command */
U "", /* Lout command for formatting Pod for (nothing) */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=for" }, /* command begins with this */
{ NULL }, { NULL }, /* no start2 needed; so no bracket2 either */
{ NULL }, /* so no end2 either */
@@ -2479,8 +2477,8 @@ TOKEN PodForToken = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "\n", /* token will end with the end of the line */
- TRUE, /* end delimiter (\n) has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ true, /* end delimiter (\n) has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PodBeginToken = {
@@ -2488,7 +2486,7 @@ TOKEN PodBeginToken = {
PRINT_COMMAND_ONLY, /* printing just the command */
U "", /* Lout command for formatting Pod for (nothing) */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=begin" }, /* command begins with this */
{ NULL }, { NULL }, /* no start2 needed; so no bracket2 either */
{ NULL }, /* so no end2 either */
@@ -2497,8 +2495,8 @@ TOKEN PodBeginToken = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "=end", /* token will end with =end character */
- TRUE, /* end delimiter has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ true, /* end delimiter has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
TOKEN PodBeginLoutToken = {
@@ -2506,7 +2504,7 @@ TOKEN PodBeginLoutToken = {
PRINT_NODELIMS_UNQUOTED,/* this is a Lout escape, no delims or quotes */
U "", /* Lout command for formatting Pod for (nothing) */
U "", U "", /* no alternate command; no following command */
- TRUE, /* token allowed at start of line only */
+ true, /* token allowed at start of line only */
{ U "=begin lout", U "=begin Lout" }, /* command begins with this */
{ NULL }, { NULL }, /* no start2 needed; so no bracket2 either */
{ NULL }, /* so no end2 either */
@@ -2515,8 +2513,8 @@ TOKEN PodBeginLoutToken = {
U "", U "", /* no inner escapes; no end inner escape */
U "", /* no bracketing delimiter */
U "=end", /* token will end with =end character */
- TRUE, /* end delimiter has to be at a line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ true, /* end delimiter has to be at a line start */
+ false, /* don't need to see end delimiter twice to stop */
};
@@ -2553,7 +2551,7 @@ TOKEN PodBeginLoutToken = {
PRINT_NODELIMS_INNER, /* recursively format the inside */ \
U command, /* Lout command for formatting this */ \
U "", U "", /* no alternate command; no following */ \
- FALSE, /* token not just start of line */ \
+ false, /* token not just start of line */ \
{ U str }, /* token begins with this */ \
{ U "<", U "<< ", U "<<< ", U "<<<< " }, /* start2 */ \
{ U "", U "", U "", U "" }, /* no bracket2 */ \
@@ -2563,8 +2561,8 @@ TOKEN PodBeginLoutToken = {
U "", U "", /* no inner escape; no end inner esc */ \
U "", /* will use brackets2 here */ \
U "", /* will use end2 here */ \
- FALSE, /* end not have to be at line start */ \
- FALSE, /* don't end delimiter twice to stop */ \
+ false, /* end not have to be at line start */ \
+ false, /* don't end delimiter twice to stop */ \
}
TOKEN PodItalicToken = RecursiveToken("I", "@PFI");
@@ -2593,7 +2591,7 @@ TOKEN PodCodeToken = RecursiveToken("C", "@PFC");
style, /* print this token unquoted */ \
U command, /* Lout command for formatting this */ \
U "", U "", /* no alternate command; no following */ \
- FALSE, /* token not just start of line */ \
+ false, /* token not just start of line */ \
{ U str }, /* token begins with this */ \
{ U "<", U "<< ", U "<<< ", U "<<<< " }, /* start2 */ \
{ U "", U "", U "", U "" }, /* no bracket2 */ \
@@ -2603,8 +2601,8 @@ TOKEN PodCodeToken = RecursiveToken("C", "@PFC");
U "", U "", /* no inner escape; no end inner esc */ \
U "", /* will use brackets2 here */ \
U "", /* will use end2 here */ \
- FALSE, /* end not have to be at line start */ \
- FALSE, /* don't end delimiter twice to stop */ \
+ false, /* end not have to be at line start */ \
+ false, /* don't end delimiter twice to stop */ \
}
TOKEN PodFileToken = InteriorToken("F", "@PFF", PRINT_NODELIMS_QUOTED);
@@ -2637,7 +2635,7 @@ TOKEN PodNumCharToken = {
U "\"\\", /* precede character number with \" */
U "", /* no alternate command */
U "\"", /* follow character number with " */
- FALSE, /* token allowed at start of line only */
+ false, /* token allowed at start of line only */
{ U "E<" }, /* command begins with this */
{ NULL }, /* no start2 needed */
{ NULL }, /* so no bracket2 either */
@@ -2647,8 +2645,8 @@ TOKEN PodNumCharToken = {
U "", U "", /* no "inner escapes" */
U "", /* no bracketing delimiter */
U ">", /* token will end with > character */
- FALSE, /* end delimiter does not have to be at line start */
- FALSE, /* don't need to see end delimiter twice to stop */
+ false, /* end delimiter does not have to be at line start */
+ false, /* don't need to see end delimiter twice to stop */
};
#define PodEscapeToken(str, command) /* Pod delimited token */ \
@@ -2658,7 +2656,7 @@ TOKEN PodNumCharToken = {
U command, /* Lout command for formatting this */ \
U "", /* no alternate command */ \
U "", /* no following command */ \
- FALSE, /* token not just start of line */ \
+ false, /* token not just start of line */ \
{ U str }, /* token begins with this */ \
{ NULL }, /* start2 */ \
{ NULL }, /* bracket2 */ \
@@ -2668,8 +2666,8 @@ TOKEN PodNumCharToken = {
U "", U "", /* no inner escape either */ \
U "", /* no bracketing delimiter */ \
U "", /* no ending delimiter */ \
- FALSE, /* end not have to be at line start */ \
- FALSE, /* don't end delimiter twice to stop */ \
+ false, /* end not have to be at line start */ \
+ false, /* don't end delimiter twice to stop */ \
}
TOKEN PodLessThanToken = PodEscapeToken("E<lt>", "<");
@@ -3535,13 +3533,13 @@ typedef enum {
BLANKNUMBERED_YES /* blank line numbers printed */
} BLANKNUMBERED_TYPE;
-static char file_name[MAX_LINE]; /* current input file name */
+static char file_name[MAX_LINE/2]; /* current input file name */
static unsigned char curr_line[MAX_LINE]; /* current input line */
static int line_num; /* current input line number */
static int line_pos; /* current input column number */
-static BOOLEAN raw_seen; /* TRUE if -r (raw mode) */
+static bool raw_seen; /* true if -r (raw mode) */
-static BOOLEAN headers_option; /* TRUE if no -n option (headers) */
+static bool headers_option; /* true if no -n option (headers) */
static char *style_option; /* value of -p option, else null */
static char *font_option; /* value of -f option, else null */
static char *size_option; /* value of -s option, else null */
@@ -3553,11 +3551,11 @@ static char *setup_option; /* value of -S option, else null */
static char *language_option; /* value of -l option, else null */
static char *numbered_option; /* value of -L option, else null */
-static BOOLEAN tab_by_spacing; /* TRUE if using space chars to tab */
+static bool tab_by_spacing; /* true if using space chars to tab */
static int tab_in; /* tab interval, value of -t option */
static float tab_out; /* tab interval width (-T option) */
static char tab_unit; /* unit of measurement for tab */
-static BOOLEAN print_lines; /* TRUE if we are printing line nums */
+static bool print_lines; /* true if we are printing line nums */
BLANKNUMBERED_TYPE blanknumbered; /* blank line numbering */
static int print_num; /* current line num for printing */
@@ -3677,14 +3675,14 @@ void NextChar()
/*****************************************************************************/
/* */
-/* BOOLEAN InputMatches(char *pattern) */
+/* bool InputMatches(char *pattern) */
/* */
-/* Returns TRUE if input starting at curr_line[line_pos] matches pattern. */
+/* Returns true if input starting at curr_line[line_pos] matches pattern. */
/* To check this we may have to read an extra line or more of input. */
/* */
/*****************************************************************************/
-BOOLEAN InputMatches(unsigned char *pattern)
+bool InputMatches(unsigned char *pattern)
{ unsigned char *p, *q;
for(p = &curr_line[line_pos], q = pattern; *q != '\0'; p++, q++ )
{
@@ -3699,7 +3697,7 @@ BOOLEAN InputMatches(unsigned char *pattern)
}
if( DEBUG_PREFIXEQ )
fprintf(stderr, "InputMatches(%s, %s) returning %s\n",
- &curr_line[line_pos], pattern, *q == '\0' ? "TRUE" : "FALSE");
+ &curr_line[line_pos], pattern, *q == '\0' ? "true" : "false");
return (*q == '\0');
} /* end InputMatches */
@@ -3722,35 +3720,35 @@ typedef struct trie_node {
/*****************************************************************************/
/* */
-/* BOOLEAN TrieInsert(&T, str, val) */
+/* bool TrieInsert(&T, str, val) */
/* */
/* Insert str into trie T. May need a new root so pass T by reference. */
-/* Return FALSE if the insertion failed, either because the string was */
+/* Return false if the insertion failed, either because the string was */
/* empty, or because it was the same as a previously inserted string. */
/* */
/*****************************************************************************/
-BOOLEAN TrieInsert(TRIE *T, unsigned char *str, TOKEN *val)
-{ BOOLEAN res;
+bool TrieInsert(TRIE *T, unsigned char *str, TOKEN *val)
+{ bool res;
if( DEBUG_TRIE )
fprintf(stderr, "[ TrieInsert(T, %s, %s)\n", str, EchoToken(val));
if( *str == '\0' )
- res = FALSE;
+ res = false;
else
{ if( *T == (TRIE) NULL )
*T = (TRIE) calloc(1, sizeof(struct trie_node)); /* will set all to 0 */
if( *(str + 1) != '\0' )
res = TrieInsert(&((*T)->sub[(int) *str]), str + 1, val);
else if( (*T)->value[(int) *str] != (TOKEN *) NULL )
- res = FALSE;
+ res = false;
else
{ (*T)->value[(int) *str] = val;
- res = TRUE;
+ res = true;
}
}
if( DEBUG_TRIE )
fprintf(stderr, "] TrieInsert(T, %s, %s) returning %s\n", str,
- EchoToken(val), res ? "TRUE" : "FALSE");
+ EchoToken(val), res ? "true" : "false");
return res;
}
@@ -3826,12 +3824,12 @@ void HashInsert(char *str)
fprintf(stderr, "] HashInsert(%s)\n", str);
}
-BOOLEAN HashRetrieve(char *str)
+bool HashRetrieve(char *str)
{ int i;
for( i=hash(str); HashTable[i]!=(char *) NULL; i = (i+1)%MAX_SYM )
if( strcmp( (char *) HashTable[i], (char *) str) == 0 )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
@@ -3859,11 +3857,11 @@ BOOLEAN HashRetrieve(char *str)
static unsigned char save_value[MAX_LINE]; /* the token text */
static int save_len; /* index of \0 in save_value */
-static BOOLEAN save_on = FALSE; /* TRUE when saving */
+static bool save_on = false; /* true when saving */
static LANGUAGE *save_language; /* the current language */
static int out_linepos = 0; /* output line position */
-static BOOLEAN out_linestart = TRUE; /* TRUE if out line start */
-static BOOLEAN out_formfeed = FALSE; /* TRUE if last was formfeed */
+static bool out_linestart = true; /* true if out line start */
+static bool out_formfeed = false; /* true if last was formfeed */
static int brace_depth; /* brace depth in verbatim */
extern void Emit(TOKEN *current_token, unsigned char ch);
@@ -3898,7 +3896,7 @@ void EmitTab()
fprintf(out_fp, "$>\"%.1f%ct\" {}", (out_linepos/tab_in)*tab_out,
tab_unit);
}
- out_formfeed = FALSE;
+ out_formfeed = false;
}
@@ -3924,7 +3922,7 @@ void EmitRaw(unsigned char ch)
if( DEBUG_EMIT )
fprintf(stderr, "EmitRaw(%c); out_linepos %d, out_linestart %s\n",
- ch, out_linepos, out_linestart ? "TRUE" : "FALSE");
+ ch, out_linepos, out_linestart ? "true" : "false");
if( save_on )
{ fprintf(err_fp, "%s internal error (EmitRaw save_on)\n", ErrorHeader());
abort();
@@ -3947,7 +3945,7 @@ void EmitRaw(unsigned char ch)
sprintf(buff, "%d", print_num);
fprintf(out_fp, "@PL{\"%s\"}", buff);
out_linepos += strlen(buff);
- out_linestart = FALSE;
+ out_linestart = false;
EmitTab();
}
if( ch != '\n' || blanknumbered != BLANKNUMBERED_NO )
@@ -3960,14 +3958,14 @@ void EmitRaw(unsigned char ch)
fputc(ch, out_fp);
out_linepos++;
- out_formfeed = FALSE;
+ out_formfeed = false;
break;
case '\t':
EmitTab();
- out_formfeed = FALSE;
+ out_formfeed = false;
break;
@@ -3975,8 +3973,8 @@ void EmitRaw(unsigned char ch)
fputc(ch, out_fp);
out_linepos = 0;
- out_linestart = TRUE;
- out_formfeed = FALSE;
+ out_linestart = true;
+ out_formfeed = false;
break;
@@ -3984,8 +3982,8 @@ void EmitRaw(unsigned char ch)
fputs("\n@NP\n", out_fp);
out_linepos = 0;
- out_linestart = TRUE;
- out_formfeed = TRUE;
+ out_linestart = true;
+ out_formfeed = true;
break;
@@ -3993,14 +3991,14 @@ void EmitRaw(unsigned char ch)
fputc(ch, out_fp);
out_linepos++;
- out_linestart = FALSE;
- out_formfeed = FALSE;
+ out_linestart = false;
+ out_formfeed = false;
break;
}
if( DEBUG_EMIT )
fprintf(stderr, "EmitRaw(%c) returning; out_linepos %d, out_linestart %s\n",
- ch, out_linepos, out_linestart ? "TRUE" : "FALSE");
+ ch, out_linepos, out_linestart ? "true" : "false");
} /* end EmitRaw */
@@ -4034,7 +4032,7 @@ void StartEmit(LANGUAGE *lang, TOKEN *current_token,
sprintf(buff, "%d", print_num);
fprintf(out_fp, "@PL{\"%s\"}", buff);
out_linepos += strlen(buff);
- out_linestart = FALSE;
+ out_linestart = false;
EmitTab();
print_num++;
}
@@ -4044,7 +4042,7 @@ void StartEmit(LANGUAGE *lang, TOKEN *current_token,
case PRINT_WHOLE_QUOTED:
/* start_delim is to be printed */
- save_on = TRUE;
+ save_on = true;
save_len = 0;
save_value[save_len] = '\0';
for( i = 0; i < len; i++ )
@@ -4055,7 +4053,7 @@ void StartEmit(LANGUAGE *lang, TOKEN *current_token,
case PRINT_NODELIMS_QUOTED:
/* like PRINT_WHOLE_QUOTED, but no delims */
- save_on = TRUE;
+ save_on = true;
save_len = 0;
save_value[save_len] = '\0';
break;
@@ -4120,7 +4118,7 @@ void StartEmit(LANGUAGE *lang, TOKEN *current_token,
void EndEmit(TOKEN *current_token, unsigned char *end_delim)
{ unsigned char *com;
int i;
- BOOLEAN quoted_now = FALSE;
+ bool quoted_now = false;
switch( current_token->print_style )
{
@@ -4143,7 +4141,7 @@ void EndEmit(TOKEN *current_token, unsigned char *end_delim)
if( com[0] != '\0' ) fprintf(out_fp, "%s{", com); /*}*/
/* print the token with appropriate escapes */
- save_on = FALSE;
+ save_on = false;
for( i = 0; i < save_len; i++ ) switch( save_value[i] )
{
case '@':
@@ -4161,7 +4159,7 @@ void EndEmit(TOKEN *current_token, unsigned char *end_delim)
if( !quoted_now )
{ putc('"', out_fp);
- quoted_now = TRUE;
+ quoted_now = true;
}
EmitRaw(save_value[i]);
break;
@@ -4172,7 +4170,7 @@ void EndEmit(TOKEN *current_token, unsigned char *end_delim)
if( !quoted_now )
{ putc('"', out_fp);
- quoted_now = TRUE;
+ quoted_now = true;
}
putc('\\', out_fp);
EmitRaw(save_value[i]);
@@ -4186,14 +4184,14 @@ void EndEmit(TOKEN *current_token, unsigned char *end_delim)
if( !quoted_now && at_start_line(save_value, i) )
{
putc('"', out_fp);
- quoted_now = TRUE;
- out_linestart = FALSE;
+ quoted_now = true;
+ out_linestart = false;
}
/* make sure we aren't in quoted text */
if( quoted_now )
{ putc('"', out_fp);
- quoted_now = FALSE;
+ quoted_now = false;
}
/* print the character */
@@ -4583,14 +4581,14 @@ void SetupLanguage(LANGUAGE *lang)
/*****************************************************************************/
/* */
-/* BOOLEAN Printable(unsigned char ch) */
+/* bool Printable(unsigned char ch) */
/* */
-/* TRUE if ch is a printable character. Used only by error messages so */
-/* can be slow. */
+/* Return true if ch is a printable character. Used only by error */
+/* messages so can be slow. */
/* */
/*****************************************************************************/
-BOOLEAN Printable(unsigned char ch)
+bool Printable(unsigned char ch)
{ unsigned char *p;
for( p = AllPrintable; *p != '\0' && *p != ch; p++ );
return (*p == ch);
@@ -5108,8 +5106,7 @@ void PrintUsage()
/*****************************************************************************/
int main(int argc, char *argv[])
-{ BOOLEAN stdin_seen; int i, j, arg_pos;
- char *infilename, *outfilename, *errfilename;
+{ int i, j, arg_pos; char *infilename, *outfilename, *errfilename;
LANGUAGE *lang = NO_LANGUAGE;
char *file_names[1024]; int file_count = 0;
@@ -5125,15 +5122,15 @@ int main(int argc, char *argv[])
in_fp = out_fp = (FILE *) NULL;
err_fp = stderr;
line_num = line_pos = 0;
- stdin_seen = raw_seen = FALSE;
- tab_by_spacing = TRUE;
+ raw_seen = false;
+ tab_by_spacing = true;
tab_in = 8;
tab_out = 3;
tab_unit = 'f';
- print_lines = FALSE;
+ print_lines = false;
blanknumbered = BLANKNUMBERED_YES;
numbered_option = NULL;
- headers_option = TRUE;
+ headers_option = true;
style_option = font_option = size_option = line_option = bls_option =
tabin_option = tabout_option = setup_option = language_option =(char *)NULL;
if( argc == 1 )
@@ -5154,7 +5151,7 @@ int main(int argc, char *argv[])
ErrorHeader());
exit(1);
}
- raw_seen = TRUE;
+ raw_seen = true;
break;
@@ -5169,7 +5166,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -i seen twice\n", ErrorHeader());
exit(1);
}
- GetArg(infilename, "usage: -i<filename>", FALSE);
+ GetArg(infilename, "usage: -i<filename>", false);
/* open the file */
in_fp = fopen(infilename, "r");
@@ -5193,7 +5190,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -o seen twice\n", ErrorHeader());
exit(1);
}
- GetArg(outfilename, "usage: -o<filename>", FALSE);
+ GetArg(outfilename, "usage: -o<filename>", false);
out_fp = fopen(outfilename, "w");
if( out_fp == NULL )
{ fprintf(err_fp, "%s: cannot open output file %s\n",
@@ -5206,7 +5203,7 @@ int main(int argc, char *argv[])
case 'e':
/* read name of error file */
- GetArg(errfilename, "usage: -e<filename>", FALSE);
+ GetArg(errfilename, "usage: -e<filename>", false);
err_fp = fopen(errfilename, "w");
if( err_fp == NULL )
{ fprintf(stderr, "%s: cannot open error file %s",
@@ -5223,7 +5220,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -p illegal with -r option\n", ErrorHeader());
exit(1);
}
- GetArg(style_option, "usage: -p<printstyle>", FALSE);
+ GetArg(style_option, "usage: -p<printstyle>", false);
if( strcmp(style_option, "fixed") != 0 &&
strcmp(style_option, "varying") != 0 &&
strcmp(style_option, "symbol") != 0 )
@@ -5241,7 +5238,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -f illegal with -r option\n", ErrorHeader());
exit(1);
}
- GetArg(font_option, "usage: -f<font_family>", FALSE);
+ GetArg(font_option, "usage: -f<font_family>", false);
break;
@@ -5252,7 +5249,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -s illegal with -r option\n", ErrorHeader());
exit(1);
}
- GetArg(size_option, "usage: -s<size>", FALSE);
+ GetArg(size_option, "usage: -s<size>", false);
break;
@@ -5263,7 +5260,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -v illegal with -r option\n", ErrorHeader());
exit(1);
}
- GetArg(line_option, "usage: -v<line_spacing>", FALSE);
+ GetArg(line_option, "usage: -v<line_spacing>", false);
break;
@@ -5274,14 +5271,14 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -b illegal with -r option\n", ErrorHeader());
exit(1);
}
- GetArg(bls_option, "usage: -b<scale_factor>", FALSE);
+ GetArg(bls_option, "usage: -b<scale_factor>", false);
break;
case 't':
/* read tab interval */
- GetArg(tabin_option, "usage: -t<number>", TRUE);
+ GetArg(tabin_option, "usage: -t<number>", true);
if( tabin_option != NULL && sscanf(tabin_option,"%d",&tab_in) != 1 )
{ fprintf(err_fp, "%s usage: -t<number>\n", ErrorHeader());
exit(1);
@@ -5297,7 +5294,7 @@ int main(int argc, char *argv[])
case 'T':
/* read tab_out and tab_unit */
- GetArg(tabout_option, "usage: -T<number><unit>", TRUE);
+ GetArg(tabout_option, "usage: -T<number><unit>", true);
if( tabout_option != NULL )
{ if( sscanf(tabout_option, "%f%c",&tab_out,&tab_unit) != 2 )
{ fprintf(err_fp, "%s usage: -T<number><unit>\n", ErrorHeader());
@@ -5315,7 +5312,7 @@ int main(int argc, char *argv[])
ErrorHeader());
exit(1);
}
- tab_by_spacing = FALSE;
+ tab_by_spacing = false;
}
break;
@@ -5327,15 +5324,15 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -S illegal with -r option\n", ErrorHeader());
exit(1);
}
- GetArg(setup_option, "usage: -S<filename>", FALSE);
+ GetArg(setup_option, "usage: -S<filename>", false);
break;
case 'L':
/* read line numbering */
- GetArg(numbered_option, "usage: -L<number>", TRUE);
- print_lines = TRUE;
+ GetArg(numbered_option, "usage: -L<number>", true);
+ print_lines = true;
print_num = 1;
if( numbered_option!=NULL && sscanf(numbered_option,"%d",&print_num)!=1)
{ fprintf(err_fp, "%s usage: -L or -L<number>\n", ErrorHeader());
@@ -5364,7 +5361,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -n illegal with -r option\n", ErrorHeader());
exit(1);
}
- headers_option = FALSE;
+ headers_option = false;
break;
@@ -5396,7 +5393,7 @@ int main(int argc, char *argv[])
{ fprintf(err_fp, "%s: -l seen twice\n", ErrorHeader());
exit(1);
}
- GetArg(language_option, "usage: -l<language>", FALSE);
+ GetArg(language_option, "usage: -l<language>", false);
i = 0; j = 0;
while( lang == NO_LANGUAGE && languages[i] != NO_LANGUAGE )
{