Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/Transports/taylor/mkgroups

StarterPak/!Newsbase/Transports/taylor/mkgroups

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet
Filename: StarterPak/!Newsbase/Transports/taylor/mkgroups
Read OK:
File size: 0660 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >mkgroups
   20REM generate the <NewsDir$Dir>.NewsBase.groups file from the
   30REM <NewsBase$TaylorConfig>.active file.
   40REM
   50REM Author:         Gunnar ZREPORTtl
   60REM Date:           13-Nov-1994
   70REM Last modified:  15-Dec-1994
   80
   90ONERROR REPORT:PRINT" at line ";ERL:END
  100
  110LIBRARY "<NewsBase$TaylorDir>.ScriptLib"
  120
  130path1$ = FNgetenv("NewsBase$TaylorConfig")
  150IF path1$ = "" THEN
  160    PROCexit(1, "NewsBase$TaylorConfig has not been found")
  170ENDIF
  210
  240REM if the file <NewsBase$TaylorConfig>.active exists, copy it to
  250REM <NewsDir$Dir>.NewsBase.groups. Otherwise, if ...active does not
  260REM exist, but ...groups does, then copy ...groups to ...active. This
  270REM is intended for upgrades from previous versions, to ensure that the
  280REM old groups file is not lost. If neither is present, generate an empty
  281REM active file.
  310IF FNobjtype(path1$ + ".active") <> 0 THEN
  320    OSCLI ("copy " + path1$ + ".active " + path1$ + ".groups F~C~V")
  330ELSE
  340    IF FNobjtype(path1$ + ".groups") <> 0 THEN
  350        OSCLI ("copy " + path1$ + ".groups " + path1$ + ".active F~C~V")
  360    ELSE
  370        o% = OPENOUT(path1$ + ".active")
  380        IF o% > 0 THEN
  400            CLOSE#o%
  401            OSCLI ("settype " + path1$ + ".active FFF")
  410            OSCLI ("copy " + path1$ + ".active " + path1$ + ".groups F~C~V")
  420        ELSE
  430            PROCexit(1, "could not create active file")
  440        ENDIF
  450    ENDIF
  460ENDIF
  470
  480PROCexit(0, "Groups file created")
  490END
  500
  510REM exit from here, returning appropriate info.
  520REM
  530DEFPROCexit(n%,a$)
  540OSCLI("set NewsBase$ReturnCode "+STR$n%)
  550OSCLI("set NewsBase$ReturnInfo "+a$)
  560END
  570ENDPROC
  580
  590DEFFNobjtype(f$)
  600LOCALF%
  610SYS"XOS_File",17,f$TOt%;F%
  620IF(F%AND1)THEN=-1:ELSE=t%

� >mkgroups
>� generate the <NewsDir$Dir>.NewsBase.groups file from the
*� <NewsBase$TaylorConfig>.active file.
(�
2!� Author:         Gunnar Z�tl
<!� Date:           13-Nov-1994
F!� Last modified:  15-Dec-1994
P
Z� �:�" at line ";�:�
d
n'ț "<NewsBase$TaylorDir>.ScriptLib"
x
�-path1$ = �getenv("NewsBase$TaylorConfig")
�� path1$ = "" �
�<    �exit(1, "NewsBase$TaylorConfig has not been found")
��
�
�C� if the file <NewsBase$TaylorConfig>.active exists, copy it to
�E� <NewsDir$Dir>.NewsBase.groups. Otherwise, if ...active does not
G� exist, but ...groups does, then copy ...groups to ...active. This
I� is intended for upgrades from previous versions, to ensure that the
K� old groups file is not lost. If neither is present, generate an empty
� active file.
6)� �objtype(path1$ + ".active") <> 0 �
@D    � ("copy " + path1$ + ".active " + path1$ + ".groups F~C~V")
J�
T-    � �objtype(path1$ + ".groups") <> 0 �
^H        � ("copy " + path1$ + ".groups " + path1$ + ".active F~C~V")
h	    �
r&        o% = �(path1$ + ".active")
|        � o% > 0 �
�            �#o%
�7            � ("settype " + path1$ + ".active FFF")
�L            � ("copy " + path1$ + ".active " + path1$ + ".groups F~C~V")
�
        �
�8            �exit(1, "could not create active file")
�
        �
