X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fisprefix.c;fp=sbr%2Fisprefix.c;h=0000000000000000000000000000000000000000;hb=b0b1dd37ff515578cf7cba51625189eb34a196cb;hp=33c06998246d3bb2e116641e5418c3b0751faed2;hpb=1f958f791cd9ee06e1de07c348555c920772af67;p=mmh diff --git a/sbr/isprefix.c b/sbr/isprefix.c deleted file mode 100644 index 33c0699..0000000 --- a/sbr/isprefix.c +++ /dev/null @@ -1,35 +0,0 @@ -/* -** isprefix.c -- check if a string is a PREFIX of another -** -** This code is Copyright (c) 2002, by the authors of nmh. See the -** COPYRIGHT file in the root directory of the nmh distribution for -** complete copyright information. -*/ - -#include - -/* -** This function had been named ssequal(). It had advertised it would -** check for substring matching, but actually checked prefix matching. -** The latter being the thing wanted. Hence, only the name and the -** descriptions were wrong. I fixed this. -** -- markus schnalke , 2011-11 -*/ - -/* -** Check if s1 is a PREFIX of s2. -** If yes, then return 1, else return 0. -*/ -int -isprefix(char *s1, char *s2) -{ - if (!s1) - s1 = ""; - if (!s2) - s2 = ""; - - while (*s1) - if (*s1++ != *s2++) - return 0; - return 1; -}