<commit_before>/**************************************************************************
/* Readline.java -- Java wrapper of GNU readline
/*
/* Java Wrapper Copyright (c) 1998-2001 by <NAME> (<EMAIL>)
/*
/* This program is free software; you can redistribute it and/or modify
/* it under the terms of the GNU Library General Public License as published
/* by  the Free Software Foundation; either version 2 of the License or
/* (at your option) any later version.
/*
/* This program 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 Library General Public License for more details.
/*
/* You should have received a copy of the GNU Library General Public License
/* along with this program; see the file COPYING.LIB.  If not, write to
/* the Free Software Foundation Inc., 59 Temple Place - Suite 330,
/* Boston, MA  02111-1307 USA
/**************************************************************************/

package org.gnu.readline;

import java.io.*;
import java.util.*;

/**
 This class implements basic functionality of the GNU-readline interface. It
 uses native method calls if available, otherwise it defaults to normal
 I/O using a BufferedReader. 

 <p>A typical implementation could look like:
<pre>
 try {
     Readline.load(ReadlineLibrary.GnuReadline);
 }
 catch (UnsatisfiedLinkError ignore_me) {
     System.err.println("couldn't load readline lib. Using simple stdin.");
 }

 Readline.initReadline("myapp");

 Runtime.getRuntime()                       // if your version supports
   .addShutdownHook(new Thread() {          // addShutdownHook (since 1.3)
      public void run() {
        Readline.cleanup();
      }
    });

 while (true) {
     try {
         line = Readline.readline("myprompt> ");
         if (line == null)
             System.out.println("no input");
         else
             processLine();
     } 
     catch (EOFException e) {
         break;
     } 
     catch (Exception e) {
         doSomething();
     }
 }
 Readline.cleanup();  // see note above about addShutdownHook

</pre>

 @version $Revision$
 @author  $Author$
*/

public class Readline {

  /**
     Constant to access the word-break-characters with
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
	  <li>Editline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString WORD_BREAK_CHARS = 
    new ReadlineConstString(0, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline,ReadlineLibrary.Editline});

  /**
     The currently defined ReadlineCompleter.
  */

  private static ReadlineCompleter iCompleter = null;


  /**
     The currently implementing backing library.
  */

  private static ReadlineLibrary iLib = ReadlineLibrary.PureJava;

  /**
     The BufferedReader for the fallback solution.
  */

  private static BufferedReader iReader = null;

  /**
      The current encoding of the BufferedReader. The default is the
      value of the property <em>readline.encoding</em>. If this
      property is unset, the default is null, so the BufferedReader
      will use the default encoding.
   */

  private static String iEncoding =<commit_msg>added list of constants for [sg]etVar()<commit_after>/**************************************************************************
/* Readline.java -- Java wrapper of GNU readline
/*
/* Java Wrapper Copyright (c) 1998-2001 by <NAME> (<EMAIL>)
/*
/* This program is free software; you can redistribute it and/or modify
/* it under the terms of the GNU Library General Public License as published
/* by  the Free Software Foundation; either version 2 of the License or
/* (at your option) any later version.
/*
/* This program 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 Library General Public License for more details.
/*
/* You should have received a copy of the GNU Library General Public License
/* along with this program; see the file COPYING.LIB.  If not, write to
/* the Free Software Foundation Inc., 59 Temple Place - Suite 330,
/* Boston, MA  02111-1307 USA
/**************************************************************************/

package org.gnu.readline;

import java.io.*;
import java.util.*;

/**
 This class implements basic functionality of the GNU-readline interface. It
 uses native method calls if available, otherwise it defaults to normal
 I/O using a BufferedReader. 

 <p>A typical implementation could look like:
<pre>
 try {
     Readline.load(ReadlineLibrary.GnuReadline);
 }
 catch (UnsatisfiedLinkError ignore_me) {
     System.err.println("couldn't load readline lib. Using simple stdin.");
 }

 Readline.initReadline("myapp");

 Runtime.getRuntime()                       // if your version supports
   .addShutdownHook(new Thread() {          // addShutdownHook (since 1.3)
      public void run() {
        Readline.cleanup();
      }
    });

 while (true) {
     try {
         line = Readline.readline("myprompt> ");
         if (line == null)
             System.out.println("no input");
         else
             processLine();
     } 
     catch (EOFException e) {
         break;
     } 
     catch (Exception e) {
         doSomething();
     }
 }
 Readline.cleanup();  // see note above about addShutdownHook

</pre>

 @version $Revision$
 @author  $Author$
*/

public class Readline {

