home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / 095z / viewarc.bas < prev   
BASIC Source File  |  1988-01-01  |  9KB  |  163 lines

  1. NOTE:  THE CHANGES BELOW ARE TO ADD THE VIEWARC MOD TO CPC 15.1C
  2.        MODIFIED BY ROY HERMAN  ROY'S RBBS (312) 779-3916
  3.  
  4.  
  5.  
  6.     This mod was written to allow the users to view the contents of ASCII
  7.     files from within an archived file.  This is a nice feature in that
  8.     users can read .DOC, README, etc. files prior to eating up valuable down
  9.     load time.  It is not a particularly sophisticated mod, but it gets the
  10.     job done. Basically it relies on PKXARC to do the dirty work so naturally
  11.     this program must be available in either the root or a pathed directory.
  12.     
  13.     Since there was not a great deal of code involved, I didn't write this
  14.     mod to be merged....but rather entered manually (slower, but safer). I 
  15.     have been using this mod now for several months and seems to work fine,
  16.     hope you can make some use of it.
  17.  
  18.                                            Dave Miller (SYSOP)
  19.                                            Rapid Transmitt Authority (RTA)
  20.                                            Durham, NC  919-471-8048
  21.  
  22.  
  23.  
  24.  
  25. This line was changed because I had to use the line # that was previously
  26. used by the L]ist command (20150). The new starting line number for the
  27. L]ist command is 20159. (see below)
  28.  
  29.  
  30. 1235 Z$ = B$(1)
  31.      IF LEN(Z$) < 1 THEN _
  32.         GOTO 1230
  33.      CALL ALLCAPS (Z$)
  34.      CALL SRCHCMND (SUB.SECTION,FF)
  35.      IF FF < 1 THEN _
  36.         GOSUB 1305 : _
  37.         GOTO 1230
  38.      IF ASC(Z$) = 32 THEN _
  39.         GOTO 1230
  40.      IF USER.SECURITY.LEVEL < OPT.SEC(FF) THEN _
  41.         VIOLATION$ = SECTION$+" "+Z$ : _
  42.         GOSUB 1380 : _
  43.         GOTO 1205
  44.         ON FF GOSUB _
  45.                  1400, _               ' A)nswer questionnaire 1
  46.                  9700, _               ' B)ulletins
  47.                  1800, _               ' C)omments
  48.                  10970, _              ' D)oor (exit to)
  49.                  2000, _               ' E)nter a message
  50.                  1275, _               ' F)ile system (exit to)
  51.                  1760, _               ' I)nitial welcome redisplayed
  52.                  5300, _               ' J)oin a conference
  53.                  3900, _               ' K)ill a message
  54.                  4700, _               ' O)perator page
  55.                  1900, _               ' P)ersonal mail (look for)
  56.                  4330, _               ' R)ead messages
  57.                  4340, _               ' S)can message headers
  58.                  4320, _               ' T)opic msg scan
  59.                  1285, _               ' U)tilities (exit to)
  60.                  5800, _               ' V)iew a conference
  61.                  9800, _               ' W)ho's on other nodes displayed ' CPC15-1C
  62.                  1283, _               ' @)Library (exit to) 18      ' CPC15-1C
  63.                 20180, _               ' D)ownload 1
  64.                 10570, _               ' G)oodbye
  65. CHANGE TO 20159 20150, _               ' L)ist                       'MOD 12/21 RAH
  66.                 53000, _               ' N)ew
  67.                 52900, _               ' S)can
  68.                 20400, _               ' U)pload 6
  69.                 20140, _               ' V)iew ARC Contents
  70.                  5500, _               ' B)aud rate change 300==>450 1
  71.                  9100, _               ' C)lock (time & time on)
  72.                  42800, _              ' F)ile transfer protocol
  73.                  43000, _              ' G)raphics
  74.                  5200, _               ' L)ines per page
  75.                  10925, _              ' M)essage margin
  76.                  5110, _               ' P)assword change
  77.                  5400, _               ' R)eview preferences
  78.                  4850, _               ' S)tatistics displayed
  79.                  1500, _               ' T)oggle
  80.                  10090, _              ' U)serlog displayed 11
  81.                  30000, _              ' A)rchive a Library disk 1   ' CPC15-1C
  82.                  30100, _              ' C)hange a Library disk      ' CPC15-1C
  83.                  30200, _              ' D)ownload Library files     ' CPC15-1C
  84.                  10570, _              ' G)oodbye                    ' CPC15-1C
  85. CHANGE TO 20159  20150, _              ' L)ist a Library directory   ' MOD 12/21 RAH
  86.                  52900, _              ' S)can a Library disk directory ' CPC15-1C
  87.                  20140, _              ' V)iew arc contents 7        ' CPC15-1C
  88.                  1325, _               ' H)elp 1
  89.                  1325, _               ' ?)help
  90.                  1250, _               ' Q)uit
  91.                  4240, _               ' X)expert toggle on/off 4
  92.                  10070, _              ' 1) List comments file 1
  93.                  10090, _              ' 2) List callers file
  94.                  10390, _              ' 3) Recover a message
  95.                  10530, _              ' 4) Erase comments
  96.                  11000, _              ' 5) User file maintenance
  97.                  33070, _              ' 6) Toggle page bell on/off
  98.                  10930                 ' 7) Exit to DOS 2.x or above 7
  99.      GOTO 1205
  100. ' ************************************************************
  101. ' *              QUIT COMMAND (GLOBAL)                       *
  102. ' ************************************************************
  103.  
  104.  
  105. skip to line 20148...........
  106.  
  107.  
  108. 20148 JK = 3 : _
  109.       CALL QTPUT(FILE.NAME.HOLD$ + " contains the following files.",1)
  110.       CALL VIEWARC
  111.       IF SUBROUTINE.PARAMETER = -1 THEN _
  112.             GOTO 13540
  113.        CALL SKIPLINE(1)
  114.        A$ = "Would you like to view an ASCII file from this ARC [Y/N]"  'DMOD1
  115.        GOSUB 12995                                                      'DMOD1
  116.        IF NOT YES THEN _                                                'DMOD1
  117.           RETURN                                                        'DMOD1
  118. 20149  JK = 2 :_                                                        'DMOD1
  119.        A$ = "What file(s) to view, [ENTER] quits"                       'DMOD1
  120.        GOSUB 12995                                                      'DMOD1
  121.        B = 1                                                            'DMOD1
  122.        IF Q = 0 THEN _                                                  'DMOD1
  123.           RETURN                                                        'DMOD1
  124.        LAST.ARC = Q                                                     'DMOD1
  125.        FIRST.ARC = B                                                    'DMOD1
  126.        FOR ARC.INDEX = FIRST.ARC TO LAST.ARC                            'DMOD1
  127.            GOSUB 20151                                                  'DMOD1
  128.        NEXT                                                             'DMOD1
  129.        RETURN                                                           'DMOD1
  130. 20151 Z$ = B$(ARC.INDEX)                                                'DMOD1
  131.       CALL ALLCAPS (Z$)                                                 'DMOD1
  132.       CALL BRKFNAME (Z$,DRV$,PREFIX$,EXT$,FALSE)                        'DMOD1
  133.       IF EXT$ = "ARC" OR EXT$ = "COM" OR EXT$ = "EXE" OR EXT$ = "BAS" OR _   'DMOD1
  134.          EXT$ = "BIN" OR EXT$ = "LIB" OR EXT$ = "OBJ" THEN _            'DMOD1
  135.          CALL QTPUT ("Sorry, only ASCII files can be viewed",1) :_      'DMOD1
  136.          GOTO 20149                                                     'DMOD1
  137.       CALL QTPUT ("Please stand by while I extract that file....",1)    'DMOD1
  138.       SHELL "PKXARC " + FILE.NAME$ + " " + z$                           'DMOD1
  139.       CALL BUFFILE (Z$)                                                 'DMOD1
  140.       SHELL "DEL " + Z$                                                 'DMOD1
  141.       RETURN                                                            'DMOD1
  142. '
  143. ' *****************************************************************************
  144. ' *  L - COMMAND FROM FILES MENU (LIST DIRECTORY)                             *
  145. ' *****************************************************************************
  146. ' ========= CHANGE LINE NUMBER 20150 TO 20159 ===========  MOD 12/21 RAH
  147. 20150 LIST.DIRECTORY = TRUE
  148.       SEARCH.DATE$ = ""
  149.       SEARCH.STRING$ = ""
  150.       CK = 0
  151.       IF Q > 1 THEN _
  152.          LIST.INDEX = 2:_
  153.          GOTO 20160
  154.       LIST.INDEX = 1
  155.       CALL GETDIRS ("for menu")
  156.       IF Q = 0 THEN _
  157.          Q = 1 : _
  158.          B$(Q) = DIRECTORY.EXTENTION$
  159.  
  160. Well............that's it. Hope I didn't forget anything. Feel free to leave
  161. comments on RTA. Take care.............
  162.  
  163.                                                         --DaVe