Comparing files QWK.C and 1B05\QWK.C
***** QWK.C

void addcrc(int subnum, long crc);
int  getcrcs(int subnum, long crc[]);

unsigned long icrc(void);
unsigned long ucrc(char far *, unsigned int);
void              genpt(uint, char far *);

/****************************************************************************/
***** 1B05\QWK.C

/****************************************************************************/
*****

***** QWK.C
                        strcpy(tmp,piece[i]->from);
                        p=strchr(tmp,'@');  /* rrchr */    /* remove the system id */
                        if(p!=NULL) *p=0; }
***** 1B05\QWK.C
                        strcpy(tmp,piece[i]->from);
                        p=strchr(tmp,'@');              /* remove the system id */
                        if(p!=NULL) *p=0; }
*****

***** QWK.C
                                        strcpy(str,useron.alias);
                                        strupr(str);                                                            /* rrchr */
                                        if((p=strchr(msg[k]->from,'@'))!=NULL) { /* don't send */
***** 1B05\QWK.C
                                        strcpy(str,useron.alias);
                                        strupr(str);
                                        if((p=strchr(msg[k]->from,'@'))!=NULL) { /* don't send */
*****

***** QWK.C
                                        if((p=strchr(str,'@'))!=NULL)
                                                *p=0;
                                        if(stricmp(str,useron.alias))   /* not from this user */
***** 1B05\QWK.C
                                        if((p=strchr(str,'@'))!=NULL)
                                                p=0;
                                        if(stricmp(str,useron.alias))   /* not from this user */
*****

***** QWK.C
                                        strcpy(tmp,msg[k]->from);
                                        p=strchr(tmp,'@');   /* rrchr */ /* remove the system id */
                                        if(p!=NULL) *p=0; }
***** 1B05\QWK.C
                                        strcpy(tmp,msg[k]->from);
                                        p=strchr(tmp,'@');              /* remove the system id */
                                        if(p!=NULL) *p=0; }
*****

***** QWK.C
                        continue;                                                       /* a subj starting with NE: */
                if((p=strchr(msg[k]->from,'@'))!=NULL) {    /* rrchr */
                        if(!strcmp(p+1,qhub[hubnum]->id))       /* or msgs that came from */
***** 1B05\QWK.C
                        continue;                                                       /* a subj starting with NE: */
                if((p=strchr(msg[k]->from,'@'))!=NULL) {
                        if(!strcmp(p+1,qhub[hubnum]->id))       /* or msgs that came from */
*****

***** QWK.C
                        strcpy(tmp,msg[k]->from);
                        p=strchr(tmp,'@');      /* rrchr */       /* remove system id */
                        if(p!=NULL) *p=0; }
***** 1B05\QWK.C
                        strcpy(tmp,msg[k]->from);
                        p=strchr(tmp,'@');          /* remove system id */
                        if(p!=NULL) *p=0; }
*****

