home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / COMPRESS / FWKCS109.ZIP / FWKTDR19.BAS < prev    next >
Encoding:
BASIC Source File  |  1990-04-30  |  15.5 KB  |  432 lines

  1. 10 ' This was written by Fred Kantor when he was tired,
  2. 20 '  much of it circa 1989 Feb 21 00:30:39;
  3. 30 '  some modification circa 1989 Jul 06 20:04:06
  4. 40 '  latest modification circa 1990 Apr 30
  5. 50 ' The purpose first was to make it easier for people to adopt ZIP format,
  6. 60 ' which Phil Katz has dedicated to the public domain, and to remove
  7. 70 ' content(s) signature duplicates.
  8. 80 CLS
  9. 90 DIM U$(512) ' U -- Unalphabetized
  10. 100 UFLAG=0     ' U
  11. 110 UDIRS$="DIR99 " ' U
  12. 120 UCONT$="                               |" ' U  as in continuation line(s)
  13. 130 LUCONT=LEN(UCONT$) ' U
  14. 140 S78$=STRING$(78," ")
  15. 150 BADCHARS$=" ./\?*"+CHR$(34)
  16. 160 LOCATE 5,1
  17. 170 PRINT "PLEASE be sure you have proper backups..."
  18. 180 LOCATE 11,1
  19. 190 PRINT "This program revises text directory(s) DIRnnn. It is supposed to be run in the"
  20. 200 PRINT "same logical [sub]directory as the text directory(s) it modifies. One use is"
  21. 210 PRINT "to freshen data about files of the form *.ZIP, to match the DOS directory"
  22. 220 PRINT "listing, and rename the old DIRnnn file as DIRnnn.OLD. It variously may call"
  23. 230 PRINT "FWKDG (Ver. 1.08)), DSA, QSORT; they should be in default directory or on path."
  24. 240 LOCATE 22,1
  25. 250 PRINT "ZIP format introduced and dedicated to public domain by Phil Katz, 1989;"
  26. 260 PRINT "QSORT Ver. 3.20 copyright 1985,86,87,88 by Ben Baker;     |    Please thank all"
  27. 270 PRINT "FWKDG (tm) copyright 1988,89,90 by Frederick W. Kantor.   |    of these people.";
  28. 280 LOCATE 8,25
  29. 290 PRINT "C A V E A T   O P E R A T O R"
  30. 300 LOCATE 4,1
  31. 310 PRINT "Your use of this program is at solely your own risk: PLEASE HAVE PROPER BACKUPS"
  32. 320 LOCATE 1,1
  33. 330 PRINT "FWKTDR(tm) Text Directory Reviser,"
  34. 340 LOCATE 2,1
  35. 350 PRINT "Version 01.9"
  36. 360 LOCATE 1,37
  37. 370 PRINT "Copyright (C) 1989,90 by Frederick W Kantor."
  38. 380 LOCATE 2,61
  39. 390 PRINT "All rights reserved."
  40. 400 '
  41. 410 LOCATE 17,1
  42. 420 PRINT "WHAT am i supposed to be doing this time? just type in the number:"
  43. 430 PRINT "   1. handle newly zipped files"
  44. 440 PRINT "   2. delete obsolete_file listings from the text directories"
  45. 450 PRINT "**> press any other alphameric key to abort <**"
  46. 460 S11$=INPUT$(1)
  47. 470 IF S11$<>"1" AND S11$<>"2" THEN CLOSE:SYSTEM
  48. 480 GOSUB 4260
  49. 490 IF S11$<>"2" THEN GOTO 760
  50. 500 PRINT "WHAT file format should i expect the filenames to be in?
  51. 510 PRINT "   1. look in DELETED.LOG, where filenames start at column 18"
  52. 520 PRINT "   2. filenames will be listed flush left with no gap in filename.ext"
  53. 530 PRINT "**> press any other alphameric key to abort <**"
  54. 540 S12$=INPUT$(1)
  55. 550 IF S12$<>"1" AND S12$<>"2" THEN CLOSE:SYSTEM
  56. 560 GOSUB 4260
  57. 570 IF S12$="1" THEN GOTO 760
  58. 580 PRINT "If the input file is in the present directory, then the filename.ext"
  59. 590 PRINT "is enough; otherwise, please give [d:]\path\filename.ext"
  60. 600 LOCATE 20,1:PRINT "**> to abort, press carriage return without filename <**";
  61. 610 LOCATE 19,1:INPUT "    where should i look for the list to work from? ",INFILE1$
  62. 620 IF INFILE1$="" THEN CLOSE:SYSTEM
  63. 630 GOSUB 4260
  64. 640 OPEN INFILE1$ FOR INPUT AS 1
  65. 650 OPEN "####list.0##" FOR OUTPUT AS 2
  66. 660 WHILE NOT EOF(1)
  67. 670 LINE INPUT #1,A$
  68. 680 IF A$="" THEN GOTO 740
  69. 690 IF INSTR(BADCHARS$,LEFT$(A$,1))<>0 THEN GOTO 740
  70. 700 JN=INSTR(A$," ")
  71. 710 IF JN=1 OR JN>13 THEN GOTO 740
  72. 720 IF JN=0 THEN JN=13
  73. 730 PRINT #2,LEFT$(A$,JN-1)
  74. 740 WEND
  75. 750 GOTO 1020
  76. 760 PRINT "in which [sub]directory should i look for ";
  77. 770 IF S11$<>"2" THEN GOTO 800
  78. 780 PRINT "DELETED.LOG ?"
  79. 790 GOTO 810
  80. 800 PRINT "the newly zipped files?"
  81. 810 INPUT "[d:]\path\  [default is the present dir] = ",PATH1$
  82. 820 IF PATH1$>"" AND RIGHT$(PATH1$,1)<>"\" AND RIGHT$(PATH1$,1)<>"/" THEN PATH1$=PATH1$+"\"
  83. 830 CLS
  84. 840 '
  85. 850 IF S11$="1" THEN GOTO 1080
  86. 860 '
  87. 870 'make sorted filename list from DELETED.LOG
  88. 880 '
  89. 890 OPEN PATH1$+"DELETED.LOG" FOR INPUT AS 1
  90. 900 OPEN "####list.0##" FOR OUTPUT AS 2
  91. 910 WHILE NOT EOF(1)
  92. 920 LINE INPUT #1,A$
  93. 930 IF LEN(A$)<18 THEN GOTO 1010
  94. 940 B$=MID$(A$,18,13)  ' 13 because some people may have inserted 'd' rather
  95. 950 '                    than overwritten the blank in column 17, and moved
  96. 960 '                    the column one space to right
  97. 970 IF LEFT$(B$,1)=" " AND LEN(B$)>1 THEN B$=MID$(B$,2):GOTO 970
  98. 980 IF RIGHT$(B$,1)=" " AND LEN(B$)>1 THEN B$=LEFT$(B$,LEN(B$)-1):GOTO 980
  99. 990 IF B$="" OR B$=" " OR B$="." THEN GOTO 1010
  100. 1000 PRINT #2,B$
  101. 1010 WEND
  102. 1020 CLOSE 1,2
  103. 1030 SHELL "qsort <####list.0## >####list.1##"
  104. 1040 KILL "####list.0##"
  105. 1050 ' ####LIST.1## contains list of filenames to clear from text directories
  106. 1060 GOTO 1100
  107. 1070 '
  108. 1080 'make sorted list of .ZIP files
  109. 1090 SHELL "dir "+PATH1$+"*.zip|dsa|find "+CHR$(34)+".ZIP"+CHR$(34)+"|qsort >####list.1##"
  110. 1100 CLS
  111. 1110 OPEN "####list.1##" FOR INPUT AS 1
  112. 1120 IF LOF(1)<5 THEN GOTO 2840 ' (includes .exe and CRLF) no work to do
  113. 1130 '
  114. 1140 DIRSONLY=1:GOSUB 2700 ' to make a current DIRSONLY.TXT
  115. 1150 OPEN "dirsonly.txt" FOR INPUT AS 2
  116. 1160 IF LOF(2)>4 THEN GOTO 1210
  117. 1170 LOCATE 21,1
  118. 1180 PRINT "i needed DIRSONLY.TXT: please ask me in same subdir as text directories"
  119. 1190 SYSTEM
  120. 1200 '
  121. 1210 OPEN "####list.2##" FOR OUTPUT AS 3
  122. 1220 LOCATE 15,1
  123. 1230 PRINT "i'm looking in DIRSONLY.TXT for which text directories have which files"
  124. 1240 '
  125. 1250 IF EOF(1) THEN GOTO 1680
  126. 1260 LINE INPUT #1,A$
  127. 1270 '
  128. 1280 IF S11$="1" THEN GOTO 1320
  129. 1290 P=LEN(A$) ' in this case , #1 labels a list of filenames
  130. 1300 GOTO 1340
  131. 1310 '
  132. 1320 IF MID$(A$,24,1)=" " THEN MID$(A$,24,1)="0" ' as in text dirs
  133. 1330 P=INSTR(A$,".") '        for filename comparisons to and including '.'
  134. 1340 IF EOF(2) THEN GOTO 1680
  135. 1350 LINE INPUT #2,B$
  136. 1360 IF LEFT$(A$,P)<LEFT$(B$,P) THEN GOTO 1250
  137. 1370 IF LEFT$(A$,P)>LEFT$(B$,P) THEN GOTO 1340
  138. 1380 IF MID$(B$,15,3)<>"DIR" THEN GOTO 1250' in DIRGUIDE.TXT, DIRs precede paths
  139. 1390 IF S11$="2" THEN GOTO 1570
  140. 1400 IF MID$(A$,P+1,3)=MID$(B$,P+1,3) THEN GOTO 1250 ' already has .ZIP, so skip
  141. 1410 '
  142. 1420 ' make a string for sorting, using these fields:
  143. 1430 '
  144. 1440 ' case 1, S11$="1": replace old with new
  145. 1450 '
  146. 1460 ' <DIRnnn>< ><old_name.ext>< ><new_name.ext  filelength date>
  147. 1470 '    6     1       12       1               31                bytes
  148. 1480 '
  149. 1490 '
  150. 1500 ' case 2, S11$="2": delete text_directory_entry of deleted file
  151. 1510 '
  152. 1520 ' <DIRnnn>< ><filename.ext>< ><dddddddddddd>
  153. 1530 '    6     1       12       1       12       bytes
  154. 1540 '
  155. 1550 '
  156. 1560 '
  157. 1570 S1$=MID$(B$,15,6) '   6 bytes,   e.g., up to and including DIR999
  158. 1580 '
  159. 1590 IF S11$="1" THEN GOTO 1650
  160. 1600 '
  161. 1610 C$=S1$+SPACE$(7-LEN(S1$))+LEFT$(B$,13)+"dddddddddddd"
  162. 1620 GOTO 1660
  163. 1630 '
  164. 1640 '
  165. 1650 C$=S1$+SPACE$(7-LEN(S1$))+LEFT$(B$,13)+LEFT$(A$,31)
  166. 1660 PRINT #3,C$
  167. 1670 GOTO 1250 ' go back for more .ZIP filenames
  168. 1680 CLOSE
  169. 1690 KILL "dirsonly.txt" ' was used to find text_directory file_lines
  170. 1700 KILL "####list.1##" ' case 1: that was the list made using the DIR command
  171. 1710 '                     case 2: was list of filenames from DELETED.LOG
  172. 1720 CLS
  173. 1730 SHELL "qsort ####list.2## ####list.3##" 'please see following discussion
  174. 1740 CLS
  175. 1750 KILL "####list.2##" ' the sorted version is for use
  176. 1760 '
  177. 1770 'the sorted strings are now grouped by text directory,
  178. 1780 'in ascending ASCII (alphabetical) order within each text directory
  179. 1790 '
  180. 1800 OPEN "####list.3##" FOR INPUT AS 1
  181. 1810 IF (S11$="1" AND LOF(1)<50) OR (S11$="2" AND LOF(1)<30) THEN SHORT1=1:GOTO 2820'  too short for even 1 line
  182. 1820 IF EOF(1) THEN GOTO 2820
  183. 1830 LINE INPUT #1,A$
  184. 1840 IF (S11$="1" AND LEN(A$)<50) OR (S11$="2" AND LEN(A$)<30) THEN GOTO 1820' too short
  185. 1850 MORE=0
  186. 1860 IF LEFT$(A$,3)<>"DIR" THEN GOTO 1820  ' not a DIR line
  187. 1870 '
  188. 1880 'find first
  189. 1890 GOSUB 2900 'open text directory as #2, .TMP output as #3
  190. 1900 ' returns TESTNAME$, clears W#, sets FLAG1=1, sets LEFTREF6$=LEFT$(A$,6)
  191. 1910 '
  192. 1920 ' if this directory is listed as unalphabetized, goto process it:
  193. 1930 IF INSTR(UDIRS$,LEFTREF6$)>0 THEN GOSUB 3540:GOTO 2000
  194. 1940 '
  195. 1950 GOSUB 3110 'process input from #2, output to #3
  196. 1960 ' receives TESTNAME$, running subtotal W#
  197. 1970 ' proceeds until completing match replacement and/or reaching eof(2)
  198. 1980 '
  199. 1990 IF EOF(2) THEN GOSUB 2180
  200. 2000 IF EOF(1) THEN GOTO 2080
  201. 2010 IF MORE=1 THEN GOTO 1840
  202. 2020 LINE INPUT #1,A$
  203. 2030 IF LEFTREF6$ <> LEFT$(A$,6) THEN GOSUB 2180:GOTO 1890
  204. 2040 '
  205. 2050 TESTNAME$=MID$(A$,8,12)
  206. 2060 GOTO 1950
  207. 2070 '
  208. 2080 IF FLAG1=1 THEN GOSUB 2180
  209. 2090 CLOSE
  210. 2100 KILL "####list.3##"
  211. 2110 GOSUB 2700' revise DIRGUIDE.TXT; 'if 0 then' supports renumbering
  212. 2120 SYSTEM                   ' exit back to system
  213. 2130 '
  214. 2140 '
  215. 2150 '----------------------------------------------------------------
  216. 2160 '
  217. 2170 '
  218. 2180 IF FLAG1=0 THEN GOTO 2650
  219. 2190 WHILE NOT EOF(2)           ' finish copying rest of text directory
  220. 2200 LINE INPUT #2,B$
  221. 2210 NFILES=NFILES+1            ' while counting files
  222. 2220 W#=W#+VAL(MID$(B$,14,9))   ' with running subtotal of filelengths
  223. 2230 PRINT #3,B$
  224. 2240 WEND
  225. 2250 CLOSE 2,3
  226. 2260 '
  227. 2270 IF INFILE$="DIR99" THEN GOTO 2530' DIR99 does not get filelength subtotal
  228. 2280 '
  229. 2290 ' subroutine for inserting filelength_total in header
  230. 2300 OPEN INFILE$+".tmp" FOR INPUT AS 2
  231. 2310 OPEN INFILE$+".tp2" FOR OUTPUT AS 3
  232. 2320 LINE INPUT #2,B$
  233. 2330 IF INSTR(B$,"Total Bytes")>0 THEN GOTO 2370 ' scan for line before total
  234. 2340 PRINT #3,B$
  235. 2350 IF EOF(2) THEN GOTO 2510
  236. 2360 GOTO 2320
  237. 2370 PRINT #3,B$
  238. 2380 '
  239. 2390 LINE INPUT #2,B$                           ' get line with old total
  240. 2400 PRINT #3, USING "########,###########";W#; ' use new left 20 bytes
  241. 2410 PRINT #3, USING "##########,######";NFILES;' use new mid 17 bytes
  242. 2420 IF S11$="2" THEN GOTO 2450
  243. 2430 PRINT #3, MID$(B$,38)               'case 1, use rest of old line
  244. 2440 GOTO 2470
  245. 2450 PRINT #3,"            " DATE$ " at " TIME$ 'case 2, replace rest of line
  246. 2460 '
  247. 2470 WHILE NOT EOF(2)           ' loop to copy rest of file
  248. 2480 LINE INPUT #2,B$
  249. 2490 PRINT #3,B$
  250. 2500 WEND
  251. 2510 CLOSE 2,3
  252. 2520 '
  253. 2530 W#=0                               ' clear filelength subtotal
  254. 2540 NFILES=0                           ' clear filecount subtotal
  255. 2550 '
  256. 2560 OPEN INFILE$+".old" AS 2 LEN=1     'dummy to clear without error message
  257. 2570 CLOSE 2
  258. 2580 KILL INFILE$+".old"
  259. 2590 '
  260. 2600 NAME INFILE$ AS INFILE$+".old"
  261. 2610 IF INFILE$="DIR99" THEN NAME INFILE$+".tmp" AS INFILE$:GOTO 2650
  262. 2620 NAME INFILE$+".tp2" AS INFILE$
  263. 2630 KILL INFILE$+".tmp"
  264. 2640 FLAG1=0
  265. 2650 RETURN
  266. 2660 '
  267. 2670 '--------------------------------------------------------------
  268. 2680 '
  269. 2690 '
  270. 2700 CLS                        ' make DIRSONLY.TXT or DIRGUIDE.TXT
  271. 2710 QT$=CHR$(34)
  272. 2720 CLS
  273. 2730 IF DIRSONLY=0 THEN SHELL "makedirg":GOTO 2750 '  fwkdg/g|qsort >dirguide.txt":GOTO 2750
  274. 2740 SHELL "fwkdg/t |qsort >dirsonly.txt" ' text dirs in local subdirectory
  275. 2750 CLS
  276. 2760 DIRSONLY=0
  277. 2770 RETURN
  278. 2780 '
  279. 2790 '------------------------------------------
  280. 2800 '
  281. 2810 '
  282. 2820 CLOSE
  283. 2830 KILL "####list.3##"
  284. 2840 LOCATE 21,1
  285. 2850 PRINT "i have no work to do..."
  286. 2860 SYSTEM
  287. 2870 '
  288. 2880 '--------------------------------------------
  289. 2890 '
  290. 2900 'subroutine for opening a text directory
  291. 2910 LEFTREF6$=LEFT$(A$,6) ' for testing later input to see if for same file
  292. 2920 INFILE$=LEFTREF6$
  293. 2930 'remove trailing blanks from filename
  294. 2940 WHILE RIGHT$(INFILE$,1)=" ":INFILE$=LEFT$(INFILE$,LEN(INFILE$)-1):WEND
  295. 2950 '
  296. 2960 OPEN INFILE$ FOR INPUT AS 2
  297. 2970 OPEN INFILE$+".tmp" FOR OUTPUT AS 3
  298. 2980 W#=0                    ' clear for running filelength_subtotal
  299. 2990 NFILES=0                ' clear for running filecount_subtotal
  300. 3000 LOCATE 12,1
  301. 3010 PRINT "now working on " INFILE$ "   ";
  302. 3020 FLAG1=1
  303. 3030 ' now set for scanning infile$ text directory, modified output into .TMP
  304. 3040 TESTNAME$=MID$(A$,8,12)
  305. 3050 RETURN
  306. 3060 '
  307. 3070 '
  308. 3080 '----------------------------------------------------
  309. 3090 '
  310. 3100 '
  311. 3110 'subroutine for seeking a match while copying a text directory and
  312. 3120 'carrying a running subtotal of filelengths
  313. 3130 FOUND=0
  314. 3140 LINE INPUT #2,B$
  315. 3150 M1$=MID$(B$,25,1)          ' test by looking at 3 bytes in date format
  316. 3160 M2$=MID$(B$,26,1)
  317. 3170 M3$=MID$(B$,27,1)
  318. 3180 IF M1$<"0" OR M1$>"9" OR M2$<>"-" OR M3$<"0" OR M3$>"9" THEN GOTO 3350
  319. 3190 '
  320. 3200 ' count files
  321. 3210 NFILES=NFILES+1
  322. 3220 '
  323. 3230 IF TESTNAME$<>LEFT$(B$,12) THEN GOTO 3340
  324. 3240 FOUND=1
  325. 3250 'case 2: delete the text line:
  326. 3260 IF S11$="2" THEN NFILES=NFILES-1:GOTO 3390
  327. 3270 '
  328. 3280 'case 1: revise and replace the text line:
  329. 3290 '
  330. 3300 ' replace left 31 bytes of text_directory_line with new ext, size [,date]
  331. 3310 MID$(B$,1,31)=MID$(A$,21,31) ' for offset, please see chart 'above'
  332. 3320 '
  333. 3330 '
  334. 3340 W#=W#+VAL(MID$(B$,14,9)) ' add new filelength to text_directory_subtotal
  335. 3350 PRINT #3,B$
  336. 3360 IF FOUND=1 THEN GOTO 3390
  337. 3370 IF EOF(2) THEN GOTO 3390
  338. 3380 GOTO 3140
  339. 3390 RETURN
  340. 3400 '
  341. 3410 '----------------------------------------------------
  342. 3420 '
  343. 3430 'This is routine for processing unalphabetized directories:
  344. 3440 '
  345. 3450 'case 1: revise and replace text line
  346. 3460 '
  347. 3470 'case 2: delete text line
  348. 3480 '
  349. 3490 ' #1 -- file with DIRnnn as left six characters, where nnn is numeric
  350. 3500 ' #2 -- unalphabetized text directory
  351. 3510 ' #3 -- temporary output file
  352. 3520 ' A$ -- this is already_read_from_#1 first line for use with #2
  353. 3530 '
  354. 3540 FILLED=0
  355. 3550 '
  356. 3560 FOR USCAN=0 TO 512
  357. 3570 U$(I)=""
  358. 3580 NEXT USCAN
  359. 3590 '
  360. 3600 IF FILLED=0 THEN GOTO 3650
  361. 3610 '
  362. 3620 GOSUB 2900
  363. 3630 '
  364. 3640 ' load U$ array
  365. 3650 USCAN=0                                              ' load U$ array
  366. 3660 LEAVE=0
  367. 3670 WHILE LEFTREF6$=LEFT$(A$,6) AND USCAN<513 AND LEAVE0=0
  368. 3680 U$(USCAN)=A$                                         '
  369. 3690 USCAN=USCAN+1                                        '
  370. 3700 IF EOF(1) THEN LEAVE0=1:GOTO 3720                    '
  371. 3710 LINE INPUT #1,A$                                     '
  372. 3720 WEND                                                 '
  373. 3730 '
  374. 3740 'On leaving this WHILE...WEND, A$ can contain a next_directory line
  375. 3750 '
  376. 3760 '
  377. 3770 IF USCAN<513 OR EOF(1) OR LEFTREF6$<>LEFT$(A$,6) THEN FILLED=0 ELSE FILLED=1
  378. 3780 '
  379. 3790 NMAX=USCAN-1                     ' set scan range
  380. 3800 '
  381. 3810 IF EOF(2) THEN GOTO 4100
  382. 3820 LINE INPUT #2,B$
  383. 3830 '
  384. 3840 '
  385. 3850 M1$=MID$(B$,25,1)          ' test by looking at 3 bytes in date format
  386. 3860 M2$=MID$(B$,26,1)
  387. 3870 M3$=MID$(B$,27,1)
  388. 3880 IF M1$<"0" OR M1$>"9" OR M2$<>"-" OR M3$<"0" OR M3$>"9" THEN GOTO 4060
  389. 3890 '
  390. 3900 FOR USCAN=0 TO NMAX
  391. 3910 IF LEFT$(B$,12)=MID$(U$(USCAN),8,12) THEN GOTO 3950
  392. 3920 NEXT USCAN
  393. 3930 GOTO 4060 ' did not find match
  394. 3940 '
  395. 3950 IF S11$<>"2" THEN GOTO 4020
  396. 3960 ' case 2: delete text line
  397. 3970 IF EOF(2) THEN GOTO 4100                  ' was the comment continued?
  398. 3980 LINE INPUT #2,B$                          '
  399. 3990 IF LEFT$(B$,LUCONT)=UCONT$ THEN GOTO 3970 ' if yes, then keep looking
  400. 4000 GOTO 3850                  ' B$ contains the new work line
  401. 4010 '
  402. 4020 'case 1:
  403. 4030 ' replace left 31 bytes of text_directory_line with new ext, size [,date]
  404. 4040 MID$(B$,1,31)=MID$(U$(USCAN),21,31)' for offset, please see chart 'above'
  405. 4050 '
  406. 4060 PRINT #3,B$
  407. 4070 '
  408. 4080 GOTO 3810
  409. 4090 '
  410. 4100 CLOSE 2
  411. 4110 CLOSE 3
  412. 4120 OPEN INFILE$+".old" AS 2
  413. 4130 CLOSE 2
  414. 4140 KILL INFILE$+".old"
  415. 4150 NAME INFILE$ AS INFILE$+".old"
  416. 4160 NAME INFILE$+".tmp" AS INFILE$
  417. 4170 IF FILLED=1 THEN GOTO 3560 ' there may have been more to do
  418. 4180 IF (S11$="1" AND LEN(A$)>49) OR (S11$="2" AND LEN(A$)>30) THEN MORE=1 ELSE MORE=0
  419. 4190 FLAG1=0
  420. 4200 RETURN
  421. 4210 '
  422. 4220 '--------------------------------
  423. 4230 '
  424. 4240 ' clear part of screen for small menus
  425. 4250 '
  426. 4260 LOCATE 17,1
  427. 4270 PRINT S78$
  428. 4280 PRINT S78$
  429. 4290 PRINT S78$
  430. 4300 PRINT S78$
  431. 4310 LOCATE 17,1
  432. 4320 RETURN