diff -C 3 ./archive.c /had/c/archive.c *** ./archive.c Thu Jan 12 06:51:38 1995 --- /had/c/archive.c Sat Jan 28 09:58:30 1995 *************** *** 19,24 **** --- 19,31 ---- HA archive handling ***********************************************************************/ + /* ----------------- + This file contains small changes by Johannes Schwabe to fix handling + of long filenames. date: January 1995. + Also, delold() was hacked to ignore case (strcmp -> stricmp). Will only + occur if compiled with -DOS2. + ------------------ */ + #include #include #include *************** *** 27,33 **** #include "archive.h" #include "haio.h" ! #define STRING 32 int arcfile=-1; char *arcname=NULL; --- 34,40 ---- #include "archive.h" #include "haio.h" ! #define STRING 300 int arcfile=-1; char *arcname=NULL; *************** *** 66,75 **** for (offset=0;;offset++) { if (read(arcfile,sptr+offset,1)!=1) error(1,ERR_READ,arcname); if (sptr[offset]==0) break; ! if ((offset&(STRING-1))==0) { if ((sptr=realloc(sptr,STRING))==NULL) ! error(1,ERR_MEM,"getstring()"); ! } } return sptr; } --- 73,82 ---- for (offset=0;;offset++) { if (read(arcfile,sptr+offset,1)!=1) error(1,ERR_READ,arcname); if (sptr[offset]==0) break; ! /* if ((offset&(STRING-1))==0) { if ((sptr=realloc(sptr,STRING))==NULL) ! error(1,ERR_MEM,"getstring()");}*/ ! /* BUG FIX: This is ERRORNEOUS */ } return sptr; } *************** *** 298,305 **** ++i; } else { ! if (!strcmp(md_strcase(hd->path),newhdr.path) && ! !strcmp(md_strcase(hd->name),newhdr.name)) { if (lseek(arcfile,oldpos,SEEK_SET)<0) error(1,ERR_SEEK,"delold()"); if (write(arcfile,"\xff",1)!=1) error(1,ERR_WRITE,arcname); --- 305,318 ---- ++i; } else { ! #ifdef OS2 ! /* MODIFICATION: strcmp replaced by stricmp for OS/2 */ ! if (!stricmp(md_strcase(hd->path),newhdr.path) && ! !stricmp(md_strcase(hd->name),newhdr.name)) { ! #else ! if (!strcmp(md_strcase(hd->path), newhdr.path) && ! !stricmp(md_strcase(hd->name),newhdr.name)) { ! #endif if (lseek(arcfile,oldpos,SEEK_SET)<0) error(1,ERR_SEEK,"delold()"); if (write(arcfile,"\xff",1)!=1) error(1,ERR_WRITE,arcname); diff -C 3 ./ha.c /had/c/ha.c *** ./ha.c Thu Jan 12 08:54:54 1995 --- /had/c/ha.c Thu Jan 26 20:42:22 1995 *************** *** 19,24 **** --- 19,27 ---- HA main program ***********************************************************************/ + /* This file contains a small add-on for emx, which converts '\' in + arguments automagically into '/'. Johannes Schwabe, January 1995 */ + #include #include #include *************** *** 761,766 **** --- 764,776 ---- int main(int argc, char *argv[]) { void (*command)(void); + #ifdef __EMX__ + int i,j; + for(i=0; i #include #include *************** *** 62,68 **** Cleanup routines */ ! void *cu_add(unsigned char flags, ...) { struct culist *ptr,*mark; va_list vaptr; --- 65,71 ---- Cleanup routines */ ! void *cu_add(unsigned /*char*/ flags, ...) { struct culist *ptr,*mark; va_list vaptr;