Back to index

tetex-bin  3.0
tilde.h
Go to the documentation of this file.
00001 /* tilde.h: Externally available variables and function in libtilde.a.
00002    $Id: tilde.h,v 1.3 2004/04/11 17:56:46 karl Exp $
00003 
00004    This file has appeared in prior works by the Free Software Foundation;
00005    thus it carries copyright dates from 1988 through 1993.
00006 
00007    Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 2004 Free Software
00008    Foundation, Inc.
00009 
00010    This program is free software; you can redistribute it and/or modify
00011    it under the terms of the GNU General Public License as published by
00012    the Free Software Foundation; either version 2, or (at your option)
00013    any later version.
00014 
00015    This program is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019 
00020    You should have received a copy of the GNU General Public License
00021    along with this program; if not, write to the Free Software
00022    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00023 
00024    Written by Brian Fox (bfox@ai.mit.edu). */
00025 
00026 #ifndef TILDE_H
00027 #define TILDE_H
00028 
00029 #include "info.h"
00030 
00031 /* If non-null, this contains the address of a function to call if the
00032    standard meaning for expanding a tilde fails.  The function is called
00033    with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
00034    which is the expansion, or a NULL pointer if there is no expansion. */
00035 extern CFunction *tilde_expansion_failure_hook;
00036 
00037 /* When non-null, this is a NULL terminated array of strings which
00038    are duplicates for a tilde prefix.  Bash uses this to expand
00039    `=~' and `:~'. */
00040 extern char **tilde_additional_prefixes;
00041 
00042 /* When non-null, this is a NULL terminated array of strings which match
00043    the end of a username, instead of just "/".  Bash sets this to
00044    `:' and `=~'. */
00045 extern char **tilde_additional_suffixes;
00046 
00047 /* Return a new string which is the result of tilde expanding STRING. */
00048 extern char *tilde_expand (char *string);
00049 
00050 /* Do the work of tilde expansion on FILENAME.  FILENAME starts with a
00051    tilde.  If there is no expansion, call tilde_expansion_failure_hook. */
00052 extern char *tilde_expand_word (char *filename);
00053 
00054 #endif /* not TILDE_H */