Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/C
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2008-08-19 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:57 +0300
commitc10e6b16f6d5484ed896b2c614cb7fb77f336d24 (patch)
treef7a2ac132f883d95c2cf28ab01d58963de1ee811 /C
parent173c07e166fdf6fcd20f18ea73008f1b628945df (diff)
4.60 beta
Diffstat (limited to 'C')
-rwxr-xr-xC/Archive/7z/7zExtract.c4
-rwxr-xr-xC/Archive/7z/7zIn.c12
-rwxr-xr-xC/Archive/7z/7zMain.c4
-rwxr-xr-xC/Bcj2.c4
-rwxr-xr-xC/Bra.h4
-rwxr-xr-xC/Bra86.c4
-rwxr-xr-xC/BwtSort.c6
-rwxr-xr-xC/LzFind.c10
-rwxr-xr-xC/LzFindMt.c8
-rwxr-xr-xC/LzmaDec.c8
-rwxr-xr-xC/LzmaEnc.c6
-rwxr-xr-xC/Sort.c6
12 files changed, 38 insertions, 38 deletions
diff --git a/C/Archive/7z/7zExtract.c b/C/Archive/7z/7zExtract.c
index da5b57c7..cc727467 100755
--- a/C/Archive/7z/7zExtract.c
+++ b/C/Archive/7z/7zExtract.c
@@ -1,5 +1,5 @@
/* 7zExtract.c -- Extracting from 7z archive
-2008-08-05
+2008-08-17
Igor Pavlov
Copyright (c) 1999-2008 Igor Pavlov
Read 7zExtract.h for license options */
@@ -79,7 +79,7 @@ SRes SzAr_Extract(
UInt32 i;
CSzFileItem *fileItem = p->db.Files + fileIndex;
*offset = 0;
- for(i = p->FolderStartFileIndex[folderIndex]; i < fileIndex; i++)
+ for (i = p->FolderStartFileIndex[folderIndex]; i < fileIndex; i++)
*offset += (UInt32)p->db.Files[i].Size;
*outSizeProcessed = (size_t)fileItem->Size;
if (*offset + *outSizeProcessed > *outBufferSize)
diff --git a/C/Archive/7z/7zIn.c b/C/Archive/7z/7zIn.c
index 9a4d6dd1..6592e7f4 100755
--- a/C/Archive/7z/7zIn.c
+++ b/C/Archive/7z/7zIn.c
@@ -1,5 +1,5 @@
/* 7zIn.c -- 7z Input functions
-2008-08-05
+2008-08-17
Igor Pavlov
Copyright (c) 1999-2008 Igor Pavlov
Read 7zIn.h for license options */
@@ -8,7 +8,7 @@ Read 7zIn.h for license options */
#include "7zDecode.h"
#include "../../7zCrc.h"
-#define RINOM(x) { if((x) == 0) return SZ_ERROR_MEM; }
+#define RINOM(x) { if ((x) == 0) return SZ_ERROR_MEM; }
void SzArEx_Init(CSzArEx *p)
{
@@ -847,7 +847,7 @@ static SRes SzReadFileNames(CSzData *sd, UInt32 numFiles, CSzFileItem *files, IS
UInt32 len = 0;
UInt32 pos = 0;
CSzFileItem *file = files + i;
- while(pos + 2 <= sd->Size)
+ while (pos + 2 <= sd->Size)
{
int numAdds;
UInt32 value = (UInt32)(sd->Data[pos] | (((UInt32)sd->Data[pos + 1]) << 8));
@@ -879,7 +879,7 @@ static SRes SzReadFileNames(CSzData *sd, UInt32 numFiles, CSzFileItem *files, IS
MY_ALLOC(char, file->Name, (size_t)len, alloc);
len = 0;
- while(2 <= sd->Size)
+ while (2 <= sd->Size)
{
int numAdds;
UInt32 value = (UInt32)(sd->Data[0] | (((UInt32)sd->Data[1]) << 8));
@@ -906,7 +906,7 @@ static SRes SzReadFileNames(CSzData *sd, UInt32 numFiles, CSzFileItem *files, IS
numAdds--;
file->Name[len++] = (char)(0x80 + ((value >> (6 * numAdds)) & 0x3F));
}
- while(numAdds > 0);
+ while (numAdds > 0);
len += numAdds;
}
@@ -1041,7 +1041,7 @@ static SRes SzReadHeader2(
file->HasStream = 1;
else
file->HasStream = (Byte)((*emptyStreamVector)[i] ? 0 : 1);
- if(file->HasStream)
+ if (file->HasStream)
{
file->IsDir = 0;
file->Size = (*unpackSizes)[sizeIndex];
diff --git a/C/Archive/7z/7zMain.c b/C/Archive/7z/7zMain.c
index 082a2ebd..5bcf0ec8 100755
--- a/C/Archive/7z/7zMain.c
+++ b/C/Archive/7z/7zMain.c
@@ -1,5 +1,5 @@
/* 7zMain.c - Test application for 7z Decoder
-2008-08-05
+2008-08-17
Igor Pavlov
Public domain */
@@ -40,7 +40,7 @@ void ConvertNumberToString(CFileSize value, char *s)
while (value != 0);
do
*s++ = temp[--pos];
- while(pos > 0);
+ while (pos > 0);
*s = '\0';
}
diff --git a/C/Bcj2.c b/C/Bcj2.c
index a4dafac8..d1be3293 100755
--- a/C/Bcj2.c
+++ b/C/Bcj2.c
@@ -1,5 +1,5 @@
/* Bcj2.c -- Converter for x86 code (BCJ2)
-2008-08-05
+2008-08-17
Copyright (c) 1999-2008 Igor Pavlov
Read Bra.h for license options */
@@ -24,7 +24,7 @@ Read Bra.h for license options */
#define RC_READ_BYTE (*buffer++)
#define RC_TEST { if (buffer == bufferLim) return SZ_ERROR_DATA; }
#define RC_INIT2 code = 0; range = 0xFFFFFFFF; \
- { int i; for(i = 0; i < 5; i++) { RC_TEST; code = (code << 8) | RC_READ_BYTE; }}
+ { int i; for (i = 0; i < 5; i++) { RC_TEST; code = (code << 8) | RC_READ_BYTE; }}
#define NORMALIZE if (range < kTopValue) { RC_TEST; range <<= 8; code = (code << 8) | RC_READ_BYTE; }
diff --git a/C/Bra.h b/C/Bra.h
index 0ff7b842..129269ae 100755
--- a/C/Bra.h
+++ b/C/Bra.h
@@ -1,5 +1,5 @@
/* Bra.h -- Branch converters for executables
-2008-08-05
+2008-08-17
Copyright (c) 1999-2008 Igor Pavlov
Read LzmaDec.h for license options */
@@ -41,7 +41,7 @@ in CALL instructions to increase the compression ratio.
Example:
UInt32 ip = 0;
- for()
+ for ()
{
// size must be >= Alignment + LookAhead, if it's not last block
SizeT processed = Convert(data, size, ip, 1);
diff --git a/C/Bra86.c b/C/Bra86.c
index 62a1705b..5c1b0923 100755
--- a/C/Bra86.c
+++ b/C/Bra86.c
@@ -1,5 +1,5 @@
/* Bra86.c -- converter for x86 code (BCJ)
-2008-03-19
+2008-08-17
Copyright (c) 1999-2008 Igor Pavlov
Read Bra.h for license options */
@@ -19,7 +19,7 @@ SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding
ip += 5;
prevPosT = (SizeT)0 - 1;
- for(;;)
+ for (;;)
{
Byte *p = data + bufferPos;
Byte *limit = data + size - 4;
diff --git a/C/BwtSort.c b/C/BwtSort.c
index fdac5545..20730507 100755
--- a/C/BwtSort.c
+++ b/C/BwtSort.c
@@ -1,5 +1,5 @@
/* BwtSort.c -- BWT block sorting
-2008-08-05
+2008-08-17
Igor Pavlov
Public domain */
@@ -225,7 +225,7 @@ UInt32 NO_INLINE SortGroup(UInt32 BlockSize, UInt32 NumSortedBytes, UInt32 group
break;
}
}
- while(++i < j);
+ while (++i < j);
if (i == 0)
{
range = range - (mid - left);
@@ -438,7 +438,7 @@ UInt32 BlockSort(UInt32 *Indices, const Byte *data, UInt32 blockSize)
i++;
continue;
}
- for(groupSize = 1;
+ for (groupSize = 1;
(Flags[(i + groupSize) >> kNumFlagsBits] & (1 << ((i + groupSize) & kFlagsMask))) != 0;
groupSize++);
diff --git a/C/LzFind.c b/C/LzFind.c
index d3938548..00c1f5a1 100755
--- a/C/LzFind.c
+++ b/C/LzFind.c
@@ -1,5 +1,5 @@
/* LzFind.c -- Match finder for LZ algorithms
-2008-08-05
+2008-08-17
Copyright (c) 1999-2008 Igor Pavlov
Read LzFind.h for license options */
@@ -263,7 +263,7 @@ static void MatchFinder_SetLimits(CMatchFinder *p)
void MatchFinder_Init(CMatchFinder *p)
{
UInt32 i;
- for(i = 0; i < p->hashSizeSum; i++)
+ for (i = 0; i < p->hashSizeSum; i++)
p->hash[i] = kEmptyHashValue;
p->cyclicBufferPos = 0;
p->buffer = p->bufferBase;
@@ -327,7 +327,7 @@ static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos,
if (pb[maxLen] == cur[maxLen] && *pb == *cur)
{
UInt32 len = 0;
- while(++len != lenLimit)
+ while (++len != lenLimit)
if (pb[len] != cur[len])
break;
if (maxLen < len)
@@ -364,7 +364,7 @@ UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byt
if (pb[len] == cur[len])
{
if (++len != lenLimit && pb[len] == cur[len])
- while(++len != lenLimit)
+ while (++len != lenLimit)
if (pb[len] != cur[len])
break;
if (maxLen < len)
@@ -417,7 +417,7 @@ static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const
UInt32 len = (len0 < len1 ? len0 : len1);
if (pb[len] == cur[len])
{
- while(++len != lenLimit)
+ while (++len != lenLimit)
if (pb[len] != cur[len])
break;
{
diff --git a/C/LzFindMt.c b/C/LzFindMt.c
index 3df50ac0..82caeb29 100755
--- a/C/LzFindMt.c
+++ b/C/LzFindMt.c
@@ -1,5 +1,5 @@
/* LzFindMt.c -- multithreaded Match finder for LZ algorithms
-2008-08-05
+2008-08-17
Copyright (c) 1999-2008 Igor Pavlov
Read LzFind.h for license options */
@@ -97,7 +97,7 @@ void MtSync_Destruct(CMtSync *p)
p->wasCreated = False;
}
-#define RINOK_THREAD(x) { if((x) != 0) return SZ_ERROR_THREAD; }
+#define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; }
static SRes MtSync_Create2(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void *), void *obj, UInt32 numBlocks)
{
@@ -262,7 +262,7 @@ Int32 NO_INLINE GetMatchesSpecN(UInt32 lenLimit, UInt32 pos, const Byte *cur, CL
if (pb[len] == cur[len])
{
if (++len != lenLimit && pb[len] == cur[len])
- while(++len != lenLimit)
+ while (++len != lenLimit)
if (pb[len] != cur[len])
break;
if (maxLen < len)
@@ -715,7 +715,7 @@ UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances)
#define SKIP_HEADER2 do { GET_NEXT_BLOCK_IF_REQUIRED
#define SKIP_HEADER(n) SKIP_HEADER2 if (p->btNumAvailBytes-- >= (n)) { const Byte *cur = p->pointerToCurPos; UInt32 *hash = p->hash;
-#define SKIP_FOOTER } INCREASE_LZ_POS p->btBufPos += p->btBuf[p->btBufPos] + 1; } while(--num != 0);
+#define SKIP_FOOTER } INCREASE_LZ_POS p->btBufPos += p->btBuf[p->btBufPos] + 1; } while (--num != 0);
void MatchFinderMt0_Skip(CMatchFinderMt *p, UInt32 num)
{
diff --git a/C/LzmaDec.c b/C/LzmaDec.c
index 0a782070..724d1c9f 100755
--- a/C/LzmaDec.c
+++ b/C/LzmaDec.c
@@ -1,5 +1,5 @@
/* LzmaDec.c -- LZMA Decoder
-2008-08-05
+2008-08-17
Copyright (c) 1999-2008 Igor Pavlov
Read LzmaDec.h for license options */
@@ -56,7 +56,7 @@ Read LzmaDec.h for license options */
{ UPDATE_1_CHECK; i = (i + i) + 1; A1; }
#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;)
#define TREE_DECODE_CHECK(probs, limit, i) \
- { i = 1; do { GET_BIT_CHECK(probs + i, i) } while(i < limit); i -= limit; }
+ { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; }
#define kNumPosBitsMax 4
@@ -328,7 +328,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
GET_BIT2(prob + i, i, ; , distance |= mask);
mask <<= 1;
}
- while(--numDirectBits != 0);
+ while (--numDirectBits != 0);
}
}
else
@@ -679,7 +679,7 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS
{
GET_BIT_CHECK(prob + i, i);
}
- while(--numDirectBits != 0);
+ while (--numDirectBits != 0);
}
}
}
diff --git a/C/LzmaEnc.c b/C/LzmaEnc.c
index 34b976d0..ccbdac97 100755
--- a/C/LzmaEnc.c
+++ b/C/LzmaEnc.c
@@ -1,5 +1,5 @@
/* LzmaEnc.c -- LZMA Encoder
-2008-08-13
+2008-08-17
Copyright (c) 1999-2008 Igor Pavlov
Read LzmaEnc.h for license options */
@@ -1966,7 +1966,7 @@ void LzmaEnc_Init(CLzmaEnc *p)
{
UInt32 i;
p->state = 0;
- for(i = 0 ; i < LZMA_NUM_REPS; i++)
+ for (i = 0 ; i < LZMA_NUM_REPS; i++)
p->reps[i] = 0;
RangeEnc_Init(&p->rc);
@@ -2002,7 +2002,7 @@ void LzmaEnc_Init(CLzmaEnc *p)
}
}
{
- for(i = 0; i < kNumFullDistances - kEndPosModelIndex; i++)
+ for (i = 0; i < kNumFullDistances - kEndPosModelIndex; i++)
p->posEncoders[i] = kProbInitValue;
}
diff --git a/C/Sort.c b/C/Sort.c
index 8438c787..ac772f6f 100755
--- a/C/Sort.c
+++ b/C/Sort.c
@@ -1,5 +1,5 @@
/* Sort.c -- Sort functions
-2008-03-13
+2008-08-17
Igor Pavlov
Public domain */
@@ -27,7 +27,7 @@ void HeapSort(UInt32 *p, UInt32 size)
UInt32 k = i;
HeapSortDown(p, k, size, temp)
}
- while(--i != 0);
+ while (--i != 0);
}
/*
do
@@ -82,7 +82,7 @@ void HeapSortRef(UInt32 *p, UInt32 *vals, UInt32 size)
UInt32 temp = p[i];
HeapSortRefDown(p, vals, i, size, temp);
}
- while(--i != 0);
+ while (--i != 0);
}
do
{