From da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968 Mon Sep 17 00:00:00 2001 From: chin Date: Fri, 17 Aug 2007 12:01:52 -0700 Subject: 6437624 RFE: Add ksh93 (as /usr/bin/ksh93) and libshell.so to OS/Net 6505835 AST tools and library (libpp) required for creating l10n messages for ksh93 PSARC/2006/550 Korn Shell 93 Integration PSARC/2006/587 /etc/ksh.kshrc for ksh93 PSARC/2007/035 ksh93 Amendments Contributed by Roland Mainz --HG-- rename : usr/src/lib/libcmd/common/mapfile-vers => deleted_files/usr/src/lib/libcmd/common/mapfile-vers rename : usr/src/lib/libcmd/common/placeholder.c => deleted_files/usr/src/lib/libcmd/common/placeholder.c --- usr/src/lib/libshell/common/include/history.h | 75 +++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 usr/src/lib/libshell/common/include/history.h (limited to 'usr/src/lib/libshell/common/include/history.h') diff --git a/usr/src/lib/libshell/common/include/history.h b/usr/src/lib/libshell/common/include/history.h new file mode 100644 index 0000000000..f97cd8b4a4 --- /dev/null +++ b/usr/src/lib/libshell/common/include/history.h @@ -0,0 +1,75 @@ +/*********************************************************************** +* * +* This software is part of the ast package * +* Copyright (c) 1982-2007 AT&T Knowledge Ventures * +* and is licensed under the * +* Common Public License, Version 1.0 * +* by AT&T Knowledge Ventures * +* * +* A copy of the License is available at * +* http://www.opensource.org/licenses/cpl1.0.txt * +* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * +* * +* Information and Software Systems Research * +* AT&T Research * +* Florham Park NJ * +* * +* David Korn * +* * +***********************************************************************/ +#pragma prototyped +#ifndef HIST_VERSION +/* + * Interface for history mechanism + * written by David Korn + * + */ + +#include + +#define HIST_CHAR '!' +#define HIST_VERSION 1 /* history file format version no. */ + +typedef struct +{ + Sfdisc_t histdisc; /* discipline for history */ + Sfio_t *histfp; /* history file stream pointer */ + char *histname; /* name of history file */ + int32_t histind; /* current command number index */ + int histsize; /* number of accessible history lines */ +#ifdef _HIST_PRIVATE + _HIST_PRIVATE +#endif /* _HIST_PRIVATE */ +} History_t; + +typedef struct +{ + int hist_command; + int hist_line; + int hist_char; +} Histloc_t; + +/* the following are readonly */ +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)) +/* these are the history interface routines */ +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 /* SHOPT_ESH */ + +#endif /* HIST_VERSION */ -- cgit v1.2.3