#define MAIN_C 1
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#endif
#ifdef USE_HCACHE
-#if HAVE_QDBM
+#if defined(HAVE_QDBM)
#include <depot.h>
-#elif HAVE_GDBM
+#elif defined(HAVE_GDBM)
#include <gdbm.h>
-#elif HAVE_DB4
+#elif defined(HAVE_DB4)
#include <db.h>
#endif
#endif
#endif
#ifdef USE_HCACHE
-#if HAVE_QDBM
+#if defined(HAVE_QDBM)
printf (" qdbm %s\n", dpversion);
-#elif HAVE_GDBM
+#elif defined(HAVE_GDBM)
printf (" gdbm %s\n", gdbm_version);
-#elif HAVE_DB4
+#elif defined(HAVE_DB4)
printf (" DB4 %d.%d.%d\n", DB_VERSION_MAJOR, DB_VERSION_MINOR,
DB_VERSION_PATCH);
#endif
"-HAVE_LANGINFO_YESEXPR "
#endif
"\n "
-#if HAVE_ICONV
+#ifdef HAVE_ICONV
"+HAVE_ICONV "
#else
"-HAVE_ICONV "
#else
"-ICONV_NONTRANS "
#endif
-#if HAVE_LIBIDN
+#ifdef HAVE_LIBIDN
"+HAVE_LIBIDN "
#else
"-HAVE_LIBIDN "
#endif
-#if HAVE_GETSID
+#ifdef HAVE_GETSID
"+HAVE_GETSID "
#else
"-HAVE_GETSID "
#endif
-#if HAVE_GETADDRINFO
+#ifdef HAVE_GETADDRINFO
"+HAVE_GETADDRINFO "
#else
"-HAVE_GETADDRINFO "
keypad (stdscr, TRUE);
cbreak ();
noecho ();
-#if HAVE_TYPEAHEAD
+#ifdef HAVE_TYPEAHEAD
typeahead (-1); /* simulate smooth scrolling */
#endif
-#if HAVE_META
+#ifdef HAVE_META
meta (stdscr, TRUE);
#endif
}
int dump_variables = -1;
/* initialize random number for tmp file creation */
- srand ((unsigned int) time (NULL));
+ srand48((unsigned int) time (NULL));
/* sanity check against stupid administrators */
mutt_error = mutt_nocurses_error;
mutt_message = mutt_nocurses_error;
- SRAND (time (NULL));
+ srand48 (time (NULL));
umask (077);
p_clear(Options, countof(Options));
address_t *a;
for (; alias_queries; alias_queries = alias_queries->next) {
- if ((a = alias_lookup(alias_queries->data))) {
+ if ((a = address_list_dup(alias_lookup(alias_queries->data)))) {
/* output in machine-readable form */
mutt_addrlist_to_idna (a, NULL);
mutt_write_address_list (a, stdout, 0, 0);
- }
- else {
+ address_list_wipe(&a);
+ } else {
rv = 1;
printf ("%s\n", alias_queries->data);
}