#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];
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);
}
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);
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);
/* 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[];
/* 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;
#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 */
};
unsigned int code, weight;
int *tbl;
- tbl = fixed[method];
+ tbl = h_fixed[method];
j = *tbl++;
weight = 1 << (16 - j);
code = 0;
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);
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);
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"%",
#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;
* Copyright 1996, 1997 Bernd Schmidt
*/
+#include <string>
+
+using namespace std;
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
}
}
-static int mismatch;
+static int imismatch;
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)
{
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;
int get_no_mismatches (void)
{
- return mismatch;
+ return imismatch;
}