Update copyright year in (most) files (those that my script finds).
[exim.git] / src / src / transports / tf_maildir.c
index 17f24d7177be68fb8683a8a1f01e83b49a689e54..50a4c186495aeb470f81bfb818bb3947f33bc434 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/transports/tf_maildir.c,v 1.5 2005/06/07 15:20:56 ph10 Exp $ */
+/* $Cambridge: exim/src/src/transports/tf_maildir.c,v 1.8 2006/02/07 11:19:03 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2005 */
+/* Copyright (c) University of Cambridge 1995 - 2006 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* Functions in support of the use of maildirsize files for handling quotas in
@@ -282,8 +282,9 @@ DEBUG(D_transport)
     debug_printf("maildir_compute_size (timestamp_only): %ld\n",
     (long int) *latest);
   else
-    debug_printf("maildir_compute_size: path=%s\n  sum=%.30g filecount=%d "
-      "timestamp=%ld\n", path, (double)sum, *filecount, (long int) *latest);
+    debug_printf("maildir_compute_size: path=%s\n  sum=" OFF_T_FMT
+      " filecount=%d timestamp=%ld\n",
+      path, sum, *filecount, (long int) *latest);
   }
 return sum;
 }
@@ -404,9 +405,9 @@ if (cached_quota != ob->quota_value ||
   {
   DEBUG(D_transport)
     debug_printf("cached quota is out of date: recalculating\n"
-      "  quota=%.30g cached_quota=%.30g filecount_quota=%d "
-      "cached_quota_filecount=%d\n", (double)ob->quota_value,
-      (double)cached_quota, ob->quota_filecount_value, cached_quota_filecount);
+      "  quota=" OFF_T_FMT " cached_quota=" OFF_T_FMT " filecount_quota=%d "
+      "cached_quota_filecount=%d\n", ob->quota_value,
+      cached_quota, ob->quota_filecount_value, cached_quota_filecount);
   goto RECALCULATE;
   }
 
@@ -439,7 +440,7 @@ if (*endptr == 0)
   if (size < 0 || filecount < 0)
     {
     DEBUG(D_transport) debug_printf("negative value in maildirsize "
-      "(size=%.30g count=%d): recalculating\n", (double)size, filecount);
+      "(size=" OFF_T_FMT " count=%d): recalculating\n", size, filecount);
     goto RECALCULATE;
     }
 
@@ -497,7 +498,7 @@ else
 
   RECALCULATE:
 
-  if (fd >= 0) close(fd);
+  if (fd >= 0) (void)close(fd);
   old_latest = 0;
   filecount = 0;
   size = maildir_compute_size(path, &filecount, &old_latest, regex, dir_regex,
@@ -510,12 +511,12 @@ else
   fd = Uopen(tempname, O_RDWR|O_CREAT|O_EXCL, 0600);
   if (fd >= 0)
     {
-    (void)sprintf(CS buffer, "%.30gS,%dC\n%.30g %d\n", (double)ob->quota_value,
-      ob->quota_filecount_value, (double)size, filecount);
+    (void)sprintf(CS buffer, OFF_T_FMT "S,%dC\n" OFF_T_FMT " %d\n",
+      ob->quota_value, ob->quota_filecount_value, size, filecount);
     len = Ustrlen(buffer);
     if (write(fd, buffer, len) != len || Urename(tempname, filename) < 0)
       {
-      close(fd);
+      (void)close(fd);
       fd = -1;
       }
     }
@@ -531,15 +532,15 @@ else
     DEBUG(D_transport) debug_printf("abandoning maildirsize because of "
       "a later subdirectory modification\n");
     (void)Uunlink(filename);
-    close(fd);
+    (void)close(fd);
     fd = -1;
     }
   }
 
 /* Return the sizes and the file descriptor, if any */
 
-DEBUG(D_transport) debug_printf("returning maildir size=%.30g filecount=%d\n",
-  (double)size, filecount);
+DEBUG(D_transport) debug_printf("returning maildir size=" OFF_T_FMT
+  " filecount=%d\n", size, filecount);
 *returned_size = size;
 *returned_filecount = filecount;
 return fd;