TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: DARIN MCBRIDE
from: Jasen Betts
date: 1998-12-16 18:58:00
subject: (C_PLUSPLUS) PORTABLE DF2

>>>>>>>>>> CSplit: Version 2.3
>>>>>>>>>>
>>>>>>>>>> CSplit: Begin part 2/2 of mkpatch
>>>>>>>>>>
    MyFgets(l1,LENGTH,f1);
     if(!MyStrcmp(l1,l2)){
       pm1=ftell(f1);
       pm2=ftell(f2);
       for (n=1;n=matches) {
         fseek(f1,pl1,SEEK_SET);
         fseek(f2,pl2,SEEK_SET);
     return;
         }
       fseek(f1,pm1,SEEK_SET);
       fseek(f2,pm2,SEEK_SET);
       }
     }
   }
}




int process(const char* s1,const char*s2,int context){
FILE *f1,*f2;
char line1[LENGTH],line2[LENGTH];
long pos1,pos2,match1,match2;
int linenum,ld1,ld2;
char* buf;

f1=fopen(s1,"r"); if (!f1) return -1;
f2=fopen(s2,"r"); if (!f2) {fclose(f1);return -2;}

if(NULL==(buf=malloc(BUFFERSIZE))) return -3;
setvbuf(f1,buf,_IOFBF,BUFFERSIZE);
if(NULL==(buf=malloc(BUFFERSIZE))) return -3;
setvbuf(f2,buf,_IOFBF,BUFFERSIZE);

printf(keyword[NEW],s1);


  /* generate instructions to make f1 become f2 */

for(linenum=1;!feof(f1);linenum++){
  pos1=ftell(f1);
  pos2=ftell(f2);
 MyFgets(line1,LENGTH,f1);
 MyFgets(line2,LENGTH,f2);
  if( feof(f1) && feof(f2)) break;
  if(MyStrcmp(line1,line2)){
    /*** panic ***/
/*    printf("***** mismatch %ld %ld\n",pos1,pos2);*/
  /*  fputs(line1,stdout);fputs(line2,stdout); puts("*****~~~~~~"); */
    fseek(f1,pos1,SEEK_SET);
    fseek(f2,pos2,SEEK_SET);

    resync(f1,f2,context);

    match1=ftell(f1);
    fseek(f1,pos1,SEEK_SET);
    for(ld1=0;ftell(f1)>>>>>>>>> CSplit: End file MKPATCH.C
>>>>>>>>>>
>>>>>>>>>> CSplit: End part 2/2 crc: 8bfe
>>>>>>>>>>
                        

--- EzyQwk V1.20 01fa018d
* Origin: CSS Brisbane, Qld, Australia. [61-7-3367-3890] (3:640/350)
SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 634/397 635/506 728 639/252
SEEN-BY: 670/218
@PATH: 640/350 201 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.