use a proper "hack" for iconv functions:
[apps/madmutt.git] / pgppacket.c
index dd241fe..f43f516 100644 (file)
@@ -57,16 +57,16 @@ static int read_material (size_t material, size_t * used, FILE * fp)
 unsigned char *pgp_read_packet (FILE * fp, size_t * len)
 {
   size_t used = 0;
-  long startpos;
+  LOFF_T startpos;
   unsigned char ctb;
   unsigned char b;
   size_t material;
 
-  startpos = ftell (fp);
+  startpos = ftello (fp);
 
   if (!plen) {
     plen = CHUNKSIZE;
-    pbuf = safe_malloc (plen);
+    pbuf = mem_malloc (plen);
   }
 
   if (fread (&ctb, 1, 1, fp) < 1) {
@@ -193,12 +193,12 @@ unsigned char *pgp_read_packet (FILE * fp, size_t * len)
 
 bail:
 
-  fseek (fp, startpos, SEEK_SET);
+  fseeko (fp, startpos, SEEK_SET);
   return NULL;
 }
 
 void pgp_release_packet (void)
 {
   plen = 0;
-  FREE (&pbuf);
+  mem_free (&pbuf);
 }