diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-22 02:11:50 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-22 02:11:50 +0200 |
commit | 1e0433c9df062ead21d0f46b15d088622b7d5c4f (patch) | |
tree | cc894172ca7deae5d835aea8f313da3aab1e2915 /mktpl/mktpl.lex | |
parent | 3ea978c60ee03dba2cb883ba18d3b334cfbf6cd0 (diff) | |
download | cforum-master.tar.gz |
Diffstat (limited to 'mktpl/mktpl.lex')
-rw-r--r-- | mktpl/mktpl.lex | 12 |
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++){ /* |