summaryrefslogtreecommitdiffstats
path: root/patches/p7zip/p7zip_9.04-ds-rusxmms-full.patch
blob: d44a16f9b1ee23c0740efa22ec8b00f046e940bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
diff -dPNur p7zip-9.04~dfsg.1/C/rccrecode.c p7zip-9.04~dfsg.1-ds/C/rccrecode.c
--- p7zip-9.04~dfsg.1/C/rccrecode.c	1970-01-01 03:00:00.000000000 +0300
+++ p7zip-9.04~dfsg.1-ds/C/rccrecode.c	2009-10-28 03:29:23.000000000 +0300
@@ -0,0 +1,71 @@
+#include <pthread.h>
+#include <librcc.h>
+
+static rcc_class_default_charset default_oem[] = {
+    { "ru", "IBM866" },
+    { NULL, NULL }
+};
+
+static rcc_class_default_charset default_iso[] = {
+    { "ru", "CP1251" },
+    { NULL, NULL }
+};
+
+#define ARC_CLASS 0
+#define OUT_CLASS 1
+#define ARCOUT_CLASS 0
+static rcc_class classes[] = {
+    { "oem", RCC_CLASS_STANDARD, NULL, default_oem, "OEM Encoding", 0 },
+    { "out", RCC_CLASS_STANDARD, "LC_CTYPE", NULL, "Output", 0 },
+    { NULL, RCC_CLASS_STANDARD, NULL, NULL, NULL, 0 }
+};
+
+static int initialized = 0;
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+void *rcc_init() {
+    rcc_context ctx;
+    
+    pthread_mutex_lock(&mutex);
+    if (!initialized) {
+	rccInit();
+	rccInitDefaultContext(NULL, 0, 0, classes, 0);
+	rccLoad(NULL, "zip");
+	rccInitDb4(NULL, NULL, 0);
+    }
+    initialized++;
+    pthread_mutex_unlock(&mutex);
+    
+    ctx = rccCreateContext(NULL, 0, 0, classes, 0);
+    if (ctx) rccInitDb4(ctx, NULL, 0);
+    if (ctx) rccLoad(ctx, "zip");
+
+    return ctx;
+}
+
+
+void rcc_free(void *ctx) {
+    if (ctx) rccFreeContext((rcc_context)ctx);
+    
+    pthread_mutex_lock(&mutex);
+    if (initialized == 1) rccFree();
+    initialized--;
+    pthread_mutex_unlock(&mutex);
+}
+
+
+char *rcc_read(void *ctx, const char *string, size_t size) {
+    if (!initialized) {
+	rcc_init();
+	if (!initialized) return NULL;
+    }
+    return rccSizedRecode((rcc_context)ctx, ARC_CLASS, OUT_CLASS, string, size, NULL);
+}
+
+char *rcc_write(rcc_context ctx, const char *string, size_t size) {
+    if (!initialized) {
+	rcc_init();
+	if (!initialized) return NULL;
+    }
+    return rccSizedRecode((rcc_context)ctx, OUT_CLASS, ARCOUT_CLASS, string, size, NULL);
+}
diff -dPNur p7zip-9.04~dfsg.1/C/rccrecode.h p7zip-9.04~dfsg.1-ds/C/rccrecode.h
--- p7zip-9.04~dfsg.1/C/rccrecode.h	1970-01-01 03:00:00.000000000 +0300
+++ p7zip-9.04~dfsg.1-ds/C/rccrecode.h	2009-10-28 03:29:23.000000000 +0300
@@ -0,0 +1,17 @@
+#ifndef _RCC_RECODE_H
+#define _RCC_RECODE_H
+
+# ifdef __cplusplus 
+extern "C" { 
+# endif
+
+    void *rcc_init();
+    void rcc_free(void *ctx);
+    char *rcc_read(void *ctx, const char *string, size_t size);
+    char *rcc_write(void *ctx, const char *string, size_t size);
+
+# ifdef __cplusplus 
+}
+# endif
+
+#endif /* _RCC_RECODE_H */
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipIn.cpp p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipIn.cpp
--- p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipIn.cpp	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipIn.cpp	2009-10-28 03:49:06.000000000 +0300
@@ -9,6 +9,8 @@
 #include "../../Common/LimitedStreams.h"
 #include "../../Common/StreamUtils.h"
 
