diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-01-18 01:09:22 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-01-18 01:09:22 +0000 |
commit | 7b1a77afca304a8ecc61cce1118a0565613e13b3 (patch) | |
tree | fdeddefb48758a99d5ae986e521d2c7dd9938e93 /converter/other | |
parent | 1b72fc2e0d7aefac04d3af67fe83e291007b1ff9 (diff) | |
download | netpbm-mirror-7b1a77afca304a8ecc61cce1118a0565613e13b3.tar.gz netpbm-mirror-7b1a77afca304a8ecc61cce1118a0565613e13b3.tar.xz netpbm-mirror-7b1a77afca304a8ecc61cce1118a0565613e13b3.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3117 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other')
-rw-r--r-- | converter/other/pamtogif.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/converter/other/pamtogif.c b/converter/other/pamtogif.c index 40d3a813..b978a94a 100644 --- a/converter/other/pamtogif.c +++ b/converter/other/pamtogif.c @@ -663,13 +663,14 @@ typedef struct { In either case, output code never reaches this value. */ unsigned long curAccum; - int curBits; - unsigned int codeCount; - /* Number of codes that have been output to this buffer (doesn't - matter if they have gone out the other side yet or not) since - the last flush (or ever, if no last flush). The main use of this - is debugging -- when something fails, you can see in a debugger - where in the image it was, then set a trap for there. + unsigned int curBits; + unsigned int stringCount; + /* Number of strings that have been output to this buffer (by writing + a string code) since the last flush (or ever, if no last flush). + Note that this counts only strings that go into the buffer; it + doesn't matter if they have gone out the other side yet. The main + use of this is debugging -- when something fails, you can see in a + debugger where in the image it was, then set a trap for there. */ } CodeBuffer; @@ -692,7 +693,7 @@ codeBuffer_create(FILE * const ofP, codeBufferP->byteBufferP = byteBuffer_create(ofP); codeBufferP->curAccum = 0; codeBufferP->curBits = 0; - codeBufferP->codeCount = 0; + codeBufferP->stringCount = 0; return codeBufferP; } @@ -731,6 +732,8 @@ codeBuffer_increaseCodeSize(CodeBuffer * const codeBufferP) { codeBufferP->maxCode = (1 << codeBufferP->nBits) - 1; } + + static void codeBuffer_output(CodeBuffer * const codeBufferP, StringCode const code) { @@ -762,7 +765,7 @@ codeBuffer_output(CodeBuffer * const codeBufferP, codeBufferP->curBits -= 8; } - ++codeBufferP->codeCount; + ++codeBufferP->stringCount; } @@ -783,8 +786,8 @@ codeBuffer_flush(CodeBuffer * const codeBufferP) { if (verbose) pm_message("%u strings of pixels written to file", - codeBufferP->codeCount); - codeBufferP->codeCount = 0; + codeBufferP->stringCount); + codeBufferP->stringCount = 0; } |