diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-01-04 15:28:21 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-01-04 15:28:21 +0300 |
commit | fa6a4104b04aa7834fdafc3aca9b479605445ca7 (patch) | |
tree | a8e01c20392759587789acbb3e38e0eb773eda8f /examples/translator.c | |
parent | ae882f68193e00deebce41c32df644b6cb2f2a47 (diff) | |
download | csx-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.c | 2 |
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(','); |