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

StarterPak/!Newsbase/Transports/taylor/sendnews

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/sendnews
Read OK:
File size: 0A43 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >sendnews
   20REM takes a news file and copies to outgoing directory
   30REM converted from ka9q.sendnews
   40REM
   50REM Author:         Gunnar ZREPORTtl
   60REM Date:           14-Sep-1994
   70REM Last modified:  10-Nov-1994
   80
   90ONERROR REPORT:PRINT" at line ";ERL:END
  100
  110LIBRARY "<NewsBase$TaylorDir>.ScriptLib"
  120
  130REM get the command line parameters.
  140PROCentry
  150N$="":u$=""
  160IF (argc = 3) OR (argc = 5) THEN
  170    FOR i%=1 TO argc - 1
  180        CASE argv$(i%) OF
  190            WHEN "-f": N$ = argv$(i% + 1): i% += 1
  200            WHEN "-u": u$ = argv$(i% + 1): i% += 1
  210            OTHERWISE PROCexit(1, "Invalid Parameter")
  220        ENDCASE
  230    NEXT i%
  240ELSE
  250    PROCexit(1, "Invalid Parameters")
  260ENDIF
  270
  280IFu$>""THEN
  290    uid% = FNgetuid(user$)
  300    IF uid% = -1 THEN
  310        PROCexit(1, "unknown user")
  320    ENDIF
  330    OSCLI("*set UUCP_UID " + STR$(uid%))
  340ENDIF
  350
  360REM we store temp. files in the scrapdir
  370IF FNobjtype("<Wimp$ScrapDir>") = 0 THEN
  380    PROCexit(1, "!Scrap must be seen for this to work!")
  390ENDIF
  400
  410IF FNgetenv("NewsBase$RemoteHost") = "" THEN
  420    PROCexit(1, "NewsBase$RemoteHost unset")
  430ENDIF
  440
  450REM generate a batch file name. TIME really changes quite fast,
  460REM so we don't need to worry about duplicate filenames... or?
  470batchfile$ = LEFT$(STR$TIME, 10)
  480batchname$ = "<Wimp$ScrapDir>." + LEFT$(batchfile$, 8)
  490REM determine size of article for #! rnews header
  500dummy% = OPENIN(N$)
  510batchsize% = EXT#dummy%
  520CLOSE#dummy%
  530REM create batch: first print the rnews header to it, then
  540REM append the actual article.
  550batch% = OPENOUT(batchname$)
  560BPUT#batch%, "#! rnews " + STR$batchsize%
  570CLOSE #batch%
  580OSCLI ("print " + N$ + " { >> " + batchname$ + " }")
  590
  600REM now place a copy of the batch in<NewsDir$Dir>.NewsBase.Work
  610REM so that newsbase can find it there and post it locally.
  620OSCLI("copy " + batchname$ + " <NewsDir$Dir>.NewsBase.Work." + batchfile$)
  630
  640REM cleanup before leaving this program...
  650OSCLI("remove " + N$)
  660REM this last OSCLI does not return. We let the script remove the
  670REM batchfile.
  680OSCLI("<NewsBase$Dir>.transports.Taylor.DoPost <NewsBase$RemoteHost> " + batchname$)
  690
  700REM just in case we get here for some wierd reason
  710PROCexit(1, "Posting failed")
  720END
  730
  740DEFFNfilename(A$,len%)
  750=A$+RIGHT$(STR$~TIME,len%-LENA$)
  760
  770DEFPROCexit(n%,a$)
  780OSCLI("set NewsBase$ReturnCode "+STR$n%)
  790OSCLI("set NewsBase$ReturnInfo "+a$)
  800END
  810ENDPROC
  820
  830DEFFNobjtype(f$)
  840LOCALF%
  850SYS"XOS_File",17,f$TOt%;F%
  860IF(F%AND1)THEN=-1:ELSE=t%
  870
  880REM BASIC is missing a getenv function, sad but true.
  890REM here it is.
  900REM
  910DEF FNgetenv(var$)
  920LOCAL res$, size, a
  930size = 0
  940SYS "XOS_ReadVarVal", var$, 0, -1 TO ,,size
  950size = NOTsize
  960res$=STRING$(size, ".")
  970SYS "XOS_ReadVarVal", var$, res$, size, 0 TO ,res$,size
  980=res$

