From 0df279ad8735176f7bb3ffbac1971cd5bdc6572a Mon Sep 17 00:00:00 2001 From: cheapie Date: Wed, 26 Aug 2015 02:28:37 -0400 Subject: One source file for XChat and HexChat 4hexchat.c was really ugly and I'm removing the need for it. Now there's a HEXCHAT define, and turning it on makes all the XChat API functions aliases to the HexChat API functions --- 4hexchat.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 4hexchat.c (limited to '4hexchat.c') diff --git a/4hexchat.c b/4hexchat.c deleted file mode 100644 index 956a4a7..0000000 --- a/4hexchat.c +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include - -int main(int argc, char *argv[]) { - if(argc < 3){puts("Syntax: 4Hexchat Input Output"); return -1;} - - FILE *File = fopen(argv[1],"rb"); - if(File == NULL) { - fputs("Couldn't open file for reading",stderr); return 0; - } - fseek(File, 0, SEEK_END); - long FileSize = ftell(File); - rewind(File); - char *Buffer = (char*)malloc(sizeof(char)*FileSize); - if(Buffer == NULL) { - fclose(File); - fputs("Can't allocate memory",stderr); return 0; - } - if(FileSize != fread(Buffer,1,FileSize,File)) { - fclose(File); - fputs("Can't read from file",stderr); return 0; - } - fclose(File); - File = fopen(argv[2],"wb"); - if(File == NULL) { - fputs("Couldn't open file for writing",stderr); return 0; - } - - int i; - for(i=0;i