2 * $Id: gp_hist.h,v 1.9.2.1 2008/12/12 06:57:50 sfeam Exp $
5 /* GNUPLOT - gp_hist.h */
8 * Copyright 1999, 2004 Thomas Williams, Colin Kelley
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.
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,
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
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.
33 * This software is provided "as is" without express or implied warranty
34 * to the extent permitted by applicable law.
37 #ifndef GNUPLOT_HISTORY_H
38 # define GNUPLOT_HISTORY_H
42 /* Type and struct definitions */
50 /* Variables of history.c needed by other modules: */
52 extern struct hist *history;
53 extern struct hist *cur_entry;
55 #ifdef GNUPLOT_HISTORY
56 extern long int gnuplot_history_size;
59 /* Prototypes of functions exported by history.c */
62 * Only required by two files directly,
63 * so I don't put this into a header file. -lh
65 #ifdef HAVE_LIBREADLINE
66 # include <readline/history.h>
70 * (almost) compatible readline relacement
72 #if defined(HAVE_LIBEDITLINE)
73 # include <editline/readline.h>
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 */
89 #endif /* GNUPLOT_HISTORY_H */