From f80f91d98b43bd3399ecfc057161a2f21e2ff7f4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 27 Jan 2004 20:50:49 +0000 Subject: [PATCH] make Tag int, move it to imap.c --- src/imap.c | 10 ++++++---- src/isync.h | 3 +-- src/main.c | 3 +-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/imap.c b/src/imap.c index 694f949..8e203ae 100644 --- a/src/imap.c +++ b/src/imap.c @@ -2,7 +2,7 @@ * * isync - IMAP4 to maildir mailbox synchronizer * Copyright (C) 2000-2002 Michael R. Elkins - * Copyright (C) 2002-2003 Oswald Buddenhagen + * Copyright (C) 2002-2004 Oswald Buddenhagen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,6 +42,8 @@ # include #endif +static int Tag; + const char *Flags[] = { "\\Seen", "\\Answered", @@ -578,7 +580,7 @@ imap_exec (imap_t * imap, const char *fmt, ...) imap->cram = 0; } #endif - else if ((size_t) atol (arg) != Tag) + else if (atoi (arg) != Tag) { fprintf (stderr, "IMAP error: wrong tag\n"); return -1; @@ -1130,7 +1132,7 @@ imap_fetch_message (imap_t * imap, unsigned int uid, int fd) else { arg = next_arg (&cmd); - if (!arg || (size_t) atoi (arg) != Tag) + if (!arg || atoi (arg) != Tag) { fprintf (stderr, "IMAP error: wrong tag\n"); return -1; @@ -1300,7 +1302,7 @@ imap_append_message (imap_t * imap, int fd, message_t * msg) { /* XXX just ignore it for now */ } - else if (atoi (arg) != (int) Tag) + else if (atoi (arg) != Tag) { fprintf (stderr, "IMAP error: wrong tag\n"); return -1; diff --git a/src/isync.h b/src/isync.h index f789549..cefa0a6 100644 --- a/src/isync.h +++ b/src/isync.h @@ -2,7 +2,7 @@ * * isync - IMAP4 to maildir mailbox synchronizer * Copyright (C) 2000-2002 Michael R. Elkins - * Copyright (C) 2002-2003 Oswald Buddenhagen + * Copyright (C) 2002-2004 Oswald Buddenhagen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -178,7 +178,6 @@ imap_t; extern config_t global; extern config_t *boxes; -extern unsigned int Tag; extern char Hostname[256]; extern int Verbose, Quiet; diff --git a/src/main.c b/src/main.c index 963e05e..c8fad62 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ * * isync - IMAP4 to maildir mailbox synchronizer * Copyright (C) 2000-2002 Michael R. Elkins - * Copyright (C) 2002-2003 Oswald Buddenhagen + * Copyright (C) 2002-2004 Oswald Buddenhagen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -102,7 +102,6 @@ struct option Opts[] = { #endif config_t global; -unsigned int Tag = 0; char Hostname[256]; int Verbose = 0;