My Blog: www.aiexp.info
虽然我的路是从这里开始的,但是这里不再是乐土.感谢曾经影响过,引导过,帮助过我的董凯,飞燕,leeco,starwing,Rockcarry,soft_wind等等等等.别了,BCCN.
改进的库转换,只用一个程序
最近好忙呀~~~~~~
/*SK-CHINA 2006-2007*/
/*开局库转换程序0.0.1 ICCS类开局库转换程序*/
#include "stdio.h"
main() {
char w;
char a,b,c,d;
FILE *openc,*openb;
printf("SK-CHINA 2006-2007 S.K\n开局库转换程序 0.0.1\n本程序用于将ICCS类开局库转换为CHESS 0.0.5可读取的类型\n\n输入ICCS类文件:open.skc\n转换后将在open.skc覆盖输出,请注意备份文件!\n按任意键开始转换\n");
getch();
openc=fopen("open.skc","r");
openb=fopen("open.txt","w");
while((w=getc(openc))!=EOF) {
switch(w) {
case '9': putc('0',openb); break;
case '8': putc('1',openb); break;
case '7': putc('2',openb); break;
case '6': putc('3',openb); break;
case '5': putc('4',openb); break;
case '4': putc('5',openb); break;
case '3': putc('6',openb); break;
case '2': putc('7',openb); break;
case '1': putc('8',openb); break;
case '0': putc('9',openb); break;
case 'A': putc('0',openb); break;
case 'B': putc('1',openb); break;
case 'C': putc('2',openb); break;
case 'D': putc('3',openb); break;
case 'E': putc('4',openb); break;
case 'F': putc('5',openb); break;
case 'G': putc('6',openb); break;
case 'H': putc('7',openb); break;
case 'I': putc('8',openb); break;
default: putc(w,openb);
}
}
fclose(openc);
fclose(openb);
openc=fopen("open.txt","r");
openb=fopen("open.skc","w");
while((a=getc(openc))!=EOF) {
if(a==' ') { putc(' ',openb); continue; }
if(a==10) { putc(10,openb); continue; }
b=getc(openc); c=getc(openc); d=getc(openc);
putc(b,openb);
putc(a,openb);
putc(d,openb);
putc(c,openb);
}
fclose(openc);
fclose(openb);
printf("\n\n\n完成!");
}
Lz 我也要一份。提示出错,不能下载
lsxshaoxin@163.com
[此贴子已经被作者于2007-8-10 19:38:19编辑过]