+#include "../../../../C/rccrecode.h"
+
 #include "ZipIn.h"
 
 #define Get16(p) GetUi16(p)
@@ -17,7 +19,17 @@
 
 namespace NArchive {
 namespace NZip {
- 
+
+CInArchive::CInArchive()
+{
+  rccctx = rcc_init();
+}
+
+CInArchive::~CInArchive()
+{
+  rcc_free(rccctx);
+}
+
 HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
 {
   _inBufMode = false;
@@ -200,12 +212,20 @@
 
 void CInArchive::ReadFileName(UInt32 nameSize, AString &dest)
 {
+  char *rccrec;
+
   if (nameSize == 0)
     dest.Empty();
   char *p = dest.GetBuffer((int)nameSize);
   SafeReadBytes(p, nameSize);
   p[nameSize] = 0;
   dest.ReleaseBuffer();
+
+  rccrec = rcc_read(rccctx, (LPCSTR)dest, 0);
+  if (rccrec) {
+    dest = rccrec;
+    free(rccrec);
+  }
 }
 
 void CInArchive::GetArchiveInfo(CInArchiveInfo &archiveInfo) const
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipIn.h p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipIn.h
--- p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipIn.h	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipIn.h	2009-10-28 03:29:23.000000000 +0300
@@ -114,6 +114,10 @@
   ISequentialInStream *CreateLimitedStream(UInt64 position, UInt64 size);
   IInStream* CreateStream();
 
+  void *rccctx;
+  CInArchive();
+  ~CInArchive();
+
   bool IsOpen() const { return m_Stream != NULL; }
 };
   
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipOut.h p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipOut.h
--- p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipOut.h	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipOut.h	2009-10-28 05:49:05.000000000 +0300
@@ -49,6 +49,11 @@
   void CreateStreamForCompressing(IOutStream **outStream);
   void CreateStreamForCopying(ISequentialOutStream **outStream);
   void SeekToPackedDataPosition();
+
+  void *rccctx;
+  COutArchive();
+  ~COutArchive();
+  void Recode(CItem &item);
 };
 
 }}
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipUpdate.cpp p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipUpdate.cpp
--- p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipUpdate.cpp	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipUpdate.cpp	2009-10-28 05:48:04.000000000 +0300
@@ -87,6 +87,7 @@
     item.NtfsATime = ui.NtfsATime;
     item.NtfsCTime = ui.NtfsCTime;
     item.NtfsTimeIsDefined = ui.NtfsTimeIsDefined;
+    archive.Recode(item);
   }
   else
     isDir = item.IsDir();
@@ -359,9 +360,11 @@
     item.NtfsCTime = ui.NtfsCTime;
     item.NtfsTimeIsDefined = ui.NtfsTimeIsDefined;
 
+    archive.Recode(item);
+
     item.CentralExtra.RemoveUnknownSubBlocks();
     item.LocalExtra.RemoveUnknownSubBlocks();
-    
+
     archive.PrepareWriteCompressedData2((UInt16)item.Name.Length(), item.UnPackSize, item.PackSize, item.LocalExtra.HasWzAesField());
     item.LocalHeaderPosition = archive.GetCurrentPosition();
     archive.SeekToPackedDataPosition();
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Alone/makefile p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Alone/makefile
--- p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Alone/makefile	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Alone/makefile	2009-10-28 03:29:24.000000000 +0300
@@ -244,6 +244,7 @@
 
 
 OBJS=\
+rccrecode.o \
 myGetTickCount.o \
 wine_date_and_time.o \
 myAddExeFlag.o \
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Alone/makefile.list p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Alone/makefile.list
--- p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Alone/makefile.list	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Alone/makefile.list	2009-10-28 03:40:17.000000000 +0300
@@ -192,6 +192,7 @@
  ../../Crypto/ZipStrong.cpp
 
 SRCS_C=\
