1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/cmd/ksh93/include/history.h
Martijn Dekker 807863c29a Update author attributions in all source files
This commit:

1. Updates the COPYRIGHT file with all the contributors to ksh
   93u+m since the reboot, based on the commit history, sorted by
   number of commits in descending order. It also separates the
   authors of backported contributions from direct contributors.

2. Adds missing contributors of source each file to that file's
   copyright header based on that file's commit history.

The script used to maintain this is now up at:
https://github.com/ksh93/ksh/wiki/update-copyright.sh

In addition, the original ast copyright notice is restored to
its EPL 1.0 version -- that is what AT&T Intellectual Property
originally licensed this code under, and we are the ones who
upgraded it to EPL 2.0 (as allowed by EPL 1.0) in 441dcc04.
The history should be accurate.
2022-07-31 00:47:08 +02:00

71 lines
2.6 KiB
C

/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1982-2011 AT&T Intellectual Property *
* Copyright (c) 2020-2022 Contributors to ksh 93u+m *
* and is licensed under the *
* Eclipse Public License, Version 2.0 *
* *
* A copy of the License is available at *
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html *
* (with md5 checksum 84283fa8859daf213bdda5a9f8d1be1d) *
* *
* David Korn <dgk@research.att.com> *
* Martijn Dekker <martijn@inlv.org> *
* *
***********************************************************************/
#ifndef HIST_VERSION
/*
* Interface for history mechanism
* written by David Korn
*
*/
#include <ast.h>
#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 */