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

StarterPak/!Newsbase/Transports/taylor/DoPost

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/DoPost
Read OK:
File size: 05E2 bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
| > DoPost
|
| Version for compressed news batches
| Usage: DoPost <NewsServerAddress> <Filename>
|
| DoPost will queue the specified file for posting to News via the
| specified NewsServer. It performs no error checking on the file, and
| assumes that the file contains a valid header.
|
| This version of DoPost produces single, compressed news batches
| for sending straight to the other end.
|
| Author:   	    Gunnar Z�tl
| Date:	    	    17-Sep-1994
| Last Modified:    19-Sep-1994
|
| We need some more memory than the non-compressing version
|
wimpslot -min 700K
|
| We create a temporary file in Wimp$ScrapDir, to which we compress the
| article
|
set f <Wimp$ScrapDir>.DPtemp
|
| if you want to use gzip instead of compress, change cunbatch to zunbatch
| and compress to gzip.
|
<obey$dir>.printto <f> #! cunbatch
compress < %1 >> <f> 2> null:
|
| this gets around a problem with the C library, which sometimes seems
| confused then receiving a <system$variable> together with I/O redirection.
Set alias$DoPostIt Uux -r - %0!rnews < <f> 2> null:
|
| we assume that posting the article will succeed.
|
Set NewsBase$ReturnInfo Article posted
DoPostIt
Set NewsBase$ReturnCode <Sys$ReturnCode>
|
| If posting did not succeed, we alter the Info for NewsBase here.
|
If "<NewsBase$ReturnCode>" <> "0" Then Set NewsBase$ReturnInfo Posting failed
|
| now remove the file sendnews passed us, the temp. file, and unset the
| helper environment variables
|
Remove %1
Remove <f>
unset f
unset alias$DoPostIt
00000000  7c 20 3e 20 44 6f 50 6f  73 74 0a 7c 0a 7c 20 56  || > DoPost.|.| V|
00000010  65 72 73 69 6f 6e 20 66  6f 72 20 63 6f 6d 70 72  |ersion for compr|
00000020  65 73 73 65 64 20 6e 65  77 73 20 62 61 74 63 68  |essed news batch|
00000030  65 73 0a 7c 20 55 73 61  67 65 3a 20 44 6f 50 6f  |es.| Usage: DoPo|
00000040  73 74 20 3c 4e 65 77 73  53 65 72 76 65 72 41 64  |st <NewsServerAd|
00000050  64 72 65 73 73 3e 20 3c  46 69 6c 65 6e 61 6d 65  |dress> <Filename|
00000060  3e 0a 7c 0a 7c 20 44 6f  50 6f 73 74 20 77 69 6c  |>.|.| DoPost wil|
00000070  6c 20 71 75 65 75 65 20  74 68 65 20 73 70 65 63  |l queue the spec|
00000080  69 66 69 65 64 20 66 69  6c 65 20 66 6f 72 20 70  |ified file for p|
00000090  6f 73 74 69 6e 67 20 74  6f 20 4e 65 77 73 20 76  |osting to News v|
000000a0  69 61 20 74 68 65 0a 7c  20 73 70 65 63 69 66 69  |ia the.| specifi|
000000b0  65 64 20 4e 65 77 73 53  65 72 76 65 72 2e 20 49  |ed NewsServer. I|
000000c0  74 20 70 65 72 66 6f 72  6d 73 20 6e 6f 20 65 72  |t performs no er|
000000d0  72 6f 72 20 63 68 65 63  6b 69 6e 67 20 6f 6e 20  |ror checking on |
000000e0  74 68 65 20 66 69 6c 65  2c 20 61 6e 64 0a 7c 20  |the file, and.| |
000000f0  61 73 73 75 6d 65 73 20  74 68 61 74 20 74 68 65  |assumes that the|
00000100  20 66 69 6c 65 20 63 6f  6e 74 61 69 6e 73 20 61  | file contains a|
00000110  20 76 61 6c 69 64 20 68  65 61 64 65 72 2e 0a 7c  | valid header..||
00000120  0a 7c 20 54 68 69 73 20  76 65 72 73 69 6f 6e 20  |.| This version |
00000130  6f 66 20 44 6f 50 6f 73  74 20 70 72 6f 64 75 63  |of DoPost produc|
00000140  65 73 20 73 69 6e 67 6c  65 2c 20 63 6f 6d 70 72  |es single, compr|
00000150  65 73 73 65 64 20 6e 65  77 73 20 62 61 74 63 68  |essed news batch|
00000160  65 73 0a 7c 20 66 6f 72  20 73 65 6e 64 69 6e 67  |es.| for sending|
00000170  20 73 74 72 61 69 67 68  74 20 74 6f 20 74 68 65  | straight to the|
00000180  20 6f 74 68 65 72 20 65  6e 64 2e 0a 7c 0a 7c 20  | other end..|.| |
00000190  41 75 74 68 6f 72 3a 20  20 20 09 20 20 20 20 47  |Author:   .    G|
000001a0  75 6e 6e 61 72 20 5a f6  74 6c 0a 7c 20 44 61 74  |unnar Z.tl.| Dat|
000001b0  65 3a 09 20 20 20 20 09  20 20 20 20 31 37 2d 53  |e:.    .    17-S|
000001c0  65 70 2d 31 39 39 34 0a  7c 20 4c 61 73 74 20 4d  |ep-1994.| Last M|
000001d0  6f 64 69 66 69 65 64 3a  20 20 20 20 31 39 2d 53  |odified:    19-S|
000001e0  65 70 2d 31 39 39 34 0a  7c 0a 7c 20 57 65 20 6e  |ep-1994.|.| We n|
000001f0  65 65 64 20 73 6f 6d 65  20 6d 6f 72 65 20 6d 65  |eed some more me|
00000200  6d 6f 72 79 20 74 68 61  6e 20 74 68 65 20 6e 6f  |mory than the no|
00000210  6e 2d 63 6f 6d 70 72 65  73 73 69 6e 67 20 76 65  |n-compressing ve|
00000220  72 73 69 6f 6e 0a 7c 0a  77 69 6d 70 73 6c 6f 74  |rsion.|.wimpslot|
00000230  20 2d 6d 69 6e 20 37 30  30 4b 0a 7c 0a 7c 20 57  | -min 700K.|.| W|
00000240  65 20 63 72 65 61 74 65  20 61 20 74 65 6d 70 6f  |e create a tempo|
00000250  72 61 72 79 20 66 69 6c  65 20 69 6e 20 57 69 6d  |rary file in Wim|
00000260  70 24 53 63 72 61 70 44  69 72 2c 20 74 6f 20 77  |p$ScrapDir, to w|
00000270  68 69 63 68 20 77 65 20  63 6f 6d 70 72 65 73 73  |hich we compress|
00000280  20 74 68 65 0a 7c 20 61  72 74 69 63 6c 65 0a 7c  | the.| article.||
00000290  0a 73 65 74 20 66 20 3c  57 69 6d 70 24 53 63 72  |.set f <Wimp$Scr|
000002a0  61 70 44 69 72 3e 2e 44  50 74 65 6d 70 0a 7c 0a  |apDir>.DPtemp.|.|
000002b0  7c 20 69 66 20 79 6f 75  20 77 61 6e 74 20 74 6f  || if you want to|
000002c0  20 75 73 65 20 67 7a 69  70 20 69 6e 73 74 65 61  | use gzip instea|
000002d0  64 20 6f 66 20 63 6f 6d  70 72 65 73 73 2c 20 63  |d of compress, c|
000002e0  68 61 6e 67 65 20 63 75  6e 62 61 74 63 68 20 74  |hange cunbatch t|
000002f0  6f 20 7a 75 6e 62 61 74  63 68 0a 7c 20 61 6e 64  |o zunbatch.| and|
00000300  20 63 6f 6d 70 72 65 73  73 20 74 6f 20 67 7a 69  | compress to gzi|
00000310  70 2e 0a 7c 0a 3c 6f 62  65 79 24 64 69 72 3e 2e  |p..|.<obey$dir>.|
00000320  70 72 69 6e 74 74 6f 20  3c 66 3e 20 23 21 20 63  |printto <f> #! c|
00000330  75 6e 62 61 74 63 68 0a  63 6f 6d 70 72 65 73 73  |unbatch.compress|
00000340  20 3c 20 25 31 20 3e 3e  20 3c 66 3e 20 32 3e 20  | < %1 >> <f> 2> |
00000350  6e 75 6c 6c 3a 0a 7c 0a  7c 20 74 68 69 73 20 67  |null:.|.| this g|
00000360  65 74 73 20 61 72 6f 75  6e 64 20 61 20 70 72 6f  |ets around a pro|
00000370  62 6c 65 6d 20 77 69 74  68 20 74 68 65 20 43 20  |blem with the C |
00000380  6c 69 62 72 61 72 79 2c  20 77 68 69 63 68 20 73  |library, which s|
00000390  6f 6d 65 74 69 6d 65 73  20 73 65 65 6d 73 0a 7c  |ometimes seems.||
000003a0  20 63 6f 6e 66 75 73 65  64 20 74 68 65 6e 20 72  | confused then r|
000003b0  65 63 65 69 76 69 6e 67  20 61 20 3c 73 79 73 74  |eceiving a <syst|
000003c0  65 6d 24 76 61 72 69 61  62 6c 65 3e 20 74 6f 67  |em$variable> tog|
000003d0  65 74 68 65 72 20 77 69  74 68 20 49 2f 4f 20 72  |ether with I/O r|
000003e0  65 64 69 72 65 63 74 69  6f 6e 2e 0a 53 65 74 20  |edirection..Set |
000003f0  61 6c 69 61 73 24 44 6f  50 6f 73 74 49 74 20 55  |alias$DoPostIt U|
00000400  75 78 20 2d 72 20 2d 20  25 30 21 72 6e 65 77 73  |ux -r - %0!rnews|
00000410  20 3c 20 3c 66 3e 20 32  3e 20 6e 75 6c 6c 3a 0a  | < <f> 2> null:.|
00000420  7c 0a 7c 20 77 65 20 61  73 73 75 6d 65 20 74 68  ||.| we assume th|
00000430  61 74 20 70 6f 73 74 69  6e 67 20 74 68 65 20 61  |at posting the a|
00000440  72 74 69 63 6c 65 20 77  69 6c 6c 20 73 75 63 63  |rticle will succ|
00000450  65 65 64 2e 0a 7c 0a 53  65 74 20 4e 65 77 73 42  |eed..|.Set NewsB|
00000460  61 73 65 24 52 65 74 75  72 6e 49 6e 66 6f 20 41  |ase$ReturnInfo A|
00000470  72 74 69 63 6c 65 20 70  6f 73 74 65 64 0a 44 6f  |rticle posted.Do|
00000480  50 6f 73 74 49 74 0a 53  65 74 20 4e 65 77 73 42  |PostIt.Set NewsB|
00000490  61 73 65 24 52 65 74 75  72 6e 43 6f 64 65 20 3c  |ase$ReturnCode <|
000004a0  53 79 73 24 52 65 74 75  72 6e 43 6f 64 65 3e 0a  |Sys$ReturnCode>.|
000004b0  7c 0a 7c 20 49 66 20 70  6f 73 74 69 6e 67 20 64  ||.| If posting d|
000004c0  69 64 20 6e 6f 74 20 73  75 63 63 65 65 64 2c 20  |id not succeed, |
000004d0  77 65 20 61 6c 74 65 72  20 74 68 65 20 49 6e 66  |we alter the Inf|
000004e0  6f 20 66 6f 72 20 4e 65  77 73 42 61 73 65 20 68  |o for NewsBase h|
000004f0  65 72 65 2e 0a 7c 0a 49  66 20 22 3c 4e 65 77 73  |ere..|.If "<News|
00000500  42 61 73 65 24 52 65 74  75 72 6e 43 6f 64 65 3e  |Base$ReturnCode>|
00000510  22 20 3c 3e 20 22 30 22  20 54 68 65 6e 20 53 65  |" <> "0" Then Se|
00000520  74 20 4e 65 77 73 42 61  73 65 24 52 65 74 75 72  |t NewsBase$Retur|
00000530  6e 49 6e 66 6f 20 50 6f  73 74 69 6e 67 20 66 61  |nInfo Posting fa|
00000540  69 6c 65 64 0a 7c 0a 7c  20 6e 6f 77 20 72 65 6d  |iled.|.| now rem|
00000550  6f 76 65 20 74 68 65 20  66 69 6c 65 20 73 65 6e  |ove the file sen|
00000560  64 6e 65 77 73 20 70 61  73 73 65 64 20 75 73 2c  |dnews passed us,|
00000570  20 74 68 65 20 74 65 6d  70 2e 20 66 69 6c 65 2c  | the temp. file,|
00000580  20 61 6e 64 20 75 6e 73  65 74 20 74 68 65 0a 7c  | and unset the.||
00000590  20 68 65 6c 70 65 72 20  65 6e 76 69 72 6f 6e 6d  | helper environm|
000005a0  65 6e 74 20 76 61 72 69  61 62 6c 65 73 0a 7c 0a  |ent variables.|.|
000005b0  52 65 6d 6f 76 65 20 25  31 0a 52 65 6d 6f 76 65  |Remove %1.Remove|
000005c0  20 3c 66 3e 0a 75 6e 73  65 74 20 66 0a 75 6e 73  | <f>.unset f.uns|
000005d0  65 74 20 61 6c 69 61 73  24 44 6f 50 6f 73 74 49  |et alias$DoPostI|
000005e0  74 0a                                             |t.|
000005e2