#pragma prototyped
#ifndef HIST_VERSION
#include <ast.h>
#define HIST_CHAR '!'
#define HIST_VERSION 1
typedef struct
{
Sfdisc_t histdisc;
Sfio_t *histfp;
char *histname;
int32_t histind;
int histsize;
#ifdef _HIST_PRIVATE
_HIST_PRIVATE
#endif
} History_t;
typedef struct
{
int hist_command;
int hist_line;
int hist_char;
} Histloc_t;
extern const char hist_fname[];
extern int _Hist;
#define hist_min(hp) ((_Hist=((int)((hp)->histind-(hp)->histsize)))>=0?_Hist:0)
#define hist_max(hp) ((int)((hp)->histind))
extern int sh_histinit(void *);
extern void hist_cancel(History_t*);
extern void hist_close(History_t*);
extern int hist_copy(char*, int, int, int);
extern void hist_eof(History_t*);
extern Histloc_t hist_find(History_t*,char*,int, int, int);
extern void hist_flush(History_t*);
extern void hist_list(History_t*,Sfio_t*, off_t, int, char*);
extern int hist_match(History_t*,off_t, char*, int*);
extern off_t hist_tell(History_t*,int);
extern off_t hist_seek(History_t*,int);
extern char *hist_word(char*, int, int);
#if SHOPT_ESH
extern Histloc_t hist_locate(History_t*,int, int, int);
#endif
#endif