fix compiler warnings
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@175
e385b8ad-14ed-0310-8656-
cc95a2468c6d
13 files changed:
- safe_realloc ((void **) &buf, ob - buf + 1);
+ safe_realloc (&buf, ob - buf + 1);
*t = buf;
iconv_close (cd);
*t = buf;
iconv_close (cd);
/* clearing refs from memory */
for (t = refs; refs; refs = t->next, t = refs)
/* clearing refs from memory */
for (t = refs; refs; refs = t->next, t = refs)
- safe_free ((void **)&refs);
if (fputc ('\n', out) == EOF)
return (-1);
if (fputc ('\n', out) == EOF)
return (-1);
int crypt_valid_passphrase(int flags)
{
int crypt_valid_passphrase(int flags)
{
- time_t now = time (NULL);
int ret = 0;
# if defined(HAVE_SETRLIMIT) &&(!defined(DEBUG))
int ret = 0;
# if defined(HAVE_SETRLIMIT) &&(!defined(DEBUG))
+#if 0
+static int flowed_maybe_quoted (char *cont)
+{
+ return regexec ((regex_t *) QuoteRegexp.rx, cont, 0, NULL, 0) == 0;
+}
+
static void flowed_quote (STATE *s, int level)
{
int i;
static void flowed_quote (STATE *s, int level)
{
int i;
-static int flowed_maybe_quoted (char *cont)
-{
- return regexec ((regex_t *) QuoteRegexp.rx, cont, 0, NULL, 0) == 0;
-}
-
static void flowed_stuff (STATE *s, char *cont, int level)
{
if (!option (OPTTEXTFLOWED) && !(s->flags & M_DISPLAY))
static void flowed_stuff (STATE *s, char *cont, int level)
{
if (!option (OPTTEXTFLOWED) && !(s->flags & M_DISPLAY))
static void text_plain_flowed_handler (BODY *a, STATE *s)
{
char line[LONG_STRING];
static void text_plain_flowed_handler (BODY *a, STATE *s)
{
char line[LONG_STRING];
static void print_flowed_line(char * line, STATE *s,int ql) {
int width;
char * pos, * oldpos;
static void print_flowed_line(char * line, STATE *s,int ql) {
int width;
char * pos, * oldpos;
int len = strlen(line);
int i;
int len = strlen(line);
int i;
static unsigned char *
dump_char_size(char *c, unsigned char *d, int *off, ssize_t size)
{
static unsigned char *
dump_char_size(char *c, unsigned char *d, int *off, ssize_t size)
{
static void
restore_char(char **c, const unsigned char *d, int *off)
static void
restore_char(char **c, const unsigned char *d, int *off)
static unsigned char *
dump_buffer(BUFFER *b, unsigned char *d, int *off)
{
static unsigned char *
dump_buffer(BUFFER *b, unsigned char *d, int *off)
{
restore_int(& (*b)->dsize, d, off);
restore_int((unsigned int *) & (*b)->destroy, d, off);
}
restore_int(& (*b)->dsize, d, off);
restore_int((unsigned int *) & (*b)->destroy, d, off);
}
static unsigned char *
dump_parameter(PARAMETER *p, unsigned char *d, int *off)
static unsigned char *
dump_parameter(PARAMETER *p, unsigned char *d, int *off)
int* noinferiors, char* delim);
int imap_read_literal (FILE* fp, IMAP_DATA* idata, long bytes);
void imap_expunge_mailbox (IMAP_DATA* idata);
int* noinferiors, char* delim);
int imap_read_literal (FILE* fp, IMAP_DATA* idata, long bytes);
void imap_expunge_mailbox (IMAP_DATA* idata);
+int imap_reconnect (CONTEXT* ctx);
void imap_logout (IMAP_DATA* idata);
/* auth.c */
void imap_logout (IMAP_DATA* idata);
/* auth.c */
static int msg_fetch_header_fetch (CONTEXT* ctx, IMAP_HEADER* h, char* buf, FILE* fp)
{
IMAP_DATA* idata;
static int msg_fetch_header_fetch (CONTEXT* ctx, IMAP_HEADER* h, char* buf, FILE* fp)
{
IMAP_DATA* idata;
int rc = -1; /* default now is that string isn't FETCH response*/
idata = (IMAP_DATA*) ctx->data;
int rc = -1; /* default now is that string isn't FETCH response*/
idata = (IMAP_DATA*) ctx->data;
static int _parse_rx_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err, int flags)
{
do
static int _parse_rx_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err, int flags)
{
do
static void _alternates_clean (void)
{
static void _alternates_clean (void)
{
/* functions used to parse commands in a rc file */
static int parse_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
/* functions used to parse commands in a rc file */
static int parse_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_rx_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_rx_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+static int parse_rx_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
+#endif
static int parse_spam_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_spam_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
-static int parse_rx_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_lists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unlists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_lists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unlists (BUFFER *, BUFFER *, unsigned long, BUFFER *);
{
int shift = option (OPTARROWCURSOR) ? 3 : 0;
int cols = COLS - shift - SidebarWidth;
{
int shift = option (OPTARROWCURSOR) ? 3 : 0;
int cols = COLS - shift - SidebarWidth;
+ char* tmpbuf = safe_malloc (n);
mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, strlen (s), 1);
tmpbuf[n - 1] = 0;
mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, strlen (s), 1);
tmpbuf[n - 1] = 0;
snprintf(s,n,"%s",tmpbuf); /* overkill */
snprintf(s,n,"%s",tmpbuf); /* overkill */
}
void menu_redraw_full (MUTTMENU *menu)
}
void menu_redraw_full (MUTTMENU *menu)
#if USE_HCACHE
void *hc = NULL;
void *data;
#if USE_HCACHE
void *hc = NULL;
void *data;
struct timeval *when = NULL;
struct stat lastchanged;
int ret;
struct timeval *when = NULL;
struct stat lastchanged;
int ret;
FOREVER
{
snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s",
FOREVER
{
snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s",
- dest->path, subdir, time (NULL), (unsigned int)getpid (),
+ dest->path, subdir, (long) time (NULL), (unsigned int)getpid (),
Counter++, NONULL (Hostname), suffix);
dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
Counter++, NONULL (Hostname), suffix);
dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
FOREVER
{
snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir,
FOREVER
{
snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir,
- time (NULL), (unsigned int)getpid (), Counter++,
+ (long) time (NULL), (unsigned int)getpid (), Counter++,
NONULL (Hostname), suffix);
snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
NONULL (Hostname), suffix);
snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
* command on its own if !*buf */
buf[0] = '\0';
mutt_nntp_query (nntp_data, buf, sizeof (buf));
* command on its own if !*buf */
buf[0] = '\0';
mutt_nntp_query (nntp_data, buf, sizeof (buf));
- if (sscanf (buf + 4, "%d %d %d %s", &num, &fc.first, &fc.last, buf) != 4) {
+ if (sscanf (buf + 4, "%d %u %u %s", &num, &fc.first, &fc.last, buf) != 4) {
mutt_error (_("GROUP command failed: %s"), buf);
FREE (&fc.messages);
return (-1);
mutt_error (_("GROUP command failed: %s"), buf);
FREE (&fc.messages);
return (-1);
}
*help_ptr++=*filename++;
}
}
*help_ptr++=*filename++;
}
- safe_free((void **) &tmp);
-