1146515Sru/* tilde.h: Externally available variables and function in libtilde.a. 2146515Sru $Id: tilde.h,v 1.3 2004/04/11 17:56:46 karl Exp $ 321495Sjmacd 421495Sjmacd This file has appeared in prior works by the Free Software Foundation; 521495Sjmacd thus it carries copyright dates from 1988 through 1993. 621495Sjmacd 7146515Sru Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 2004 Free Software 821495Sjmacd Foundation, Inc. 921495Sjmacd 1021495Sjmacd This program is free software; you can redistribute it and/or modify 1121495Sjmacd it under the terms of the GNU General Public License as published by 1221495Sjmacd the Free Software Foundation; either version 2, or (at your option) 1321495Sjmacd any later version. 1421495Sjmacd 1521495Sjmacd This program is distributed in the hope that it will be useful, 1621495Sjmacd but WITHOUT ANY WARRANTY; without even the implied warranty of 1721495Sjmacd MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1821495Sjmacd GNU General Public License for more details. 1921495Sjmacd 2021495Sjmacd You should have received a copy of the GNU General Public License 2121495Sjmacd along with this program; if not, write to the Free Software 2221495Sjmacd Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 2321495Sjmacd 2421495Sjmacd Written by Brian Fox (bfox@ai.mit.edu). */ 2521495Sjmacd 2642660Smarkm#ifndef TILDE_H 2742660Smarkm#define TILDE_H 2821495Sjmacd 2942660Smarkm#include "info.h" 3042660Smarkm 3121495Sjmacd/* If non-null, this contains the address of a function to call if the 3221495Sjmacd standard meaning for expanding a tilde fails. The function is called 3321495Sjmacd with the text (sans tilde, as in "foo"), and returns a malloc()'ed string 3421495Sjmacd which is the expansion, or a NULL pointer if there is no expansion. */ 3521495Sjmacdextern CFunction *tilde_expansion_failure_hook; 3621495Sjmacd 3721495Sjmacd/* When non-null, this is a NULL terminated array of strings which 3821495Sjmacd are duplicates for a tilde prefix. Bash uses this to expand 3921495Sjmacd `=~' and `:~'. */ 4021495Sjmacdextern char **tilde_additional_prefixes; 4121495Sjmacd 4221495Sjmacd/* When non-null, this is a NULL terminated array of strings which match 4321495Sjmacd the end of a username, instead of just "/". Bash sets this to 4421495Sjmacd `:' and `=~'. */ 4521495Sjmacdextern char **tilde_additional_suffixes; 4621495Sjmacd 4721495Sjmacd/* Return a new string which is the result of tilde expanding STRING. */ 48146515Sruextern char *tilde_expand (char *string); 4921495Sjmacd 5021495Sjmacd/* Do the work of tilde expansion on FILENAME. FILENAME starts with a 5121495Sjmacd tilde. If there is no expansion, call tilde_expansion_failure_hook. */ 52146515Sruextern char *tilde_expand_word (char *filename); 5321495Sjmacd 5442660Smarkm#endif /* not TILDE_H */ 55