]> git.imager.perl.org - imager.git/commitdiff
update flip.im with IMAGER_NO_CONTEXT
authorTony Cook <tony@develop-help.com>
Mon, 6 Aug 2012 01:36:33 +0000 (11:36 +1000)
committerTony Cook <tony@develop-help.com>
Tue, 14 Aug 2012 09:58:17 +0000 (19:58 +1000)
flip.im

diff --git a/flip.im b/flip.im
index 5bb1c74f4400dc541e16295e81bf5c3300afea08..d286b91f432c3e206a5dcaf1ff629be62f8ae42d 100644 (file)
--- a/flip.im
+++ b/flip.im
@@ -1,3 +1,4 @@
+#define IMAGER_NO_CONTEXT
 #include "imager.h"
 
 static void flip_h(i_img *im);
@@ -22,9 +23,10 @@ Returns 0 if parameters are invalid.
 
 undef_int
 i_flipxy(i_img *im, int direction) {
+  dIMCTXim(im);
   i_clear_error();
 
-  mm_log((1, "i_flipxy(im %p, direction %d)\n", im, direction ));
+  im_log((aIMCTX, 1, "i_flipxy(im %p, direction %d)\n", im, direction ));
 
   if (!im)
     return 0;
@@ -43,10 +45,9 @@ i_flipxy(i_img *im, int direction) {
     break;
 
   default:
-    mm_log((1, "i_flipxy: direction is invalid\n" ));
-    i_push_errorf(0, "direction %d invalid", direction);
+    im_log((aIMCTX, 1, "i_flipxy: direction is invalid\n" ));
+    im_push_errorf(aIMCTX, 0, "direction %d invalid", direction);
     return 0;
-
   }
   return 1;
 }