about summary refs log tree commit diff
path: root/converter/other/rletopnm.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-06-28 17:21:21 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-06-28 17:21:21 +0000
commit0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0 (patch)
tree3e8db9f13fb33464324c6986e7d80540a42a86c7 /converter/other/rletopnm.c
parent7dd37058c4c8e0f6ca272e329162a52f958e4951 (diff)
downloadnetpbm-mirror-0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0.tar.gz
netpbm-mirror-0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0.tar.xz
netpbm-mirror-0d513aca5cbbb8db0a9d127e101ac3b534cc8bf0.zip
promote Stable to Super Stable
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@4557 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/rletopnm.c')
-rw-r--r--converter/other/rletopnm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/converter/other/rletopnm.c b/converter/other/rletopnm.c
index 99959141..018456c8 100644
--- a/converter/other/rletopnm.c
+++ b/converter/other/rletopnm.c
@@ -35,6 +35,7 @@
  *
  */
 
+#define _DEFAULT_SOURCE 1  /* New name for SVID & BSD source defines */
 #define _BSD_SOURCE 1      /* Make sure strdup() is in string.h */
 #define _XOPEN_SOURCE 500  /* Make sure strdup() is in string.h */
 
@@ -264,7 +265,8 @@ writePpmRaster(FILE * const imageoutFileP,
     pixel *pixelrow;
     gray *alpharow;
    
-    int scan, x, y;
+    int scan;
+    int x;
     /*
      *  Allocate some stuff.
      */
@@ -280,9 +282,9 @@ writePpmRaster(FILE * const imageoutFileP,
     /*
      * Loop through those scan lines.
      */
-    for (scan = 0; scan < height; scan++)
-        y = rle_getrow(&hdr, scanlines[height - scan - 1]);
-    for (scan = 0; scan < height; scan++) {
+    for (scan = 0; scan < height; ++scan)
+        rle_getrow(&hdr, scanlines[height - scan - 1]);
+    for (scan = 0; scan < height; ++scan) {
         scanline = scanlines[scan];
         switch (visual) {
         case GRAYSCALE:    /* 8 bits without colormap */
@@ -366,7 +368,6 @@ writePgmRaster(FILE * const imageoutFileP,
     gray * pixelrow;
     gray * alpharow;
     int scan;
-    int y;
     /*
      *  Allocate some stuff.
      */
@@ -383,7 +384,7 @@ writePgmRaster(FILE * const imageoutFileP,
      * Loop through those scan lines.
      */
     for (scan = 0; scan < height; ++scan)
-        y = rle_getrow(&hdr, scanlines[height - scan - 1]);
+        rle_getrow(&hdr, scanlines[height - scan - 1]);
 
     for (scan = 0; scan < height; ++scan) {
         int x;