From 27d3c9e00c4f90f73969ccb1b1c6b2bbfee7abab Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 12 Aug 2023 00:30:32 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4586 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/ppmtosixel.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'converter/ppm') 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); -- cgit 1.4.1