home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
755.LOGEDIT.2
< prev
next >
Wrap
Text File
|
1985-09-28
|
4KB
|
94 lines
10 REM LOGEDIT VER 790821
20 Q3=0\N1=0\N4=0 \ GOSUB 5010
30 ERRSET 800,E1,E2
40 INPUT"Name of LOG file ? ",L1$\IF L1$=""THEN 40
50 INPUT"Which drive is it on ? ",D1 \ IF D1<1ORD1>4 THEN50
60 INPUT"Name of file when edited ? ",L2$\IF L2$=""THEN60
65 IF LEN(L2$)<8THEN70ELSE!"LENTH ERROR (max is 7)"\GOTO60
70 IF L1$<>L2$ THEN80 ELSE PRINT"FILE NAME ERROR"\GOTO60
80 INPUT"Which drive do you want it put on ? ",D2 \ IF D2<1ORD2>4 THEN80
90 D1$=STR$(D1) \ D2$=STR$(D2) \D1$=D1$(2,2)\D2$=D2$(2,2)
100 IF FILE(L2$+","+D$(2,2))=2 THEN 120 ELSE 110
110 IF FILE(L2$+","+D$(2,2))=3 THEN 120 ELSE 130
120 PRINT"FILE ",L2$," ALREADY EXISTS ON DRIVE ",D$\GOTO 60
130 OPEN#0,"*"+L1$+","+D1$ \ READ#0,N1 \ CLOSE#0
140 PRINT"There are ",N1," entries in ",L1$
150 CREATE "*"+L2$+","+D2$ , 2 \ REM POINTER FILE
160 CREATE L2$+","+D2$ ,INT(N1/4+N1/10)+1
170 OPEN#0,L1$+","+D1$ \ REM OPEN OLD LOG FILE
180 OPEN#1,L2$+","+D2$ \ REM OPEN NEW LOG FILE
190 Q3=0
195 INPUT"Edit by entry number or call sign ( N or C ) ? ",A$\IF A$=""THEN 195
200 IF A$(1,1)="N" THEN Q=1
210 IF A$(1,1)="C" THEN Q=2
220 IF Q=0 THEN 190
230 IFQ>1THEN260ELSE INPUT"Number ? ",N3\IF N3<1THEN230
240 IF N3>N4 THEN 250 ELSE PRINT "SEQUENCE ERROR" \ GOTO 230
250 GOSUB 5025 \N4=N4+1\ IF N4=N3 THEN 320 ELSE 280
260 IF Q>2 THEN 190 ELSE INPUT"Call sign ? ",C1$
270 GOSUB 5025 \N4=N4+1\ IF C$=C1$ THEN 320 ELSE 280
280 REM WRITE TO DISC
290 GOSUB 5035 \ IF N4>=N1 THEN 730 \ REM CLOSEOUT
300 IFQ=1 THEN 250
310 GOTO 270
320 REM
330 I=N4 \ GOSUB 5015 \ GOSUB 5020 \Q3=1
340 INPUT"Change QSL information ? ",A$\IF A$="" THEN 340
350 IF A$(1,1)="N"THEN 420
360 INPUT"Was a card sent ? ",A$\IF A$="" THEN 360
370 IF A$(1,1)="Y" THEN Q1=1 ELSE Q1=0
380 INPUT"Was one received ? ",A$\IF A$(1,1)="" THEN 380
390 IF A$(1,1)="Y" THEN Q2=1 ELSE Q2=0
400 INPUT"ANY OTHER CHANGES ?",A$\IFA$(1,1)=""THEN 400
410 IF A$(1,1)="N" THEN 660
420 INPUT"Change the comments ?",A$\IF A$(1,1)="" THEN 420
430 IF A$(1,1)="Y" THEN INPUT"...? ",X$
440 INPUT"ANY OTHER CHANGES ? ",A$\IF A$=""THEN440
450 IF A$(1,1)="N"THEN 660
460 INPUT"Change time ? ",A$\IF A$="" THEN 460
470 IF A$(1,1)<>"Y" THEN 490
480 INPUT "New time ? ",T \ IF T<0 OR T>2400 THEN 480
490 INPUT"Change the date ?",A$\IFA$=""THEN490
500 IFA$(1,1)<>"Y"THEN 540
510 INPUT"Day ? ",D1\IF D1<1ORD1>31THEN510
520 INPUT"Month ( 1-12 ) ? ",D2\IF D2<1ORD2>12 THEN 520
530 INPUT"Year (19xx) ? ",D3\IF D3<1900 THEN 530 ELSE D3=D3-1900è540 INPUT"Change the FREQ/BAND information ? ",A$\IF A$=""THEN540
550 IF A$(1,1)<>"Y"THEN560 ELSE INPUT"Freq/band ? ",F
560 INPUT"Change the signal reports ?",A$\IF A$=""THEN560
570 IFA$(1,1)<>"Y"THEN 590
580 INPUT1"Sent ? ",S\PRINTTAB(24),\INPUT"Received ? ",R
590 INPUT "Change the power ? ",A$\IF A$=""THEN590
600 IF A$(1,1)<>"Y"THEN610 ELSE INPUT"Power ? ",P
610 INPUT"Change the mode ?",A$\IF A$=""THEN610
620 IFA$(1,1)<>"Y"THEN630 ELSE INPUT"Mode ? ",M$\IFM$=""THEN620
630 INPUT"Correct the call sign ? ",A$\IF A$=""THEN 630
640 IF A$(1,1)<>"Y" THEN 660
650 INPUT"Call sign ? ",C$\IF C$=""THEN 650
660 GOSUB 5015 \ GOSUB 5020
670 INPUT"OK ?",A$\IF A$=""THEN670
680 IF A$(1,1)="N" THEN 340 ELSE GOSUB 5035
685 IFN4>=N1THEN730
690 INPUT"Another entry ?",A$\IF A$="" THEN 690
700 IF A$(1,1)="Y" THEN 190
710 REM CLOSE OUT LOGS
720 GOSUB 5025 \N4=N4+1 \ GOSUB 5035 \ IF N4<N1 THEN 720
730 CLOSE#0
740 CLOSE#1
750 OPEN#0,"*"+L2$+","+D2$
760 WRITE#0,N4
770 CLOSE#0
780 IF Q3=1 THEN 790 ELSE IF Q=2 THEN PRINTC1$+" WAS NOT IN THE LOG"
790 GOTO 5045 \ REM TERMINATE
800 ERRSET 800,E1,E2
810 IFE2<>15THEN820ELSEIFE1<130THEN900ELSE880
820 IF E1<>5560 THEN 830 ELSE IF I>4 THEN 5570 ELSE 5565
830 IF E1<>5650 THEN 840 ELSE IF I>4 THEN 5670 ELSE 5660
840 IF E2<>7 THEN 850 ELSE PRINT "FILE ERROR"\GOTO 900
850 IF E2<>8 THEN 860 ELSE PRINT "HARD DISC ERROR"\GOTO 900
860 REM
870 PRINT"ERROR ",E2," AT LINE ",E1
880 DESTROY"*"+L2$+","+D2$
890 DESTROY L2$+","+D2$
900 GOTO 790
5000 REM SUBROUTINE PACKAGE VER 790821