| 
									
										
										
										
											1996-08-26 18:22:31 +00:00
										 |  |  | /* tilde.h: Externally available variables and function in libtilde.a. */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-12 13:36:28 +00:00
										 |  |  | /* Copyright (C) 1992-2009 Free Software Foundation, Inc.
 | 
					
						
							| 
									
										
										
										
											1996-12-23 17:02:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-12 13:36:28 +00:00
										 |  |  |    This file contains the Readline Library (Readline), a set of | 
					
						
							| 
									
										
										
										
											1996-12-23 17:02:34 +00:00
										 |  |  |    routines for providing Emacs style line input to programs that ask | 
					
						
							|  |  |  |    for it. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-12 13:36:28 +00:00
										 |  |  |    Readline is free software: you can redistribute it and/or modify | 
					
						
							| 
									
										
										
										
											1996-12-23 17:02:34 +00:00
										 |  |  |    it under the terms of the GNU General Public License as published by | 
					
						
							| 
									
										
										
										
											2009-01-12 13:36:28 +00:00
										 |  |  |    the Free Software Foundation, either version 3 of the License, or | 
					
						
							|  |  |  |    (at your option) any later version. | 
					
						
							| 
									
										
										
										
											1996-12-23 17:02:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-12 13:36:28 +00:00
										 |  |  |    Readline 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 General Public License for more details. | 
					
						
							| 
									
										
										
										
											1996-12-23 17:02:34 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-12 13:36:28 +00:00
										 |  |  |    You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  |    along with Readline.  If not, see <http://www.gnu.org/licenses/>.
 | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											1996-12-23 17:02:34 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | #if !defined (_TILDE_H_)
 | 
					
						
							|  |  |  | #  define _TILDE_H_
 | 
					
						
							| 
									
										
										
										
											1996-08-26 18:22:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-03-17 21:46:59 +00:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* A function can be defined using prototypes and compile on both ANSI C
 | 
					
						
							|  |  |  |    and traditional C compilers with something like this: | 
					
						
							| 
									
										
										
										
											2001-11-13 17:56:06 +00:00
										 |  |  | 	extern char *func PARAMS((char *, char *, int)); */ | 
					
						
							| 
									
										
										
										
											2000-03-17 21:46:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-11-13 17:56:06 +00:00
										 |  |  | #if !defined (PARAMS)
 | 
					
						
							| 
									
										
										
										
											2000-03-17 21:46:59 +00:00
										 |  |  | #  if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
 | 
					
						
							| 
									
										
										
										
											2001-11-13 17:56:06 +00:00
										 |  |  | #    define PARAMS(protos) protos
 | 
					
						
							| 
									
										
										
										
											2000-03-17 21:46:59 +00:00
										 |  |  | #  else
 | 
					
						
							| 
									
										
										
										
											2001-11-13 17:56:06 +00:00
										 |  |  | #    define PARAMS(protos) ()
 | 
					
						
							| 
									
										
										
										
											2000-03-17 21:46:59 +00:00
										 |  |  | #  endif
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2001-11-13 17:56:06 +00:00
										 |  |  | typedef char *tilde_hook_func_t PARAMS((char *)); | 
					
						
							| 
									
										
										
										
											1996-08-26 18:22:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1997-06-05 14:59:13 +00:00
										 |  |  | /* If non-null, this contains the address of a function that the application
 | 
					
						
							|  |  |  |    wants called before trying the standard tilde expansions.  The function | 
					
						
							|  |  |  |    is called with the text sans tilde, and returns a malloc()'ed string | 
					
						
							|  |  |  |    which is the expansion, or a NULL pointer if the expansion fails. */ | 
					
						
							| 
									
										
										
										
											2001-04-06 19:14:31 +00:00
										 |  |  | extern tilde_hook_func_t *tilde_expansion_preexpansion_hook; | 
					
						
							| 
									
										
										
										
											1997-06-05 14:59:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-08-26 18:22:31 +00:00
										 |  |  | /* If non-null, this contains the address of a function to call if the
 | 
					
						
							|  |  |  |    standard meaning for expanding a tilde fails.  The function is called | 
					
						
							|  |  |  |    with the text (sans tilde, as in "foo"), and returns a malloc()'ed string | 
					
						
							|  |  |  |    which is the expansion, or a NULL pointer if there is no expansion. */ | 
					
						
							| 
									
										
										
										
											2001-04-06 19:14:31 +00:00
										 |  |  | extern tilde_hook_func_t *tilde_expansion_failure_hook; | 
					
						
							| 
									
										
										
										
											1996-08-26 18:22:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* When non-null, this is a NULL terminated array of strings which
 | 
					
						
							|  |  |  |    are duplicates for a tilde prefix.  Bash uses this to expand | 
					
						
							|  |  |  |    `=~' and `:~'. */ | 
					
						
							|  |  |  | extern char **tilde_additional_prefixes; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* When non-null, this is a NULL terminated array of strings which match
 | 
					
						
							|  |  |  |    the end of a username, instead of just "/".  Bash sets this to | 
					
						
							|  |  |  |    `:' and `=~'. */ | 
					
						
							|  |  |  | extern char **tilde_additional_suffixes; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Return a new string which is the result of tilde expanding STRING. */ | 
					
						
							| 
									
										
										
										
											2001-11-13 17:56:06 +00:00
										 |  |  | extern char *tilde_expand PARAMS((const char *)); | 
					
						
							| 
									
										
										
										
											1996-08-26 18:22:31 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* Do the work of tilde expansion on FILENAME.  FILENAME starts with a
 | 
					
						
							|  |  |  |    tilde.  If there is no expansion, call tilde_expansion_failure_hook. */ | 
					
						
							| 
									
										
										
										
											2001-11-13 17:56:06 +00:00
										 |  |  | extern char *tilde_expand_word PARAMS((const char *)); | 
					
						
							| 
									
										
										
										
											2000-03-17 21:46:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-12-07 14:08:12 +00:00
										 |  |  | /* Find the portion of the string beginning with ~ that should be expanded. */ | 
					
						
							|  |  |  | extern char *tilde_find_word PARAMS((const char *, int, int *)); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2000-03-17 21:46:59 +00:00
										 |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											1996-08-26 18:22:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											1996-12-23 17:02:34 +00:00
										 |  |  | #endif /* _TILDE_H_ */
 |