tilde.h revision 21308
121308Sache/* tilde.h: Externally available variables and function in libtilde.a. */
221308Sache
321308Sache/* Copyright (C) 1992 Free Software Foundation, Inc.
421308Sache
521308Sache   This file contains the Readline Library (the Library), a set of
621308Sache   routines for providing Emacs style line input to programs that ask
721308Sache   for it.
821308Sache
921308Sache   The Library is free software; you can redistribute it and/or modify
1021308Sache   it under the terms of the GNU General Public License as published by
1121308Sache   the Free Software Foundation; either version 1, or (at your option)
1221308Sache   any later version.
1321308Sache
1421308Sache   The Library is distributed in the hope that it will be useful, but
1521308Sache   WITHOUT ANY WARRANTY; without even the implied warranty of
1621308Sache   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1721308Sache   General Public License for more details.
1821308Sache
1921308Sache   The GNU General Public License is often shipped with GNU software, and
2021308Sache   is generally kept in a file called COPYING or LICENSE.  If you do not
2121308Sache   have a copy of the license, write to the Free Software Foundation,
2221308Sache   675 Mass Ave, Cambridge, MA 02139, USA. */
2321308Sache
2421308Sache#if !defined (_TILDE_H_)
2521308Sache#  define _TILDE_H_
2621308Sache
2721308Sache/* Function pointers can be declared as (Function *)foo. */
2821308Sache#if !defined (_FUNCTION_DEF)
2921308Sache#  define _FUNCTION_DEF
3021308Sachetypedef int Function ();
3121308Sachetypedef void VFunction ();
3221308Sachetypedef char *CPFunction ();
3321308Sachetypedef char **CPPFunction ();
3421308Sache#endif /* _FUNCTION_DEF */
3521308Sache
3621308Sache/* If non-null, this contains the address of a function to call if the
3721308Sache   standard meaning for expanding a tilde fails.  The function is called
3821308Sache   with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
3921308Sache   which is the expansion, or a NULL pointer if there is no expansion. */
4021308Sacheextern CPFunction *tilde_expansion_failure_hook;
4121308Sache
4221308Sache/* When non-null, this is a NULL terminated array of strings which
4321308Sache   are duplicates for a tilde prefix.  Bash uses this to expand
4421308Sache   `=~' and `:~'. */
4521308Sacheextern char **tilde_additional_prefixes;
4621308Sache
4721308Sache/* When non-null, this is a NULL terminated array of strings which match
4821308Sache   the end of a username, instead of just "/".  Bash sets this to
4921308Sache   `:' and `=~'. */
5021308Sacheextern char **tilde_additional_suffixes;
5121308Sache
5221308Sache/* Return a new string which is the result of tilde expanding STRING. */
5321308Sacheextern char *tilde_expand ();
5421308Sache
5521308Sache/* Do the work of tilde expansion on FILENAME.  FILENAME starts with a
5621308Sache   tilde.  If there is no expansion, call tilde_expansion_failure_hook. */
5721308Sacheextern char *tilde_expand_word ();
5821308Sache
5921308Sache#endif /* _TILDE_H_ */
60