home *** CD-ROM | disk | FTP | other *** search
/ YPA: Your Privacy Assured / YPA.ISO / other_goodies / utilities / iu-14-as225.lha / INetUtils-1.4 / contrib / waffle_spool.rexx < prev   
OS/2 REXX Batch file  |  1994-10-13  |  7KB  |  161 lines

  1. From virginia!icecave.apana.org.au!dfreeman Thu, 6 Oct 94 12:20:21 EDT
  2. Received: by adastra.cvl.va.us (V1.17-beta/Amiga)
  3.       id <3jur@adastra.cvl.va.us>; Thu, 6 Oct 94 12:20:21 EDT
  4. Received: from bushwire.apana.org.au by uvaarpa.virginia.edu id aa17490;
  5.           6 Oct 94 11:40 EDT
  6. Received: from icecave.UUCP (Uicecave@localhost) by bushwire.apana.org.au (8.6.9/bwnf7) with UUCP id BAA02231 for adastra.cvl.va.us!mbs; Fri, 7 Oct 1994 01:14:06 +1000
  7. Received: by icecave.apana.org.au (V1.17-beta/Amiga)
  8.       id <11bp@icecave.apana.org.au>; Thu, 6 Oct 94 20:06:50 GMT +1000
  9. Date: Thu, 6 Oct 94 20:06:50 GMT +1000
  10. Message-Id: <9410062006.11bp@icecave.apana.org.au>
  11. From: Dave Freeman <dfreeman@icecave.apana.org.au>
  12. To: mbs@adastra.cvl.va.us
  13. Subject: Re: AmiTCP (Ether) <> UUCP
  14.  
  15.  
  16. > > What I would like to do is get away from the necessity for him to use
  17. > > a modem to dial out with his Waffle setup to collect his usenet stuff.
  18.  
  19. > I believe your analysis and conclusion are correct. You can use such utilities
  20. > as NNTPxfer between his host and your own, but then you would not be running
  21. > UUCP at all.
  22.  
  23. > There are no current solutions to UUCP over Ethernet for the Amiga. I've spent
  24. > some time on it, its not simple, and I won't have time to finish it any time
  25. > soon. Several other people have indicated that they WOULD do something, but no
  26. > programs have yet been seen...
  27.  
  28. I have taken an interim step of massaging the contents of his spool
  29. directory on my system into a format that Waffle can accept and then
  30. putting them in his home directory in relation to my AmiTCP setup.  He
  31. can then ftp them and de-archive them straight into his Waffle spool
  32. and process them.  This was done using AREXX (if I'd done it in C I
  33. would still be doing it) and I will include the AREXX script here for
  34. your interest.  It is not all that generic yet but I plan on making it
  35. generic soon as I have a couple of other people up here talking about
  36. slip and so forth even if it only gives them a connection to my BBS
  37. and not a further connection to internet in general.
  38.  
  39. I wonder what it would take to actually get an ethernet/uucp
  40. connection.  Is it 'mainly' a case of a uucico that will operate on
  41. something other than a serial device?  Or have I missed something
  42. major here?  If it is 'mainly' this then I _might_ be able to convince
  43. a local C programming mate to have a look at it for me.
  44.  
  45. As I said, my main programming experience is AREXX and AmigaDOS batch
  46. files rather than C so I'm not totally sure of what would be involved
  47. here.  I guess a suitable getty would have to be involved but I
  48. suspect that this could be bypassed by use of a suitable telnet login
  49. that would spawn a uucico instead of a shell.
  50.  
  51. Obviously I am quite interested in seeing this implemented and would
  52. like to be involved, even if only twisting the arm of a mate that
  53. _does_ do quite a bit of C programming at a commercial level.
  54.  
  55. Anyway, here is that AREXX stuff FWIW (the main thing of interest I
  56. guess is that Waffle needs a bitmask as part of it's own filename -
  57. mainly to get around the problem with all no case on MS-DOS).
  58.  
  59.  -----8<-----
  60. /* ----------------------------------------------------------------------------------------------- */
  61. /*                                                                                                 */
  62. /* Waffle_Kludge.rexx v1.0 by Dave Freeman - dfreeman@icecave.apana.org.au                         */
  63. /*                                                                                                 */
  64. /* ----------------------------------------------------------------------------------------------- */
  65.  
  66. OPTIONS RESULTS
  67.  
  68. /* ----------------------------------------------------------------------------------------------- */
  69.  
  70. IF ~SHOW('l','rexxsupport.library') THEN
  71.   IF ~ADDLIB('rexxsupport.library',0,-30) THEN
  72.     DO
  73.       SAY "Error: rexxsupport.library not available"
  74.       EXIT 5
  75.     END
  76.  
  77. /* ----------------------------------------------------------------------------------------------- */
  78.  
  79. SystemName = incan_troll
  80. ThisSystem = icecave
  81. StoreDir   = 'USERS:japa/uucp/'
  82.  
  83. /* ----------------------------------------------------------------------------------------------- */
  84.  
  85. WorkDir   = 'UUSpool:'SystemName'/'
  86. DirList   = SHOWDIR(WorkDir,FILE)
  87. DirCount  = WORDS(DirList)
  88.  
  89. IF LENGTH(ThisSystem) > 7 THEN DO
  90.   SystemAdj = LEFT(ThisSystem,7)
  91.   END
  92. ELSE DO
  93.   SystemAdj = ThisSystem
  94.   END
  95.  
  96. /* ----------------------------------------------------------------------------------------------- */
  97.  
  98. CurrDir = PRAGMA('D')
  99. PRAGMA('D',WorkDir)
  100.  
  101. /* ----------------------------------------------------------------------------------------------- */
  102.  
  103. DO Count = 1 TO DirCount BY 1
  104.   TestFile = WORD(DirList,Count)
  105.   IF LEFT(TestFile,2) = 'C.' & EXISTS(WorkDir||TestFile) = 1 THEN DO
  106.     OPEN(WorkIn,TestFile,READ)
  107.     DO UNTIL EOF(WorkIn)
  108.       WorkLine = READLN(WorkIn)
  109.       IF EOF(WorkIn) THEN LEAVE
  110.       PARSE VAR WorkLine junk LocalFile RemoteFile junk
  111.       LocalFile = STRIP(LocalFile)
  112.       RemoteFile = STRIP(RemoteFile)
  113.       RemoteFile = DELSTR(RemoteFile,3,LENGTH(SystemAdj))
  114.       RemoteFile = RIGHT(RemoteFile,5)'.'LEFT(RemoteFile,1)
  115.       RemoteTest = LEFT(RemoteFile,5)
  116.       Kludge = 0
  117.       DO Counter = 1 TO LENGTH(RemoteTest) BY 1
  118.         CharTest = SUBSTR(RemoteTest,Counter,1)
  119.         IF POS(CharTest,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') = 0 THEN DO
  120.           Kludge = Kludge + (2 ** (LENGTH(RemoteTest) - Counter))
  121.           END
  122.         END
  123.       Kludge = SUBSTR('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',Kludge+1,1)
  124.       ADDRESS COMMAND 'Rename 'LocalFile' AS 'Kludge||RemoteFile
  125.       END
  126.     CLOSE(WorkIn)
  127.     ADDRESS COMMAND 'Delete >NIL: 'TestFile
  128.     END
  129.   END
  130.  
  131. SaveFile = StoreDir||STRIP(LEFT(SystemName,8))'.lha'
  132.  
  133. Say 'SaveFile: 'SaveFile', WorkDir: 'WorkDir
  134.  
  135. PRAGMA(D,StoreDir)
  136.  
  137. ADDRESS COMMAND 'C:LHA -2 -m -N -q a 'SaveFile' 'WorkDir'*'
  138. ADDRESS COMMAND 'Delete >NIL: 'WorkDir'#?'
  139.  
  140. /* ----------------------------------------------------------------------------------------------- */
  141.  
  142. PRAGMA('D',CurrDir)
  143.  
  144. /* ----------------------------------------------------------------------------------------------- */
  145.  
  146. EXIT
  147.  -----8<-----
  148.  
  149. Feel free to do anything you like with it although I would like to see
  150. any changes made to it forwarded back to me at some stage (even if
  151. just for my own interest/learning etc).
  152.  
  153. --
  154. |~~~~~~~~~~| dfreeman@icecave.apana.org.au |  -= The Ice Cave =-   |
  155. |  _--_|\<---------------------------------------------------------+
  156. | /      \ | Cairns, Far North Queensland  |   FIDONet:  3:640/535 |
  157. | \_.--._/ |                               |  AmigaNet: 41:450/533 |
  158. |       v  |  Rain Forest & Reef Country   | Phone: +61-70-31-4186 |
  159. |__________|_______________________________|        +61-70-31-4020 |
  160.  
  161.