Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/diff/diffreg.c
Show First 20 Lines • Show All 1,413 Lines • ▼ Show 20 Lines | for (; pos > last; pos--) { | ||||
if (most_recent_pat != NULL) { | if (most_recent_pat != NULL) { | ||||
int ret = regexec(&most_recent_re, buf, 0, NULL, 0); | int ret = regexec(&most_recent_re, buf, 0, NULL, 0); | ||||
if (ret != 0) | if (ret != 0) | ||||
continue; | continue; | ||||
strlcpy(lastbuf, buf, sizeof(lastbuf)); | strlcpy(lastbuf, buf, sizeof(lastbuf)); | ||||
lastmatchline = pos; | lastmatchline = pos; | ||||
return (lastbuf); | return (lastbuf); | ||||
} else if (isalpha(buf[0]) || buf[0] == '_' || buf[0] == '$') { | } else if (isalpha(buf[0]) || buf[0] == '_' || buf[0] == '$' | ||||
|| buf[0] == '-' || buf[0] == '+') { | |||||
if (begins_with(buf, "private:")) { | if (begins_with(buf, "private:")) { | ||||
if (!state) | if (!state) | ||||
state = " (private)"; | state = " (private)"; | ||||
} else if (begins_with(buf, "protected:")) { | } else if (begins_with(buf, "protected:")) { | ||||
if (!state) | if (!state) | ||||
state = " (protected)"; | state = " (protected)"; | ||||
} else if (begins_with(buf, "public:")) { | } else if (begins_with(buf, "public:")) { | ||||
if (!state) | if (!state) | ||||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |