jcs
/amend
/amendments
/65
diffreg: Fix D_PROTOTYPE usage
Look for a Mac-style newline here, not Unix
jcs made amendment 65 over 2 years ago
--- diffreg.c Sun Oct 17 14:48:37 2021
+++ diffreg.c Sat Apr 16 14:13:33 2022
@@ -1191,7 +1191,7 @@ match_function(const long *f, int pos, FILE *fp)
nc = fread(buf, 1, nc, fp);
if (nc > 0) {
buf[nc] = '\0';
- buf[strcspn((const char *)buf, "\n")] = '\0';
+ buf[strcspn((const char *)buf, "\r")] = '\0';
if (isalpha(buf[0]) || buf[0] == '_' || buf[0] == '$') {
if (begins_with((const char *)buf, "private:")) {
if (!state)