/* ---------- */ /* najijoin.c */ /* ---------- */ /* naji file spliting and joining functions */ /* this .c file is a part */ /* of libnaji version 0.6.1 */ /* libnaji is based on */ /* the original najitool */ /* both najitool and libnaji */ /* are public domain and are */ /* made by the same author */ /* please read license.txt */ /* made by NECDET COKYAZICI */ #include "libnaji.h" void filechop(long copytil, char *namein, char *nameout, char *nameout2) { long i; long fsize; int a; najin(namein); najout(nameout); najout2(nameout2); for (i=0; i endpos) { fprintf(stderr, "Error, start position cannot be greater than end possition.\n\n"); exit(15); } if (startpos > filesize) { fprintf(stderr, "Error, start position is greater than the file size.\n\n"); exit(16); } if (endpos > filesize) { fprintf(stderr, "Error, end position is greater than the file size.\n\n"); exit(17); } fseek(naji_input, startpos, SEEK_SET); for (i=startpos; i