� >sendnews
8� takes a news file and copies to outgoing directory
"� converted from ka9q.sendnews
(�
2!� Author:         Gunnar Z�tl
<!� Date:           14-Sep-1994
F!� Last modified:  10-Nov-1994
P
Z� �:�" at line ";�:�
d
n'ț "<NewsBase$TaylorDir>.ScriptLib"
x
�&� get the command line parameters.
�
�entry
�N$="":u$=""
�� (argc = 3) � (argc = 5) �
�    � i%=1 � argc - 1
�        Ȏ argv$(i%) �
�3            � "-f": N$ = argv$(i% + 1): i% += 1
�3            � "-u": u$ = argv$(i% + 1): i% += 1
�/             �exit(1, "Invalid Parameter")
�
        �
�    � i%
��
�&    �exit(1, "Invalid Parameters")
�

�u$>""�
"    uid% = �getuid(user$)
,    � uid% = -1 �
6$        �exit(1, "unknown user")
@	    �
J%    �("*set UUCP_UID " + �(uid%))
T�
^
h*� we store temp. files in the scrapdir
r'� �objtype("<Wimp$ScrapDir>") = 0 �
|9    �exit(1, "!Scrap must be seen for this to work!")
��
�
�+� �getenv("NewsBase$RemoteHost") = "" �
�-    �exit(1, "NewsBase$RemoteHost unset")
��
�
�A� generate a batch file name. TIME really changes quite fast,
�@� so we don't need to worry about duplicate filenames... or?
�batchfile$ = �Ñ, 10)
�5batchname$ = "<Wimp$ScrapDir>." + �batchfile$, 8)
�3� determine size of article for #! rnews header
�dummy% = �(N$)
�batchsize% = �#dummy%
�#dummy%
<� create batch: first print the rnews header to it, then
 � append the actual article.
&batch% = �(batchname$)
0'�#batch%, "#! rnews " + �batchsize%
:
� #batch%
D4� ("print " + N$ + " { >> " + batchname$ + " }")
N
XA� now place a copy of the batch in<NewsDir$Dir>.NewsBase.Work
b=� so that newsbase can find it there and post it locally.
lJ�("copy " + batchname$ + " <NewsDir$Dir>.NewsBase.Work." + batchfile$)
v
�,� cleanup before leaving this program...
��("remove " + N$)
�C� this last OSCLI does not return. We let the script remove the
�� batchfile.
�T�("<NewsBase$Dir>.transports.Taylor.DoPost <NewsBase$RemoteHost> " + batchname$)
�
�4� just in case we get here for some wierd reason
��exit(1, "Posting failed")
��
�
�ݤfilename(A$,len%)
�=A$+��~�,len%-�A$)
�
��exit(n%,a$)
%�("set NewsBase$ReturnCode "+�n%)
$�("set NewsBase$ReturnInfo "+a$)
 �
