mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7953] Some space and formating cleanups in vmap_extractor_v2
This commit is contained in:
parent
35271fe488
commit
a3fff9b2cb
6 changed files with 24 additions and 25 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
/* 12.11.03 1.02 Dan Macintosh compatibility */
|
/* 12.11.03 1.02 Dan Macintosh compatibility */
|
||||||
/* 24.07.04 1.03 Sam Mac OS X compatibility */
|
/* 24.07.04 1.03 Sam Mac OS X compatibility */
|
||||||
/* 22.11.06 1.04 Sam Mac OS X compatibility (for StormLib 6.0) */
|
/* 22.11.06 1.04 Sam Mac OS X compatibility (for StormLib 6.0) */
|
||||||
/* 31.12.06 1.05 XPinguin Full GNU/Linux compatibility */
|
/* 31.12.06 1.05 XPinguin Full GNU/Linux compatibility */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#ifndef __STORMPORT_H__
|
#ifndef __STORMPORT_H__
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
*
|
*
|
||||||
* Description: implementation for StormLib - linux port
|
* Description: implementation for StormLib - linux port
|
||||||
* intended to be used in GLdiablo
|
* intended to be used in GLdiablo
|
||||||
*
|
*
|
||||||
* ----> StormLib was originally developed for Windows by
|
* ----> StormLib was originally developed for Windows by
|
||||||
* Ladislav Zezula (www.zezula.net), and he did
|
* Ladislav Zezula (www.zezula.net), and he did
|
||||||
* a _great_ job! Thanks Ladislav!
|
* a _great_ job! Thanks Ladislav!
|
||||||
|
|
@ -17,9 +17,9 @@
|
||||||
*
|
*
|
||||||
* Author: Marko Friedemann <marko.friedemann@bmx-chemnitz.de>
|
* Author: Marko Friedemann <marko.friedemann@bmx-chemnitz.de>
|
||||||
* Created at: Mon Jan 29 19:01:37 CEST 2001
|
* Created at: Mon Jan 29 19:01:37 CEST 2001
|
||||||
* Computer: whiplash.flachland-chemnitz.de
|
* Computer: whiplash.flachland-chemnitz.de
|
||||||
* System: Linux 2.4.0 on i686
|
* System: Linux 2.4.0 on i686
|
||||||
*
|
*
|
||||||
* Copyright (c) 2001 BMX-Chemnitz.DE All rights reserved.
|
* Copyright (c) 2001 BMX-Chemnitz.DE All rights reserved.
|
||||||
*
|
*
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
@ -163,6 +163,6 @@ BOOL DeleteFile(const char *lpFileName)
|
||||||
BOOL MoveFile(const char *lpExistingFileName, const char *lpNewFileName)
|
BOOL MoveFile(const char *lpExistingFileName, const char *lpNewFileName)
|
||||||
{
|
{
|
||||||
return rename(lpExistingFileName, lpNewFileName);
|
return rename(lpExistingFileName, lpNewFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -17,16 +17,16 @@
|
||||||
1. Redistributions of source code must retain the above copyright
|
1. Redistributions of source code must retain the above copyright
|
||||||
notice, this list of conditions and the following disclaimer.
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. The origin of this software must not be misrepresented; you must
|
2. The origin of this software must not be misrepresented; you must
|
||||||
not claim that you wrote the original software. If you use this
|
not claim that you wrote the original software. If you use this
|
||||||
software in a product, an acknowledgment in the product
|
software in a product, an acknowledgment in the product
|
||||||
documentation would be appreciated but is not required.
|
documentation would be appreciated but is not required.
|
||||||
|
|
||||||
3. Altered source versions must be plainly marked as such, and must
|
3. Altered source versions must be plainly marked as such, and must
|
||||||
not be misrepresented as being the original software.
|
not be misrepresented as being the original software.
|
||||||
|
|
||||||
4. The name of the author may not be used to endorse or promote
|
4. The name of the author may not be used to endorse or promote
|
||||||
products derived from this software without specific prior written
|
products derived from this software without specific prior written
|
||||||
permission.
|
permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||||
|
|
@ -57,8 +57,8 @@
|
||||||
|
|
||||||
For more information on these sources, see the manual.
|
For more information on these sources, see the manual.
|
||||||
|
|
||||||
To get some idea how the block sorting algorithms in this file
|
To get some idea how the block sorting algorithms in this file
|
||||||
work, read my paper
|
work, read my paper
|
||||||
On the Performance of BWT Sorting Algorithms
|
On the Performance of BWT Sorting Algorithms
|
||||||
in Proceedings of the IEEE Data Compression Conference 2000,
|
in Proceedings of the IEEE Data Compression Conference 2000,
|
||||||
Snowbird, Utah, USA, 27-30 March 2000. The main sort in this
|
Snowbird, Utah, USA, 27-30 March 2000. The main sort in this
|
||||||
|
|
@ -321,7 +321,7 @@ void fallbackSort ( UInt32* fmap,
|
||||||
r = -1;
|
r = -1;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
/*-- find the next non-singleton bucket --*/
|
/*-- find the next non-singleton bucket --*/
|
||||||
k = r + 1;
|
k = r + 1;
|
||||||
while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
|
while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
|
||||||
if (ISSET_BH(k)) {
|
if (ISSET_BH(k)) {
|
||||||
|
|
|
||||||
|
|
@ -471,7 +471,7 @@ int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )
|
||||||
return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;
|
return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (action == BZ_FLUSH) {
|
if (action == BZ_FLUSH) {
|
||||||
s->avail_in_expect = strm->avail_in;
|
s->avail_in_expect = strm->avail_in;
|
||||||
s->mode = BZ_M_FLUSHING;
|
s->mode = BZ_M_FLUSHING;
|
||||||
goto preswitch;
|
goto preswitch;
|
||||||
|
|
|
||||||
|
|
@ -373,14 +373,14 @@ void sendMTFValues ( EState* s )
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
Set up an auxiliary length table which is used to fast-track
|
Set up an auxiliary length table which is used to fast-track
|
||||||
the common case (nGroups == 6).
|
the common case (nGroups == 6).
|
||||||
---*/
|
---*/
|
||||||
if (nGroups == 6) {
|
if (nGroups == 6) {
|
||||||
for (v = 0; v < alphaSize; v++) {
|
for (v = 0; v < alphaSize; v++) {
|
||||||
s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v];
|
s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v];
|
||||||
s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v];
|
s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v];
|
||||||
s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v];
|
s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nSelectors = 0;
|
nSelectors = 0;
|
||||||
|
|
@ -429,14 +429,14 @@ void sendMTFValues ( EState* s )
|
||||||
cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16;
|
cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/*--- slow version which correctly handles all situations ---*/
|
/*--- slow version which correctly handles all situations ---*/
|
||||||
for (i = gs; i <= ge; i++) {
|
for (i = gs; i <= ge; i++) {
|
||||||
UInt16 icv = mtfv[i];
|
UInt16 icv = mtfv[i];
|
||||||
for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
|
for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--
|
/*--
|
||||||
Find the coding table which is best for this group,
|
Find the coding table which is best for this group,
|
||||||
and record its identity in the selector table.
|
and record its identity in the selector table.
|
||||||
--*/
|
--*/
|
||||||
|
|
@ -470,7 +470,7 @@ void sendMTFValues ( EState* s )
|
||||||
# undef BZ_ITUR
|
# undef BZ_ITUR
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/*--- slow version which correctly handles all situations ---*/
|
/*--- slow version which correctly handles all situations ---*/
|
||||||
for (i = gs; i <= ge; i++)
|
for (i = gs; i <= ge; i++)
|
||||||
s->rfreq[bt][ mtfv[i] ]++;
|
s->rfreq[bt][ mtfv[i] ]++;
|
||||||
}
|
}
|
||||||
|
|
@ -623,15 +623,14 @@ void sendMTFValues ( EState* s )
|
||||||
# undef BZ_ITAH
|
# undef BZ_ITAH
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/*--- slow version which correctly handles all situations ---*/
|
/*--- slow version which correctly handles all situations ---*/
|
||||||
for (i = gs; i <= ge; i++) {
|
for (i = gs; i <= ge; i++) {
|
||||||
bsW ( s,
|
bsW ( s,
|
||||||
s->len [s->selector[selCtr]] [mtfv[i]],
|
s->len [s->selector[selCtr]] [mtfv[i]],
|
||||||
s->code [s->selector[selCtr]] [mtfv[i]] );
|
s->code [s->selector[selCtr]] [mtfv[i]] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gs = ge+1;
|
gs = ge+1;
|
||||||
selCtr++;
|
selCtr++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7952"
|
#define REVISION_NR "7953"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue