* Add strneq() (streq only n chars) macro

* fix return type of xstrdup.
This commit is contained in:
Paul Smith 1999-03-19 04:27:56 +00:00
parent e3d0d562da
commit 1e0513335f
2 changed files with 3 additions and 1 deletions

2
make.h
View file

@ -298,6 +298,8 @@ extern char *alloca ();
# define strieq(a, b) (strcmp ((a), (b)) == 0)
#endif
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
/* Add to VAR the hashing value of C, one character in a name. */
#define HASH(var, c) \
((var += (c)), (var = ((var) << 7) + ((var) >> 20)))

2
misc.c
View file

@ -379,7 +379,7 @@ xrealloc (ptr, size)
}
const char *
char *
xstrdup (ptr)
const char *ptr;
{