+ ../../../../C/rccrecode.c \
  ../../../../C/Aes.c \
  ../../../../C/7zStream.c \
  ../../../../C/Bra.c \
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Format7zFree/makefile p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Format7zFree/makefile
--- p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Format7zFree/makefile	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Format7zFree/makefile	2009-10-28 03:29:24.000000000 +0300
@@ -284,6 +284,7 @@
 
 
 OBJS = \
+  rccrecode.o \
   wine_date_and_time.o \
   myGetTickCount.o \
   $(COMMON_OBJS) \
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Format7zFree/makefile.list p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Format7zFree/makefile.list
--- p7zip-9.04~dfsg.1/CPP/7zip/Bundles/Format7zFree/makefile.list	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Bundles/Format7zFree/makefile.list	2009-10-28 03:34:02.000000000 +0300
@@ -218,6 +218,7 @@
  ../../Crypto/ZipStrong.cpp
 
 SRCS_C=\
+ ../../../../C/rccrecode.c \
  ../../../../C/7zBuf2.c \
  ../../../../C/7zStream.c \
  ../../../../C/Aes.c \
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_amd64 p7zip-9.04~dfsg.1-ds/makefile.linux_amd64
--- p7zip-9.04~dfsg.1/makefile.linux_amd64	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_amd64	2009-10-28 03:54:47.000000000 +0300
@@ -12,7 +12,7 @@
 CC_SHARED=-fPIC
 LINK_SHARED=-fPIC -shared
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 OBJ_CRC32=$(OBJ_CRC32_C)
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_amd64_asm p7zip-9.04~dfsg.1-ds/makefile.linux_amd64_asm
--- p7zip-9.04~dfsg.1/makefile.linux_amd64_asm	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_amd64_asm	2009-10-28 03:54:47.000000000 +0300
@@ -13,7 +13,7 @@
 LINK_SHARED=-fPIC -shared
 ASM=yasm -f elf -m amd64
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 CPU=x64
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_amd64_asm_icc p7zip-9.04~dfsg.1-ds/makefile.linux_amd64_asm_icc
--- p7zip-9.04~dfsg.1/makefile.linux_amd64_asm_icc	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_amd64_asm_icc	2009-10-28 03:54:47.000000000 +0300
@@ -16,7 +16,7 @@
 LINK_SHARED=-fPIC -shared
 ASM=yasm -f elf -m amd64
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 CPU=x64
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_gcc_2.95_no_need_for_libstdc p7zip-9.04~dfsg.1-ds/makefile.linux_gcc_2.95_no_need_for_libstdc
--- p7zip-9.04~dfsg.1/makefile.linux_gcc_2.95_no_need_for_libstdc	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_gcc_2.95_no_need_for_libstdc	2009-10-28 03:54:47.000000000 +0300
@@ -11,7 +11,7 @@
 LINK_SHARED=-shared
 ASM=nasm -f elf
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 CPU=x86
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_s390x p7zip-9.04~dfsg.1-ds/makefile.linux_s390x
--- p7zip-9.04~dfsg.1/makefile.linux_s390x	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_s390x	2009-10-28 03:54:47.000000000 +0300
@@ -15,7 +15,7 @@
 CC_SHARED=-fPIC
 LINK_SHARED=-fPIC -shared
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 OBJ_CRC32=$(OBJ_CRC32_C)
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_x86_asm_gcc_4.X p7zip-9.04~dfsg.1-ds/makefile.linux_x86_asm_gcc_4.X
--- p7zip-9.04~dfsg.1/makefile.linux_x86_asm_gcc_4.X	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_x86_asm_gcc_4.X	2009-10-28 03:54:47.000000000 +0300
@@ -15,7 +15,7 @@
 LINK_SHARED=-fPIC -shared
 ASM=nasm -f elf
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 CPU=x86
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_x86_asm_gcc_4.X_fltk p7zip-9.04~dfsg.1-ds/makefile.linux_x86_asm_gcc_4.X_fltk
--- p7zip-9.04~dfsg.1/makefile.linux_x86_asm_gcc_4.X_fltk	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_x86_asm_gcc_4.X_fltk	2009-10-28 03:54:47.000000000 +0300
@@ -15,7 +15,7 @@
 LINK_SHARED=-fPIC -shared
 ASM=nasm -f elf
 
