This version looks much better. Please check.

diff --git a/wrlib/rotate.c b/wrlib/rotate.c
index fead8ae..09e8a0a 100644
--- a/wrlib/rotate.c
+++ b/wrlib/rotate.c
@@ -213,6 +213,7 @@ RImage *RRotateImage(RImage * image, float angle)
  *
  */

+#if 0
 static void
 copyLine(int x1, int y1, int x2, int y2, int nwidth, int format,
unsigned char *dst, unsigned char **src)
 {
@@ -292,9 +293,14 @@ copyLine(int x1, int y1, int x2, int y2, int
nwidth, int format, unsigned char *

  *src = s;
 }
+#endif

 static RImage *rotateImage(RImage * image, float angle)
 {
+ (void) angle;
+ puts("NOT FULLY IMPLEMENTED");
+ return RCloneImage(image);
+#if 0
  RImage *img;
  int nwidth, nheight;
  int x1, y1;
@@ -371,8 +377,6 @@ static RImage *rotateImage(RImage * image, float angle)
  }
  }
  } else {
- puts("NOT IMPLEMTENED");
- return img;
  dpr = dx << 1;
  dpru = dpr - (dy << 1);
  p = dpr - dy;
@@ -396,4 +400,5 @@ static RImage *rotateImage(RImage * image, float angle)
  }

  return img;
+#endif
 }
-- 
1.8.3.2

On Wed, May 21, 2014 at 5:43 PM, David Maciejak
<david.macie...@gmail.com> wrote:
> right, i will resubmit it.
>
> On Wed, May 21, 2014 at 5:29 PM, Carlos R. Mafra <crma...@gmail.com> wrote:
>> On Wed, 21 May 2014 at 12:49:44 +0800, David Maciejak wrote:
>>> when the rotation angle value passed to RRotateImage is a modulo of 90,
>>> the function is working well but in other cases the rotateImage()
>>> function is called. That last function is half implemented but
>>> the half already implemented part is also segfaulting (use the testrot.c
>>> to replay the crash).
>>> So the patch is moving the 'not implemented' msg to disable the whole
>>> rotateImage() function and comment it out.
>>>
>>>
>>> @@ -212,7 +212,7 @@ RImage *RRotateImage(RImage * image, float angle)
>>>   * increment pixel location from source
>>>   *
>>>   */
>>> -
>>> +/*
>>>  static void
>>>  copyLine(int x1, int y1, int x2, int y2, int nwidth, int format,
>>
>> Btw, it's better to comment out huge blocks of code with
>>
>> #if 0
>> ...
>> #endif
>>
>>
>> --
>> To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Attachment: 0001-wrlib-RRotateImage-function-not-fully-implemented.patch
Description: Binary data

Reply via email to