Commit 9c82647d99b8d7a54050b2e47f245eb8e704a2d5

Thomas de Grivel 2023-10-22T17:00:05

fix c3s

diff --git a/c3s/c3s.c b/c3s/c3s.c
index 6f35c87..4d4215e 100644
--- a/c3s/c3s.c
+++ b/c3s/c3s.c
@@ -74,9 +74,9 @@ int main (int argc, char **argv)
   buf_file_open_r(&in, stdin);
   buf_init(&out, false, sizeof(o), o);
   buf_file_open_w(&out, stdout);
-  while ((r = buf_xfer_spaces(&out, &in)) >= 0) {
+  while ((r = buf_ignore_spaces(&in)) >= 0) {
     if ((r = buf_parse_tag(&in, &input)) > 0) {
-      if (! eval_tag(&result, &input)) {
+      if (! eval_tag(&input, &result)) {
         tag_clean(&input);
         continue;
       }
@@ -95,8 +95,6 @@ int main (int argc, char **argv)
         (r == 0 &&
          (r = buf_ignore_character(&in)) <= 0))
       break;
-    if ((r = buf_refill_compact(&in)) < 0)
-      break;
   }
   buf_readline_close(&in);
   buf_file_close(&out);
diff --git a/ic3/ic3.c b/ic3/ic3.c
index 2636b58..54abfce 100644
--- a/ic3/ic3.c
+++ b/ic3/ic3.c
@@ -100,7 +100,6 @@ int main (int argc, char **argv)
   buf_init(&out, false, sizeof(o), o);
   buf_file_open_w(&out, stdout);
   while ((r = ic3_buf_ignore_spaces(&out, &in)) >= 0) {
-    (void) 0;
     if ((r = buf_parse_tag(&in, &input)) > 0) {
       if (! eval_tag(&input, &result)) {
         tag_clean(&input);