aboutsummaryrefslogtreecommitdiff
path: root/examples/translator.c
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-01-04 15:28:21 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-01-04 15:28:21 +0300
commitfa6a4104b04aa7834fdafc3aca9b479605445ca7 (patch)
treea8e01c20392759587789acbb3e38e0eb773eda8f /examples/translator.c
parentae882f68193e00deebce41c32df644b6cb2f2a47 (diff)
downloadcsx-fa6a4104b04aa7834fdafc3aca9b479605445ca7.tar
csx-fa6a4104b04aa7834fdafc3aca9b479605445ca7.tar.xz
csx-fa6a4104b04aa7834fdafc3aca9b479605445ca7.zip
Strings work, everything is fine. =)
Diffstat (limited to 'examples/translator.c')
-rw-r--r--examples/translator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/translator.c b/examples/translator.c
index 8358a47..29f4d4e 100644
--- a/examples/translator.c
+++ b/examples/translator.c
@@ -40,6 +40,7 @@ void readlist()
if (first) first = 0;
else putchar(',');
printf("csx_str(\"");
+ c = getchar();
while (c != EOF && c != '"') {
if (c == '\\') c = getchar();
if (c == '"' || c == '\\') putchar('\\');
@@ -47,6 +48,7 @@ void readlist()
c = getchar();
}
printf("\")");
+ c = getchar();
} else if (c == '\'') {
if (first) first = 0;
else putchar(',');