aboutsummaryrefslogtreecommitdiff
path: root/C/Ppmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'C/Ppmd.h')
-rw-r--r--C/Ppmd.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/C/Ppmd.h b/C/Ppmd.h
index b198792..66b2626 100644
--- a/C/Ppmd.h
+++ b/C/Ppmd.h
@@ -1,9 +1,9 @@
1/* Ppmd.h -- PPMD codec common code 1/* Ppmd.h -- PPMD codec common code
22021-04-13 : Igor Pavlov : Public domain 22023-03-05 : Igor Pavlov : Public domain
3This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ 3This 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
55typedef struct 57typedef struct