***** QWK.C
{
        uchar   ch,str[256],fname[128],block[128],cptab[1024]
                        ,*AttemptedToUploadREPpacket="Attempted to upload REP packet";
***** 1B05\QWK.C
{
        uchar   ch,str[256],fname[128],block[128]
                        ,*AttemptedToUploadREPpacket="Attempted to upload REP packet";
*****

***** QWK.C
        int     rep,file;
        uint    h,i,j,k,n,x,y,msgs,total_crcs,last_sub=-1;
        long    l,size,misc,*crc,thiscrc;
        node_t  node;
***** 1B05\QWK.C
        int     rep,file;
        uint    h,i,j,k,n,x,y,msgs;
        long    l,size,misc;
        node_t  node;
*****

***** QWK.C

//genpt(0,cptab);
sprintf(str,"%s%s.REP",temp_dir,sys_id);
***** 1B05\QWK.C

sprintf(str,"%s%s.REP",temp_dir,sys_id);
*****

***** QWK.C
bputs(text[QWKUnpacking]);
if((crc=(long *)farmalloc(SUB_CRCS*4))==NULL) {
        close(rep);
        errormsg(WHERE,ERR_ALLOC,nulstr,SUB_CRCS*4);
        return; }
for(l=128;l<size;l+=i*128) {
***** 1B05\QWK.C
bputs(text[QWKUnpacking]);
for(l=128;l<size;l+=i*128) {
*****

***** QWK.C

                /* if posting, add to new-scan config for QWKnet nodes automatically */
        if(useron.rest&FLAG('Q'))
            sub[usrsub[j][k]]->misc|=SUB_NSCAN;

                sprintf(str,"%-25.25s","SBBS");
***** 1B05\QWK.C

                sprintf(str,"%-25.25s","SBBS");
*****

***** QWK.C


        if(useron.rest&FLAG('P')) {
***** 1B05\QWK.C

        if(useron.rest&FLAG('P')) {
*****

***** QWK.C

                if(usrsub[j][k]!=last_sub) {
                        total_crcs=getcrcs(usrsub[j][k],crc);
                        last_sub=usrsub[j][k]; }

                for(n=0;n<=0xfff;n++) {
***** 1B05\QWK.C

                for(n=0;n<=0xfff;n++) {
*****

***** QWK.C
                lread(rep,qwkbuf+128,(long)(i-1L)*128L);
/*
                icrc();
                thiscrc=ucrc((char *)qwkbuf+128,(long)(i-1L)*128L);
                for(x=0;x<total_crcs;x++)
                        if(thiscrc==crc[x])
                                break;
                if(x<total_crcs) {
                        bputs("\1r\1h\1iDuplicate message!\r\n");
                        farfree((char *)qwkbuf);
                        logline("P!","Duplicate post attempt");
                        continue; }
                addcrc(usrsub[j][k],thiscrc);
*/
                if(!qwktomsg(qwkbuf,str,0,usrsub[j][k])) {
***** 1B05\QWK.C
                lread(rep,qwkbuf+128,(long)(i-1L)*128L);
                if(!qwktomsg(qwkbuf,str,0,usrsub[j][k])) {
*****

***** QWK.C
farfree(crc);
}

***** 1B05\QWK.C
}

*****

***** QWK.C
{
        uchar   str[256],fname[128],block[128],ch,cptab[1024];
        uchar   huge *qwkbuf;
        int     qwk,file,last_sub=-1;
        uint    h,i,j,n,msgs,x,total_crcs;
        long    l,size,thiscrc,*crc;
        time_t  t;
***** 1B05\QWK.C
{
        uchar   str[256],fname[128],block[128],ch;
        uchar   huge *qwkbuf;
        int     qwk,file;
        uint    h,i,j,n,msgs;
        long    l,size;
        time_t  t;
*****

***** QWK.C

//genpt(0,cptab);
useron.number=1;
***** 1B05\QWK.C

useron.number=1;
*****

***** QWK.C
bputs(text[QWKUnpacking]);

if((crc=(long *)farmalloc(SUB_CRCS*4))==NULL) {
        close(qwk);
        errormsg(WHERE,ERR_ALLOC,nulstr,SUB_CRCS*4);
        return; }
for(l=128;l<size;l+=i*128) {
***** 1B05\QWK.C
bputs(text[QWKUnpacking]);
for(l=128;l<size;l+=i*128) {
*****

***** QWK.C
                        break;
        if(j>=qhub[hubnum]->subs)       /* ignore messages for subs not in config */
                continue;

        j=qhub[hubnum]->sub[j];
        if(j!=last_sub) {
                total_crcs=getcrcs(j,crc);
                last_sub=j; }

***** 1B05\QWK.C
                        break;
        if(j>=qhub[hubnum]->subs) {  /* ignore messages for subs not in config */
        /***
                sprintf(str,"%s.QWK contained messages for conference %u"
                        ,qhub[hubnum]->id,n);
                bprintf("%s\r\n",str);
                errorlog(str);
        ***/
                continue; }
        j=qhub[hubnum]->sub[j];


*****

***** QWK.C
        lread(qwk,qwkbuf+128,(long)(i-1L)*128L);

/*
        icrc();
        thiscrc=ucrc((char *)qwkbuf+128,(i-1)*128);
        for(x=0;x<total_crcs;x++)
                if(thiscrc==crc[x])
                        break;

        if(x<total_crcs) {
                bputs("\1r\1h\1iDuplicate message!\r\n");
                farfree((char *)qwkbuf);
                sprintf(str,"Duplicate post on %s from QWK hub: %s"
                        ,sub[j]->code,qhub[hubnum]->id);
                continue; }

        addcrc(j,thiscrc);
*/
        if(!qwktomsg(qwkbuf,str,1,j)) {
***** 1B05\QWK.C
        lread(qwk,qwkbuf+128,(long)(i-1L)*128L);
        if(!qwktomsg(qwkbuf,str,1,j)) {
*****

***** QWK.C
remove(str);
farfree(crc);
}
***** 1B05\QWK.C
remove(str);
}
*****