�	    �
��
�
�#�exit(0, "Groups file created")
��
�
�1� exit from here, returning appropriate info.
�
��exit(n%,a$)
%�("set NewsBase$ReturnCode "+�n%)
&$�("set NewsBase$ReturnInfo "+a$)
0�
:�
D
Nݤobjtype(f$)
X�F%
bș"XOS_File",17,f$�t%;F%
l�(F%�1)�=-1:�=t%
�
00000000  0d 00 0a 0f f4 20 3e 6d  6b 67 72 6f 75 70 73 0d  |..... >mkgroups.|
00000010  00 14 3e f4 20 67 65 6e  65 72 61 74 65 20 74 68  |..>. generate th|
00000020  65 20 3c 4e 65 77 73 44  69 72 24 44 69 72 3e 2e  |e <NewsDir$Dir>.|
00000030  4e 65 77 73 42 61 73 65  2e 67 72 6f 75 70 73 20  |NewsBase.groups |
00000040  66 69 6c 65 20 66 72 6f  6d 20 74 68 65 0d 00 1e  |file from the...|
00000050  2a f4 20 3c 4e 65 77 73  42 61 73 65 24 54 61 79  |*. <NewsBase$Tay|
00000060  6c 6f 72 43 6f 6e 66 69  67 3e 2e 61 63 74 69 76  |lorConfig>.activ|
00000070  65 20 66 69 6c 65 2e 0d  00 28 05 f4 0d 00 32 21  |e file...(....2!|
00000080  f4 20 41 75 74 68 6f 72  3a 20 20 20 20 20 20 20  |. Author:       |
00000090  20 20 47 75 6e 6e 61 72  20 5a f6 74 6c 0d 00 3c  |  Gunnar Z.tl..<|
000000a0  21 f4 20 44 61 74 65 3a  20 20 20 20 20 20 20 20  |!. Date:        |
000000b0  20 20 20 31 33 2d 4e 6f  76 2d 31 39 39 34 0d 00  |   13-Nov-1994..|
000000c0  46 21 f4 20 4c 61 73 74  20 6d 6f 64 69 66 69 65  |F!. Last modifie|
000000d0  64 3a 20 20 31 35 2d 44  65 63 2d 31 39 39 34 0d  |d:  15-Dec-1994.|
000000e0  00 50 04 0d 00 5a 19 ee  85 20 f6 3a f1 22 20 61  |.P...Z... .:." a|
000000f0  74 20 6c 69 6e 65 20 22  3b 9e 3a e0 0d 00 64 04  |t line ";.:...d.|
00000100  0d 00 6e 27 c8 9b 20 22  3c 4e 65 77 73 42 61 73  |..n'.. "<NewsBas|
00000110  65 24 54 61 79 6c 6f 72  44 69 72 3e 2e 53 63 72  |e$TaylorDir>.Scr|
00000120  69 70 74 4c 69 62 22 0d  00 78 04 0d 00 82 2d 70  |iptLib"..x....-p|
00000130  61 74 68 31 24 20 3d 20  a4 67 65 74 65 6e 76 28  |ath1$ = .getenv(|
00000140  22 4e 65 77 73 42 61 73  65 24 54 61 79 6c 6f 72  |"NewsBase$Taylor|
00000150  43 6f 6e 66 69 67 22 29  0d 00 96 13 e7 20 70 61  |Config")..... pa|
00000160  74 68 31 24 20 3d 20 22  22 20 8c 0d 00 a0 3c 20  |th1$ = "" ....< |
00000170  20 20 20 f2 65 78 69 74  28 31 2c 20 22 4e 65 77  |   .exit(1, "New|
00000180  73 42 61 73 65 24 54 61  79 6c 6f 72 43 6f 6e 66  |sBase$TaylorConf|
00000190  69 67 20 68 61 73 20 6e  6f 74 20 62 65 65 6e 20  |ig has not been |
000001a0  66 6f 75 6e 64 22 29 0d  00 aa 05 cd 0d 00 d2 04  |found").........|
000001b0  0d 00 f0 43 f4 20 69 66  20 74 68 65 20 66 69 6c  |...C. if the fil|
000001c0  65 20 3c 4e 65 77 73 42  61 73 65 24 54 61 79 6c  |e <NewsBase$Tayl|
000001d0  6f 72 43 6f 6e 66 69 67  3e 2e 61 63 74 69 76 65  |orConfig>.active|
000001e0  20 65 78 69 73 74 73 2c  20 63 6f 70 79 20 69 74  | exists, copy it|
000001f0  20 74 6f 0d 00 fa 45 f4  20 3c 4e 65 77 73 44 69  | to...E. <NewsDi|
00000200  72 24 44 69 72 3e 2e 4e  65 77 73 42 61 73 65 2e  |r$Dir>.NewsBase.|
00000210  67 72 6f 75 70 73 2e 20  4f 74 68 65 72 77 69 73  |groups. Otherwis|
00000220  65 2c 20 69 66 20 2e 2e  2e 61 63 74 69 76 65 20  |e, if ...active |
00000230  64 6f 65 73 20 6e 6f 74  0d 01 04 47 f4 20 65 78  |does not...G. ex|
00000240  69 73 74 2c 20 62 75 74  20 2e 2e 2e 67 72 6f 75  |ist, but ...grou|
00000250  70 73 20 64 6f 65 73 2c  20 74 68 65 6e 20 63 6f  |ps does, then co|
00000260  70 79 20 2e 2e 2e 67 72  6f 75 70 73 20 74 6f 20  |py ...groups to |
00000270  2e 2e 2e 61 63 74 69 76  65 2e 20 54 68 69 73 0d  |...active. This.|
00000280  01 0e 49 f4 20 69 73 20  69 6e 74 65 6e 64 65 64  |..I. is intended|
00000290  20 66 6f 72 20 75 70 67  72 61 64 65 73 20 66 72  | for upgrades fr|
000002a0  6f 6d 20 70 72 65 76 69  6f 75 73 20 76 65 72 73  |om previous vers|
000002b0  69 6f 6e 73 2c 20 74 6f  20 65 6e 73 75 72 65 20  |ions, to ensure |
000002c0  74 68 61 74 20 74 68 65  0d 01 18 4b f4 20 6f 6c  |that the...K. ol|
000002d0  64 20 67 72 6f 75 70 73  20 66 69 6c 65 20 69 73  |d groups file is|
000002e0  20 6e 6f 74 20 6c 6f 73  74 2e 20 49 66 20 6e 65  | not lost. If ne|
000002f0  69 74 68 65 72 20 69 73  20 70 72 65 73 65 6e 74  |ither is present|
00000300  2c 20 67 65 6e 65 72 61  74 65 20 61 6e 20 65 6d  |, generate an em|
00000310  70 74 79 0d 01 19 12 f4  20 61 63 74 69 76 65 20  |pty..... active |
00000320  66 69 6c 65 2e 0d 01 36  29 e7 20 a4 6f 62 6a 74  |file...6). .objt|
00000330  79 70 65 28 70 61 74 68  31 24 20 2b 20 22 2e 61  |ype(path1$ + ".a|
00000340  63 74 69 76 65 22 29 20  3c 3e 20 30 20 8c 0d 01  |ctive") <> 0 ...|
00000350  40 44 20 20 20 20 ff 20  28 22 63 6f 70 79 20 22  |@D    . ("copy "|
00000360  20 2b 20 70 61 74 68 31  24 20 2b 20 22 2e 61 63  | + path1$ + ".ac|
00000370  74 69 76 65 20 22 20 2b  20 70 61 74 68 31 24 20  |tive " + path1$ |
00000380  2b 20 22 2e 67 72 6f 75  70 73 20 46 7e 43 7e 56  |+ ".groups F~C~V|
00000390  22 29 0d 01 4a 05 cc 0d  01 54 2d 20 20 20 20 e7  |")..J....T-    .|
000003a0  20 a4 6f 62 6a 74 79 70  65 28 70 61 74 68 31 24  | .objtype(path1$|
000003b0  20 2b 20 22 2e 67 72 6f  75 70 73 22 29 20 3c 3e  | + ".groups") <>|
000003c0  20 30 20 8c 0d 01 5e 48  20 20 20 20 20 20 20 20  | 0 ...^H        |
000003d0  ff 20 28 22 63 6f 70 79  20 22 20 2b 20 70 61 74  |. ("copy " + pat|
000003e0  68 31 24 20 2b 20 22 2e  67 72 6f 75 70 73 20 22  |h1$ + ".groups "|
000003f0  20 2b 20 70 61 74 68 31  24 20 2b 20 22 2e 61 63  | + path1$ + ".ac|
00000400  74 69 76 65 20 46 7e 43  7e 56 22 29 0d 01 68 09  |tive F~C~V")..h.|
00000410  20 20 20 20 cc 0d 01 72  26 20 20 20 20 20 20 20  |    ...r&       |
00000420  20 6f 25 20 3d 20 ae 28  70 61 74 68 31 24 20 2b  | o% = .(path1$ +|
00000430  20 22 2e 61 63 74 69 76  65 22 29 0d 01 7c 16 20  | ".active")..|. |
00000440  20 20 20 20 20 20 20 e7  20 6f 25 20 3e 20 30 20  |       . o% > 0 |
00000450  8c 0d 01 90 14 20 20 20  20 20 20 20 20 20 20 20  |.....           |
00000460  20 d9 23 6f 25 0d 01 91  37 20 20 20 20 20 20 20  | .#o%...7       |
00000470  20 20 20 20 20 ff 20 28  22 73 65 74 74 79 70 65  |     . ("settype|
00000480  20 22 20 2b 20 70 61 74  68 31 24 20 2b 20 22 2e  | " + path1$ + ".|
00000490  61 63 74 69 76 65 20 46  46 46 22 29 0d 01 9a 4c  |active FFF")...L|
000004a0  20 20 20 20 20 20 20 20  20 20 20 20 ff 20 28 22  |            . ("|
000004b0  63 6f 70 79 20 22 20 2b  20 70 61 74 68 31 24 20  |copy " + path1$ |
000004c0  2b 20 22 2e 61 63 74 69  76 65 20 22 20 2b 20 70  |+ ".active " + p|
000004d0  61 74 68 31 24 20 2b 20  22 2e 67 72 6f 75 70 73  |ath1$ + ".groups|
000004e0  20 46 7e 43 7e 56 22 29  0d 01 a4 0d 20 20 20 20  | F~C~V")....    |
000004f0  20 20 20 20 cc 0d 01 ae  38 20 20 20 20 20 20 20  |    ....8       |
00000500  20 20 20 20 20 f2 65 78  69 74 28 31 2c 20 22 63  |     .exit(1, "c|
00000510  6f 75 6c 64 20 6e 6f 74  20 63 72 65 61 74 65 20  |ould not create |
00000520  61 63 74 69 76 65 20 66  69 6c 65 22 29 0d 01 b8  |active file")...|
00000530  0d 20 20 20 20 20 20 20  20 cd 0d 01 c2 09 20 20  |.        .....  |
00000540  20 20 cd 0d 01 cc 05 cd  0d 01 d6 04 0d 01 e0 23  |  .............#|
00000550  f2 65 78 69 74 28 30 2c  20 22 47 72 6f 75 70 73  |.exit(0, "Groups|
00000560  20 66 69 6c 65 20 63 72  65 61 74 65 64 22 29 0d  | file created").|
00000570  01 ea 05 e0 0d 01 f4 04  0d 01 fe 31 f4 20 65 78  |...........1. ex|
00000580  69 74 20 66 72 6f 6d 20  68 65 72 65 2c 20 72 65  |it from here, re|
00000590  74 75 72 6e 69 6e 67 20  61 70 70 72 6f 70 72 69  |turning appropri|
000005a0  61 74 65 20 69 6e 66 6f  2e 0d 02 08 05 f4 0d 02  |ate info........|
000005b0  12 11 dd f2 65 78 69 74  28 6e 25 2c 61 24 29 0d  |....exit(n%,a$).|
000005c0  02 1c 25 ff 28 22 73 65  74 20 4e 65 77 73 42 61  |..%.("set NewsBa|
000005d0  73 65 24 52 65 74 75 72  6e 43 6f 64 65 20 22 2b  |se$ReturnCode "+|
000005e0  c3 6e 25 29 0d 02 26 24  ff 28 22 73 65 74 20 4e  |.n%)..&$.("set N|
000005f0  65 77 73 42 61 73 65 24  52 65 74 75 72 6e 49 6e  |ewsBase$ReturnIn|
00000600  66 6f 20 22 2b 61 24 29  0d 02 30 05 e0 0d 02 3a  |fo "+a$)..0....:|
00000610  05 e1 0d 02 44 04 0d 02  4e 11 dd a4 6f 62 6a 74  |....D...N...objt|
00000620  79 70 65 28 66 24 29 0d  02 58 07 ea 46 25 0d 02  |ype(f$)..X..F%..|
00000630  62 1c c8 99 22 58 4f 53  5f 46 69 6c 65 22 2c 31  |b..."XOS_File",1|
00000640  37 2c 66 24 b8 74 25 3b  46 25 0d 02 6c 14 e7 28  |7,f$.t%;F%..l..(|
00000650  46 25 80 31 29 8c 3d 2d  31 3a 8b 3d 74 25 0d ff  |F%.1).=-1:.=t%..|
00000660