home *** CD-ROM | disk | FTP | other *** search
- EchoHandler V1.1 ©1991 Henrik Nordström
-
- Currently needs AmigaDOS 2.0, for Packet-handling functions.
- Need to write own packet-handling functions to work with -> 1.3,
- but I really don't se why to support "old" roms, in my 2.0 hacks...
-
- This is a useful and very small filehandler called ECHO:
- it is simply a easy way to see a programs output both on the console
- and have it redirected to a file.
-
- for example:
- dir >ECHO:dirdump dh0:
-
- or even:
- sort inputfile ECHO:output
-
- and the most useful one: (for me, and a lot of other programmers i suppose...)
- lc >ECHO:ram:lc-errors -v -O EchoHandler
-
- I wrote this little filehandler because I always wanted to know how this part
- of AmigaDOS really worked, and it showed that it was very easy to make new
- filehandlers to use with AmigaDOS!
-
- And i really like the size of this handler... 652 bytes, and written in C! not
- much for being a C program, and i don't think that it can be made much smaller
- even if you write it in assembler...
-
- mountlist entry:
- ECHO:
- Handler = l:EchoHandler
- Stacksize = 3000
- Priority = 5
- GlobVec = -1
- #
-
- Changes in 1.2:
- Filesize now 860 bytes.. little bigger, but not very much..
- Get's consolestream from pr_CLI->cli_CurrentOutput if caller is a CLI-process,
- if not, i use pr_COS, but pr_COS can be redirected with >filename
- At last I found out how to specify that a FileHandle is interactive. no
- more blocklike output..
-
- Changes in 1.1:
- A number of new ACTIONS supported, filesize grown from 652 to 824 bytes. still
- not much, and now it's even more useful. now you can appent to files thru ECHO:
- example:
- echo >>ECHO:outfile "hello"
- and you can read files:
- copy echo:infile to outfile
- shows infile to console while copying it to outfile!
-
- Packets supported in 1.0:
- ACTION_NEWFILE: Open a new file, whith any valid filename
- finds CurrentOutputStream from calling process.
- ACTION_WRITE: Writes data to console (CurrentOutputStream) and
- file
- ACTION_END: Close file
- ACTION_DIE: Remove filehandler from memory. delayed if any files
- are open.
-
- Packets added in 1.1:
- ACTION_OLDFILE: Opens an exsisting file for reading or append
- ACTION_UPDATE: Opens an new or exsisting file for reading or append
- ACTION_READ: Read data from opened file.
- ACTION_SEEK: Seek in opened file.
-
-
-
- My address if you have any questions or simply wants to contact me
- by some reason:
-
- FidoNet:
- Henrik Nordstrom 2:206/108 (The Crystal)
-
- Mail:
- Henrik Nordström
- Ängsvägen 1
- 756 45 Uppsala
- Sweden
-
- Phone:
- +46-(0)18-303763 or
- +46-(0)18-300104
-