[情报] 如何合并别人的表情符号档

楼主: xisland (窄宅)   2013-11-30 09:56:46
// 此程式可将2个表情符号档合并成1个
#include <stdio.h>
char buf1[10240];
char buf2[10240];
char buf3[20480];
main(int argc, char **argv)
{
FILE *fus1;
FILE *fus2;
FILE *fus3;
int i,l1,l2,l3;
int *n1;
int *n2;
int *n3;
fus1=fopen(argv[1],"rb");
fus2=fopen(argv[2],"rb");
fus3=fopen(argv[3],"wb");
l1=filelength(fileno(fus1));
l2=filelength(fileno(fus2));
l3=l1+l2-2;
fread(buf1,l1,1,fus1);
fread(buf2,l2,1,fus2);
n1=&buf1[0];
n2=&buf2[0];
n3=&buf3[0];
for (i=0;i<l1;i++)
buf3[i]=buf1[i];
for (i=0;i<l2-2;i++)
buf3[i+l1]=buf2[i+2];
*n3=*n1+*n2;
fwrite(buf3,l3,1,fus3);
fclose(fus1);
fclose(fus2);
fclose(fus3);
}

Links booklink

Contact Us: admin [ a t ] ucptt.com