]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
misc
authorToni Wilen <twilen@winuae.net>
Wed, 30 Jun 2010 19:06:49 +0000 (22:06 +0300)
committerToni Wilen <twilen@winuae.net>
Wed, 30 Jun 2010 19:06:49 +0000 (22:06 +0300)
archivers/lha/huf.cpp
archivers/lha/lha.h
archivers/lha/lhamaketbl.cpp
archivers/lha/shuf.cpp
cfgfile.cpp
include/sysdeps.h
readcpu.cpp

index e6ddd3f7c8667df70ab55f6eaf6bc73ee6968ca4..dec8868c4dab1729f8426ba99ffbed82b7e3c455 100644 (file)
@@ -18,7 +18,7 @@
 #endif
 
 /* ------------------------------------------------------------------------ */
-unsigned short  left[2 * NC - 1], right[2 * NC - 1];
+unsigned short  h_left[2 * NC - 1], h_right[2 * NC - 1];
 unsigned char   c_len[NC], pt_len[NPT];
 unsigned short  c_freq[2 * NC - 1], c_table[4096], c_code[NC], p_freq[2 * NP - 1],
                pt_table[256], pt_code[NPT], t_freq[2 * NT - 1];
@@ -370,9 +370,9 @@ static void read_c_len(void)
                                unsigned short  mask = 1 << (16 - 9);
                                do {
                                        if (lhabitbuf & mask)
-                                               c = right[c];
+                                               c = h_right[c];
                                        else
-                                               c = left[c];
+                                               c = h_left[c];
                                        mask >>= 1;
                                } while (c >= NT);
                        }
@@ -416,9 +416,9 @@ unsigned short decode_c_st1(void)
                mask = 1 << (16 - 1);
                do {
                        if (lhabitbuf & mask)
-                               j = right[j];
+                               j = h_right[j];
                        else
-                               j = left[j];
+                               j = h_left[j];
                        mask >>= 1;
                } while (j >= NC);
                fillbuf(c_len[j] - 12);
@@ -439,9 +439,9 @@ unsigned short decode_p_st1(void)
                mask = 1 << (16 - 1);
                do {
                        if (lhabitbuf & mask)
-                               j = right[j];
+                               j = h_right[j];
                        else
-                               j = left[j];
+                               j = h_left[j];
                        mask >>= 1;
                } while (j >= np);
                fillbuf(pt_len[j] - 8);
index 34a123c07434cbc0a4bc3916b2fd1bfddf4e37b2..6e41db14acd4f62cf1dde20450b774bdf4ce690a 100644 (file)
@@ -173,7 +173,7 @@ EXTERN int          prev_char;
 
 /* huf.c */
 #ifndef LHA_MAIN_SRC  /* t.okamoto 96/2/20 */
-EXTERN unsigned short left[], right[];
+EXTERN unsigned short h_left[], h_right[];
 EXTERN unsigned char c_len[], pt_len[];
 EXTERN unsigned short c_freq[], c_table[], c_code[];
 EXTERN unsigned short p_freq[], pt_table[], pt_code[], t_freq[];
