junk.txt
来自「压缩文件中是Error Correction Coding - Mathemat」· 文本 代码 · 共 53 行
TXT
53 行
/**************************************** Program: cmpsimple --- a simple (and slow) file comparison program*** Todd K. Moon* Date: August 19. 2004****************************************/#include <stdio.h>#include <stdlib.h>main(int argc, char *argv[]){ FILE *fout1,*fout2; unsigned char b1, b2; unsigned int byteno; if(argc==1) { printf("Usage: %s file1 file2\n",argv[0]); exit(-1); } fout1 = fopen(argv[1],"rb"); fout2 = fopen(argv[2],"rb"); byteno = 0; while(fread(&b1,1,1,fout1)) { byteno++; if(fread(&b2,1,1,fout2)) { if(b1 != b2) { printf("Different bytes at byte number %ud\n",byteno); } } else { printf("Different file length\n"); break; } } if(fread(&b2,1,1,fout2)) { printf("Different file lengths\n"); } fclose(fout1); fclose(fout2);} /*Local Variables:compile-command:"gcc -o cmpsimple cmpsimple.c"End:*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?