home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / Edge1721.DMS / Edge1721.adf / ExtraStuff / Edge_SasC.lha / echohandler / EchoHandler.DOC < prev    next >
Encoding:
Text File  |  1993-11-09  |  2.4 KB  |  84 lines

  1. EchoHandler V1.1 ©1991 Henrik Nordström
  2.  
  3. Currently needs AmigaDOS 2.0, for Packet-handling functions.
  4. Need to write own packet-handling functions to work with -> 1.3,
  5. but I really don't se why to support "old" roms, in my 2.0 hacks...
  6.  
  7. This is a useful and very small filehandler called ECHO:
  8. it is simply a easy way to see a programs output both on the console
  9. and have it redirected to a file.
  10.  
  11. for example:
  12.  dir >ECHO:dirdump dh0:
  13.  
  14. or even:
  15.  sort inputfile ECHO:output
  16.  
  17. and the most useful one: (for me, and a lot of other programmers i suppose...)
  18.  lc >ECHO:ram:lc-errors -v -O EchoHandler
  19.  
  20. I wrote this little filehandler because I always wanted to know how this part
  21. of AmigaDOS really worked, and it showed that it was very easy to make new 
  22. filehandlers to use with AmigaDOS!
  23.  
  24. And i really like the size of this handler... 652 bytes, and written in C! not
  25. much for being a C program, and i don't think that it can be made much smaller
  26. even if you write it in assembler...
  27.  
  28. mountlist entry:
  29. ECHO:
  30.     Handler = l:EchoHandler
  31.     Stacksize = 3000
  32.     Priority = 5
  33.     GlobVec = -1
  34. #
  35.  
  36. Changes in 1.2:
  37. Filesize now 860 bytes.. little bigger, but not very much..
  38. Get's consolestream from pr_CLI->cli_CurrentOutput if caller is a CLI-process,
  39. if not, i use pr_COS, but pr_COS can be redirected with >filename 
  40. At last I found out how to specify that a FileHandle is interactive.  no
  41. more blocklike output..
  42.  
  43. Changes in 1.1:
  44. A number of new ACTIONS supported, filesize grown from 652 to 824 bytes. still
  45. not much, and now it's even more useful. now you can appent to files thru ECHO:
  46. example:
  47.  echo >>ECHO:outfile "hello"
  48. and you can read files:
  49.  copy echo:infile to outfile
  50. shows infile to console while copying it to outfile!
  51.  
  52. Packets supported in 1.0:
  53. ACTION_NEWFILE:    Open a new file, whith any valid filename
  54.         finds CurrentOutputStream from calling process.
  55. ACTION_WRITE:    Writes data to console (CurrentOutputStream) and
  56.         file
  57. ACTION_END:    Close file
  58. ACTION_DIE:    Remove filehandler from memory. delayed if any files
  59.         are open.
  60.  
  61. Packets added in 1.1:
  62. ACTION_OLDFILE:    Opens an exsisting file for reading or append
  63. ACTION_UPDATE:    Opens an new or exsisting file for reading or append
  64. ACTION_READ:    Read data from opened file.
  65. ACTION_SEEK:    Seek in opened file.
  66.  
  67.  
  68.  
  69. My address if you have any questions or simply wants to contact me
  70. by some reason:
  71.  
  72. FidoNet:
  73.  Henrik Nordstrom 2:206/108 (The Crystal)
  74.  
  75. Mail:
  76.  Henrik Nordström
  77.  Ängsvägen 1
  78.  756 45 Uppsala
  79.  Sweden
  80.  
  81. Phone:
  82. +46-(0)18-303763 or
  83. +46-(0)18-300104
  84.