ibmbin-request@crdgw1.crd.ge.com (05/31/90)
[Date of last change 02/27/90 Release 1.2] UseNet CBIP Starter's Kit The files contained herein are public domain, with the following exceptions: ARCE 4.0c, Copyright (c) 1986-89, Wayne Chin and Vernon D. Buerg. ALL RIGHTS RESERVED. DeZip v2.0 (C) Copyright 1989 by R. P. Byrne This kit contains what you will need to begin downloading files from comp.binaries.ibm.pc, or from various archive sites. This kit contains: 1) Instructions 2) BASIC source for UUDECODE 3) Pascal source for UUDECODE 4) C source for UUDECODE 5) ARC-E 4.0C, ARC extractor, in uuencoded form 6) LOOZ 2.10, ZOO extractor, in uuencoded form 7) DEZIP, ZIP extractor, in uuencoded form You will need: 1) Pascal or C compiler or BASIC Interpreter 2) File editor What to do: You will need to split this file into 7 parts. Each part is separated by a line stating "---CUT HERE---" and a short description. Using a text editor, separate the parts for the Pascal source, the C source, and the UUEncoded extraction programs. Then compile one of the sources to create an executable version of uudecode, and then run it on the uuencoded files. If you called the ARC-E file arce.uue, then type: uudecode arce.uue This will give you ARC-E.COM, an executable ARC file extractor. Type 'arc-e' for options. This file will allow you to extract all other ARC files. NOTE: This file is for the purpose of ease of use on any system. Although other formats (such as shar files) are easier to handle, they present a problem on the portability between systems. ---CUT HERE--- Save following as UUDECODE.BAS and run under BASIC Interp. 1000 KEY OFF 1001 DEFINT A-Z 1010 REM Trap error opening input file 1020 ON ERROR GOTO 1600 1030 CLS 1040 LOCATE 5,11 1050 PRINT STRING$(40," ") 1060 LOCATE 5,11 1070 INPUT "Enter name of input file: ", INFILE$ 1080 OPEN INFILE$ FOR INPUT AS #1 1090 LOCATE 8,10 1100 PRINT STRING$(40," ") 1110 REM Trap error opening output file 1120 ON ERROR GOTO 1640 1130 LOCATE 8,10 1140 INPUT "Enter name of output file: ", OUTFILE$ 1150 OPEN "R", #2,OUTFILE$, 1 1160 FIELD #2, 1 AS N$ 1170 REM Trap error at end of file 1180 ON ERROR GOTO 1680 1190 REM Search for header line 1200 LINE INPUT #1,A$ 1210 IF LEFT$(A$,5) <>"begin" THEN 1200 1220 LOCATE 11,10 1230 PRINT "Header = ";A$ 1240 SP = ASC(" ") 1250 DIM BUF(100) 1260 RECNO# = 1 1270 REM Main loop 1280 LINE INPUT #1, A$ 1290 P = 0 1300 BYTES = ASC(LEFT$(A$,1)) - SP 1310 IF BYTES = 64 THEN BYTES = 0 1320 IF BYTES = 0 THEN 1560 1330 COUNT% = INT(BYTES/3+.9): COUNT%=COUNT%*4 1340 FOR I = 2 TO COUNT% STEP 4 1350 X1 = ASC(MID$(A$,I,I)) - SP 1360 IF X1 = 64 THEN X1 = 0 1370 X2 = ASC(MID$(A$,I+1,I+1)) - SP 1380 IF X2 = 64 THEN X2 = 0 1390 X3 = ASC(MID$(A$,I+2,I+2)) - SP 1400 IF X3 = 64 THEN X3 = 0 1410 X4 = ASC(MID$(A$,I+3,I+3)) - SP 1420 IF X4 = 64 THEN X4 = 0 1440 IF P<BYTES THEN P = P + 1: BUF(P) = (X2\16) + (X1*4) 1460 IF P<BYTES THEN P = P + 1: BUF(P) = (X3\4) + ((X2 MOD 16) * 16) 1480 IF P<BYTES THEN P = P + 1: BUF(P) = X4 + ((X3 MOD 4) * 64) 1490 NEXT I 1500 FOR I = 1 TO P 1510 LSET N$ = CHR$(BUF(I)) 1520 PUT #2, RECNO# 1530 RECNO# = RECNO# + 1 1540 NEXT I 1550 GOTO 1280 1560 END 1570 REM 1580 REM Error trapping routines 1590 REM 1600 LOCATE 22,20 1610 PRINT "Can't open input file" 1620 GOSUB 1740 1630 RESUME 1020 1640 LOCATE 22,20 1650 PRINT "Can't open output file" 1660 GOSUB 1740 1670 RESUME 1090 1680 LOCATE 22,20 1690 PRINT "Header line not found" 1700 GOSUB 1740 1710 LOCATE 24,1 1720 END 1740 FOR I = 1 TO 5000: NEXT I 1750 LOCATE 22,20 1760 PRINT STRING$(30," ") 1770 RETURN