-LOCAL_LIBS=-lpthread `fltk-config --ldflags`
+LOCAL_LIBS=-lpthread -lrcc `fltk-config --ldflags`
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 CPU=x86
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_x86_asm_icc p7zip-9.04~dfsg.1-ds/makefile.linux_x86_asm_icc
--- p7zip-9.04~dfsg.1/makefile.linux_x86_asm_icc	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_x86_asm_icc	2009-10-28 03:54:47.000000000 +0300
@@ -16,7 +16,7 @@
 LINK_SHARED=-fPIC -shared
 ASM=nasm -f elf
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 CPU=x86
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_x86_ppc_alpha p7zip-9.04~dfsg.1-ds/makefile.linux_x86_ppc_alpha
--- p7zip-9.04~dfsg.1/makefile.linux_x86_ppc_alpha	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_x86_ppc_alpha	2009-10-28 03:54:47.000000000 +0300
@@ -14,7 +14,7 @@
 CC_SHARED=-fPIC
 LINK_SHARED=-fPIC -shared
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 OBJ_CRC32=$(OBJ_CRC32_C)
diff -dPNur p7zip-9.04~dfsg.1/makefile.linux_x86_ppc_alpha_gcc_4.X p7zip-9.04~dfsg.1-ds/makefile.linux_x86_ppc_alpha_gcc_4.X
--- p7zip-9.04~dfsg.1/makefile.linux_x86_ppc_alpha_gcc_4.X	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.linux_x86_ppc_alpha_gcc_4.X	2009-10-28 03:54:47.000000000 +0300
@@ -14,7 +14,7 @@
 CC_SHARED=-fPIC
 LINK_SHARED=-fPIC -shared
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 OBJ_CRC32=$(OBJ_CRC32_C)
diff -dPNur p7zip-9.04~dfsg.1/makefile.machine p7zip-9.04~dfsg.1-ds/makefile.machine
--- p7zip-9.04~dfsg.1/makefile.machine	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.machine	2009-10-28 03:29:24.000000000 +0300
@@ -14,7 +14,7 @@
 CC_SHARED=-fPIC
 LINK_SHARED=-fPIC -shared
 
-LOCAL_LIBS=-lpthread
+LOCAL_LIBS=-lpthread -lrcc
 LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
 
 OBJ_CRC32=$(OBJ_CRC32_C)
diff -dPNur p7zip-9.04~dfsg.1/makefile.rules p7zip-9.04~dfsg.1-ds/makefile.rules
--- p7zip-9.04~dfsg.1/makefile.rules	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/makefile.rules	2009-10-28 03:29:24.000000000 +0300
@@ -586,3 +586,5 @@
 7zCrcT8.o : ../../../../C/7zCrcT8.c
 	$(CC) $(CFLAGS) ../../../../C/7zCrcT8.c
 
+rccrecode.o : ../../../../C/rccrecode.c
+	$(CC) $(CFLAGS) ../../../../C/rccrecode.c
diff -dPNur p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipOut.cpp p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipOut.cpp
--- p7zip-9.04~dfsg.1/CPP/7zip/Archive/Zip/ZipOut.cpp	2009-06-27 18:18:14.000000000 +0400
+++ p7zip-9.04~dfsg.1-ds/CPP/7zip/Archive/Zip/ZipOut.cpp	2009-10-28 05:49:01.000000000 +0300
@@ -7,9 +7,24 @@
 #include "../../Common/OffsetStream.h"
 #include "../../Common/StreamUtils.h"
 
+#include "../../../../C/rccrecode.h"
+
 namespace NArchive {
 namespace NZip {
 
+COutArchive::COutArchive() {
+    rccctx = rcc_init();
+}
+
+COutArchive::~COutArchive() {
+    rcc_free(rccctx);
+}
+
+void COutArchive::Recode(CItem &item) {
+   char *rccrec = rcc_write(rccctx, (const char *)item.Name, item.Name.Length());
+   if (rccrec) item.Name = rccrec;
+}
+
 void COutArchive::Create(IOutStream *outStream)
 {
   if (!m_OutBuffer.Create(1 << 16))