diff options
author | Paul Smith <psmith@gnu.org> | 1999-03-19 04:27:56 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-03-19 04:27:56 +0000 |
commit | 1e0513335f560b6d9530fd7010108bf14790ba93 (patch) | |
tree | 16ced5095aaeb48ceabd53f0b697065938b4705b | |
parent | e3d0d562dac042d725dc2060f760132f6b549678 (diff) | |
download | gunmake-1e0513335f560b6d9530fd7010108bf14790ba93.tar.gz |
* Add strneq() (streq only n chars) macro
* fix return type of xstrdup.
-rw-r--r-- | make.h | 2 | ||||
-rw-r--r-- | misc.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -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))) @@ -379,7 +379,7 @@ xrealloc (ptr, size) } -const char * +char * xstrdup (ptr) const char *ptr; { |