aboutsummaryrefslogtreecommitdiff
path: root/readline/tilde.h
diff options
context:
space:
mode:
Diffstat (limited to 'readline/tilde.h')
-rw-r--r--readline/tilde.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/readline/tilde.h b/readline/tilde.h
index 634b954..7783fd6 100644
--- a/readline/tilde.h
+++ b/readline/tilde.h
@@ -8,7 +8,7 @@
The Library is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
+ the Free Software Foundation; either version 2, or (at your option)
any later version.
The Library is distributed in the hope that it will be useful, but
@@ -19,11 +19,27 @@
The GNU General Public License is often shipped with GNU software, and
is generally kept in a file called COPYING or LICENSE. If you do not
have a copy of the license, write to the Free Software Foundation,
- 675 Mass Ave, Cambridge, MA 02139, USA. */
+ 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#if !defined (_TILDE_H_)
# define _TILDE_H_
+#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:
+ extern char *func __P((char *, char *, int)); */
+
+#if !defined (__P)
+# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
+# define __P(protos) protos
+# else
+# define __P(protos) ()
+# endif
+#endif
+
/* Function pointers can be declared as (Function *)foo. */
#if !defined (_FUNCTION_DEF)
# define _FUNCTION_DEF
@@ -56,10 +72,14 @@ extern char **tilde_additional_prefixes;
extern char **tilde_additional_suffixes;
/* Return a new string which is the result of tilde expanding STRING. */
-extern char *tilde_expand ();
+extern char *tilde_expand __P((char *));
/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
tilde. If there is no expansion, call tilde_expansion_failure_hook. */
-extern char *tilde_expand_word ();
+extern char *tilde_expand_word __P((char *));
+
+#ifdef __cplusplus
+}
+#endif
#endif /* _TILDE_H_ */