home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
misc
/
pc_ham2
/
logfudge.2
< prev
next >
Wrap
Text File
|
1985-09-28
|
2KB
|
44 lines
10 REM LOGFUDGE VER 800130
20 ERRSET 9060,E1,E2
30 DIM X1$(64),X2$(64)\I=0
40 Q3=0\N1=0\N4=0
50 INPUT"Name of LOG file ? ",L1$\IF L1$=""THEN 50
60 INPUT"Which drive is it on ? ",D1 \ IF D1<1ORD1>4 THEN60
70 INPUT"NAME OF NEW LOG FILE ? ",L2$\IFL2$=""THEN70
75 INPUT"WHICH DRIVE IS IT TO BE PUT ON ? ",D2\IFD2<1ORD2>4THEN75
80 D1$=STR$(D1) \ D2$=STR$(D2) \D1$=D1$(2,2)\D2$=D2$(2,2)
90 OPEN#0,"*"+L1$+","+D1$ \ READ#0,N1 \ CLOSE#0
100 PRINT"There are ",N1," entries in ",L1$
110 OPEN#0,L1$+","+D1$ \ REM OPEN OLD LOG FILE
115 CREATE "*"+L2$+","+D2$,2 \ CREATE L2$+","+D2$,INT((N1/4)+(N1*.15))+1
120 OPEN#1,L2$+","+D2$ \ REM OPEN NEW LOG FILE
130 READ #0,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
135 I=I+1
140 D4=D1\D5=D2\D6=D3\T1=T\F1=F\S1=S\R1=R\P1=P
150 Q3=Q1\Q4=Q2\C1$=C$\M3$=M$\X1$=X$
160 IF I>=N1THEN180
170 READ #0,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
180 I=I+1\IF C$="/*"THEN220\REM SKIP
190 WRITE#1,&D4,&D5,&D6,T1,F1,C1$,S1,R1,M3$,P1,&Q3,&Q4,X1$
200 N4=N4+1
210 IF I>N1 THEN 240 ELSE 140
220 IF I>N1 THEN 240 ELSE 130
240 CLOSE#0
250 CLOSE#1
260 OPEN#0,"*"+L2$+","+D2$
270 WRITE#0,N4
280 CLOSE#0
290 !"There are now ",N4," entries in the log file"
9000 FOR I=1 TO 4
9010 IF FILE("SYSTEM,"+STR$(I))=2 THEN EXIT 9030
9020 NEXT \ GOTO 9040
9030 CHAIN "SYSTEM,"+STR$(I)
9040 PRINT"put a system disc in any drive, then hit 'RETURN'"
9050 INPUT" ",A$ \ GOTO 9000
9060 ERRSET 9060,E1,E2
9070 IF E2=15THEN9000
9080 IFE1=9010THENIFI<1ORI>4THEN9040ELSE9020
9090 IFE2<>7THEN9100ELSEPRINT"FILE ERROR"\GOTO9000
9100 IFE2<>8THEN9110ELSEPRINT"HARD DISC ERROR"\GOTO9000
9110 PRINT"ERROR ",E2," AT LINE ",E1\GOTO9000