summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorwlestes <wlestes>2001-10-17 14:29:52 +0000
committerwlestes <wlestes>2001-10-17 14:29:52 +0000
commit1808505646c1ef6817b02e16c366c2179964835a (patch)
treefdeb7c171900ea19c6b7228da8b1ba7fad1bb194 /misc.c
parent7812a5d7ee0166408403e0dc28e15503d5ef952a (diff)
downloadflex-1808505646c1ef6817b02e16c366c2179964835a.tar.gz
merge latest batch of millaway's changes
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 7f52950..dc5b6ef 100644
--- a/misc.c
+++ b/misc.c
@@ -34,7 +34,7 @@
#include "flexdef.h"
-
+/* Append "#define defname value\n" to the running buffer. */
void action_define( defname, value )
char *defname;
int value;
@@ -53,6 +53,7 @@ int value;
}
+/* Append "new_text" to the running buffer. */
void add_action( new_text )
char *new_text;
{
@@ -793,6 +794,12 @@ void skelout()
{ /* copy from skel array */
if ( buf[0] == '%' )
{ /* control line */
+ /* print the control line as a comment. */
+ if (buf[strlen(buf)-1]=='\\')
+ out_str("/* %s */\\\n", buf);
+ else
+ out_str("/* %s */\n", buf);
+
switch ( buf[1] )
{
case '%':
@@ -810,6 +817,14 @@ void skelout()
do_copy = 1;
break;
+ case 'c':
+ OUT_BEGIN_CODE();
+ break;
+
+ case 'e':
+ OUT_END_CODE();
+ break;
+
default:
flexfatal(
_( "bad line in skeleton file" ) );