itss: Use BOOL type where appropriate

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Feb 28 10:17:31 CST 2014


---
 dlls/itss/lzx.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/itss/lzx.c b/dlls/itss/lzx.c
index 01a9492..9e343da 100644
--- a/dlls/itss/lzx.c
+++ b/dlls/itss/lzx.c
@@ -85,14 +85,14 @@ struct LZXstate
     ULONG window_posn;     /* current offset within the window        */
     ULONG R0, R1, R2;      /* for the LRU offset system               */
     UWORD main_elements;   /* number of main tree elements            */
-    int   header_read;     /* have we started decoding at all yet?    */
+    BOOL  header_read;     /* have we started decoding at all yet?    */
     UWORD block_type;      /* type of this block                      */
     ULONG block_length;    /* uncompressed length of this block       */
     ULONG block_remaining; /* uncompressed bytes still left to decode */
     ULONG frames_read;     /* the number of CFDATA blocks processed   */
     LONG  intel_filesize;  /* magic header value used for transform   */
     LONG  intel_curpos;    /* current offset in transform space       */
-    int   intel_started;   /* have we seen any translatable data yet? */
+    BOOL  intel_started;   /* have we seen any translatable data yet? */
 
     LZX_DECLARE_TABLE(PRETREE);
     LZX_DECLARE_TABLE(MAINTREE);
@@ -200,12 +200,12 @@ struct LZXstate *LZXinit(int window)
     /* initialize other state */
     pState->R0  =  pState->R1  = pState->R2 = 1;
     pState->main_elements   = LZX_NUM_CHARS + (posn_slots << 3);
-    pState->header_read     = 0;
+    pState->header_read     = FALSE;
     pState->frames_read     = 0;
     pState->block_remaining = 0;
     pState->block_type      = LZX_BLOCKTYPE_INVALID;
     pState->intel_curpos    = 0;
-    pState->intel_started   = 0;
+    pState->intel_started   = FALSE;
     pState->window_posn     = 0;
 
     /* initialise tables to 0 (because deltas will be applied to them) */
@@ -229,12 +229,12 @@ int LZXreset(struct LZXstate *pState)
     int i;
 
     pState->R0  =  pState->R1  = pState->R2 = 1;
-    pState->header_read     = 0;
+    pState->header_read     = FALSE;
     pState->frames_read     = 0;
     pState->block_remaining = 0;
     pState->block_type      = LZX_BLOCKTYPE_INVALID;
     pState->intel_curpos    = 0;
-    pState->intel_started   = 0;
+    pState->intel_started   = FALSE;
     pState->window_posn     = 0;
 
     for (i = 0; i < LZX_MAINTREE_MAXSYMBOLS + LZX_LENTABLE_SAFETY; i++) pState->MAINTREE_len[i] = 0;
@@ -495,7 +495,7 @@ int LZXdecompress(struct LZXstate *pState, unsigned char *inpos, unsigned char *
         i = j = 0;
         READ_BITS(k, 1); if (k) { READ_BITS(i,16); READ_BITS(j,16); }
         pState->intel_filesize = (i << 16) | j; /* or 0 if not encoded */
-        pState->header_read = 1;
+        pState->header_read = TRUE;
     }
 
     /* main decoding loop */
@@ -522,14 +522,14 @@ int LZXdecompress(struct LZXstate *pState, unsigned char *inpos, unsigned char *
                     READ_LENGTHS(MAINTREE, 0, 256);
                     READ_LENGTHS(MAINTREE, 256, pState->main_elements);
                     BUILD_TABLE(MAINTREE);
-                    if (LENTABLE(MAINTREE)[0xE8] != 0) pState->intel_started = 1;
+                    if (LENTABLE(MAINTREE)[0xE8] != 0) pState->intel_started = TRUE;
 
                     READ_LENGTHS(LENGTH, 0, LZX_NUM_SECONDARY_LENGTHS);
                     BUILD_TABLE(LENGTH);
                     break;
 
                 case LZX_BLOCKTYPE_UNCOMPRESSED:
-                    pState->intel_started = 1; /* because we can't assume otherwise */
+                    pState->intel_started = TRUE; /* because we can't assume otherwise */
                     ENSURE_BITS(16); /* get up to 16 pad bits into the buffer */
                     if (bitsleft > 16) inpos -= 2; /* and align the bitstream! */
                     R0 = inpos[0]|(inpos[1]<<8)|(inpos[2]<<16)|(inpos[3]<<24);inpos+=4;
-- 
1.9.0




More information about the wine-patches mailing list