aboutsummaryrefslogtreecommitdiff
path: root/mktpl/mktpl.lex
diff options
context:
space:
mode:
Diffstat (limited to 'mktpl/mktpl.lex')
-rw-r--r--mktpl/mktpl.lex12
1 files changed, 6 insertions, 6 deletions
diff --git a/mktpl/mktpl.lex b/mktpl/mktpl.lex
index e184c0e..296cc0b 100644
--- a/mktpl/mktpl.lex
+++ b/mktpl/mktpl.lex
@@ -5,12 +5,12 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+
void apnd();
void eval();
void text();
void prnt();
-
+
char *buf;
int len;
int sz;
@@ -38,7 +38,7 @@ main(int argc, char *argv[])
sz = 512;
if(!(buf = malloc(sz)))
err(1, "malloc");
-
+
yylex();
return 0;
}
@@ -51,7 +51,7 @@ apnd()
if(!(buf = realloc(buf, sz)))
err(1, "realloc");
}
-
+
buf[len++] = *yytext;
}
@@ -66,9 +66,9 @@ void
text()
{
int i, ofs;
-
+
if(!len) return;
-
+
printf("printf(\"");
for(i = ofs = 0; i < len; i++){
/*