*�
4
>ݤobjtype(f$)
H�F%
Rș"XOS_File",17,f$�t%;F%
\�(F%�1)�=-1:�=t%
f
p7� BASIC is missing a getenv function, sad but true.
z� here it is.
��
�� �getenv(var$)
�� res$, size, a
�size = 0
�-ș "XOS_ReadVarVal", var$, 0, -1 � ,,size
�size = �size
�res$=�size, ".")
�9ș "XOS_ReadVarVal", var$, res$, size, 0 � ,res$,size
�	=res$
�
00000000  0d 00 0a 0f f4 20 3e 73  65 6e 64 6e 65 77 73 0d  |..... >sendnews.|
00000010  00 14 38 f4 20 74 61 6b  65 73 20 61 20 6e 65 77  |..8. takes a new|
00000020  73 20 66 69 6c 65 20 61  6e 64 20 63 6f 70 69 65  |s file and copie|
00000030  73 20 74 6f 20 6f 75 74  67 6f 69 6e 67 20 64 69  |s to outgoing di|
00000040  72 65 63 74 6f 72 79 0d  00 1e 22 f4 20 63 6f 6e  |rectory...". con|
00000050  76 65 72 74 65 64 20 66  72 6f 6d 20 6b 61 39 71  |verted from ka9q|
00000060  2e 73 65 6e 64 6e 65 77  73 0d 00 28 05 f4 0d 00  |.sendnews..(....|
00000070  32 21 f4 20 41 75 74 68  6f 72 3a 20 20 20 20 20  |2!. Author:     |
00000080  20 20 20 20 47 75 6e 6e  61 72 20 5a f6 74 6c 0d  |    Gunnar Z.tl.|
00000090  00 3c 21 f4 20 44 61 74  65 3a 20 20 20 20 20 20  |.<!. Date:      |
000000a0  20 20 20 20 20 31 34 2d  53 65 70 2d 31 39 39 34  |     14-Sep-1994|
000000b0  0d 00 46 21 f4 20 4c 61  73 74 20 6d 6f 64 69 66  |..F!. Last modif|
000000c0  69 65 64 3a 20 20 31 30  2d 4e 6f 76 2d 31 39 39  |ied:  10-Nov-199|
000000d0  34 0d 00 50 04 0d 00 5a  19 ee 85 20 f6 3a f1 22  |4..P...Z... .:."|
000000e0  20 61 74 20 6c 69 6e 65  20 22 3b 9e 3a e0 0d 00  | at line ";.:...|
000000f0  64 04 0d 00 6e 27 c8 9b  20 22 3c 4e 65 77 73 42  |d...n'.. "<NewsB|
00000100  61 73 65 24 54 61 79 6c  6f 72 44 69 72 3e 2e 53  |ase$TaylorDir>.S|
00000110  63 72 69 70 74 4c 69 62  22 0d 00 78 04 0d 00 82  |criptLib"..x....|
00000120  26 f4 20 67 65 74 20 74  68 65 20 63 6f 6d 6d 61  |&. get the comma|
00000130  6e 64 20 6c 69 6e 65 20  70 61 72 61 6d 65 74 65  |nd line paramete|
00000140  72 73 2e 0d 00 8c 0a f2  65 6e 74 72 79 0d 00 96  |rs......entry...|
00000150  0f 4e 24 3d 22 22 3a 75  24 3d 22 22 0d 00 a0 1f  |.N$="":u$=""....|
00000160  e7 20 28 61 72 67 63 20  3d 20 33 29 20 84 20 28  |. (argc = 3) . (|
00000170  61 72 67 63 20 3d 20 35  29 20 8c 0d 00 aa 19 20  |argc = 5) ..... |
00000180  20 20 20 e3 20 69 25 3d  31 20 b8 20 61 72 67 63  |   . i%=1 . argc|
00000190  20 2d 20 31 0d 00 b4 1a  20 20 20 20 20 20 20 20  | - 1....        |
000001a0  c8 8e 20 61 72 67 76 24  28 69 25 29 20 ca 0d 00  |.. argv$(i%) ...|
000001b0  be 33 20 20 20 20 20 20  20 20 20 20 20 20 c9 20  |.3            . |
000001c0  22 2d 66 22 3a 20 4e 24  20 3d 20 61 72 67 76 24  |"-f": N$ = argv$|
000001d0  28 69 25 20 2b 20 31 29  3a 20 69 25 20 2b 3d 20  |(i% + 1): i% += |
000001e0  31 0d 00 c8 33 20 20 20  20 20 20 20 20 20 20 20  |1...3           |
000001f0  20 c9 20 22 2d 75 22 3a  20 75 24 20 3d 20 61 72  | . "-u": u$ = ar|
00000200  67 76 24 28 69 25 20 2b  20 31 29 3a 20 69 25 20  |gv$(i% + 1): i% |
00000210  2b 3d 20 31 0d 00 d2 2f  20 20 20 20 20 20 20 20  |+= 1.../        |
00000220  20 20 20 20 7f 20 f2 65  78 69 74 28 31 2c 20 22  |    . .exit(1, "|
00000230  49 6e 76 61 6c 69 64 20  50 61 72 61 6d 65 74 65  |Invalid Paramete|
00000240  72 22 29 0d 00 dc 0d 20  20 20 20 20 20 20 20 cb  |r")....        .|
00000250  0d 00 e6 0c 20 20 20 20  ed 20 69 25 0d 00 f0 05  |....    . i%....|
00000260  cc 0d 00 fa 26 20 20 20  20 f2 65 78 69 74 28 31  |....&    .exit(1|
00000270  2c 20 22 49 6e 76 61 6c  69 64 20 50 61 72 61 6d  |, "Invalid Param|
00000280  65 74 65 72 73 22 29 0d  01 04 05 cd 0d 01 0e 04  |eters").........|
00000290  0d 01 18 0b e7 75 24 3e  22 22 8c 0d 01 22 1d 20  |.....u$>""...". |
000002a0  20 20 20 75 69 64 25 20  3d 20 a4 67 65 74 75 69  |   uid% = .getui|
000002b0  64 28 75 73 65 72 24 29  0d 01 2c 15 20 20 20 20  |d(user$)..,.    |
000002c0  e7 20 75 69 64 25 20 3d  20 2d 31 20 8c 0d 01 36  |. uid% = -1 ...6|
000002d0  24 20 20 20 20 20 20 20  20 f2 65 78 69 74 28 31  |$        .exit(1|
000002e0  2c 20 22 75 6e 6b 6e 6f  77 6e 20 75 73 65 72 22  |, "unknown user"|
000002f0  29 0d 01 40 09 20 20 20  20 cd 0d 01 4a 25 20 20  |)..@.    ...J%  |
00000300  20 20 ff 28 22 2a 73 65  74 20 55 55 43 50 5f 55  |  .("*set UUCP_U|
00000310  49 44 20 22 20 2b 20 c3  28 75 69 64 25 29 29 0d  |ID " + .(uid%)).|
00000320  01 54 05 cd 0d 01 5e 04  0d 01 68 2a f4 20 77 65  |.T....^...h*. we|
00000330  20 73 74 6f 72 65 20 74  65 6d 70 2e 20 66 69 6c  | store temp. fil|
00000340  65 73 20 69 6e 20 74 68  65 20 73 63 72 61 70 64  |es in the scrapd|
00000350  69 72 0d 01 72 27 e7 20  a4 6f 62 6a 74 79 70 65  |ir..r'. .objtype|
00000360  28 22 3c 57 69 6d 70 24  53 63 72 61 70 44 69 72  |("<Wimp$ScrapDir|
00000370  3e 22 29 20 3d 20 30 20  8c 0d 01 7c 39 20 20 20  |>") = 0 ...|9   |
00000380  20 f2 65 78 69 74 28 31  2c 20 22 21 53 63 72 61  | .exit(1, "!Scra|
00000390  70 20 6d 75 73 74 20 62  65 20 73 65 65 6e 20 66  |p must be seen f|
000003a0  6f 72 20 74 68 69 73 20  74 6f 20 77 6f 72 6b 21  |or this to work!|
000003b0  22 29 0d 01 86 05 cd 0d  01 90 04 0d 01 9a 2b e7  |")............+.|
000003c0  20 a4 67 65 74 65 6e 76  28 22 4e 65 77 73 42 61  | .getenv("NewsBa|
000003d0  73 65 24 52 65 6d 6f 74  65 48 6f 73 74 22 29 20  |se$RemoteHost") |
000003e0  3d 20 22 22 20 8c 0d 01  a4 2d 20 20 20 20 f2 65  |= "" ....-    .e|
000003f0  78 69 74 28 31 2c 20 22  4e 65 77 73 42 61 73 65  |xit(1, "NewsBase|
00000400  24 52 65 6d 6f 74 65 48  6f 73 74 20 75 6e 73 65  |$RemoteHost unse|
00000410  74 22 29 0d 01 ae 05 cd  0d 01 b8 04 0d 01 c2 41  |t")............A|
00000420  f4 20 67 65 6e 65 72 61  74 65 20 61 20 62 61 74  |. generate a bat|
00000430  63 68 20 66 69 6c 65 20  6e 61 6d 65 2e 20 54 49  |ch file name. TI|
00000440  4d 45 20 72 65 61 6c 6c  79 20 63 68 61 6e 67 65  |ME really change|
00000450  73 20 71 75 69 74 65 20  66 61 73 74 2c 0d 01 cc  |s quite fast,...|
00000460  40 f4 20 73 6f 20 77 65  20 64 6f 6e 27 74 20 6e  |@. so we don't n|
00000470  65 65 64 20 74 6f 20 77  6f 72 72 79 20 61 62 6f  |eed to worry abo|
00000480  75 74 20 64 75 70 6c 69  63 61 74 65 20 66 69 6c  |ut duplicate fil|
00000490  65 6e 61 6d 65 73 2e 2e  2e 20 6f 72 3f 0d 01 d6  |enames... or?...|
000004a0  19 62 61 74 63 68 66 69  6c 65 24 20 3d 20 c0 c3  |.batchfile$ = ..|
000004b0  91 2c 20 31 30 29 0d 01  e0 35 62 61 74 63 68 6e  |., 10)...5batchn|
000004c0  61 6d 65 24 20 3d 20 22  3c 57 69 6d 70 24 53 63  |ame$ = "<Wimp$Sc|
000004d0  72 61 70 44 69 72 3e 2e  22 20 2b 20 c0 62 61 74  |rapDir>." + .bat|
000004e0  63 68 66 69 6c 65 24 2c  20 38 29 0d 01 ea 33 f4  |chfile$, 8)...3.|
000004f0  20 64 65 74 65 72 6d 69  6e 65 20 73 69 7a 65 20  | determine size |
00000500  6f 66 20 61 72 74 69 63  6c 65 20 66 6f 72 20 23  |of article for #|
00000510  21 20 72 6e 65 77 73 20  68 65 61 64 65 72 0d 01  |! rnews header..|
00000520  f4 12 64 75 6d 6d 79 25  20 3d 20 8e 28 4e 24 29  |..dummy% = .(N$)|
00000530  0d 01 fe 19 62 61 74 63  68 73 69 7a 65 25 20 3d  |....batchsize% =|
00000540  20 a2 23 64 75 6d 6d 79  25 0d 02 08 0c d9 23 64  | .#dummy%.....#d|
00000550  75 6d 6d 79 25 0d 02 12  3c f4 20 63 72 65 61 74  |ummy%...<. creat|
00000560  65 20 62 61 74 63 68 3a  20 66 69 72 73 74 20 70  |e batch: first p|
00000570  72 69 6e 74 20 74 68 65  20 72 6e 65 77 73 20 68  |rint the rnews h|
00000580  65 61 64 65 72 20 74 6f  20 69 74 2c 20 74 68 65  |eader to it, the|
00000590  6e 0d 02 1c 20 f4 20 61  70 70 65 6e 64 20 74 68  |n... . append th|
000005a0  65 20 61 63 74 75 61 6c  20 61 72 74 69 63 6c 65  |e actual article|
000005b0  2e 0d 02 26 1a 62 61 74  63 68 25 20 3d 20 ae 28  |...&.batch% = .(|
000005c0  62 61 74 63 68 6e 61 6d  65 24 29 0d 02 30 27 d5  |batchname$)..0'.|
000005d0  23 62 61 74 63 68 25 2c  20 22 23 21 20 72 6e 65  |#batch%, "#! rne|
000005e0  77 73 20 22 20 2b 20 c3  62 61 74 63 68 73 69 7a  |ws " + .batchsiz|
000005f0  65 25 0d 02 3a 0d d9 20  23 62 61 74 63 68 25 0d  |e%..:.. #batch%.|
00000600  02 44 34 ff 20 28 22 70  72 69 6e 74 20 22 20 2b  |.D4. ("print " +|
00000610  20 4e 24 20 2b 20 22 20  7b 20 3e 3e 20 22 20 2b  | N$ + " { >> " +|
00000620  20 62 61 74 63 68 6e 61  6d 65 24 20 2b 20 22 20  | batchname$ + " |
00000630  7d 22 29 0d 02 4e 04 0d  02 58 41 f4 20 6e 6f 77  |}")..N...XA. now|
00000640  20 70 6c 61 63 65 20 61  20 63 6f 70 79 20 6f 66  | place a copy of|
00000650  20 74 68 65 20 62 61 74  63 68 20 69 6e 3c 4e 65  | the batch in<Ne|
00000660  77 73 44 69 72 24 44 69  72 3e 2e 4e 65 77 73 42  |wsDir$Dir>.NewsB|
00000670  61 73 65 2e 57 6f 72 6b  0d 02 62 3d f4 20 73 6f  |ase.Work..b=. so|
00000680  20 74 68 61 74 20 6e 65  77 73 62 61 73 65 20 63  | that newsbase c|
00000690  61 6e 20 66 69 6e 64 20  69 74 20 74 68 65 72 65  |an find it there|
000006a0  20 61 6e 64 20 70 6f 73  74 20 69 74 20 6c 6f 63  | and post it loc|
000006b0  61 6c 6c 79 2e 0d 02 6c  4a ff 28 22 63 6f 70 79  |ally...lJ.("copy|
000006c0  20 22 20 2b 20 62 61 74  63 68 6e 61 6d 65 24 20  | " + batchname$ |
000006d0  2b 20 22 20 3c 4e 65 77  73 44 69 72 24 44 69 72  |+ " <NewsDir$Dir|
000006e0  3e 2e 4e 65 77 73 42 61  73 65 2e 57 6f 72 6b 2e  |>.NewsBase.Work.|
000006f0  22 20 2b 20 62 61 74 63  68 66 69 6c 65 24 29 0d  |" + batchfile$).|
00000700  02 76 04 0d 02 80 2c f4  20 63 6c 65 61 6e 75 70  |.v....,. cleanup|
00000710  20 62 65 66 6f 72 65 20  6c 65 61 76 69 6e 67 20  | before leaving |
00000720  74 68 69 73 20 70 72 6f  67 72 61 6d 2e 2e 2e 0d  |this program....|
00000730  02 8a 15 ff 28 22 72 65  6d 6f 76 65 20 22 20 2b  |....("remove " +|
00000740  20 4e 24 29 0d 02 94 43  f4 20 74 68 69 73 20 6c  | N$)...C. this l|
00000750  61 73 74 20 4f 53 43 4c  49 20 64 6f 65 73 20 6e  |ast OSCLI does n|
00000760  6f 74 20 72 65 74 75 72  6e 2e 20 57 65 20 6c 65  |ot return. We le|
00000770  74 20 74 68 65 20 73 63  72 69 70 74 20 72 65 6d  |t the script rem|
00000780  6f 76 65 20 74 68 65 0d  02 9e 10 f4 20 62 61 74  |ove the..... bat|
00000790  63 68 66 69 6c 65 2e 0d  02 a8 54 ff 28 22 3c 4e  |chfile....T.("<N|
000007a0  65 77 73 42 61 73 65 24  44 69 72 3e 2e 74 72 61  |ewsBase$Dir>.tra|
000007b0  6e 73 70 6f 72 74 73 2e  54 61 79 6c 6f 72 2e 44  |nsports.Taylor.D|
000007c0  6f 50 6f 73 74 20 3c 4e  65 77 73 42 61 73 65 24  |oPost <NewsBase$|
000007d0  52 65 6d 6f 74 65 48 6f  73 74 3e 20 22 20 2b 20  |RemoteHost> " + |
000007e0  62 61 74 63 68 6e 61 6d  65 24 29 0d 02 b2 04 0d  |batchname$).....|
000007f0  02 bc 34 f4 20 6a 75 73  74 20 69 6e 20 63 61 73  |..4. just in cas|
00000800  65 20 77 65 20 67 65 74  20 68 65 72 65 20 66 6f  |e we get here fo|
00000810  72 20 73 6f 6d 65 20 77  69 65 72 64 20 72 65 61  |r some wierd rea|
00000820  73 6f 6e 0d 02 c6 1e f2  65 78 69 74 28 31 2c 20  |son.....exit(1, |
00000830  22 50 6f 73 74 69 6e 67  20 66 61 69 6c 65 64 22  |"Posting failed"|
00000840  29 0d 02 d0 05 e0 0d 02  da 04 0d 02 e4 17 dd a4  |)...............|
00000850  66 69 6c 65 6e 61 6d 65  28 41 24 2c 6c 65 6e 25  |filename(A$,len%|
00000860  29 0d 02 ee 16 3d 41 24  2b c2 c3 7e 91 2c 6c 65  |)....=A$+..~.,le|
00000870  6e 25 2d a9 41 24 29 0d  02 f8 04 0d 03 02 11 dd  |n%-.A$).........|
00000880  f2 65 78 69 74 28 6e 25  2c 61 24 29 0d 03 0c 25  |.exit(n%,a$)...%|
00000890  ff 28 22 73 65 74 20 4e  65 77 73 42 61 73 65 24  |.("set NewsBase$|
000008a0  52 65 74 75 72 6e 43 6f  64 65 20 22 2b c3 6e 25  |ReturnCode "+.n%|
000008b0  29 0d 03 16 24 ff 28 22  73 65 74 20 4e 65 77 73  |)...$.("set News|
000008c0  42 61 73 65 24 52 65 74  75 72 6e 49 6e 66 6f 20  |Base$ReturnInfo |
000008d0  22 2b 61 24 29 0d 03 20  05 e0 0d 03 2a 05 e1 0d  |"+a$).. ....*...|
000008e0  03 34 04 0d 03 3e 11 dd  a4 6f 62 6a 74 79 70 65  |.4...>...objtype|
000008f0  28 66 24 29 0d 03 48 07  ea 46 25 0d 03 52 1c c8  |(f$)..H..F%..R..|
00000900  99 22 58 4f 53 5f 46 69  6c 65 22 2c 31 37 2c 66  |."XOS_File",17,f|
00000910  24 b8 74 25 3b 46 25 0d  03 5c 14 e7 28 46 25 80  |$.t%;F%..\..(F%.|
00000920  31 29 8c 3d 2d 31 3a 8b  3d 74 25 0d 03 66 04 0d  |1).=-1:.=t%..f..|
00000930  03 70 37 f4 20 42 41 53  49 43 20 69 73 20 6d 69  |.p7. BASIC is mi|
00000940  73 73 69 6e 67 20 61 20  67 65 74 65 6e 76 20 66  |ssing a getenv f|
00000950  75 6e 63 74 69 6f 6e 2c  20 73 61 64 20 62 75 74  |unction, sad but|
00000960  20 74 72 75 65 2e 0d 03  7a 11 f4 20 68 65 72 65  | true...z.. here|
00000970  20 69 74 20 69 73 2e 0d  03 84 05 f4 0d 03 8e 13  | it is..........|
00000980  dd 20 a4 67 65 74 65 6e  76 28 76 61 72 24 29 0d  |. .getenv(var$).|
00000990  03 98 13 ea 20 72 65 73  24 2c 20 73 69 7a 65 2c  |.... res$, size,|
000009a0  20 61 0d 03 a2 0c 73 69  7a 65 20 3d 20 30 0d 03  | a....size = 0..|
000009b0  ac 2d c8 99 20 22 58 4f  53 5f 52 65 61 64 56 61  |.-.. "XOS_ReadVa|
000009c0  72 56 61 6c 22 2c 20 76  61 72 24 2c 20 30 2c 20  |rVal", var$, 0, |
000009d0  2d 31 20 b8 20 2c 2c 73  69 7a 65 0d 03 b6 10 73  |-1 . ,,size....s|
000009e0  69 7a 65 20 3d 20 ac 73  69 7a 65 0d 03 c0 14 72  |ize = .size....r|
000009f0  65 73 24 3d c4 73 69 7a  65 2c 20 22 2e 22 29 0d  |es$=.size, ".").|
00000a00  03 ca 39 c8 99 20 22 58  4f 53 5f 52 65 61 64 56  |..9.. "XOS_ReadV|
00000a10  61 72 56 61 6c 22 2c 20  76 61 72 24 2c 20 72 65  |arVal", var$, re|
00000a20  73 24 2c 20 73 69 7a 65  2c 20 30 20 b8 20 2c 72  |s$, size, 0 . ,r|
00000a30  65 73 24 2c 73 69 7a 65  0d 03 d4 09 3d 72 65 73  |es$,size....=res|
00000a40  24 0d ff                                          |$..|
00000a43