X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=readline%2Fhistlib.h;h=88a34d10f1d57e22d6a6783a255b11af61d95ce5;hb=f9267e152c9c4e2b150366c590674180e66d45df;hp=10a40d7919b9c90e1d61e7349f3db7c143d181e6;hpb=d60d9f651ab04df95fcd31488fbb46be263382ae;p=deliverable%2Fbinutils-gdb.git diff --git a/readline/histlib.h b/readline/histlib.h index 10a40d7919..88a34d10f1 100644 --- a/readline/histlib.h +++ b/readline/histlib.h @@ -6,7 +6,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 @@ -17,7 +17,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 (_HISTLIB_H_) #define _HISTLIB_H_ @@ -31,8 +31,11 @@ typedef char *CPFunction (); typedef char **CPPFunction (); #endif /* _FUNCTION_DEF */ +#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 #ifndef savestring # ifndef strcpy @@ -69,6 +72,7 @@ extern char *strchr (); #define BAD_WORD_SPEC 1 #define SUBST_FAILED 2 #define BAD_MODIFIER 3 +#define NO_PREV_SUBST 4 /* Possible definitions for history starting point specification. */ #define ANCHORED_SEARCH 1 @@ -78,4 +82,7 @@ extern char *strchr (); #define HISTORY_APPEND 0 #define HISTORY_OVERWRITE 1 +/* Some variable definitions shared across history source files. */ +extern int history_offset; + #endif /* !_HISTLIB_H_ */