Add a new memcmpstart to use instead of strcmpstart when the thing we are comparing is not nul-terminated.

svn:r17187
This commit is contained in:
Nick Mathewson
2008-11-03 16:35:48 +00:00
parent 7b45d530b0
commit 3f84ed3d46
2 changed files with 19 additions and 0 deletions
+3
View File
@@ -181,6 +181,9 @@ int strcasecmpstart(const char *s1, const char *s2)
int strcmpend(const char *s1, const char *s2) ATTR_PURE ATTR_NONNULL((1,2));
int strcasecmpend(const char *s1, const char *s2)
ATTR_PURE ATTR_NONNULL((1,2));
int memcmpstart(const void *mem, size_t memlen,
const char *prefix) ATTR_PURE;
void tor_strstrip(char *s, const char *strip) ATTR_NONNULL((1,2));
long tor_parse_long(const char *s, int base, long min,
long max, int *ok, char **next);