X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/c53b61f8d4a809ab53e954594874285ca32d1b11..fc0d9e42eafa6999fad8dc0887fb12e1a4a8699d:/sbr/mf.c diff --git a/sbr/mf.c b/sbr/mf.c index ebd130d2..084643b4 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -26,8 +26,8 @@ static int my_lex (char *); int isfrom(const char *string) { - return (strncmp (string, "From ", 5) == 0 - || strncmp (string, ">From ", 6) == 0); + return (has_prefix(string, "From ") + || has_prefix(string, ">From ")); } @@ -52,10 +52,8 @@ lequal (const char *a, const char *b) static int isat (const char *p) { - return (strncmp (p, " AT ", 4) - && strncmp (p, " At ", 4) - && strncmp (p, " aT ", 4) - && strncmp (p, " at ", 4) ? FALSE : TRUE); + return has_prefix(p, " AT ") || has_prefix(p, " At ") || + has_prefix(p, " aT ") || has_prefix(p, " at "); }