Icons are changed
[gnuplot] / src / gp_hist.h
1 /*
2  * $Id: gp_hist.h,v 1.9.2.1 2008/12/12 06:57:50 sfeam Exp $
3  */
4
5 /* GNUPLOT - gp_hist.h */
6
7 /*[
8  * Copyright 1999, 2004   Thomas Williams, Colin Kelley
9  *
10  * Permission to use, copy, and distribute this software and its
11  * documentation for any purpose with or without fee is hereby granted,
12  * provided that the above copyright notice appear in all copies and
13  * that both that copyright notice and this permission notice appear
14  * in supporting documentation.
15  *
16  * Permission to modify the software is granted, but not the right to
17  * distribute the complete modified source code.  Modifications are to
18  * be distributed as patches to the released version.  Permission to
19  * distribute binaries produced by compiling modified sources is granted,
20  * provided you
21  *   1. distribute the corresponding source modifications from the
22  *    released version in the form of a patch file along with the binaries,
23  *   2. add special version identification to distinguish your version
24  *    in addition to the base release version number,
25  *   3. provide your name and address as the primary contact for the
26  *    support of your modified version, and
27  *   4. retain our contact information in regard to use of the base
28  *    software.
29  * Permission to distribute the released version of the source code along
30  * with corresponding source modifications in the form of a patch file is
31  * granted with same provisions 2 through 4 for binary distributions.
32  *
33  * This software is provided "as is" without express or implied warranty
34  * to the extent permitted by applicable law.
35 ]*/
36
37 #ifndef GNUPLOT_HISTORY_H
38 # define GNUPLOT_HISTORY_H
39
40 #include "syscfg.h"
41
42 /* Type and struct definitions */
43
44 struct hist {
45     char *line;
46     struct hist *prev;
47     struct hist *next;
48 };
49
50 /* Variables of history.c needed by other modules: */
51
52 extern struct hist *history;
53 extern struct hist *cur_entry;
54
55 #ifdef GNUPLOT_HISTORY
56 extern long int gnuplot_history_size;
57 #endif
58
59 /* Prototypes of functions exported by history.c */
60
61 /* GNU readline
62  * Only required by two files directly,
63  * so I don't put this into a header file. -lh
64  */
65 #ifdef HAVE_LIBREADLINE
66 # include <readline/history.h>
67 #endif
68
69 /* NetBSD editline
70  * (almost) compatible readline relacement
71  */
72 #if defined(HAVE_LIBEDITLINE)
73 # include <editline/readline.h>
74 #endif
75
76 #if defined(READLINE) && !defined(HAVE_LIBREADLINE) && !defined(HAVE_LIBEDITLINE)
77 void add_history __PROTO((char *line));
78 void write_history_n __PROTO((const int, const char *, const char *));
79 void write_history __PROTO((char *));
80 void read_history __PROTO((char *));
81 const char *history_find __PROTO((char *));
82 int history_find_all __PROTO((char *));
83 #elif defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE)
84 void write_history_n __PROTO((const int, const char *, const char *));
85 const char *history_find __PROTO((char *));
86 int history_find_all __PROTO((char *));
87 #endif /* READLINE && !HAVE_LIBREADLINE */
88
89 #endif /* GNUPLOT_HISTORY_H */