about summary refs log tree commit diff
path: root/converter/ppm
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-08-12 00:30:32 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-08-12 00:30:32 +0000
commit27d3c9e00c4f90f73969ccb1b1c6b2bbfee7abab (patch)
tree66d72bfa22fa28f04d9d9d7373a465ea6d35ef94 /converter/ppm
parent053597a48588b55773e7e8f71a261b9f07ce2f57 (diff)
downloadnetpbm-mirror-27d3c9e00c4f90f73969ccb1b1c6b2bbfee7abab.tar.gz
netpbm-mirror-27d3c9e00c4f90f73969ccb1b1c6b2bbfee7abab.tar.xz
netpbm-mirror-27d3c9e00c4f90f73969ccb1b1c6b2bbfee7abab.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4586 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm')
-rw-r--r--converter/ppm/ppmtosixel.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/converter/ppm/ppmtosixel.c b/converter/ppm/ppmtosixel.c
index 73cf1f1d..4fdf6a66 100644
--- a/converter/ppm/ppmtosixel.c
+++ b/converter/ppm/ppmtosixel.c
@@ -32,9 +32,6 @@ typedef struct {
 
 
 
-static pixel** pixels;   /* stored ppm pixmap input */
-
-
 enum Charwidth {CHARWIDTH_8BIT, CHARWIDTH_7BIT};
 
 struct CmdlineInfo {
@@ -124,9 +121,10 @@ parseCommandLine(int argc, const char ** argv,
 
 
 static void
-writePackedImage(colorhash_table const cht,
+writePackedImage(pixel **        const pixels,
                  unsigned int    const rows,
-                 unsigned int    const cols) {
+                 unsigned int    const cols,
+                 colorhash_table const cht) {
 
     unsigned int row;
 
@@ -218,9 +216,10 @@ writeColorMap(colorhist_vector const chv,
 
 
 static void
-writeRawImage(colorhash_table const cht,
+writeRawImage(pixel **        const pixels,
               unsigned int    const rows,
-              unsigned int    const cols) {
+              unsigned int    const cols,
+              colorhash_table const cht) {
 
     unsigned int row;
 
@@ -262,6 +261,7 @@ main(int argc, const char ** argv) {
     int rows, cols;
     pixval maxval;
     int colorCt;
+    pixel ** pixels;
     colorhist_vector chv;
         /* List of colors in the image, indexed by colormap index */
     colorhash_table cht;
@@ -299,9 +299,9 @@ main(int argc, const char ** argv) {
     writeColorMap(chv, colorCt, maxval);
 
     if (cmdline.raw)
-        writeRawImage(cht, rows, cols);
+        writeRawImage(pixels, rows, cols, cht);
     else
-        writePackedImage(cht, rows, cols);
+        writePackedImage(pixels, rows, cols, cht);
 
     writeEnd(!!cmdline.margin, eseqs);