ref: c625b9713b0144ccfcadd09f7210dcd1fff4b8e1
parent: c78a04e3f7969c206d199a3460f536c1bfab99a6
author: Arnold D. Robbins <arnold@skeeve.com>
date: Thu Sep 21 08:39:41 EDT 2023
Restore makefile, final fix in b.c.
--- a/b.c
+++ b/b.c
@@ -811,6 +811,7 @@
return result;
}
+
/*
* NAME
* fnematch
@@ -857,8 +858,6 @@
memcpy(buf + k, r.bytes, r.len);
j += r.len - 1; // incremented next time around the loop
k += r.len;
- if (r.len > 1)
- i += r.len - 1; // also
if ((ns = get_gototab(pfa, s, r.rune)) != 0)
s = ns;
@@ -872,6 +871,8 @@
}
} while (buf[j] && s != 1);
s = 2;
+ if (r.len > 1)
+ i += r.len - 1; // i incremented around the loop
} while (buf[i] && !patlen);
/* adjbuf() may have relocated a resized buffer. Inform the world. */
--- a/makefile
+++ b/makefile
@@ -23,9 +23,9 @@
# ****************************************************************/
CFLAGS = -fsanitize=address -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls
-CFLAGS = -g3
-#CFLAGS =
-#CFLAGS = -O2
+CFLAGS = -g
+CFLAGS =
+CFLAGS = -O2
# compiler options
#CC = gcc -Wall -g -Wwrite-strings
--
⑨