Commit 01e3bffeb8eea003605b373d6159101b9b4a5487

Thomas de Grivel 2024-09-16T06:06:32

buf_parse_cow

diff --git a/.ikc3_history b/.ikc3_history
index 2b0ec71..1db7ffa 100644
--- a/.ikc3_history
+++ b/.ikc3_history
@@ -1,6 +1,3 @@
-a
-a = ? <- 1 ; 2
-a
 a = ? <- 1 ; 2
 a
 a = ? <- 1 ; 2
@@ -97,3 +94,6 @@ Str.ftime(Time.now(), "%a, %G")
 Str.ftime(Time.now(), "%a, %m %d %G")
 Str.ftime(Time.now(), "%a, %b %d %G")
 Str.ftime(Time.now(), "%a, %b %d %G %T %Z")
+cow 1
+cow(1)
+cow 1
diff --git a/libkc3/buf_parse.c b/libkc3/buf_parse.c
index ff39e96..b708373 100644
--- a/libkc3/buf_parse.c
+++ b/libkc3/buf_parse.c
@@ -1364,7 +1364,7 @@ sw buf_parse_cow (s_buf *buf, s_cow *cow)
       goto restore;
     result += r;
   }
-  if ((r = buf_read_1(buf, "cow(")) <= 0)
+  if ((r = buf_read_1(buf, "cow ")) <= 0)
     goto restore;
   result += r;
   if ((r = buf_ignore_spaces(buf)) < 0)
@@ -1375,12 +1375,6 @@ sw buf_parse_cow (s_buf *buf, s_cow *cow)
   if ((r = buf_parse_tag(buf, cow_read_write(&tmp))) <= 0)
     goto restore;
   result += r;
-  if ((r = buf_ignore_spaces(buf)) < 0)
-    goto restore;
-  result += r;
-  if ((r = buf_read_1(buf, ")")) <= 0)
-    goto restore;
-  result += r;
   if (tmp.type != &g_sym_Tag) {
     if (! tag_type(cow_read_write(&tmp), &type)) {
       r = -1;