diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-11-23 18:59:00 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-11-23 18:59:00 -0500 |
commit | 2916980bde9ae4d8b8e9d60062660bdca947f56e (patch) | |
tree | 2b82b766ecb942f2758987d83f955694b12bc378 /rldefs.h | |
parent | d19d2a576e818d6732b0d1b1ae72e3cc96fc29a3 (diff) | |
download | readline-2916980bde9ae4d8b8e9d60062660bdca947f56e.tar.gz |
Readline-4.1 import
Diffstat (limited to 'rldefs.h')
-rw-r--r-- | rldefs.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -10,7 +10,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -21,7 +21,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_RLDEFS_H_) #define _RLDEFS_H_ @@ -122,7 +122,8 @@ extern char *xmalloc (); #if !defined (STREQ) #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) -#define STREQN(a, b, n) (((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#define STREQN(a, b, n) (((n) == 0) ? (1) \ + : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) #endif #if !defined (FREE) |