2 * $Id: hist.h 768 2007-10-24 00:10:03Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2022 Eduardo Chappa
6 * Copyright 2006-2007 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_HIST_INCLUDED
18 #define PITH_HIST_INCLUDED
21 #define HISTSIZE (20+1)
23 typedef struct one_hist
{
30 typedef struct history_s
{
34 ONE_HIST_S
*hist
[1]; /* has size histsize */
38 #define HISTORY_UP_KEYNAME "Up"
39 #define HISTORY_DOWN_KEYNAME "Down"
40 #define HISTORY_KEYLABEL N_("History")
42 void init_hist(HISTORY_S
**, int);
43 void free_hist(HISTORY_S
**);
44 char *get_prev_hist(HISTORY_S
*, char *, unsigned, void *);
45 char *get_next_hist(HISTORY_S
*, char *, unsigned, void *);
46 char *hist_in_pos(int, char **, int, HISTORY_S
*, int);
47 void save_hist(HISTORY_S
*, char *, unsigned, void *);
48 int items_in_hist(HISTORY_S
*);
49 void add_to_histlist(HISTORY_S
**);
50 void free_histlist(void);
51 int dirs_in_hist(HISTORY_S
*);
54 #endif /* PITH_HIST_INCLUDED */