the ‘kids don't do this at home’ commit.
[apps/madmutt.git] / lib-mx / compress.c
index 00064b7..b9b237c 100644 (file)
@@ -137,14 +137,14 @@ static int get_size (const char *path)
 static const char *compresshook_format_str (char *dest, ssize_t destlen,
                                             char op, const char *src,
                                             const char *fmt,
-                                            const char *ifstring __attribute__ ((unused)),
-                                            const char *elsestring __attribute__ ((unused)),
-                                            unsigned long data,
+                                            const char *ifstr __attribute__ ((unused)),
+                                            const char *elstr __attribute__ ((unused)),
+                                            anytype data,
                                             format_flag flags __attribute__ ((unused)))
 {
   char tmp[STRING];
 
-  CONTEXT *ctx = (CONTEXT *) data;
+  CONTEXT *ctx = data.ptr;
 
   switch (op) {
   case 'f':
@@ -172,7 +172,7 @@ static char *get_compression_cmd (const char *cmd, const CONTEXT * ctx)
   char expanded[_POSIX_PATH_MAX];
 
   m_strformat(expanded, sizeof (expanded), cmd, compresshook_format_str,
-              (unsigned long)ctx, 0);
+              (void *)ctx, 0);
   return m_strdup(expanded);
 }