Skip to content

Commit 41f356c

Browse files
author
dberlin
committed
- revert modifications to MaxDB library and sync with version 7.6.00.37
- bump version to 1.0.1
1 parent ed02729 commit 41f356c

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

SAP-Report-Source-Decompressor/lib/hpa105CsObjInt.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ typedef struct CSH
186186

187187
TREE_DESC d_desc;
188188

189-
TREE_DESC bl_desc;
189+
TREE_DESC bl_desc;
190190

191191
SAP_BYTE window[(BUF_SIZE1)];
192192
SAP_BYTE InterBuf[(BUF_SIZE2)];
@@ -364,7 +364,7 @@ typedef struct CSC
364364

365365
BYTE_TYP * in_ptr; /* global input ptr ............*/
366366
BYTE_TYP * end_inbuf; /* end of input buffer .........*/
367-
BYTE_TYP *stack_end;
367+
BYTE_TYP *stack_end;
368368

369369
int hshift;
370370
CODE_INT ent;
@@ -402,8 +402,7 @@ class CsObjectInt
402402
SAP_INT outlen, /* len output ......*/
403403
SAP_INT option, /* decompr. option */
404404
SAP_INT * bytes_read, /* bytes read ......*/
405-
SAP_INT * bytes_decompressed, /* bytes decompr. */
406-
int show_algo);
405+
SAP_INT * bytes_decompressed); /* bytes decompr. */
407406

408407
int CsGetAlgorithm (SAP_BYTE * data);
409408

SAP-Report-Source-Decompressor/lib/vpa105CsObjInt.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ int CsObjectInt::CsDecompr (SAP_BYTE * inbuf, /* ptr input .......*/
133133
SAP_INT outlen, /* len output ......*/
134134
SAP_INT option, /* decompr. option */
135135
SAP_INT * bytes_read, /* bytes read ......*/
136-
SAP_INT * bytes_decompressed, /* bytes decompr. */
137-
int show_algo)
136+
SAP_INT * bytes_decompressed) /* bytes decompr. */
138137
/*--------------------------------------------------------------------*/
139138
/* Decompress */
140139
/* */
@@ -178,8 +177,6 @@ int CsObjectInt::CsDecompr (SAP_BYTE * inbuf, /* ptr input .......*/
178177
{
179178
if (inlen < CS_HEAD_SIZE) return CS_E_IN_BUFFER_LEN;
180179
algorithm = CsGetAlgorithm (inbuf);
181-
if (show_algo > 0)
182-
printf("%s: %u (1 = LZC, 2 = LZH)\n", "Algorithm", algorithm);
183180
}
184181

185182
switch (algorithm)
@@ -335,7 +332,7 @@ int CsObjectInt::CsInitDecompr (SAP_BYTE * inbuf)
335332

336333
rc = CsDecompr (inbuf, CS_HEAD_SIZE,
337334
outbuf, 0, CS_INIT_DECOMPRESS,
338-
&bytes_read, &bytes_written, 0);
335+
&bytes_read, &bytes_written);
339336

340337
if (rc < 0) return rc;
341338
return 0;

SAP-Report-Source-Decompressor/sap-reposrc-decompressor.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
//--------------------------------------------------------------------------------------------------
1717
// Changes:
1818
// 2012-06-23 - 1.0.0 - Initial version
19+
// 2012-06-24 - 1.0.1 - Revert modifications to MaxDB library
1920
//--------------------------------------------------------------------------------------------------
2021

21-
#define VERSION "1.0.0"
22+
#define VERSION "1.0.1"
2223

2324
// Silence MS Visual C++ ("... consider using fopen_s instead ...")
2425
#ifdef _MSC_VER
@@ -86,7 +87,11 @@ int main(int argc, char *argv[]) {
8687
return 2;
8788
}
8889

89-
printf("Compressed source read from file '%s'\n", argv[1]);
90+
printf("Compressed source read from '%s'\n", argv[1]);
91+
92+
// Determine compression algorithm
93+
ret = o.CsGetAlgorithm(bin + 1);
94+
printf("Algorithm: %u (1 = LZC, 2 = LZH)\n", ret);
9095

9196
for (;;) {
9297
// Create output buffer with an initial size factor of 10 x input buffer
@@ -101,7 +106,6 @@ int main(int argc, char *argv[]) {
101106
, CS_INIT_DECOMPRESS // Decompression
102107
, &byte_read // Bytes read from input buffer
103108
, &byte_decomp // Bytes decompressed to output buffer
104-
, factor > 10 ? 0 : 1 // Print algorithm information only once
105109
);
106110

107111
// Output buffer too small -> increase size factor and retry
@@ -152,7 +156,7 @@ int main(int argc, char *argv[]) {
152156
fwrite("\n", 1, 1, fout);
153157
fclose(fout);
154158

155-
printf("Plain source code written to file '%s'\nHave a nice day\n\n", argv[2]);
159+
printf("Plain source code written to '%s'\nHave a nice day\n\n", argv[2]);
156160

157161
free(bout);
158162
return 0;

0 commit comments

Comments
 (0)