  /**
     Constant to access rl_library_version using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_LIBRARY_VERSION = 
    new ReadlineConstString(0, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_readline_name using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_READLINE_NAME = 
    new ReadlineConstString(1, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_prompt using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_PROMPT = 
    new ReadlineConstString(2, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_line_buffer using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_LINE_BUFFER = 
    new ReadlineConstString(3, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_terminal_name using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_TERMINAL_NAME = 
    new ReadlineConstString(4, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_executing_macro using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_EXECUTING_MACRO =
    new ReadlineConstString(5, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_basic_word_break_characters using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_BASIC_WORD_BREAK_CHARACTERS =
    new ReadlineConstString(6, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_completer_word_break_characters using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_COMPLETER_WORD_BREAK_CHARACTERS = 
    new ReadlineConstString(7, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_completer_quote_characters using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_COMPLETER_QUOTE_CHARACTERS = 
    new ReadlineConstString(8, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_basic_quote_characters using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_BASIC_QUOTE_CHARACTERS = 
    new ReadlineConstString(9, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_filename_quote_characters using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_FILENAME_QUOTE_CHARACTERS = 
    new ReadlineConstString(10, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_special_prefixes using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString RL_SPECIAL_PREFIXES = 
    new ReadlineConstString(11, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access history_word_delimiters using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString HISTORY_WORD_DELIMITERS = 
    new ReadlineConstString(12, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});

  /**
     Constant to access history_no_expand_chars using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString HISTORY_NO_EXPAND_CHARS = 
    new ReadlineConstString(13, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access history_search_delimiter_chars using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstString HISTORY_SEARCH_DELIMITERS = 
    new ReadlineConstString(14, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_readline_version using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_READLINE_VERSION = 
    new ReadlineConstInt(0, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_gnu_readline_p using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_GNU_READLINE_P = 
    new ReadlineConstInt(1, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_readline_state using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_READLINE_STATE = 
    new ReadlineConstInt(2, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_editing_mode using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_EDITING_MODE = 
    new ReadlineConstInt(3, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_insert_mode using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_INSERT_MODE = 
    new ReadlineConstInt(4, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_point using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_POINT = 
    new ReadlineConstInt(5, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_end using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_END = 
    new ReadlineConstInt(6, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_mark using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_MARK = 
    new ReadlineConstInt(7, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_done using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_DONE = 
    new ReadlineConstInt(8, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_pending_input using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_PENDING_INPUT = 
    new ReadlineConstInt(9, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_dispatching using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_DISPATCHING = 
    new ReadlineConstInt(10, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_explicit_arg using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_EXPLICIT_ARG = 
    new ReadlineConstInt(11, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_numeric_arg using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_NUMERIC_ARG = 
    new ReadlineConstInt(12, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_erase_empty_line using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_ERASE_EMPTY_LINE = 
    new ReadlineConstInt(13, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_already_prompted using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_ALREADY_PROMPTED = 
    new ReadlineConstInt(14, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_num_chars_to_read using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_NUM_CHARS_TO_READ = 
    new ReadlineConstInt(15, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_catch_signals using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_CATCH_SIGNALS = 
    new ReadlineConstInt(16, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_catch_sigwinch using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_CATCH_SIGWINCH = 
    new ReadlineConstInt(17, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_filename_completion_desired using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_FILENAME_COMPLETION_DESIRED = 
    new ReadlineConstInt(18, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_filename_quoting_desired using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_FILENAME_QUOTING_DESIRED = 
    new ReadlineConstInt(19, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_attempted_completion_over using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_ATTEMPTED_COMPLETION_OVER = 
    new ReadlineConstInt(20, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_completion_type using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_COMPLETION_TYPE = 
    new ReadlineConstInt(21, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_completion_append_character using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_COMPLETION_APPEND_CHARACTER = 
    new ReadlineConstInt(22, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_completion_suppress_append using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_COMPLETION_SUPPRESS_APPEND = 
    new ReadlineConstInt(23, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_completion_query_items using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_COMPLETION_QUERY_ITEMS = 
    new ReadlineConstInt(24, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_completion_mark_symlink_dirs using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_COMPLETION_MARK_SYMLINK_DIRS = 
    new ReadlineConstInt(25, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_ignore_completion_duplicates using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_IGNORE_COMPLETION_DUPLICATES = 
    new ReadlineConstInt(26, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access rl_inhibit_completion using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt RL_INHIBIT_COMPLETION = 
    new ReadlineConstInt(27, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access history_base using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt HISTORY_BASE = 
    new ReadlineConstInt(28, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access history_length using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt HISTORY_LENGTH = 
    new ReadlineConstInt(29, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access history_max_entries using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt HISTORY_MAX_ENTRIES = 
    new ReadlineConstInt(30, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});


  /**
     Constant to access history_quotes_inhibit_expansion using
     <code>getVar()</code> or <code>setVar()</code>.

     <p>Supporting implementations:
        <ul>
	  <li>GNU-Readline</li>
        </ul>
     </p>     
  */
  
  public final static ReadlineConstInt HISTORY_QUOTES_EXPANSION = 
    new ReadlineConstInt(31, new ReadlineLibrary[] 
      {ReadlineLibrary.GnuReadline});



  /* ----------------------------------------------------------------------- */

  /**
     The currently defined ReadlineCompleter.
  */

  private static ReadlineCompleter iCompleter = null;


  /**
     The currently implementing backing library.
  */

  private static ReadlineLibrary iLib = ReadlineLibrary.PureJava;

  /**
     The BufferedReader for the fallback solution.
  */

  private static BufferedReader iReader = null;

  /**
      The current encoding of the BufferedReader. The default is the
      value of the property <em>readline.encoding</em>. If this
      property is unset, the default is null, so the BufferedReader
      will use the default encoding.
   */

  private static String iEncoding =
{'fraction_non_alphanumeric': 0.13044922361537822, 'fraction_numerical': 0.005189736776550693, 'mean_word_length': 2.6678848789401552, 'pattern_counts': {'":': 0, '<': 499, '<?xml version=': 0, '>': 501, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2251623', 'n_tokens_mistral': 8058, 'n_tokens_neox': 7337, 'n_words': 1759}