00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined (_HISTLIB_H_)
00023 #define _HISTLIB_H_
00024
00025 #if defined (HAVE_STRING_H)
00026 # include <string.h>
00027 #else
00028 # include <strings.h>
00029 #endif
00030
00031 #if !defined (STREQ)
00032 #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0))
00033 #define STREQN(a, b, n) (((n) == 0) ? (1) \
00034 : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0))
00035 #endif
00036
00037 #ifndef savestring
00038 #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
00039 #endif
00040
00041 #ifndef whitespace
00042 #define whitespace(c) (((c) == ' ') || ((c) == '\t'))
00043 #endif
00044
00045 #ifndef _rl_digit_p
00046 #define _rl_digit_p(c) ((c) >= '0' && (c) <= '9')
00047 #endif
00048
00049 #ifndef _rl_digit_value
00050 #define _rl_digit_value(c) ((c) - '0')
00051 #endif
00052
00053 #ifndef member
00054 # ifndef strchr
00055 extern char *strchr ();
00056 # endif
00057 #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0)
00058 #endif
00059
00060 #ifndef FREE
00061 # define FREE(x) if (x) free (x)
00062 #endif
00063
00064
00065 #define EVENT_NOT_FOUND 0
00066 #define BAD_WORD_SPEC 1
00067 #define SUBST_FAILED 2
00068 #define BAD_MODIFIER 3
00069 #define NO_PREV_SUBST 4
00070
00071
00072 #define ANCHORED_SEARCH 1
00073 #define NON_ANCHORED_SEARCH 0
00074
00075
00076 #define HISTORY_APPEND 0
00077 #define HISTORY_OVERWRITE 1
00078
00079
00080 extern int history_offset;
00081
00082 #endif