58 sprintf(from,
"%s/%s", fromDir, fromName);
66 sprintf(sub,
"%s/%s", subDir, subName);
90 if (bacc && bsub && ffrom && fsub && fdest)
102 fread(bacc, 1, l, ffrom);
103 fwrite(bacc, 1, l, fdest);
124 s = ((0x3fc&(((
unsigned short)bsub[i+1])<<2)) | (bsub[i+0] >> 6));
125 d = ((0x3fc&(((
unsigned short)bacc[i+1])<<2)) | (bacc[i+0] >> 6));
127 bacc[i+0] = (bacc[i+0]&0x3F)|(d<<6);
130 s = ((0x3f0&(((
unsigned short)bsub[i+0])<<4)) | (bsub[i+3] >> 4));
131 d = ((0x3f0&(((
unsigned short)bacc[i+0])<<4)) | (bacc[i+3] >> 4));
133 bacc[i+0] = (bacc[i+0]&0xC0)|(d>>4);
134 bacc[i+3] = (bacc[i+3]&0x0F)|(d<<4);
136 s = ((0x3c0&(((
unsigned short)bsub[i+3])<<6)) | (bsub[i+2] >> 2));
137 d = ((0x3c0&(((
unsigned short)bacc[i+3])<<6)) | (bacc[i+2] >> 2));
139 bacc[i+2] = (bacc[i+2]&0x03)|(d<<2);
140 bacc[i+3] = (bacc[i+3]&0xF0)|(d>>6);
142 s = ((0x300&(((
unsigned short)bsub[i+2])<<8)) | (bsub[i+5]));
143 d = ((0x300&(((
unsigned short)bacc[i+2])<<8)) | (bacc[i+5]));
145 bacc[i+2] = (bacc[i+2]&0xFC)|(d>>8);
148 s = ((0x3fc&(((
unsigned short)bsub[i+4])<<2)) | (bsub[i+7] >> 6));
149 d = ((0x3fc&(((
unsigned short)bacc[i+4])<<2)) | (bacc[i+7] >> 6));
152 bacc[i+7] = (bacc[i+7]&0x3F)|(d<<6);
154 s = ((0x3f0&(((
unsigned short)bsub[i+7])<<4)) | (bsub[i+6] >> 4));
155 d = ((0x3f0&(((
unsigned short)bacc[i+7])<<4)) | (bacc[i+6] >> 4));
157 bacc[i+6] = (bacc[i+6]&0x0F)|(d<<4);
158 bacc[i+7] = (bacc[i+7]&0xC0)|(d>>4);
160 s = ((0x3c0&(((
unsigned short)bsub[i+6])<<6)) | (bsub[i+9] >> 2));
161 d = ((0x3c0&(((
unsigned short)bacc[i+6])<<6)) | (bacc[i+9] >> 2));
163 bacc[i+6] = (bacc[i+6]&0xF0)|(d>>6);
164 bacc[i+9] = (bacc[i+9]&0x03)|(d<<2);
166 s = ((0x300&(((
unsigned short)bsub[i+9])<<8)) | (bsub[i+8]));
167 d = ((0x300&(((
unsigned short)bacc[i+9])<<8)) | (bacc[i+8]));
170 bacc[i+9] = (bacc[i+9]&0xFC)|(d>>8);
177 s = ((0xFF0&(((
unsigned short)bsub[i+1])<<4)) | (bsub[i+0] >> 4));
178 d = ((0xFF0&(((
unsigned short)bacc[i+1])<<4)) | (bacc[i+0] >> 4));
180 bacc[i+0] = (bacc[i+0]&0x0F)|(d<<4);
183 s = ((0xF00&(((
unsigned short)bsub[i+0])<<8)) | (bsub[i+3] ));
184 d = ((0xF00&(((
unsigned short)bacc[i+0])<<8)) | (bacc[i+3] ));
186 bacc[i+0] = (bacc[i+0]&0xF0)|(d>>8);
189 s = ((0xFF0&(((
unsigned short)bsub[i+2])<<4)) | (bsub[i+5] >> 4));
190 d = ((0xFF0&(((
unsigned short)bacc[i+2])<<4)) | (bacc[i+5] >> 4));
193 bacc[i+5] = (bacc[i+5]&0x0F)|(d<<4);
195 s = ((0xF00&(((
unsigned short)bsub[i+5])<<8)) | (bsub[i+4] ));
196 d = ((0xF00&(((
unsigned short)bacc[i+5])<<8)) | (bacc[i+4] ));
199 bacc[i+5] = (bacc[i+5]&0xF0)|(d>>8);
206 s = ((
unsigned short)(bsub[i+ 1]) << 6) | (bsub[i+ 0] >> 2);
207 d = ((
unsigned short)(bacc[i+ 1]) << 6) | (bacc[i+ 0] >> 2);
209 bacc[i+ 0] = (bacc[i+ 0]&0x03)|(d<< 2);
212 s = ((
unsigned short)(bsub[i+ 0] & 0x03) << 12) | ((
unsigned short)(bsub[i+ 3]) << 4) | (bsub[i+ 2] >> 4);
213 d = ((
unsigned short)(bacc[i+ 0] & 0x03) << 12) | ((
unsigned short)(bacc[i+ 3]) << 4) | (bacc[i+ 2] >> 4);
215 bacc[i+ 0] = (bacc[i+ 0]&0xFC)|(d>>12);
216 bacc[i+ 2] = (bacc[i+ 2]&0x0F)|(d<< 4);
219 s = ((
unsigned short)(bsub[i+ 2] & 0x0F) << 10) | ((
unsigned short)(bsub[i+ 5]) << 2) | (bsub[i+ 4] >> 6);
220 d = ((
unsigned short)(bacc[i+ 2] & 0x0F) << 10) | ((
unsigned short)(bacc[i+ 5]) << 2) | (bacc[i+ 4] >> 6);
222 bacc[i+ 2] = (bacc[i+ 2]&0xF0)|(d>>10);
223 bacc[i+ 4] = (bacc[i+ 4]&0x3F)|(d<< 6);
226 s = ((
unsigned short)(bsub[i+ 4] & 0x3F) << 8) | (bsub[i+ 7]);
227 d = ((
unsigned short)(bacc[i+ 4] & 0x3F) << 8) | (bacc[i+ 7]);
229 bacc[i+ 4] = (bacc[i+ 4]&0xC0)|(d>> 8);
232 s = ((
unsigned short)(bsub[i+ 6]) << 6) | (bsub[i+ 9] >> 2);
233 d = ((
unsigned short)(bacc[i+ 6]) << 6) | (bacc[i+ 9] >> 2);
236 bacc[i+ 9] = (bacc[i+ 9]&0x03)|(d<< 2);
238 s = ((
unsigned short)(bsub[i+ 9] & 0x03) << 12) | ((
unsigned short)(bsub[i+ 8]) << 4) | (bsub[i+11] >> 4);
239 d = ((
unsigned short)(bacc[i+ 9] & 0x03) << 12) | ((
unsigned short)(bacc[i+ 8]) << 4) | (bacc[i+11] >> 4);
242 bacc[i+ 9] = (bacc[i+ 9]&0xFC)|(d>>12);
243 bacc[i+11] = (bacc[i+11]&0x0F)|(d<< 4);
245 s = ((
unsigned short)(bsub[i+11] & 0x0F) << 10) | ((
unsigned short)(bsub[i+10]) << 2) | (bsub[i+13] >> 6);
246 d = ((
unsigned short)(bacc[i+11] & 0x0F) << 10) | ((
unsigned short)(bacc[i+10]) << 2) | (bacc[i+13] >> 6);
249 bacc[i+11] = (bacc[i+11]&0xF0)|(d>>10);
250 bacc[i+13] = (bacc[i+13]&0x3F)|(d<< 6);
252 s = ((
unsigned short)(bsub[i+13] & 0x3F) << 8) | (bsub[i+12]);
253 d = ((
unsigned short)(bacc[i+13] & 0x3F) << 8) | (bacc[i+12]);
256 bacc[i+13] = (bacc[i+13]&0xC0)|(d>> 8);
270 if (bacc)
free(bacc);
271 if (bsub)
free(bsub);