Guest User

Untitled

a guest
Jul 17th, 2011
154
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13. main()
  14. {
  15.  
  16.  
  17. unsigned int i=0,s=0,zero=0,count=0,zero1=0,k=0,t=0,total=0,one=0,eight=0,c=0;
  18. unsigned int w=0,p=0,v=0,h=0,range=0,c1=0;
  19.  
  20.  
  21. unsigned int jum=0x00;
  22. unsigned int jum1=0x00;
  23.  
  24.  
  25. unsigned char swap=0x02;
  26. unsigned char hash1[300];
  27. unsigned char temp[300];
  28. unsigned char temp1[300];
  29. unsigned char hex[260][14];
  30. unsigned char run1[400]; //56
  31. unsigned char run[300]; //7
  32. unsigned char run2[300]; //7
  33. unsigned char crap[300];
  34. unsigned char crap1[300];
  35. unsigned char crap2[268];
  36. unsigned char guard[14];
  37. unsigned char crap3[468];
  38. unsigned char guard1[14];
  39. memset(crap3,0x05,sizeof(crap3));
  40. unsigned char hash[300];
  41. unsigned char table[80000];
  42. memset(guard,0x05,sizeof(guard));
  43. memset(guard,0x05,sizeof(guard));
  44.  
  45.  
  46. unsigned int address=0,address2=0,address3=0,comcount=0,clocker=0;
  47.  
  48.  
  49. long fileoffset=0;
  50. long testoffset=0; //large
  51. //long fileoffset=81234689;//594824,594832
  52. //long testoffset=81234689; //min 1
  53. long filecheck=0;
  54. long overcheck=0;
  55.  
  56. unsigned char ch=0;
  57. unsigned char ch1=0;
  58. unsigned char ch2=0;
  59. unsigned char ch3=0;
  60. unsigned char table2[480];
  61. unsigned char table3[480];
  62.  
  63. unsigned char dump[480];
  64.  
  65. unsigned int overlimit=0;
  66. unsigned int chi=0;
  67. unsigned int chi1=0;
  68. unsigned int chi2=0;
  69. unsigned int runc=0,runc1=0;
  70.  
  71.  
  72. unsigned int place=0x00;
  73. unsigned int place1=0x00;
  74.  
  75. unsigned int pd=0,pd1=0;
  76. unsigned int pd2=0,pd3=0;
  77.  
  78. unsigned char guard2[14];
  79. unsigned int stepinpro=0;
  80.  
  81. unsigned int e0[48],e1[48],e2[48],e3[48],e4[48],e5[48],e6[48],e7[48];
  82.  
  83. memset(e0,0x00,sizeof(e0));
  84. memset(e1,0x00,sizeof(e1));
  85. memset(e2,0x00,sizeof(e2));
  86. memset(e3,0x00,sizeof(e3));
  87. memset(e4,0x00,sizeof(e4));
  88. memset(e5,0x00,sizeof(e5));
  89. memset(e6,0x00,sizeof(e6));
  90. memset(e7,0x00,sizeof(e7));
  91.  
  92. t=0;
  93. for(i=0;i<34;i++) {
  94. e0[i] = (unsigned char)(t);
  95. t=t+8;
  96. }
  97. t=1;
  98. for(i=0;i<34;i++) {
  99. e1[i] = (unsigned char)(t);
  100. t=t+8;
  101. }
  102. t=2;
  103. for(i=0;i<34;i++) {
  104. e2[i] = (unsigned char)(t);
  105. t=t+8;
  106. }
  107. t=3;
  108. for(i=0;i<34;i++) {
  109. e3[i] = (unsigned char)(t);
  110. t=t+8;
  111. }
  112. t=4;
  113. for(i=0;i<34;i++) {
  114. e4[i] = (unsigned char)(t);
  115. t=t+8;
  116. }
  117. t=5;
  118. for(i=0;i<34;i++) {
  119. e5[i] = (unsigned char)(t);
  120. t=t+8;
  121. }
  122. t=6;
  123. for(i=0;i<34;i++) {
  124. e6[i] = (unsigned char)(t);
  125. t=t+8;
  126. }
  127. t=7;
  128. for(i=0;i<34;i++) {
  129. e7[i] = (unsigned char)(t);
  130. t=t+8;
  131. }
  132.  
  133.  
  134. FILE *in,*out,*clear,*tab;//,*tab;//,*over;//,*tab;
  135.  
  136. tab = fopen("table.txt","wb");
  137. //clear = fopen("clear.txt","wb");
  138.  
  139.  
  140. for(i=0;i<=0xff;i++) {
  141. k=i;
  142. hex[i][7] = k&0x01;
  143. k=(k>>1);
  144. hex[i][6] = k&0x01;
  145. k=(k>>1);
  146. hex[i][5] = k&0x01;
  147. k=(k>>1);
  148. hex[i][4] = k&0x01;
  149. k=(k>>1);
  150. hex[i][3] = k&0x01;
  151. k=(k>>1);
  152. hex[i][2] = k&0x01;
  153. k=(k>>1);
  154. hex[i][1] = k&0x01;
  155. k=(k>>1);
  156. hex[i][0] = k&0x01;
  157. }
  158.  
  159. printf("Running program\n");
  160. k=0;
  161. s=1;
  162. t=0;
  163. w=0;
  164. count=0;
  165. for(p=0;p<0x0110;) {
  166. table[w+0] = k;
  167. table[w+1] = p;
  168. table[w+2] = (unsigned char)(k+0x01);
  169. table[w+3] = p;
  170. table[w+4] = (unsigned char)(k+0x02);
  171. table[w+5] = p;
  172. table[w+6] = (unsigned char)(k+0x03);
  173. table[w+7] = p;
  174. table[w+8] = (unsigned char)(k+0x04);
  175. table[w+9] = p;
  176. table[w+10] = (unsigned char)(k+0x05);
  177. table[w+11] = p;
  178. table[w+12] = (unsigned char)(k+0x06);
  179. table[w+13] = p;
  180. table[w+14] = (unsigned char)(k+0x07);
  181. table[w+15] = p;
  182. w=w+16;
  183. k=k+8;
  184. if(k>=0xff) {
  185. k=s;
  186. p=(p+0x01);
  187. s++;
  188. count++;
  189. }
  190. if(s >= 8) {
  191. s=0;
  192. }
  193. if(t >= 0x08) {
  194. t=0;
  195. p=(p&0xf0);
  196. }
  197. if(count >= 8) {
  198. count=0;
  199. p=p+0x10;
  200. p=(p&0xfff0);
  201. }
  202. k=(unsigned char)(k);
  203. }
  204. for(i=0;i<32;i++) {
  205. table[w+1] = 0x00;
  206. w++;
  207. }
  208. k=0;
  209. s=1;
  210. t=0;
  211. w=0;
  212. count=0;
  213. for(i=0;i<=0xffff;i++) {
  214. fprintf(tab,"%c",table[(unsigned short)(i)]);
  215. }
  216. fclose(tab);
  217. //(((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  218. //(((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  219. //(((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  220. //FIX DATA INPUT TO COMPRE
  221.  
  222.  
  223.  
  224. in = fopen("bin.txt","rb");
  225. out = fopen("bin1.txt","wb");
  226. clear = fopen("clear.txt","wb");
  227.  
  228. fseek(in,0,SEEK_END);
  229. fileoffset = ftell(in);
  230. rewind(in);
  231. if(fileoffset == 0) {
  232. printf("error at fileoffset get\n");
  233. exit(1);
  234. }
  235.  
  236. s=0;
  237. for(;;) {
  238. filecheck = ftell(in);
  239. if((filecheck+8) > fileoffset) {
  240. ch = fgetc(in);
  241. if((ch&0x08) == 0x08) {
  242. fprintf(out,"%c",(ch&0xf7));
  243. }
  244. if((ch&0x08) == 0x00) {
  245. fprintf(out,"%c",(ch&0xf7));
  246. }
  247. ch=0;
  248. ch = ch+(hash[0]);
  249. ch = ch+(hash[1]<<1);
  250. ch = ch+(hash[2]<<2);
  251. ch = ch+(hash[3]<<3);
  252. ch = ch+(hash[4]<<4);
  253. ch = ch+(hash[5]<<5);
  254. ch = ch+(hash[6]<<6);
  255. ch = ch+(hash[7]<<7);
  256. fprintf(clear,"%c",ch);
  257.  
  258. goto star;
  259. }
  260.  
  261. for(i=0;i<8;i++) {
  262. temp[i] = fgetc(in);
  263. }
  264. s=0;
  265. for(i=0;i<8;i=i+2) {
  266. if((temp[i+1]&0x08) == 0x08) {
  267. hash[s] = 0x01;
  268. s++;
  269. //fprintf(clear,"%c",0x01);
  270. }
  271. if((temp[i+1]&0x08) == 0x00) {
  272. //fprintf(clear,"%c",0x00);
  273. hash[s] = 0x00;
  274. s++;
  275. }
  276. temp[i+1] = (temp[i+1]&0xf7);
  277. fprintf(out,"%c%c",temp[i+0],temp[i+1]);
  278. }
  279. ch=0;
  280. ch = ch+(hash[0]);
  281. ch = ch+(hash[1]<<1);
  282. ch = ch+(hash[2]<<2);
  283. ch = ch+(hash[3]<<3);
  284. ch = ch+(hash[4]<<4);
  285. ch = ch+(hash[5]<<5);
  286. ch = ch+(hash[6]<<6);
  287. ch = ch+(hash[7]<<7);
  288. fprintf(clear,"%c",ch);
  289. memset(hash,0x00,sizeof(hash));
  290.  
  291.  
  292. }
  293.  
  294. star:
  295. fclose(in);
  296. fclose(out);
  297. fclose(clear);
  298.  
  299. printf("Fixed table\n");
  300.  
  301. swap=0x02;
  302. count=0;
  303. jum=0x00;
  304. clocker = 10;
  305. comcount=0;
  306. ////////////////////MAIN LOOP MAIN LOOP
  307. stat:
  308. if(swap == 0x00) {
  309. fileoffset = ftell(out);
  310. if(fileoffset == 0) {
  311. printf("distance error\n");
  312. exit(1);
  313. }
  314. //if(fileoffset <= 500) goto endy;
  315. if(clocker <= 2) goto endy;
  316. stepinpro++;
  317. printf("%ld:::fileoffset\n",fileoffset);
  318. fclose(in);
  319. fclose(out);
  320. out = fopen("temp.txt","wb");
  321. in = fopen("temp1.txt","rb");
  322. swap = swap ^0x01;
  323. goto passed;
  324. }
  325. if(swap == 0x01) {
  326. fileoffset = ftell(out);
  327. if(fileoffset == 0) {
  328. printf("distance error\n");
  329. exit(1);
  330. }
  331. //if(fileoffset <= 500) goto endy;
  332. if(clocker <= 2) goto endy;
  333. stepinpro++;
  334. printf("%ld:::fileoffset\n",fileoffset);
  335. fclose(in);
  336. fclose(out);
  337. out = fopen("temp1.txt","wb");
  338. in = fopen("temp.txt","rb");
  339. swap = swap ^0x01;
  340. goto passed;
  341. }
  342. if(swap == 0x02) {
  343. place=0x00;
  344. in = fopen("bin1.txt","rb");
  345. out = fopen("temp.txt","wb");
  346. swap = 0x01;
  347. fseek(in,0,SEEK_END);
  348. fileoffset = ftell(in);
  349. testoffset = fileoffset;
  350. rewind(in);
  351. if(fileoffset == 0) {
  352. printf("error at fileoffset get\n");
  353. exit(1);
  354. }
  355.  
  356. }
  357. passed:
  358. /////////////CONTINUE
  359. ///////////////////////////////////////////////////
  360. //////////////////////////////////////////////////
  361. ///////////////////////////////////////////////////
  362. ///////////////////////////////////////////////////
  363. ///////////////////////////////////////////////////
  364. ///////////////////////////////////////////////////
  365. //////////////////////////////////////////////////
  366. ///////////////////////////////////////////////////
  367. ///////////////////////////////////////////////////
  368. //////////////////////////////////////////////////
  369. ///////////////////WORKING LOOP WORKING LOOP
  370. clocker=0;
  371. count=0;
  372. end1:
  373. //printf("%d\n",clocker);
  374.  
  375.  
  376.  
  377. filecheck = ftell(in);
  378. if((filecheck+32) > fileoffset) {
  379. place = (filecheck+32)-fileoffset;
  380. place = (32-place);
  381. printf("filecheck value = %d,,should be %d,with place %d\n",filecheck,fileoffset,place);
  382. for(i=0;i<place;i++) {
  383. ch = fgetc(in);
  384. fprintf(out,"%c",ch);
  385. }
  386. goto stat;
  387. }
  388. //((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  389. //((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  390. //((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  391. //16 * 8 = 128
  392. memset(temp,0x06,sizeof(temp));
  393. memset(temp1,0x07,sizeof(temp1));
  394. memset(hash,0x08,sizeof(hash));
  395. memset(hash1,0x09,sizeof(hash1));
  396. memset(table2,0x0a,sizeof(table2));
  397. memset(table3,0x0b,sizeof(table3));
  398. memset(crap,0x0c,sizeof(crap));
  399. memset(crap1,0x0d,sizeof(crap1));
  400. memset(crap2,0x0e,sizeof(crap2));
  401. memset(crap3,0x0f,sizeof(crap3));
  402. memset(run1,0x10,sizeof(run1));
  403.  
  404. place=0x00;
  405. place1=0x00;
  406. jum=0x00;
  407. jum1=0x00;
  408.  
  409.  
  410. for(i=0;i<32;i++) {
  411. temp[i] = fgetc(in);
  412. }
  413. //test run used for second stage, first need a patch
  414. s=0;
  415. for(i=0;i<32;i=i+2) {
  416. if(temp[i] == 0xff) temp[i] = 0xaa; //set patch up to to change ff to aa55aa55, when expand fix at end
  417.  
  418. }
  419.  
  420. //Verifed probelable doesn't crash, and quick to expand after full compress to verfier, RAM ECC checking etc
  421. //ups, add for loop to if block
  422.  
  423. /*
  424. for(i=0;i<32;i++) {
  425. table2[i] = temp[i]; //used to verfier compress/expand accurate
  426.  
  427. }
  428. */
  429. //6bit 2left
  430. //exit(1);
  431.  
  432.  
  433. //1,2,3,4,5,6,7,8 = 136 total
  434. //10001000
  435.  
  436. //8 numbers per group
  437. //64 groups size
  438. ///////////////////////////////////////////////////
  439. ///////////////////////////////////////////////////
  440. //////////////////////////////////////////////////
  441. //memset(run1,0x05,sizeof(run1));
  442.  
  443. memset(crap3,0x00,sizeof(crap3));
  444. s=0;
  445. for(i=0;i<32;i=i+2) {
  446. address =(temp[i+0]<<8);
  447. address2 = temp[i+1];
  448. address = address+address2;
  449. run[s] = 0x00;
  450. if((address&0x01) == 0x01) {
  451. address = address-1;
  452. run[s] = 0x01;
  453. }
  454. s++;
  455. //printf("%4X\n",address);
  456. crap3[i+0] = table[(unsigned short)(address)];
  457. crap3[i+1] = table[(unsigned short)(address+1)];
  458. //printf("%8X:\n",address);
  459. }
  460.  
  461.  
  462. w=0;
  463. s=0;
  464. for(t=0;t<32;t=t+2) {
  465. ch=ch1=ch2=ch3=0;
  466. ch2 = (unsigned char)(crap3[t+1]&0x0f);
  467. if(ch2 == 0x00) {
  468. if(crap3[t+0] > 0 && crap3[t+0] < 8 || crap3[t+0] == 0) i=0;
  469. if(crap3[t+0] >= 8 && crap3[t+0] < 16) i=1;
  470. if(crap3[t+0] >= 16 && crap3[t+0] < 24) i=2;
  471. if(crap3[t+0] >= 24 && crap3[t+0] < 32) i=3;
  472. if(crap3[t+0] >= 32 && crap3[t+0] < 40) i=4;
  473. if(crap3[t+0] >= 40 && crap3[t+0] < 48) i=5;
  474. if(crap3[t+0] >= 48 && crap3[t+0] < 56) i=6;
  475. if(crap3[t+0] >= 56 && crap3[t+0] < 64) i=7;
  476. if(crap3[t+0] >= 64 && crap3[t+0] < 72) i=8;
  477. if(crap3[t+0] >= 72 && crap3[t+0] < 80) i=9;
  478. if(crap3[t+0] >= 80 && crap3[t+0] < 88) i=10;
  479. if(crap3[t+0] >= 88 && crap3[t+0] < 96) i=11;
  480. if(crap3[t+0] >= 96 && crap3[t+0] < 104) i=12;
  481. if(crap3[t+0] >= 104 && crap3[t+0] < 112) i=13;
  482. if(crap3[t+0] >= 112 && crap3[t+0] < 120) i=14;
  483. if(crap3[t+0] >= 120 && crap3[t+0] < 128) i=15;
  484. if(crap3[t+0] >= 128 && crap3[t+0] < 136) i=16;
  485. if(crap3[t+0] >= 136 && crap3[t+0] < 144) i=17;
  486. if(crap3[t+0] >= 144 && crap3[t+0] < 152) i=18;
  487. if(crap3[t+0] >= 152 && crap3[t+0] < 160) i=19;
  488. if(crap3[t+0] >= 160 && crap3[t+0] < 168) i=20;
  489. if(crap3[t+0] >= 168 && crap3[t+0] < 176) i=21;
  490. if(crap3[t+0] >= 176 && crap3[t+0] < 184) i=22;
  491. if(crap3[t+0] >= 184 && crap3[t+0] < 192) i=23;
  492. if(crap3[t+0] >= 192 && crap3[t+0] < 200) i=24;
  493. if(crap3[t+0] >= 200 && crap3[t+0] < 208) i=25;
  494. if(crap3[t+0] >= 208 && crap3[t+0] < 216) i=26;
  495. if(crap3[t+0] >= 216 && crap3[t+0] < 224) i=27;
  496. if(crap3[t+0] >= 224 && crap3[t+0] < 232) i=28;
  497. if(crap3[t+0] >= 232 && crap3[t+0] < 240) i=29;
  498. if(crap3[t+0] >= 240 && crap3[t+0] < 248) i=30;
  499. if(crap3[t+0] >= 248 && crap3[t+0] < 255 || crap3[t+0] == 0xff) i=31;
  500. ch = (unsigned char)(i); //32 number out of area
  501. if(ch == 0) i=0;
  502. if(ch == 1) i=8;
  503. if(ch == 2) i=16;
  504. if(ch == 3) i=24;
  505. if(ch == 4) i=32;
  506. if(ch == 5) i=40;
  507. if(ch == 6) i=48;
  508. if(ch == 7) i=56;
  509. if(ch == 8) i=64;
  510. if(ch == 9) i=72;
  511. if(ch == 10) i=80;
  512. if(ch == 11) i=88;
  513. if(ch == 12) i=96;
  514. if(ch == 13) i=104;
  515. if(ch == 14) i=112;
  516. if(ch == 15) i=120;
  517. if(ch == 16) i=128;
  518. if(ch == 17) i=136;
  519. if(ch == 18) i=144;
  520. if(ch == 19) i=152;
  521. if(ch == 20) i=160;
  522. if(ch == 21) i=168;
  523. if(ch == 22) i=176;
  524. if(ch == 23) i=184;
  525. if(ch == 24) i=192;
  526. if(ch == 25) i=200;
  527. if(ch == 26) i=208;
  528. if(ch == 27) i=216;
  529. if(ch == 28) i=224;
  530. if(ch == 29) i=232;
  531. if(ch == 30) i=240;
  532. if(ch == 31) i=248;
  533. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  534. ch3 = (crap3[t+1]&0xf0); //msb of second value
  535. ch3 = (ch3>>4);
  536. goto endt;
  537. }
  538. if(ch2 == 0x01) {
  539. if(crap3[t+0] >= 1 && crap3[t+0] < 9) i=0;
  540. if(crap3[t+0] >= 9 && crap3[t+0] < 17) i=1;
  541. if(crap3[t+0] >= 17 && crap3[t+0] < 25) i=2;
  542. if(crap3[t+0] >= 25 && crap3[t+0] < 33) i=3;
  543. if(crap3[t+0] >= 33 && crap3[t+0] < 41) i=4;
  544. if(crap3[t+0] >= 41 && crap3[t+0] < 49) i=5;
  545. if(crap3[t+0] >= 49 && crap3[t+0] < 57) i=6;
  546. if(crap3[t+0] >= 57 && crap3[t+0] < 65) i=7;
  547. if(crap3[t+0] >= 65 && crap3[t+0] < 73) i=8;
  548. if(crap3[t+0] >= 73 && crap3[t+0] < 81) i=9;
  549. if(crap3[t+0] >= 81 && crap3[t+0] < 89) i=10;
  550. if(crap3[t+0] >= 89 && crap3[t+0] < 97) i=11;
  551. if(crap3[t+0] >= 97 && crap3[t+0] < 105) i=12;
  552. if(crap3[t+0] >= 105 && crap3[t+0] < 113) i=13;
  553. if(crap3[t+0] >= 113 && crap3[t+0] < 121) i=14;
  554. if(crap3[t+0] >= 121 && crap3[t+0] < 129) i=15;
  555. if(crap3[t+0] >= 129 && crap3[t+0] < 137) i=16;
  556. if(crap3[t+0] >= 137 && crap3[t+0] < 145) i=17;
  557. if(crap3[t+0] >= 145 && crap3[t+0] < 153) i=18;
  558. if(crap3[t+0] >= 153 && crap3[t+0] < 161) i=19;
  559. if(crap3[t+0] >= 161 && crap3[t+0] < 169) i=20;
  560. if(crap3[t+0] >= 169 && crap3[t+0] < 177) i=21;
  561. if(crap3[t+0] >= 177 && crap3[t+0] < 185) i=22;
  562. if(crap3[t+0] >= 185 && crap3[t+0] < 193) i=23;
  563. if(crap3[t+0] >= 193 && crap3[t+0] < 201) i=24;
  564. if(crap3[t+0] >= 201 && crap3[t+0] < 209) i=25;
  565. if(crap3[t+0] >= 209 && crap3[t+0] < 217) i=26;
  566. if(crap3[t+0] >= 217 && crap3[t+0] < 225) i=27;
  567. if(crap3[t+0] >= 225 && crap3[t+0] < 233) i=28;
  568. if(crap3[t+0] >= 233 && crap3[t+0] < 241) i=29;
  569. if(crap3[t+0] >= 241 && crap3[t+0] < 249) i=30;
  570. if(crap3[t+0] >= 249 && crap3[t+0] < 255 || crap3[t+0] == 0 || crap3[t+0] == 0xff) i=31;
  571. ch = (unsigned char)(i); //32 number out of area
  572. if(ch == 0) i=1;
  573. if(ch == 1) i=9;
  574. if(ch == 2) i=17;
  575. if(ch == 3) i=25;
  576. if(ch == 4) i=33;
  577. if(ch == 5) i=41;
  578. if(ch == 6) i=49;
  579. if(ch == 7) i=57;
  580. if(ch == 8) i=65;
  581. if(ch == 9) i=73;
  582. if(ch == 10) i=81;
  583. if(ch == 11) i=89;
  584. if(ch == 12) i=97;
  585. if(ch == 13) i=105;
  586. if(ch == 14) i=113;
  587. if(ch == 15) i=121;
  588. if(ch == 16) i=129;
  589. if(ch == 17) i=137;
  590. if(ch == 18) i=145;
  591. if(ch == 19) i=153;
  592. if(ch == 20) i=161;
  593. if(ch == 21) i=169;
  594. if(ch == 22) i=177;
  595. if(ch == 23) i=185;
  596. if(ch == 24) i=193;
  597. if(ch == 25) i=201;
  598. if(ch == 26) i=209;
  599. if(ch == 27) i=217;
  600. if(ch == 28) i=225;
  601. if(ch == 29) i=233;
  602. if(ch == 30) i=241;
  603. if(ch == 31) i=249;
  604. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  605. ch3 = (crap3[t+1]&0xf0); //msb of second value
  606. ch3 = (ch3>>4);
  607. goto endt;
  608. }
  609. if(ch2 == 0x02) {
  610. if(crap3[t+0] >= 2 && crap3[t+0] < 10) i=0;
  611. if(crap3[t+0] >= 10 && crap3[t+0] < 18) i=1;
  612. if(crap3[t+0] >= 18 && crap3[t+0] < 26) i=2;
  613. if(crap3[t+0] >= 26 && crap3[t+0] < 34) i=3;
  614. if(crap3[t+0] >= 34 && crap3[t+0] < 42) i=4;
  615. if(crap3[t+0] >= 42 && crap3[t+0] < 50) i=5;
  616. if(crap3[t+0] >= 50 && crap3[t+0] < 58) i=6;
  617. if(crap3[t+0] >= 58 && crap3[t+0] < 66) i=7;
  618. if(crap3[t+0] >= 66 && crap3[t+0] < 74) i=8;
  619. if(crap3[t+0] >= 74 && crap3[t+0] < 82) i=9;
  620. if(crap3[t+0] >= 82 && crap3[t+0] < 90) i=10;
  621. if(crap3[t+0] >= 90 && crap3[t+0] < 98) i=11;
  622. if(crap3[t+0] >= 98 && crap3[t+0] < 106) i=12;
  623. if(crap3[t+0] >= 106 && crap3[t+0] < 114) i=13;
  624. if(crap3[t+0] >= 114 && crap3[t+0] < 122) i=14;
  625. if(crap3[t+0] >= 122 && crap3[t+0] < 130) i=15;
  626. if(crap3[t+0] >= 130 && crap3[t+0] < 138) i=16;
  627. if(crap3[t+0] >= 138 && crap3[t+0] < 146) i=17;
  628. if(crap3[t+0] >= 146 && crap3[t+0] < 154) i=18;
  629. if(crap3[t+0] >= 154 && crap3[t+0] < 162) i=19;
  630. if(crap3[t+0] >= 162 && crap3[t+0] < 170) i=20;
  631. if(crap3[t+0] >= 170 && crap3[t+0] < 178) i=21;
  632. if(crap3[t+0] >= 178 && crap3[t+0] < 186) i=22;
  633. if(crap3[t+0] >= 186 && crap3[t+0] < 194) i=23;
  634. if(crap3[t+0] >= 194 && crap3[t+0] < 202) i=24;
  635. if(crap3[t+0] >= 202 && crap3[t+0] < 210) i=25;
  636. if(crap3[t+0] >= 210 && crap3[t+0] < 218) i=26;
  637. if(crap3[t+0] >= 218 && crap3[t+0] < 226) i=27;
  638. if(crap3[t+0] >= 226 && crap3[t+0] < 234) i=28;
  639. if(crap3[t+0] >= 234 && crap3[t+0] < 242) i=29;
  640. if(crap3[t+0] >= 242 && crap3[t+0] < 250) i=30;
  641. if(crap3[t+0] >= 250 && crap3[t+0] < 255 || crap3[t+0] == 0xff || crap3[t+0] == 0 || crap3[t+0] > 0 && crap3[t+0] < 2) i=31;
  642. ch = (unsigned char)(i); //32 number out of area
  643. if(ch == 0) i=2;
  644. if(ch == 1) i=10;
  645. if(ch == 2) i=18;
  646. if(ch == 3) i=26;
  647. if(ch == 4) i=34;
  648. if(ch == 5) i=42;
  649. if(ch == 6) i=50;
  650. if(ch == 7) i=58;
  651. if(ch == 8) i=66;
  652. if(ch == 9) i=74;
  653. if(ch == 10) i=82;
  654. if(ch == 11) i=90;
  655. if(ch == 12) i=98;
  656. if(ch == 13) i=106;
  657. if(ch == 14) i=114;
  658. if(ch == 15) i=122;
  659. if(ch == 16) i=130;
  660. if(ch == 17) i=138;
  661. if(ch == 18) i=146;
  662. if(ch == 19) i=154;
  663. if(ch == 20) i=162;
  664. if(ch == 21) i=170;
  665. if(ch == 22) i=178;
  666. if(ch == 23) i=186;
  667. if(ch == 24) i=194;
  668. if(ch == 25) i=202;
  669. if(ch == 26) i=210;
  670. if(ch == 27) i=218;
  671. if(ch == 28) i=226;
  672. if(ch == 29) i=234;
  673. if(ch == 30) i=242;
  674. if(ch == 31) i=250;
  675. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  676. ch3 = (crap3[t+1]&0xf0); //msb of second value
  677. ch3 = (ch3>>4);
  678. goto endt;
  679. }
  680. if(ch2 == 0x03) {
  681. if(crap3[t+0] >= 3 && crap3[t+0] < 11) i=0;
  682. if(crap3[t+0] >= 11 && crap3[t+0] < 19) i=1;
  683. if(crap3[t+0] >= 19 && crap3[t+0] < 27) i=2;
  684. if(crap3[t+0] >= 27 && crap3[t+0] < 35) i=3;
  685. if(crap3[t+0] >= 35 && crap3[t+0] < 43) i=4;
  686. if(crap3[t+0] >= 43 && crap3[t+0] < 51) i=5;
  687. if(crap3[t+0] >= 51 && crap3[t+0] < 59) i=6;
  688. if(crap3[t+0] >= 59 && crap3[t+0] < 67) i=7;
  689. if(crap3[t+0] >= 67 && crap3[t+0] < 75) i=8;
  690. if(crap3[t+0] >= 75 && crap3[t+0] < 83) i=9;
  691. if(crap3[t+0] >= 83 && crap3[t+0] < 91) i=10;
  692. if(crap3[t+0] >= 91 && crap3[t+0] < 99) i=11;
  693. if(crap3[t+0] >= 99 && crap3[t+0] < 107) i=12;
  694. if(crap3[t+0] >= 107 && crap3[t+0] < 115) i=13;
  695. if(crap3[t+0] >= 115 && crap3[t+0] < 123) i=14;
  696. if(crap3[t+0] >= 123 && crap3[t+0] < 131) i=15;
  697. if(crap3[t+0] >= 131 && crap3[t+0] < 139) i=16;
  698. if(crap3[t+0] >= 139 && crap3[t+0] < 147) i=17;
  699. if(crap3[t+0] >= 147 && crap3[t+0] < 155) i=18;
  700. if(crap3[t+0] >= 155 && crap3[t+0] < 163) i=19;
  701. if(crap3[t+0] >= 163 && crap3[t+0] < 171) i=20;
  702. if(crap3[t+0] >= 171 && crap3[t+0] < 179) i=21;
  703. if(crap3[t+0] >= 179 && crap3[t+0] < 187) i=22;
  704. if(crap3[t+0] >= 187 && crap3[t+0] < 195) i=23;
  705. if(crap3[t+0] >= 195 && crap3[t+0] < 203) i=24;
  706. if(crap3[t+0] >= 203 && crap3[t+0] < 211) i=25;
  707. if(crap3[t+0] >= 211 && crap3[t+0] < 219) i=26;
  708. if(crap3[t+0] >= 219 && crap3[t+0] < 227) i=27;
  709. if(crap3[t+0] >= 227 && crap3[t+0] < 235) i=28;
  710. if(crap3[t+0] >= 235 && crap3[t+0] < 243) i=29;
  711. if(crap3[t+0] >= 243 && crap3[t+0] < 251) i=30;
  712. if(crap3[t+0] >= 251 && crap3[t+0] < 255 || crap3[t+0] == 0xff || crap3[t+0] == 0 || crap3[t+0] > 0 && crap3[t+0] < 3) i=31;
  713. ch = (unsigned char)(i); //32 number out of area
  714. if(ch == 0) i=3;
  715. if(ch == 1) i=11;
  716. if(ch == 2) i=19;
  717. if(ch == 3) i=27;
  718. if(ch == 4) i=35;
  719. if(ch == 5) i=43;
  720. if(ch == 6) i=51;
  721. if(ch == 7) i=59;
  722. if(ch == 8) i=67;
  723. if(ch == 9) i=75;
  724. if(ch == 10) i=83;
  725. if(ch == 11) i=91;
  726. if(ch == 12) i=99;
  727. if(ch == 13) i=107;
  728. if(ch == 14) i=115;
  729. if(ch == 15) i=123;
  730. if(ch == 16) i=131;
  731. if(ch == 17) i=139;
  732. if(ch == 18) i=147;
  733. if(ch == 19) i=155;
  734. if(ch == 20) i=163;
  735. if(ch == 21) i=171;
  736. if(ch == 22) i=179;
  737. if(ch == 23) i=187;
  738. if(ch == 24) i=195;
  739. if(ch == 25) i=203;
  740. if(ch == 26) i=211;
  741. if(ch == 27) i=219;
  742. if(ch == 28) i=227;
  743. if(ch == 29) i=235;
  744. if(ch == 30) i=243;
  745. if(ch == 31) i=251;
  746. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  747. ch3 = (crap3[t+1]&0xf0); //msb of second value
  748. ch3 = (ch3>>4);
  749. goto endt;
  750. }
  751. if(ch2 == 0x04) {
  752. if(crap3[t+0] >= 4 && crap3[t+0] < 12) i=0;
  753. if(crap3[t+0] >= 12 && crap3[t+0] < 20) i=1;
  754. if(crap3[t+0] >= 20 && crap3[t+0] < 28) i=2;
  755. if(crap3[t+0] >= 28 && crap3[t+0] < 36) i=3;
  756. if(crap3[t+0] >= 36 && crap3[t+0] < 44) i=4;
  757. if(crap3[t+0] >= 44 && crap3[t+0] < 52) i=5;
  758. if(crap3[t+0] >= 52 && crap3[t+0] < 60) i=6;
  759. if(crap3[t+0] >= 60 && crap3[t+0] < 68) i=7;
  760. if(crap3[t+0] >= 68 && crap3[t+0] < 76) i=8;
  761. if(crap3[t+0] >= 76 && crap3[t+0] < 84) i=9;
  762. if(crap3[t+0] >= 84 && crap3[t+0] < 92) i=10;
  763. if(crap3[t+0] >= 92 && crap3[t+0] < 100) i=11;
  764. if(crap3[t+0] >= 100 && crap3[t+0] < 108) i=12;
  765. if(crap3[t+0] >= 108 && crap3[t+0] < 116) i=13;
  766. if(crap3[t+0] >= 116 && crap3[t+0] < 124) i=14;
  767. if(crap3[t+0] >= 124 && crap3[t+0] < 132) i=15;
  768. if(crap3[t+0] >= 132 && crap3[t+0] < 140) i=16;
  769. if(crap3[t+0] >= 140 && crap3[t+0] < 148) i=17;
  770. if(crap3[t+0] >= 148 && crap3[t+0] < 156) i=18;
  771. if(crap3[t+0] >= 156 && crap3[t+0] < 164) i=19;
  772. if(crap3[t+0] >= 164 && crap3[t+0] < 172) i=20;
  773. if(crap3[t+0] >= 172 && crap3[t+0] < 180) i=21;
  774. if(crap3[t+0] >= 180 && crap3[t+0] < 188) i=22;
  775. if(crap3[t+0] >= 188 && crap3[t+0] < 196) i=23;
  776. if(crap3[t+0] >= 196 && crap3[t+0] < 204) i=24;
  777. if(crap3[t+0] >= 204 && crap3[t+0] < 212) i=25;
  778. if(crap3[t+0] >= 212 && crap3[t+0] < 220) i=26;
  779. if(crap3[t+0] >= 220 && crap3[t+0] < 228) i=27;
  780. if(crap3[t+0] >= 228 && crap3[t+0] < 236) i=28;
  781. if(crap3[t+0] >= 236 && crap3[t+0] < 244) i=29;
  782. if(crap3[t+0] >= 244 && crap3[t+0] < 252) i=30;
  783. if(crap3[t+0] >= 252 && crap3[t+0] < 255 || crap3[t+0] == 0xff || crap3[t+0] == 0 || crap3[t+0] > 0 && crap3[t+0] < 4) i=31;
  784. ch = (unsigned char)(i); //32 number out of area
  785. if(ch == 0) i=4;
  786. if(ch == 1) i=12;
  787. if(ch == 2) i=20;
  788. if(ch == 3) i=28;
  789. if(ch == 4) i=36;
  790. if(ch == 5) i=44;
  791. if(ch == 6) i=52;
  792. if(ch == 7) i=60;
  793. if(ch == 8) i=68;
  794. if(ch == 9) i=76;
  795. if(ch == 10) i=84;
  796. if(ch == 11) i=92;
  797. if(ch == 12) i=100;
  798. if(ch == 13) i=108;
  799. if(ch == 14) i=116;
  800. if(ch == 15) i=124;
  801. if(ch == 16) i=132;
  802. if(ch == 17) i=140;
  803. if(ch == 18) i=148;
  804. if(ch == 19) i=156;
  805. if(ch == 20) i=164;
  806. if(ch == 21) i=172;
  807. if(ch == 22) i=180;
  808. if(ch == 23) i=188;
  809. if(ch == 24) i=196;
  810. if(ch == 25) i=204;
  811. if(ch == 26) i=212;
  812. if(ch == 27) i=220;
  813. if(ch == 28) i=228;
  814. if(ch == 29) i=236;
  815. if(ch == 30) i=244;
  816. if(ch == 31) i=252;
  817. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  818. ch3 = (crap3[t+1]&0xf0); //msb of second value
  819. ch3 = (ch3>>4);
  820. goto endt;
  821. }
  822. if(ch2 == 0x05) {
  823. if(crap3[t+0] >= 5 && crap3[t+0] < 13) i=0;
  824. if(crap3[t+0] >= 13 && crap3[t+0] < 21) i=1;
  825. if(crap3[t+0] >= 21 && crap3[t+0] < 29) i=2;
  826. if(crap3[t+0] >= 29 && crap3[t+0] < 37) i=3;
  827. if(crap3[t+0] >= 37 && crap3[t+0] < 45) i=4;
  828. if(crap3[t+0] >= 45 && crap3[t+0] < 53) i=5;
  829. if(crap3[t+0] >= 53 && crap3[t+0] < 61) i=6;
  830. if(crap3[t+0] >= 61 && crap3[t+0] < 69) i=7;
  831. if(crap3[t+0] >= 69 && crap3[t+0] < 77) i=8;
  832. if(crap3[t+0] >= 77 && crap3[t+0] < 85) i=9;
  833. if(crap3[t+0] >= 85 && crap3[t+0] < 93) i=10;
  834. if(crap3[t+0] >= 93 && crap3[t+0] < 101) i=11;
  835. if(crap3[t+0] >= 101 && crap3[t+0] < 109) i=12;
  836. if(crap3[t+0] >= 109 && crap3[t+0] < 117) i=13;
  837. if(crap3[t+0] >= 117 && crap3[t+0] < 125) i=14;
  838. if(crap3[t+0] >= 125 && crap3[t+0] < 133) i=15;
  839. if(crap3[t+0] >= 133 && crap3[t+0] < 141) i=16;
  840. if(crap3[t+0] >= 141 && crap3[t+0] < 149) i=17;
  841. if(crap3[t+0] >= 149 && crap3[t+0] < 157) i=18;
  842. if(crap3[t+0] >= 157 && crap3[t+0] < 165) i=19;
  843. if(crap3[t+0] >= 165 && crap3[t+0] < 173) i=20;
  844. if(crap3[t+0] >= 173 && crap3[t+0] < 181) i=21;
  845. if(crap3[t+0] >= 181 && crap3[t+0] < 189) i=22;
  846. if(crap3[t+0] >= 189 && crap3[t+0] < 197) i=23;
  847. if(crap3[t+0] >= 197 && crap3[t+0] < 205) i=24;
  848. if(crap3[t+0] >= 205 && crap3[t+0] < 213) i=25;
  849. if(crap3[t+0] >= 213 && crap3[t+0] < 221) i=26;
  850. if(crap3[t+0] >= 221 && crap3[t+0] < 229) i=27;
  851. if(crap3[t+0] >= 229 && crap3[t+0] < 237) i=28;
  852. if(crap3[t+0] >= 237 && crap3[t+0] < 245) i=29;
  853. if(crap3[t+0] >= 245 && crap3[t+0] < 253) i=30;
  854. if(crap3[t+0] >= 253 && crap3[t+0] < 255 || crap3[t+0] == 0xff || crap3[t+0] == 0 || crap3[t+0] > 0 && crap3[t+0] < 5) i=31;
  855. ch = (unsigned char)(i); //32 number out of area
  856. if(ch == 0) i=5;
  857. if(ch == 1) i=13;
  858. if(ch == 2) i=21;
  859. if(ch == 3) i=29;
  860. if(ch == 4) i=37;
  861. if(ch == 5) i=45;
  862. if(ch == 6) i=53;
  863. if(ch == 7) i=61;
  864. if(ch == 8) i=69;
  865. if(ch == 9) i=77;
  866. if(ch == 10) i=85;
  867. if(ch == 11) i=93;
  868. if(ch == 12) i=101;
  869. if(ch == 13) i=109;
  870. if(ch == 14) i=117;
  871. if(ch == 15) i=125;
  872. if(ch == 16) i=133;
  873. if(ch == 17) i=141;
  874. if(ch == 18) i=149;
  875. if(ch == 19) i=157;
  876. if(ch == 20) i=165;
  877. if(ch == 21) i=173;
  878. if(ch == 22) i=181;
  879. if(ch == 23) i=189;
  880. if(ch == 24) i=197;
  881. if(ch == 25) i=205;
  882. if(ch == 26) i=213;
  883. if(ch == 27) i=221;
  884. if(ch == 28) i=229;
  885. if(ch == 29) i=237;
  886. if(ch == 30) i=245;
  887. if(ch == 31) i=253;
  888. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  889. ch3 = (crap3[t+1]&0xf0); //msb of second value
  890. ch3 = (ch3>>4);
  891. goto endt;
  892. }
  893. if(ch2 == 0x06) {
  894. if(crap3[t+0] >= 6 && crap3[t+0] < 14) i=0;
  895. if(crap3[t+0] >= 14 && crap3[t+0] < 22) i=1;
  896. if(crap3[t+0] >= 22 && crap3[t+0] < 30) i=2;
  897. if(crap3[t+0] >= 30 && crap3[t+0] < 38) i=3;
  898. if(crap3[t+0] >= 38 && crap3[t+0] < 46) i=4;
  899. if(crap3[t+0] >= 46 && crap3[t+0] < 54) i=5;
  900. if(crap3[t+0] >= 54 && crap3[t+0] < 62) i=6;
  901. if(crap3[t+0] >= 62 && crap3[t+0] < 70) i=7;
  902. if(crap3[t+0] >= 70 && crap3[t+0] < 78) i=8;
  903. if(crap3[t+0] >= 78 && crap3[t+0] < 86) i=9;
  904. if(crap3[t+0] >= 86 && crap3[t+0] < 94) i=10;
  905. if(crap3[t+0] >= 94 && crap3[t+0] < 102) i=11;
  906. if(crap3[t+0] >= 102 && crap3[t+0] < 110) i=12;
  907. if(crap3[t+0] >= 110 && crap3[t+0] < 118) i=13;
  908. if(crap3[t+0] >= 118 && crap3[t+0] < 126) i=14;
  909. if(crap3[t+0] >= 126 && crap3[t+0] < 134) i=15;
  910. if(crap3[t+0] >= 134 && crap3[t+0] < 142) i=16;
  911. if(crap3[t+0] >= 142 && crap3[t+0] < 150) i=17;
  912. if(crap3[t+0] >= 150 && crap3[t+0] < 158) i=18;
  913. if(crap3[t+0] >= 158 && crap3[t+0] < 166) i=19;
  914. if(crap3[t+0] >= 166 && crap3[t+0] < 174) i=20;
  915. if(crap3[t+0] >= 174 && crap3[t+0] < 182) i=21;
  916. if(crap3[t+0] >= 182 && crap3[t+0] < 190) i=22;
  917. if(crap3[t+0] >= 190 && crap3[t+0] < 198) i=23;
  918. if(crap3[t+0] >= 198 && crap3[t+0] < 206) i=24;
  919. if(crap3[t+0] >= 206 && crap3[t+0] < 214) i=25;
  920. if(crap3[t+0] >= 214 && crap3[t+0] < 222) i=26;
  921. if(crap3[t+0] >= 222 && crap3[t+0] < 230) i=27;
  922. if(crap3[t+0] >= 230 && crap3[t+0] < 238) i=28;
  923. if(crap3[t+0] >= 238 && crap3[t+0] < 246) i=29;
  924. if(crap3[t+0] >= 246 && crap3[t+0] < 254) i=30;
  925. if(crap3[t+0] >= 254 && crap3[t+0] < 255 || crap3[t+0] == 0xff || crap3[t+0] == 0 || crap3[t+0] > 0 && crap3[t+0] < 6) i=31;
  926. ch = (unsigned char)(i); //32 number out of area
  927. if(ch == 0) i=6;
  928. if(ch == 1) i=14;
  929. if(ch == 2) i=22;
  930. if(ch == 3) i=30;
  931. if(ch == 4) i=38;
  932. if(ch == 5) i=46;
  933. if(ch == 6) i=54;
  934. if(ch == 7) i=62;
  935. if(ch == 8) i=70;
  936. if(ch == 9) i=78;
  937. if(ch == 10) i=86;
  938. if(ch == 11) i=94;
  939. if(ch == 12) i=102;
  940. if(ch == 13) i=110;
  941. if(ch == 14) i=118;
  942. if(ch == 15) i=126;
  943. if(ch == 16) i=134;
  944. if(ch == 17) i=142;
  945. if(ch == 18) i=150;
  946. if(ch == 19) i=158;
  947. if(ch == 20) i=166;
  948. if(ch == 21) i=174;
  949. if(ch == 22) i=182;
  950. if(ch == 23) i=190;
  951. if(ch == 24) i=198;
  952. if(ch == 25) i=206;
  953. if(ch == 26) i=214;
  954. if(ch == 27) i=222;
  955. if(ch == 28) i=230;
  956. if(ch == 29) i=238;
  957. if(ch == 30) i=246;
  958. if(ch == 31) i=254;
  959. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  960. ch3 = (crap3[t+1]&0xf0); //msb of second value
  961. ch3 = (ch3>>4);
  962. goto endt;
  963. }
  964. if(ch2 == 0x07) {
  965. if(crap3[t+0] >= 7 && crap3[t+0] < 15) i=0;
  966. if(crap3[t+0] >= 15 && crap3[t+0] < 23) i=1;
  967. if(crap3[t+0] >= 23 && crap3[t+0] < 31) i=2;
  968. if(crap3[t+0] >= 31 && crap3[t+0] < 39) i=3;
  969. if(crap3[t+0] >= 39 && crap3[t+0] < 47) i=4;
  970. if(crap3[t+0] >= 47 && crap3[t+0] < 55) i=5;
  971. if(crap3[t+0] >= 55 && crap3[t+0] < 63) i=6;
  972. if(crap3[t+0] >= 63 && crap3[t+0] < 71) i=7;
  973. if(crap3[t+0] >= 71 && crap3[t+0] < 79) i=8;
  974. if(crap3[t+0] >= 79 && crap3[t+0] < 87) i=9;
  975. if(crap3[t+0] >= 87 && crap3[t+0] < 95) i=10;
  976. if(crap3[t+0] >= 95 && crap3[t+0] < 103) i=11;
  977. if(crap3[t+0] >= 103 && crap3[t+0] < 111) i=12;
  978. if(crap3[t+0] >= 111 && crap3[t+0] < 119) i=13;
  979. if(crap3[t+0] >= 119 && crap3[t+0] < 127) i=14;
  980. if(crap3[t+0] >= 127 && crap3[t+0] < 135) i=15;
  981. if(crap3[t+0] >= 135 && crap3[t+0] < 143) i=16;
  982. if(crap3[t+0] >= 143 && crap3[t+0] < 151) i=17;
  983. if(crap3[t+0] >= 151 && crap3[t+0] < 159) i=18;
  984. if(crap3[t+0] >= 159 && crap3[t+0] < 167) i=19;
  985. if(crap3[t+0] >= 167 && crap3[t+0] < 175) i=20;
  986. if(crap3[t+0] >= 175 && crap3[t+0] < 183) i=21;
  987. if(crap3[t+0] >= 183 && crap3[t+0] < 191) i=22;
  988. if(crap3[t+0] >= 191 && crap3[t+0] < 199) i=23;
  989. if(crap3[t+0] >= 199 && crap3[t+0] < 207) i=24;
  990. if(crap3[t+0] >= 207 && crap3[t+0] < 215) i=25;
  991. if(crap3[t+0] >= 215 && crap3[t+0] < 223) i=26;
  992. if(crap3[t+0] >= 223 && crap3[t+0] < 231) i=27;
  993. if(crap3[t+0] >= 231 && crap3[t+0] < 239) i=28;
  994. if(crap3[t+0] >= 239 && crap3[t+0] < 247) i=29;
  995. if(crap3[t+0] >= 247 && crap3[t+0] < 255) i=30;
  996. if(crap3[t+0] >= 255 && crap3[t+0] < 255 || crap3[t+0] == 0xff || crap3[t+0] == 0 || crap3[t+0] > 0 && crap3[t+0] < 7) i=31;
  997. ch = (unsigned char)(i); //32 number out of area
  998. if(ch == 0) i=7;
  999. if(ch == 1) i=15;
  1000. if(ch == 2) i=23;
  1001. if(ch == 3) i=31;
  1002. if(ch == 4) i=39;
  1003. if(ch == 5) i=47;
  1004. if(ch == 6) i=55;
  1005. if(ch == 7) i=63;
  1006. if(ch == 8) i=71;
  1007. if(ch == 9) i=79;
  1008. if(ch == 10) i=87;
  1009. if(ch == 11) i=95;
  1010. if(ch == 12) i=103;
  1011. if(ch == 13) i=111;
  1012. if(ch == 14) i=119;
  1013. if(ch == 15) i=127;
  1014. if(ch == 16) i=135;
  1015. if(ch == 17) i=143;
  1016. if(ch == 18) i=151;
  1017. if(ch == 19) i=159;
  1018. if(ch == 20) i=167;
  1019. if(ch == 21) i=175;
  1020. if(ch == 22) i=183;
  1021. if(ch == 23) i=191;
  1022. if(ch == 24) i=199;
  1023. if(ch == 25) i=207;
  1024. if(ch == 26) i=215;
  1025. if(ch == 27) i=223;
  1026. if(ch == 28) i=231;
  1027. if(ch == 29) i=239;
  1028. if(ch == 30) i=247;
  1029. if(ch == 31) i=255;
  1030. ch1 = (crap3[t+0]-i); //32 area number plus 0-8
  1031. ch3 = (crap3[t+1]&0xf0); //msb of second value
  1032. ch3 = (ch3>>4);
  1033. goto endt;
  1034. }
  1035.  
  1036. endt:
  1037. run1[w+0] = hex[ch][7];
  1038. run1[w+1] = hex[ch][6];
  1039. run1[w+2] = hex[ch][5]; //5
  1040. run1[w+3] = hex[ch][4];
  1041. run1[w+4] = hex[ch][3];
  1042. run1[w+5] = hex[ch1][7];
  1043. run1[w+6] = hex[ch1][6];
  1044. run1[w+7] = run[s];//hex[ch1][5]; //3
  1045. //printf("%2X:",hex[ch1][5]);
  1046. ///////////////////////////////////////////
  1047. run1[w+8] = hex[ch2][7];
  1048. run1[w+9] = hex[ch2][6]; //3 //only need 2bits after first run
  1049. run1[w+10] = hex[ch2][5];
  1050. run1[w+11] = hex[ch3][7];
  1051. run1[w+12] = hex[ch3][6];
  1052. run1[w+13] = hex[ch3][5]; //4
  1053. run1[w+14] = hex[ch3][4];
  1054. w=w+15; //ever second byte save 1 bit
  1055. s++;
  1056. }
  1057.  
  1058.  
  1059. s=0;
  1060. for(w=0;w<240;w=w+8) {
  1061. for(i=0;i<=0xff;i++) {
  1062. zero=0;
  1063. if(run1[w+0] == hex[i][7]) zero++;
  1064. if(run1[w+1] == hex[i][6]) zero++;
  1065. if(run1[w+2] == hex[i][5]) zero++; //5
  1066. if(run1[w+3] == hex[i][4]) zero++;
  1067. if(run1[w+4] == hex[i][3]) zero++;
  1068. if(run1[w+5] == hex[i][2]) zero++;
  1069. if(run1[w+6] == hex[i][1]) zero++;
  1070. if(run1[w+7] == hex[i][0]) zero++;
  1071. if(zero >= 8) goto loc;
  1072. }
  1073. printf("error find hex 20\n");
  1074. exit(1);
  1075. loc:
  1076. crap[s] = (unsigned char)(i);
  1077. s++;
  1078. }
  1079. for(i=0;i<30;i++) {
  1080. fprintf(out,"%c",crap[i]);
  1081. }
  1082. //fprintf(out,"%c",place);
  1083.  
  1084. //checking to see if it works
  1085. /*
  1086. ------------------------------------------------------------------
  1087. -----------------------------------------------------------------
  1088. ------------------------------------------------------------------
  1089. -----------------------------------------------------------------
  1090. ------------------------------------------------------------------
  1091. -----------------------------------------------------------------
  1092. ------------------------------------------------------------------
  1093. -----------------------------------------------------------------
  1094. ------------------------------------------------------------------
  1095. -----------------------------------------------------------------
  1096. ------------------------------------------------------------------
  1097. -----------------------------------------------------------------
  1098. ------------------------------------------------------------------
  1099. -----------------------------------------------------------------
  1100. ------------------------------------------------------------------
  1101. -----------------------------------------------------------------
  1102. ------------------------------------------------------------------
  1103. -----------------------------------------------------------------
  1104. ------------------------------------------------------------------
  1105. -----------------------------------------------------------------
  1106. ------------------------------------------------------------------
  1107. -----------------------------------------------------------------
  1108. */
  1109. //printf(":%2X%2X:\n",table3[0],table3[1]);
  1110.  
  1111. /*
  1112. count=0;
  1113.  
  1114. k=0;
  1115. for(i=0;i<30;i++) {
  1116. crap2[k+0] = hex[crap[i]][7];
  1117. crap2[k+1] = hex[crap[i]][6];
  1118. crap2[k+2] = hex[crap[i]][5];
  1119. crap2[k+3] = hex[crap[i]][4];
  1120. crap2[k+4] = hex[crap[i]][3];
  1121. crap2[k+5] = hex[crap[i]][2];
  1122. crap2[k+6] = hex[crap[i]][1];
  1123. crap2[k+7] = hex[crap[i]][0];
  1124. k=k+8;
  1125. }
  1126.  
  1127. p=0;
  1128. k=0;
  1129. //ch =
  1130. //ch1 =
  1131. //ch2 =
  1132. //ch3 =
  1133. h=0;
  1134. for(k=0;k<240;k=k+15) {
  1135. ch=0x00;
  1136. ch = ch+(crap2[k+0]);
  1137. ch = ch+((crap2[k+1])<<1);
  1138. ch = ch+((crap2[k+2])<<2);
  1139. ch = ch+((crap2[k+3])<<3);
  1140. ch = ch+((crap2[k+4])<<4);
  1141. ch1 = 0x00;
  1142. ch1 = ch1+(crap2[k+5]);
  1143. ch1 = ch1+((crap2[k+6])<<1);
  1144. run2[h] = ch1+((crap2[k+7])<<2);
  1145. h++;
  1146. ch2=0x00;
  1147. ch2 = ch2+(crap2[k+8]);
  1148. ch2 = ch2+((crap2[k+9])<<1);
  1149. ch2 = ch2+((crap2[k+10])<<2);
  1150. ch3 = 0x00;
  1151. ch3 = ch3+(crap2[k+11]);
  1152. ch3 = ch3+((crap2[k+12])<<1);
  1153. ch3 = ch3+((crap2[k+13])<<2);
  1154. ch3 = ch3+((crap2[k+14])<<3);
  1155.  
  1156. //10,7,0,9
  1157. //printf("ch = %4X,ch1 = %4X,ch2 = %4X, ch3 = %4X\n",ch,ch1,ch2,ch3);
  1158.  
  1159.  
  1160. address=0x00;
  1161. address3 = ((ch3<<4)+ch2);
  1162. address2=0x00;
  1163. if(ch2 == 0x00) {
  1164. if(ch == 0) i=0;
  1165. if(ch == 1) i=8;
  1166. if(ch == 2) i=16;
  1167. if(ch == 3) i=24;
  1168. if(ch == 4) i=32;
  1169. if(ch == 5) i=40;
  1170. if(ch == 6) i=48;
  1171. if(ch == 7) i=56;
  1172. if(ch == 8) i=64;
  1173. if(ch == 9) i=72;
  1174. if(ch == 10) i=80;
  1175. if(ch == 11) i=88;
  1176. if(ch == 12) i=96;
  1177. if(ch == 13) i=104;
  1178. if(ch == 14) i=112;
  1179. if(ch == 15) i=120;
  1180. if(ch == 16) i=128;
  1181. if(ch == 17) i=136;
  1182. if(ch == 18) i=144;
  1183. if(ch == 19) i=152;
  1184. if(ch == 20) i=160;
  1185. if(ch == 21) i=168;
  1186. if(ch == 22) i=176;
  1187. if(ch == 23) i=184;
  1188. if(ch == 24) i=192;
  1189. if(ch == 25) i=200;
  1190. if(ch == 26) i=208;
  1191. if(ch == 27) i=216;
  1192. if(ch == 28) i=224;
  1193. if(ch == 29) i=232;
  1194. if(ch == 30) i=240;
  1195. if(ch == 31) i=248;
  1196. address2=i;
  1197. address2 = (unsigned char)(address2+ch1);
  1198. if(address2 > 0xff) {
  1199. address2 = (unsigned char)(address2);
  1200. address2++;
  1201. }
  1202.  
  1203. }
  1204. if(ch2 == 0x01) {
  1205. if(ch == 0) i=1;
  1206. if(ch == 1) i=9;
  1207. if(ch == 2) i=17;
  1208. if(ch == 3) i=25;
  1209. if(ch == 4) i=33;
  1210. if(ch == 5) i=41;
  1211. if(ch == 6) i=49;
  1212. if(ch == 7) i=57;
  1213. if(ch == 8) i=65;
  1214. if(ch == 9) i=73;
  1215. if(ch == 10) i=81;
  1216. if(ch == 11) i=89;
  1217. if(ch == 12) i=97;
  1218. if(ch == 13) i=105;
  1219. if(ch == 14) i=113;
  1220. if(ch == 15) i=121;
  1221. if(ch == 16) i=129;
  1222. if(ch == 17) i=137;
  1223. if(ch == 18) i=145;
  1224. if(ch == 19) i=153;
  1225. if(ch == 20) i=161;
  1226. if(ch == 21) i=169;
  1227. if(ch == 22) i=177;
  1228. if(ch == 23) i=185;
  1229. if(ch == 24) i=193;
  1230. if(ch == 25) i=201;
  1231. if(ch == 26) i=209;
  1232. if(ch == 27) i=217;
  1233. if(ch == 28) i=225;
  1234. if(ch == 29) i=233;
  1235. if(ch == 30) i=241;
  1236. if(ch == 31) i=249;
  1237.  
  1238. address2=i;
  1239. address2 = (unsigned char)(address2+ch1);
  1240. if(address2 > 0xff) {
  1241. address2 = (unsigned char)(address2);
  1242. address2++;
  1243. }
  1244.  
  1245. }
  1246. if(ch2 == 0x02) {
  1247. if(ch == 0) i=2;
  1248. if(ch == 1) i=10;
  1249. if(ch == 2) i=18;
  1250. if(ch == 3) i=26;
  1251. if(ch == 4) i=34;
  1252. if(ch == 5) i=42;
  1253. if(ch == 6) i=50;
  1254. if(ch == 7) i=58;
  1255. if(ch == 8) i=66;
  1256. if(ch == 9) i=74;
  1257. if(ch == 10) i=82;
  1258. if(ch == 11) i=90;
  1259. if(ch == 12) i=98;
  1260. if(ch == 13) i=106;
  1261. if(ch == 14) i=114;
  1262. if(ch == 15) i=122;
  1263. if(ch == 16) i=130;
  1264. if(ch == 17) i=138;
  1265. if(ch == 18) i=146;
  1266. if(ch == 19) i=154;
  1267. if(ch == 20) i=162;
  1268. if(ch == 21) i=170;
  1269. if(ch == 22) i=178;
  1270. if(ch == 23) i=186;
  1271. if(ch == 24) i=194;
  1272. if(ch == 25) i=202;
  1273. if(ch == 26) i=210;
  1274. if(ch == 27) i=218;
  1275. if(ch == 28) i=226;
  1276. if(ch == 29) i=234;
  1277. if(ch == 30) i=242;
  1278. if(ch == 31) i=250;
  1279.  
  1280. address2=i;
  1281. address2 = (unsigned char)(address2+ch1);
  1282. if(address2 > 0xff) {
  1283. address2 = (unsigned char)(address2);
  1284. address2++;
  1285. }
  1286.  
  1287. }
  1288. if(ch2 == 0x03) {
  1289. if(ch == 0) i=3;
  1290. if(ch == 1) i=11;
  1291. if(ch == 2) i=19;
  1292. if(ch == 3) i=27;
  1293. if(ch == 4) i=35;
  1294. if(ch == 5) i=43;
  1295. if(ch == 6) i=51;
  1296. if(ch == 7) i=59;
  1297. if(ch == 8) i=67;
  1298. if(ch == 9) i=75;
  1299. if(ch == 10) i=83;
  1300. if(ch == 11) i=91;
  1301. if(ch == 12) i=99;
  1302. if(ch == 13) i=107;
  1303. if(ch == 14) i=115;
  1304. if(ch == 15) i=123;
  1305. if(ch == 16) i=131;
  1306. if(ch == 17) i=139;
  1307. if(ch == 18) i=147;
  1308. if(ch == 19) i=155;
  1309. if(ch == 20) i=163;
  1310. if(ch == 21) i=171;
  1311. if(ch == 22) i=179;
  1312. if(ch == 23) i=187;
  1313. if(ch == 24) i=195;
  1314. if(ch == 25) i=203;
  1315. if(ch == 26) i=211;
  1316. if(ch == 27) i=219;
  1317. if(ch == 28) i=227;
  1318. if(ch == 29) i=235;
  1319. if(ch == 30) i=243;
  1320. if(ch == 31) i=251;
  1321.  
  1322. address2=i;
  1323. address2 = (unsigned char)(address2+ch1);
  1324. if(address2 > 0xff) {
  1325. address2 = (unsigned char)(address2);
  1326. address2++;
  1327. }
  1328.  
  1329. }
  1330. if(ch2 == 0x04) {
  1331. if(ch == 0) i=4;
  1332. if(ch == 1) i=12;
  1333. if(ch == 2) i=20;
  1334. if(ch == 3) i=28;
  1335. if(ch == 4) i=36;
  1336. if(ch == 5) i=44;
  1337. if(ch == 6) i=52;
  1338. if(ch == 7) i=60;
  1339. if(ch == 8) i=68;
  1340. if(ch == 9) i=76;
  1341. if(ch == 10) i=84;
  1342. if(ch == 11) i=92;
  1343. if(ch == 12) i=100;
  1344. if(ch == 13) i=108;
  1345. if(ch == 14) i=116;
  1346. if(ch == 15) i=124;
  1347. if(ch == 16) i=132;
  1348. if(ch == 17) i=140;
  1349. if(ch == 18) i=148;
  1350. if(ch == 19) i=156;
  1351. if(ch == 20) i=164;
  1352. if(ch == 21) i=172;
  1353. if(ch == 22) i=180;
  1354. if(ch == 23) i=188;
  1355. if(ch == 24) i=196;
  1356. if(ch == 25) i=204;
  1357. if(ch == 26) i=212;
  1358. if(ch == 27) i=220;
  1359. if(ch == 28) i=228;
  1360. if(ch == 29) i=236;
  1361. if(ch == 30) i=244;
  1362. if(ch == 31) i=252;
  1363.  
  1364. address2=i;
  1365. address2 = (unsigned char)(address2+ch1);
  1366. if(address2 > 0xff) {
  1367. address2 = (unsigned char)(address2);
  1368. address2++;
  1369. }
  1370.  
  1371. }
  1372. if(ch2 == 0x05) {
  1373. if(ch == 0) i=5;
  1374. if(ch == 1) i=13;
  1375. if(ch == 2) i=21;
  1376. if(ch == 3) i=29;
  1377. if(ch == 4) i=37;
  1378. if(ch == 5) i=45;
  1379. if(ch == 6) i=53;
  1380. if(ch == 7) i=61;
  1381. if(ch == 8) i=69;
  1382. if(ch == 9) i=77;
  1383. if(ch == 10) i=85;
  1384. if(ch == 11) i=93;
  1385. if(ch == 12) i=101;
  1386. if(ch == 13) i=109;
  1387. if(ch == 14) i=117;
  1388. if(ch == 15) i=125;
  1389. if(ch == 16) i=133;
  1390. if(ch == 17) i=141;
  1391. if(ch == 18) i=149;
  1392. if(ch == 19) i=157;
  1393. if(ch == 20) i=165;
  1394. if(ch == 21) i=173;
  1395. if(ch == 22) i=181;
  1396. if(ch == 23) i=189;
  1397. if(ch == 24) i=197;
  1398. if(ch == 25) i=205;
  1399. if(ch == 26) i=213;
  1400. if(ch == 27) i=221;
  1401. if(ch == 28) i=229;
  1402. if(ch == 29) i=237;
  1403. if(ch == 30) i=245;
  1404. if(ch == 31) i=253;
  1405.  
  1406. address2=i;
  1407. address2 = (unsigned char)(address2+ch1);
  1408. if(address2 > 0xff) {
  1409. address2 = (unsigned char)(address2);
  1410. address2++;
  1411. }
  1412.  
  1413. }
  1414. if(ch2 == 0x06) {
  1415. if(ch == 0) i=6;
  1416. if(ch == 1) i=14;
  1417. if(ch == 2) i=22;
  1418. if(ch == 3) i=30;
  1419. if(ch == 4) i=38;
  1420. if(ch == 5) i=46;
  1421. if(ch == 6) i=54;
  1422. if(ch == 7) i=62;
  1423. if(ch == 8) i=70;
  1424. if(ch == 9) i=78;
  1425. if(ch == 10) i=86;
  1426. if(ch == 11) i=94;
  1427. if(ch == 12) i=102;
  1428. if(ch == 13) i=110;
  1429. if(ch == 14) i=118;
  1430. if(ch == 15) i=126;
  1431. if(ch == 16) i=134;
  1432. if(ch == 17) i=142;
  1433. if(ch == 18) i=150;
  1434. if(ch == 19) i=158;
  1435. if(ch == 20) i=166;
  1436. if(ch == 21) i=174;
  1437. if(ch == 22) i=182;
  1438. if(ch == 23) i=190;
  1439. if(ch == 24) i=198;
  1440. if(ch == 25) i=206;
  1441. if(ch == 26) i=214;
  1442. if(ch == 27) i=222;
  1443. if(ch == 28) i=230;
  1444. if(ch == 29) i=238;
  1445. if(ch == 30) i=246;
  1446. if(ch == 31) i=254;
  1447.  
  1448. address2=i;
  1449. address2 = (unsigned char)(address2+ch1);
  1450. if(address2 > 0xff) {
  1451. address2 = (unsigned char)(address2);
  1452. address2++;
  1453. }
  1454.  
  1455. }
  1456. if(ch2 == 0x07) {
  1457. if(ch == 0) i=7;
  1458. if(ch == 1) i=15;
  1459. if(ch == 2) i=23;
  1460. if(ch == 3) i=31;
  1461. if(ch == 4) i=39;
  1462. if(ch == 5) i=47;
  1463. if(ch == 6) i=55;
  1464. if(ch == 7) i=63;
  1465. if(ch == 8) i=71;
  1466. if(ch == 9) i=79;
  1467. if(ch == 10) i=87;
  1468. if(ch == 11) i=95;
  1469. if(ch == 12) i=103;
  1470. if(ch == 13) i=111;
  1471. if(ch == 14) i=119;
  1472. if(ch == 15) i=127;
  1473. if(ch == 16) i=135;
  1474. if(ch == 17) i=143;
  1475. if(ch == 18) i=151;
  1476. if(ch == 19) i=159;
  1477. if(ch == 20) i=167;
  1478. if(ch == 21) i=175;
  1479. if(ch == 22) i=183;
  1480. if(ch == 23) i=191;
  1481. if(ch == 24) i=199;
  1482. if(ch == 25) i=207;
  1483. if(ch == 26) i=215;
  1484. if(ch == 27) i=223;
  1485. if(ch == 28) i=231;
  1486. if(ch == 29) i=239;
  1487. if(ch == 30) i=247;
  1488. if(ch == 31) i=255;
  1489.  
  1490. address2=i;
  1491. address2 = (address2+ch1);
  1492. if(address2 > 0xff) {
  1493. address2 = (unsigned char)(address2);
  1494. address2++;
  1495. }
  1496.  
  1497. }
  1498. //address2 = (address2&0xff);
  1499.  
  1500. for(s=0;s<=0xffff;s=s+2) {
  1501. if(table[s+0] == address2 && table[s+1] == address3) {
  1502. range = s;
  1503. //printf(":%4X:",range);
  1504. goto lop;
  1505. }
  1506.  
  1507. }
  1508. printf("\ncan't find search match in table\n");
  1509. exit(1);
  1510. lop:
  1511. hash1[p+0] = (unsigned char)(range>>8);
  1512. hash1[p+1] = (unsigned char)(range);
  1513. p=p+2;
  1514. }
  1515. //printf(":%2X%2X:%2X%2X:\n",table3[i+0],table3[i+1],hash1[i+0],hash1[i+1])
  1516.  
  1517.  
  1518.  
  1519. zero=0;
  1520. s=0;
  1521. for(i=0;i<32;i=i+2) {
  1522. if(run[s] == 0x01) hash1[i+1] = hash1[i+1]+1;
  1523. s++;
  1524. }
  1525.  
  1526.  
  1527. zero=0;
  1528. for(i=0;i<32;i++) {
  1529. if(hash1[i] == table2[i]) zero++;
  1530. //printf("%2X:%2X..:\n",hash1[i],table3[i]);
  1531. }
  1532. if(zero < 32) {
  1533. printf("error in checking stage\n");
  1534. exit(1);
  1535. }
  1536. //printf("%d:\n",clocker);
  1537.  
  1538.  
  1539. //printf("yes passed\n");
  1540. //printf("%d::count = %d\n",zero,count);
  1541. //fclose(in);
  1542. //fclose(out);
  1543. //fclose(clear);
  1544.  
  1545. */
  1546. //exit(1);
  1547. /*
  1548. ------------------------------------------------------------------
  1549. -----------------------------------------------------------------
  1550. ------------------------------------------------------------------
  1551. -----------------------------------------------------------------
  1552. ------------------------------------------------------------------
  1553. -----------------------------------------------------------------
  1554. ------------------------------------------------------------------
  1555. -----------------------------------------------------------------
  1556. ------------------------------------------------------------------
  1557. -----------------------------------------------------------------
  1558. ------------------------------------------------------------------
  1559. -----------------------------------------------------------------
  1560. ------------------------------------------------------------------
  1561. -----------------------------------------------------------------
  1562. ------------------------------------------------------------------
  1563. -----------------------------------------------------------------
  1564. ------------------------------------------------------------------
  1565. -----------------------------------------------------------------
  1566. ------------------------------------------------------------------
  1567. -----------------------------------------------------------------
  1568. ------------------------------------------------------------------
  1569. -----------------------------------------------------------------
  1570. */
  1571. /*
  1572. ------------------------------------------------------------------
  1573. -----------------------------------------------------------------
  1574. ------------------------------------------------------------------
  1575. -----------------------------------------------------------------
  1576. ------------------------------------------------------------------
  1577. -----------------------------------------------------------------
  1578. ------------------------------------------------------------------
  1579. -----------------------------------------------------------------
  1580. ------------------------------------------------------------------
  1581. -----------------------------------------------------------------
  1582. ------------------------------------------------------------------
  1583. -----------------------------------------------------------------
  1584. ------------------------------------------------------------------
  1585. -----------------------------------------------------------------
  1586. ------------------------------------------------------------------
  1587. -----------------------------------------------------------------
  1588. ------------------------------------------------------------------
  1589. -----------------------------------------------------------------
  1590. ------------------------------------------------------------------
  1591. -----------------------------------------------------------------
  1592. ------------------------------------------------------------------
  1593. -----------------------------------------------------------------
  1594. */
  1595.  
  1596. clocker++;
  1597. goto end1;
  1598.  
  1599. ////-----------------------------------------------
  1600. ////-----------------------------------------------
  1601. ////-----------------------------------------------
  1602. ////-----------------------------------------------
  1603. ////-----------------------------------------------
  1604. ////-----------------------------------------------
  1605. ////-----------------------------------------------
  1606. ////-----------------------------------------------
  1607. ////-----------------------------------------------
  1608. ////-----------------------------------------------
  1609. ////-----------------------------------------------
  1610. ////-----------------------------------------------
  1611. ////-----------------------------------------------
  1612. ////-----------------------------------------------
  1613. ////-----------------------------------------------
  1614. ////-----------------------------------------------
  1615. ///////////////////////////////////////////////////
  1616. ///////////////////////////////////////////////////
  1617. //////////////////////////////////////////////////
  1618. ///////////////////////////////////////////////////
  1619. ///////////////////////////////////////////////////
  1620. //////////////////////////////////////////////////
  1621. /////////////////////////////////////////////////////////////////////
  1622. //////////////////////////////////////////////////////////////////////
  1623. /////////////////////////////////////////////////////////////////////
  1624. end:
  1625. printf("no hash\n");
  1626. endy:
  1627. printf("Finished...::swap files are min = %2X\n",swap);
  1628. printf("out file = :::1 = temp.txt:::::0 = temp1.txt\n");
  1629. printf("%ld fileoffset\n",fileoffset);
  1630. fclose(out);
  1631. fclose(in);
  1632. printf("\n\n");
  1633. printf("Data C:\n");
  1634. if(swap == 0x01) in = fopen("temp.txt","rb");
  1635. if(swap == 0x00) in = fopen("temp1.txt","rb");
  1636. fseek(in,0,SEEK_END);
  1637. fileoffset = ftell(in);
  1638. rewind(in);
  1639. for(i=0;i<fileoffset;i++) {
  1640. ch = fgetc(in);
  1641. printf("%2X",ch);
  1642. }
  1643. printf("\n");
  1644. printf("Steps = %d\n",stepinpro);
  1645. fclose(in);
  1646. exit(1);
  1647.  
  1648. }
RAW Paste Data