index 791636b94551492a6afe422f4ce2381a093d7153..f32b42e048173fbf81ff479df5006f22d16cef10 100644 (file)
@@ -72,13 +72,13 @@ void lha_make_table(short nchar, unsigned char bitlen[], short tablebits, unsign
                        /* make tree (n length) */
                        while (--n >= 0) {
                                if (*p == 0) {
-                                       right[avail] = left[avail] = 0;
+                                       h_right[avail] = h_left[avail] = 0;
                                        *p = avail++;
                                }
                                if (i & 0x8000)
-                                       p = &right[*p];
+                                       p = &h_right[*p];
                                else
-                                       p = &left[*p];
+                                       p = &h_left[*p];
                                i <<= 1;
                        }
                        *p = j;
index 62e9b1aa610b605a15d3aa8a27f01f9ac754c0cc..e9102cfc788548b96c91fa6005cf75e0d8c75951 100644 (file)
@@ -16,7 +16,7 @@
 #define NP2                    (NP * 2 - 1)
 /* ------------------------------------------------------------------------ */
 static unsigned int np;
-int             fixed[2][16] = {
+static int             h_fixed[2][16] = {
        {3, 0x01, 0x04, 0x0c, 0x18, 0x30, 0},   /* old compatible */
        {2, 0x01, 0x01, 0x03, 0x06, 0x0D, 0x1F, 0x4E, 0}        /* 8K buf */
 };
@@ -54,7 +54,7 @@ static void ready_made(int method)
        unsigned int    code, weight;
        int            *tbl;
 
-       tbl = fixed[method];
+       tbl = h_fixed[method];
        j = *tbl++;
        weight = 1 << (16 - j);
        code = 0;
@@ -167,9 +167,9 @@ unsigned short decode_c_st0(void)
                i = lhabitbuf;
                do {
                        if ((short) i < 0)
-                               j = right[j];
+                               j = h_right[j];
                        else
-                               j = left[j];
+                               j = h_left[j];
                        i <<= 1;
                } while (j >= N1);
                fillbuf(c_len[j] - 12);
@@ -193,9 +193,9 @@ unsigned short decode_p_st0(void)
                i = lhabitbuf;
                do {
                        if ((short) i < 0)
-                               j = right[j];
+                               j = h_right[j];
                        else
-                               j = left[j];
+                               j = h_left[j];
                        i <<= 1;
                } while (j >= np);
                fillbuf(pt_len[j] - 8);
index 074a9cfa8881e5b2b1f5e6a1febe2b69f57d2343..cfc32a2201a52b95636c600150e106abc5252249 100644 (file)
@@ -748,7 +748,7 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
        cfgfile_dwrite (f, L"gfx_gamma", L"%d", p->gfx_gamma);
        cfgfile_dwrite_str (f, L"gfx_filter_mask", p->gfx_filtermask);
        if (p->gfx_filteroverlay[0]) {
-               cfgfile_dwrite (f, L"gfx_filter_overlay", L"%s:%d%s,%d%s,%d%s,%d%s",
+               cfgfile_dwrite (f, L"gfx_filter_overlay", L"%s,%d%s,%d%s,%d%s,%d%s",
                        p->gfx_filteroverlay,
                        p->gfx_filteroverlay_pos.x >= -24000 ? p->gfx_filteroverlay_pos.x : -p->gfx_filteroverlay_pos.x - 30000,
                        p->gfx_filteroverlay_pos.x >= -24000 ? L"" : L"%",
@@ -1275,7 +1275,7 @@ static int cfgfile_parse_host (struct uae_prefs *p, TCHAR *option, TCHAR *value)
 
 #ifdef GFXFILTER
        if (_tcscmp (option, L"gfx_filter_overlay") == 0) {
-               TCHAR *s = _tcschr (value, ':');
+               TCHAR *s = _tcschr (value, ',');
                p->gfx_filteroverlay_pos.x = 0;
                p->gfx_filteroverlay_pos.y = 0;
                p->gfx_filteroverlay_pos.width = 0;
index e500a366cae79b5afc6ba585f1db02b34744e46a..4830721f679c564a186c24b2e4f79b5ee0adc467 100644 (file)
   * Copyright 1996, 1997 Bernd Schmidt
   */
 
+#include <string>
+
+using namespace std;
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
index 5a1cdfeac32deb931dba699ac81d2c0de4d94d3d..f8448cd267b635d22b4ba5e7acf873e9f7865042 100644 (file)
@@ -783,7 +783,7 @@ void read_table68k (void)
        }
 }
 
-static int mismatch;
+static int imismatch;
 
 static void handle_merges (long int opcode)
 {
@@ -838,20 +838,20 @@ static void handle_merges (long int opcode)
                                || table68k[code].suse != table68k[opcode].suse
                                || table68k[code].duse != table68k[opcode].duse)
                        {
-                               mismatch++; continue;
+                               imismatch++; continue;
                        }
                        if (table68k[opcode].suse
                                && (table68k[opcode].spos != table68k[code].spos
                                || table68k[opcode].smode != table68k[code].smode
                                || table68k[opcode].stype != table68k[code].stype))
                        {
-                               mismatch++; continue;
+                               imismatch++; continue;
                        }
                        if (table68k[opcode].duse
                                && (table68k[opcode].dpos != table68k[code].dpos
                                || table68k[opcode].dmode != table68k[code].dmode))
                        {
-                               mismatch++; continue;
+                               imismatch++; continue;
                        }
 
                        if (code != opcode)
@@ -864,7 +864,7 @@ void do_merges (void)
 {
        long int opcode;
        int nr = 0;
-       mismatch = 0;
+       imismatch = 0;
        for (opcode = 0; opcode < 65536; opcode++) {
                if (table68k[opcode].handler != -1 || table68k[opcode].mnemo == i_ILLG)
                        continue;
@@ -876,5 +876,5 @@ void do_merges (void)
 
 int get_no_mismatches (void)
 {
-       return mismatch;
+       return imismatch;
 }