home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / cwin / c.exe / $INSTDIR / include / readline / tilde.h < prev   
Encoding:
C/C++ Source or Header  |  2003-12-15  |  3.5 KB  |  99 lines

  1. /* tilde.h: Externally available variables and function in libtilde.a. */
  2.  
  3. /* Copyright (C) 1992 Free Software Foundation, Inc.
  4.  
  5.    This file contains the Readline Library (the Library), a set of
  6.    routines for providing Emacs style line input to programs that ask
  7.    for it.
  8.  
  9.    The Library is free software; you can redistribute it and/or modify
  10.    it under the terms of the GNU General Public License as published by
  11.    the Free Software Foundation; either version 2, or (at your option)
  12.    any later version.
  13.  
  14.    The Library is distributed in the hope that it will be useful, but
  15.    WITHOUT ANY WARRANTY; without even the implied warranty of
  16.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.    General Public License for more details.
  18.  
  19.    The GNU General Public License is often shipped with GNU software, and
  20.    is generally kept in a file called COPYING or LICENSE.  If you do not
  21.    have a copy of the license, write to the Free Software Foundation,
  22.    59 Temple Place, Suite 330, Boston, MA 02111 USA. */
  23.  
  24. #if !defined (_TILDE_H_)
  25. #  define _TILDE_H_
  26.  
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31. #if __READLINE_EXPORT__
  32. # define READLINE_API __declspec (dllexport)
  33. #elif __READLINE_IMPORT__
  34. # define READLINE_API __declspec (dllimport)
  35. #else
  36. # define READLINE_API
  37. #endif
  38.  
  39. /* A function can be defined using prototypes and compile on both ANSI C
  40.    and traditional C compilers with something like this:
  41.     extern char *func __P((char *, char *, int)); */
  42.  
  43. #if !defined (__P)
  44. #  if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
  45. #    define __P(protos) protos
  46. #  else
  47. #    define __P(protos) ()
  48. #  endif
  49. #endif
  50.  
  51. #if !defined (__STDC__) && !defined (__cplusplus)
  52. #  if defined (__GNUC__)    /* gcc with -traditional */
  53. #    if !defined (const)
  54. #      define const __const
  55. #    endif /* !const */
  56. #  else /* !__GNUC__ */
  57. #    if !defined (const)
  58. #      define const
  59. #    endif /* !const */
  60. #  endif /* !__GNUC__ */
  61. #endif /* !__STDC__ && !__cplusplus */
  62.  
  63. typedef char *tilde_hook_func_t __P((char *));
  64.  
  65. /* If non-null, this contains the address of a function that the application
  66.    wants called before trying the standard tilde expansions.  The function
  67.    is called with the text sans tilde, and returns a malloc()'ed string
  68.    which is the expansion, or a NULL pointer if the expansion fails. */
  69. READLINE_API extern tilde_hook_func_t *tilde_expansion_preexpansion_hook;
  70.  
  71. /* If non-null, this contains the address of a function to call if the
  72.    standard meaning for expanding a tilde fails.  The function is called
  73.    with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
  74.    which is the expansion, or a NULL pointer if there is no expansion. */
  75. READLINE_API extern tilde_hook_func_t *tilde_expansion_failure_hook;
  76.  
  77. /* When non-null, this is a NULL terminated array of strings which
  78.    are duplicates for a tilde prefix.  Bash uses this to expand
  79.    `=~' and `:~'. */
  80. READLINE_API extern char **tilde_additional_prefixes;
  81.  
  82. /* When non-null, this is a NULL terminated array of strings which match
  83.    the end of a username, instead of just "/".  Bash sets this to
  84.    `:' and `=~'. */
  85. READLINE_API extern char **tilde_additional_suffixes;
  86.  
  87. /* Return a new string which is the result of tilde expanding STRING. */
  88. READLINE_API extern char *tilde_expand __P((const char *));
  89.  
  90. /* Do the work of tilde expansion on FILENAME.  FILENAME starts with a
  91.    tilde.  If there is no expansion, call tilde_expansion_failure_hook. */
  92. READLINE_API extern char *tilde_expand_word __P((const char *));
  93.  
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97.  
  98. #endif /* _TILDE_H_ */
  99.