Import readline 8.0
[external/binutils.git] / readline / history.h
index 14ca2a9..cc3de29 100644 (file)
@@ -1,23 +1,23 @@
 /* history.h -- the names of functions that you can call in history. */
-/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
 
-   This file contains the GNU History Library (the Library), a set of
+/* Copyright (C) 1989-2015 Free Software Foundation, Inc.
+
+   This file contains the GNU History Library (History), a set of
    routines for managing the text of previously typed lines.
 
-   The Library is free software; you can redistribute it and/or modify
+   History is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-   The Library is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
+   History is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-   The GNU General Public License is often shipped with GNU software, and
-   is generally kept in a file called COPYING or LICENSE.  If you do not
-   have a copy of the license, write to the Free Software Foundation,
-   59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+   You should have received a copy of the GNU General Public License
+   along with History.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 #ifndef _HISTORY_H_
 #define _HISTORY_H_
@@ -86,11 +86,20 @@ extern void add_history PARAMS((const char *));
    STRING. */
 extern void add_history_time PARAMS((const char *));
 
-/* A reasonably useless function, only here for completeness.  WHICH
-   is the magic number that tells us which element to delete.  The
-   elements are numbered from 0. */
+/* Remove an entry from the history list.  WHICH is the magic number that
+   tells us which element to delete.  The elements are numbered from 0. */
 extern HIST_ENTRY *remove_history PARAMS((int));
 
+/* Remove a set of entries from the history list: FIRST to LAST, inclusive */
+extern HIST_ENTRY **remove_history_range PARAMS((int, int));
+
+/* Allocate a history entry consisting of STRING and TIMESTAMP and return
+   a pointer to it. */
+extern HIST_ENTRY *alloc_history_entry PARAMS((char *, char *));
+
+/* Copy the history entry H, but not the (opaque) data pointer */
+extern HIST_ENTRY *copy_history_entry PARAMS((HIST_ENTRY *));
+
 /* Free the history entry H and return any application-specific data
    associated with it. */
 extern histdata_t free_history_entry PARAMS((HIST_ENTRY *));
@@ -216,7 +225,7 @@ extern int history_truncate_file PARAMS((const char *, int));
   -1) If there was an error in expansion.
    2) If the returned line should just be printed.
 
-  If an error ocurred in expansion, then OUTPUT contains a descriptive
+  If an error occurred in expansion, then OUTPUT contains a descriptive
   error message. */
 extern int history_expand PARAMS((char *, char **));
 
@@ -241,16 +250,27 @@ extern char **history_tokenize PARAMS((const char *));
 extern int history_base;
 extern int history_length;
 extern int history_max_entries;
+extern int history_offset;
+
+extern int history_lines_read_from_file;
+extern int history_lines_written_to_file;
+
 extern char history_expansion_char;
 extern char history_subst_char;
 extern char *history_word_delimiters;
 extern char history_comment_char;
 extern char *history_no_expand_chars;
 extern char *history_search_delimiter_chars;
+
 extern int history_quotes_inhibit_expansion;
+extern int history_quoting_state;
 
 extern int history_write_timestamps;
 
+/* These two are undocumented; the second is reserved for future use */
+extern int history_multiline_entries;
+extern int history_file_version;
+
 /* Backwards compatibility */
 extern int max_input_history;