175406Sache/* compat.c -- backwards compatibility functions. */ 275406Sache 375406Sache/* Copyright (C) 2000 Free Software Foundation, Inc. 475406Sache 575406Sache This file is part of the GNU Readline Library, a library for 675406Sache reading lines of text with interactive input and history editing. 775406Sache 875406Sache The GNU Readline Library is free software; you can redistribute it 975406Sache and/or modify it under the terms of the GNU General Public License 1075406Sache as published by the Free Software Foundation; either version 2, or 1175406Sache (at your option) any later version. 1275406Sache 1375406Sache The GNU Readline Library is distributed in the hope that it will be 1475406Sache useful, but WITHOUT ANY WARRANTY; without even the implied warranty 1575406Sache of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1675406Sache GNU General Public License for more details. 1775406Sache 1875406Sache The GNU General Public License is often shipped with GNU software, and 1975406Sache is generally kept in a file called COPYING or LICENSE. If you do not 2075406Sache have a copy of the license, write to the Free Software Foundation, 2175406Sache 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ 2275406Sache#define READLINE_LIBRARY 2375406Sache 2475406Sache#if defined (HAVE_CONFIG_H) 2575406Sache# include <config.h> 2675406Sache#endif 2775406Sache 2875406Sache#include <stdio.h> 2975406Sache 3075406Sache#include "rlstdc.h" 3175406Sache#include "rltypedefs.h" 3275406Sache 33119610Sacheextern void rl_free_undo_list PARAMS((void)); 34119610Sacheextern int rl_maybe_save_line PARAMS((void)); 35119610Sacheextern int rl_maybe_unsave_line PARAMS((void)); 36119610Sacheextern int rl_maybe_replace_line PARAMS((void)); 3775406Sache 38119610Sacheextern int rl_crlf PARAMS((void)); 39119610Sacheextern int rl_ding PARAMS((void)); 40119610Sacheextern int rl_alphabetic PARAMS((int)); 4175406Sache 42119610Sacheextern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); 43119610Sacheextern char *rl_username_completion_function PARAMS((const char *, int)); 44119610Sacheextern char *rl_filename_completion_function PARAMS((const char *, int)); 4575406Sache 4675406Sache/* Provide backwards-compatible entry points for old function names. */ 4775406Sache 4875406Sachevoid 4975406Sachefree_undo_list () 5075406Sache{ 5175406Sache rl_free_undo_list (); 5275406Sache} 5375406Sache 5475406Sacheint 5575406Sachemaybe_replace_line () 5675406Sache{ 5775406Sache return rl_maybe_replace_line (); 5875406Sache} 5975406Sache 6075406Sacheint 6175406Sachemaybe_save_line () 6275406Sache{ 6375406Sache return rl_maybe_save_line (); 6475406Sache} 6575406Sache 6675406Sacheint 6775406Sachemaybe_unsave_line () 6875406Sache{ 6975406Sache return rl_maybe_unsave_line (); 7075406Sache} 7175406Sache 7275406Sacheint 7375406Sacheding () 7475406Sache{ 7575406Sache return rl_ding (); 7675406Sache} 7775406Sache 7875406Sacheint 7975406Sachecrlf () 8075406Sache{ 8175406Sache return rl_crlf (); 8275406Sache} 8375406Sache 8475406Sacheint 8575406Sachealphabetic (c) 8675406Sache int c; 8775406Sache{ 8875406Sache return rl_alphabetic (c); 8975406Sache} 9075406Sache 9175406Sachechar ** 9275406Sachecompletion_matches (s, f) 9375406Sache const char *s; 9475406Sache rl_compentry_func_t *f; 9575406Sache{ 9675406Sache return rl_completion_matches (s, f); 9775406Sache} 9875406Sache 9975406Sachechar * 10075406Sacheusername_completion_function (s, i) 10175406Sache const char *s; 10275406Sache int i; 10375406Sache{ 10475406Sache return rl_username_completion_function (s, i); 10575406Sache} 10675406Sache 10775406Sachechar * 10875406Sachefilename_completion_function (s, i) 10975406Sache const char *s; 11075406Sache int i; 11175406Sache{ 11275406Sache return rl_filename_completion_function (s, i); 11375406Sache} 114