Removing old svn keywords.
[monky] / src / mail.c
index 182a3eb..d037fd9 100644 (file)
@@ -7,7 +7,7 @@
  * Please see COPYING for details
  *
  * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
- * Copyright (c) 2005-2007 Brenden Matthews, Philip Kovacs, et. al.
+ * Copyright (c) 2005-2008 Brenden Matthews, Philip Kovacs, et. al.
  *     (see AUTHORS)
  * All rights reserved.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
- * $Id$ */
+ */
 
 #include <sys/stat.h>
 #include <sys/time.h>
 
 #include <dirent.h>
 #include <errno.h>
-#include <stdio.h>
-#include <string.h>
 
 #include "conky.h"
 
@@ -39,7 +37,7 @@ char *current_mail_spool;
 
 void update_mail_count(struct local_mail_s *mail)
 {
-       struct stat buf;
+       struct stat st;
 
        if (mail == NULL) {
                return;
@@ -54,7 +52,7 @@ void update_mail_count(struct local_mail_s *mail)
                mail->last_update = current_update_time;
        }
 
-       if (stat(mail->box, &buf)) {
+       if (stat(mail->box, &st)) {
                static int rep;
 
                if (!rep) {
@@ -65,7 +63,7 @@ void update_mail_count(struct local_mail_s *mail)
        }
 #if HAVE_DIRENT_H
        /* maildir format */
-       if (S_ISDIR(buf.st_mode)) {
+       if (S_ISDIR(st.st_mode)) {
                DIR *dir;
                char *dirname;
                struct dirent *dirent;
@@ -122,7 +120,7 @@ void update_mail_count(struct local_mail_s *mail)
        }
 #endif
        /* mbox format */
-       if (buf.st_mtime != mail->last_mtime) {
+       if (st.st_mtime != mail->last_mtime) {
                /* yippee, modification time has changed, let's read mail count! */
                static int rep;
                FILE *fp;
@@ -192,6 +190,6 @@ void update_mail_count(struct local_mail_s *mail)
                        mail->new_mail_count++;
                }
 
-               mail->last_mtime = buf.st_mtime;
+               mail->last_mtime = st.st_mtime;
        }
 }