diff options
Diffstat (limited to 'C/Ppmd.h')
-rw-r--r-- | C/Ppmd.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,9 +1,9 @@ | |||
1 | /* Ppmd.h -- PPMD codec common code | 1 | /* Ppmd.h -- PPMD codec common code |
2 | 2021-04-13 : Igor Pavlov : Public domain | 2 | 2023-03-05 : Igor Pavlov : Public domain |
3 | This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ | 3 | This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ |
4 | 4 | ||
5 | #ifndef __PPMD_H | 5 | #ifndef ZIP7_INC_PPMD_H |
6 | #define __PPMD_H | 6 | #define ZIP7_INC_PPMD_H |
7 | 7 | ||
8 | #include "CpuArch.h" | 8 | #include "CpuArch.h" |
9 | 9 | ||
@@ -48,8 +48,10 @@ typedef struct | |||
48 | Byte Count; /* Count to next change of Shift */ | 48 | Byte Count; /* Count to next change of Shift */ |
49 | } CPpmd_See; | 49 | } CPpmd_See; |
50 | 50 | ||
51 | #define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ | 51 | #define Ppmd_See_UPDATE(p) \ |
52 | { (p)->Summ = (UInt16)((p)->Summ << 1); (p)->Count = (Byte)(3 << (p)->Shift++); } | 52 | { if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ |
53 | { (p)->Summ = (UInt16)((p)->Summ << 1); \ | ||
54 | (p)->Count = (Byte)(3 << (p)->Shift++); }} | ||
53 | 55 | ||
54 | 56 | ||
55 | typedef struct | 57 | typedef struct |