* always adds "" around the string */
#define quote_string(str) quote_string_maybe((str), 0)
#define quote_string_always(str) quote_string_maybe((str), 1)
+#define len_quote_string(str) len_quote_string_maybe((str), 0);
/*@only@*//*@null@*/char *quote_string_maybe(const char *str, gboolean always);
/*@only@*//*@null@*/char *unquote_string(const char *str);
+/*@only@*//*@null@*/int len_quote_string_maybe(const char *str, gboolean always);
/* Split a string into space-delimited words, obeying quoting as created by
* quote_string. To keep compatibility with the old split(), this has the
* or prototypes some simple stub functions that are used instead.
*/
-#ifdef HAVE_READLINE
-# ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_LIBREADLINE
+# if defined(HAVE_READLINE_READLINE_H)
# include <readline/readline.h>
-# ifdef HAVE_READLINE_HISTORY_H
-# include <readline/history.h>
-# endif
-# else
-# ifdef HAVE_READLINE_H
-# include <readline.h>
-# ifdef HAVE_HISTORY_H
-# include <history.h>
-# endif
-# endif
-# endif
-#else
-
-char * readline(const char *prompt);
-void add_history(const char *line);
-
-#endif
+# elif defined(HAVE_READLINE_H)
+# include <readline.h>
+# else /* !defined(HAVE_READLINE_H) */
+extern char *readline ();
+# endif /* !defined(HAVE_READLINE_H) */
+ /* char *cmdline = NULL; */
+#else /* !defined(HAVE_LIBREADLINE) */
+ /* use our own readline */
+char * readline(const char *prompt);
+#endif /* HAVE_LIBREADLINE */
+
+#ifdef HAVE_READLINE_HISTORY
+# if defined(HAVE_READLINE_HISTORY_H)
+# include <readline/history.h>
+# elif defined(HAVE_HISTORY_H)
+# include <history.h>
+# else /* !defined(HAVE_HISTORY_H) */
+extern void add_history ();
+extern int write_history ();
+extern int read_history ();
+# endif /* defined(HAVE_READLINE_HISTORY_H) */
+#else /* !defined(HAVE_READLINE_HISTORY) */
+ /* use our own add_history */
+void add_history(const char *line);
+#endif /* HAVE_READLINE_HISTORY */
char *base64_decode_alloc_string(char *);