From:	CSBVAX::MRGATE!RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP  2-SEP-1988 07:55
To:	ARISIA::EVERHART
Subj:	ARC mods 7/7


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Thu,  1 SEP 88 06:27:43 PDT
Received: from CUNYVM.CUNY.EDU by KL.SRI.COM with TCP; Thu, 1 Sep 88 06:01:36 PDT
Received: from UKACRL.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 7774; Thu, 01 Sep 88 09:00:08 EDT
Received: from RL.IB by UKACRL.BITNET (Mailer X1.25) with BSMTP id 3280; Thu,
 01 Sep 88 13:59:16 BST
Received: from RL.IB by UK.AC.RL.IB (Mailer X1.25) with BSMTP id 3278; Thu, 01
          Sep 88 13:59:15 BS
Via:      UK.AC.KCL.CC.OAK;  1 SEP 88 13:59:11 BST
Date:     1-SEP-1988 13:59:58 GMT
From:     UDAA055%OAK.CC.KCL.AC.UK@CUNYVM.CUNY.EDU
To:       info-vax@KL.SRI.COM
Subject:  ARC mods 7/7
Sender:   Andy Harper, Kings College London <A.Harper%OAK.CC.KCL.AC.UK@CUNYVM.CUNY.EDU>

+-+-+-+ Beginning of part 7 +-+-+-+
X              case 2:                  /* a repeat, but too short */
X                   state = SENDNEWC;   /* send the second one next time */
X                   return lastc;
X
X              default:                 /* a run - compress it */
X                   state = SENDCNT;    /* send repeat count next time */
X                   return DLE;         /* send repeat marker this time */
X              
X         
X
X    case SENDNEWC:                     /* send second char of short run */
X         state = SENTCHAR;
X         return lastc = c;
X
X    case SENDCNT:                      /* sent DLE, now send count */
X         state = SENDNEWC;
X         return repcnt;
X
X    default:
X         abort("Bug - bad ncr state\n");
X    
X
X
Xstatic INT getch(f)                    /* special get char for packing */
XFILE *f;                               /* file to get from */
X$
X register INT c;                             /* a char from the file */
X
X    if((c=fgetc(f))!=EOF)              /* if not the end of file */
X    $    crcval = addcrc(crcval,c);    /* then update CRC check value */
X         stdlen++;                     /* and bump length counter */
X    
X
X    return c;
X
X
XINT putc_pak(c,f)                          /* put a packed byte into archive */
Xchar c;                                /* byte to put */
XFILE *f;                               /* archive to put it in */
X$
X    putc_tst(code(c),f);               /* put encoded byte, with checks */
X
X
$ GOSUB UNPACK_FILE
$ EXIT
-+-+-+-+-+ End of part 7 +-+-+-+-+-

