* 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"
void update_mail_count(struct local_mail_s *mail)
{
- struct stat buf;
+ struct stat st;
if (mail == NULL) {
return;
mail->last_update = current_update_time;
}
- if (stat(mail->box, &buf)) {
+ if (stat(mail->box, &st)) {
static int rep;
if (!rep) {
}
#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;
}
#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;
mail->new_mail_count++;
}
- mail->last_mtime = buf.st_mtime;
+ mail->last_mtime = st.st_mtime;
}
}