Rude Dog Software Viewer v.1.0, Pure C ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Copyright 1992 by Sean P. Price Background, Features, Future Additions, and other BS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Rude Dog Software Text File Viewer is a little utility I put together after trying several text file viewers on my TT with no luck. They all had problems in TT medium (The resolution I do most of my work in). Most of them didn't work at all. Rather than run my GEnie bill through the roof trying to find one that works, I wrote my own. Besides actually needing this program, I used it to help me learn C. It has certainly done that. All future versions of this program, and probably any program that I write will be in C, and released under the Rude Dog Software title. Don't hold me to it, but I'm seriously thinking of porting the FzDS Protocols to C. Rude Dog Viewer will run in any resolution, although it will only allow you to view text in resolutions with at least 80 columns. It will view ASCII text, VT52, ANSI, Degas PI? and PC? images, NeoChrome NEO images, and Prism Paint PNT images. It detects ANSI files automatically, and will display them using as many colors as are available. It also fully supports ANSI attributes such as Ghost and Underline. It has separate ANSI fonts for 8 and 16 line font sizes giving you high quality character output. You won't see the blocky font used by FzDS Viewer (GFA Release) and FzDSTerm in ST High or TT resolutions. It also now has the ability to view Degas PI? and PC?, NeoChrome NEO, and Prim Paint PNT pictures. It will automatically switch resolutions where applicable, except when run under MultiTOS. (See below for MultiTOS info.) I.e. If you try to view a PI1 picture from ST Medium, Rude Dog Viewer will automatically switch to ST Low and show you the picture and switch back when you exit. If you are in ST Medium and try to view a PI3 picture you will get a message telling you can't view that picture in the current resolution. NOTE: Rude Dog Viewer always returns your palette and resolution to your original settings. (I personally hate programs that don't restore my colors.) Degas de-compression routines adapted from code written by John Brochu. This version finally adds access to the Menu Bar. This means you can access other programs and the Desktop in MultiTOS without quitting Rude Dog Viewer. Rude Dog Viewer has been tested under MultiTOS and works great. There are two things you should note about running it under MultiTOS. First you should use PRGFLAGS.PRG or CHPROT.APP to set Rude Dog Viewer to Global protection. Second Rude Dog Viewer will not automatically switch resolutions to fit the picture you wish to view. This is due to a limitation in MultiTOS. I could do it, but it would require that I first shut down all processes currently running. I don't think anybody would appreciate that. I will be adding printer support, support for more picture formats such as Conny Pettersson's extended Degas, and possibly TX2 support. I would also like to add the ability to reformat the text to any column size for printing or re-saving. It'll probably be a while before I add that though. This program is Copyright 1992 by Sean P. Price. It is a shareware product. If you use it, send a shareware contribution for whatever you think it's worth. I suggest between $3-$5 US but feel free to send more or less. Some people may think that $3-$5 is a bit low, but this program is fairly basic in it's current form and not really worth more. For the most part I would just like to know that people are using it and are interested in seeing it upgraded. So send your contributions to me at the following address: Sean P. Price P.O. Box 1364 Inyokern, CA 93527 I assume no responsibility for any damage incurred from the use or misuse of this program. It may be freely distributed as long as the following files are included in the archive RUDEVIEW.ZIP: RUDEVIEW.PRG The Rude Dog Software Text File Viewer RUDEVIEW.RSC Resource file for Rude Dog Viewer RUDEVIEW.TXT This documentation How to use it. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Rude Dog Viewer is very easy to use. It will accept a filename passed through the command line, so you can easily install it as an application. Or, if you are using TOS 2.0x or 3.0x you can simply drag the text file over Rude Dog Viewer and TOS will pass the name to Rude Dog Viewer. If you run it without passing a filename, you will be prompted to select a file for viewing with the file selector. *NOTE for TT users* If you have TT RAM, you can set Rude Dog Viewer to 'Run in TT RAM', but should set the 'Use TT RAM' flag to OFF. This is because the TT can't use TT RAM for video. If you don't plan on viewing pictures with Rude Dog Viewer, setting 'Use TT RAM' should work okay. *NOTE for MultiTOS users* You must use PRGFLAGS.PRG or CHPROT.APP to set Rude Dog Viewer to Global mode. If you don't, it may crash MultiTOS. You will also be limited to viewing pictures in the current resolution. This is a limi- tation of MultiTOS. Text Viewing Command List: Help screen: Help Scroll down one line: Return Down Arrow Left Mouse Button Scroll up one line: Up Arrow Right Mouse Button Scroll down one page: Space Right Arrow Scroll up one page: Left Arrow Jump to top of file: T, t Jump to bottom of file: B, b Continuous Scroll: C, c Load new file: L, l Both Mouse Buttons Quit to Desktop: Q, q Undo Search: S, s Access Menu Bar: A, a Picture Viewing Command List: Help screen: Help Load new file: L, l Either Mouse Button Quit to Desktop: Q, q Undo Both Mouse Buttons Access Menu Bar: A, a Here's a little trick you can use to install Rude Dog Viewer so it will run for any file extension not already in use by the system. First make a backup of your DESKTOP.INF or NEWDESK.INF file. Then install Rude Dog Viewer as an application with * as the document type and save your desktop. Load your DESKTOP.INF or NEWDESK.INF file into a text editor. It will look something like the one below. It is a NEWDESK.INF file, but that's not important. #a000000 #b000000 #c7770007000600070055200505552220770557075055507703111103 #d #K 4F 53 4C 44 46 42 43 57 45 58 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 4D 56 50 00 @ #E 80 04 00 06 #Q 41 40 43 40 43 40 #W 00 00 1C 01 14 1C 00 C:\*.*@ #W 00 00 0A 0F 1A 09 00 @ #W 00 00 0E 01 1A 09 00 @ #W 00 00 04 07 26 0C 00 @ #W 00 00 0C 0B 26 09 00 @ #W 00 00 08 0F 1A 09 00 @ #W 00 00 06 01 1A 09 00 @ #N FF 04 000 @ *.*@ @ #D FF 01 000 @ *.*@ @ #G 03 FF 000 *.APP@ @ @ #G 03 FF 000 *.PRG@ @ @ #Y 03 FF 000 *.GTP@ @ @ #P 03 FF 000 *.TTP@ @ @ #F 03 04 000 *.TOS@ @ @ #P 03 04 000 C:\ARC.TTP@ *.ARC@ -x @ #P 03 04 000 C:\LHARC.TTP@ *.LZH@ @ #G 03 04 202 C:\UTILITY\RUDEVIEW.PRG@ *.*@ @ #M 00 02 00 FF C DEVICE@ @ #M 00 00 00 FF A FLOPPY DISK@ @ #M 00 01 00 FF B FLOPPY DISK@ @ #T 00 08 02 FF TRASH@ @ #M 00 03 00 FF D DEVICE@ @ #M 00 04 00 FF E DEVICE@ @ #M 00 05 00 FF F DEVICE@ @ #M 00 06 00 FF G DEVICE@ @ #M 01 00 00 FF H DEVICE@ @ #M 01 01 00 FF I DEVICE@ @ #M 01 02 00 FF J DEVICE@ @ Now move the line containing RUDEVIEW.PRG to the line just above the one with *.APP as in the example below. Now save this text file and you are set. Simple enough, eh? For those interested I'll explain why this works. When you launch any file from the Desktop, TOS starts looking for a matching extension type in your DESKTOP.INF or NEWDESK.INF file so it can run the appropriate installed application if any. It searches from the bottom up, which is why PRG, TOS, APP, TTP, and GTP are above your installed applications. By putting Rude Dog Viewer above these any extension that doesn't have a matching application, and isn't a system file (TOS, PRG, etc.) will get to Rude Dog Viewer and load it because it's extension is the wildcard *. #a000000 #b000000 #c7770007000600070055200505552220770557075055507703111103 #d #K 4F 53 4C 44 46 42 43 57 45 58 00 00 00 00 00 00 00 00 00 00 00 00 00 52 00 00 4D 56 50 00 @ #E 80 04 00 06 #Q 41 40 43 40 43 40 #W 00 00 1C 01 14 1C 00 C:\*.*@ #W 00 00 0A 0F 1A 09 00 @ #W 00 00 0E 01 1A 09 00 @ #W 00 00 04 07 26 0C 00 @ #W 00 00 0C 0B 26 09 00 @ #W 00 00 08 0F 1A 09 00 @ #W 00 00 06 01 1A 09 00 @ #N FF 04 000 @ *.*@ @ #D FF 01 000 @ *.*@ @ #G 03 04 202 C:\UTILITY\RUDEVIEW.PRG@ *.*@ @ #G 03 FF 000 *.APP@ @ @ #G 03 FF 000 *.PRG@ @ @ #Y 03 FF 000 *.GTP@ @ @ #P 03 FF 000 *.TTP@ @ @ #F 03 04 000 *.TOS@ @ @ #P 03 04 000 C:\ARC.TTP@ *.ARC@ -x @ #P 03 04 000 C:\LHARC.TTP@ *.LZH@ @ #M 00 02 00 FF C DEVICE@ @ #M 00 00 00 FF A FLOPPY DISK@ @ #M 00 01 00 FF B FLOPPY DISK@ @ #T 00 08 02 FF TRASH@ @ #M 00 03 00 FF D DEVICE@ @ #M 00 04 00 FF E DEVICE@ @ #M 00 05 00 FF F DEVICE@ @ #M 00 06 00 FF G DEVICE@ @ #M 01 00 00 FF H DEVICE@ @ #M 01 01 00 FF I DEVICE@ @ #M 01 02 00 FF J DEVICE@ @ Revision History ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Version 1.0: Finally the first non-beta release. I would like to thank Frank Lawrence for his help in beta testing, creative suggestions, and of course his registration fee. There isn't much change in this version. At least not anything significant. Version 0.9 Beta: Added the ability to access the Menu Bar for Accessories and MultiTOS. Sped up text display considerably. Fixed some more cosmetic bugs. Fixed clipping bug that would cause bombs if you tried to view any dialogs in ST Low or TT Medium resolutions. Fixed a bug where it wouldn't put a CR on the first line after pressing C for Continuous Scroll. Version 0.8 Beta: Added support for Prism Paint's PNT image format. Fixed some minor cosmetic bugs. Fixed a bug that could cause bombs if a compressed Degas picture was larger than 32000 bytes, or a compressed Prism Paint picture was larger than 153600 bytes. Version 0.7 Beta: Added ability to view Degas PI?, PC?, and NeoChrome images. Fixed a major bug concerning memory allocation. Version 0.6 Beta: Fixed a bug that didn't allow you view the last line when paging through with the right arow key. Added ability to quit by pressing the Undo key. It was in the documentation, but didn't function. Version 0.5 Beta: New file input routines. Fixed the mouse buttons. They did the opposite of what is listed in the docs and help menu. Fixed a bug that caused an extra blank line to be displayed at the bottom of a listing. Fixed the mouse pointer to switch to an arrow. Fixed a bug in the search routines that caused it to not find a match in the last line. Version 0.4 Beta: Added mouse scrolling support. It was in the documentation and Help dialog, but not the program. Fixed a few problems with mouse hide and show. Fixed a bug in search where it started out with Case Ignore as default, but the Case Ignore box wasn't highlighted. It now defaults to Case Sensitive. Closing Remarks ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ As stated above, this program and all accompanying files are Copyright 1992 by Sean P. Price. This program may be freely distributed provided that all files listed above are intact in the archive RUDEVIEW.ZIP and have not been modified in any manner, and that there is no charge other than compensation for media and postage. The charge for media and postage is not in any case to exceed $5.00 US currency. Rude Dog Viewer is written using Pure C and should run on any version of TOS. If you find some strange incompatibility problem, please inform me. You may send comments, suggestions, bug reports, or complaints to me at any of the following places: GEnie: Address GE-Mail to S.PRICE19 Sanctuary From The Law BBS (619)377-3610, 8/N/1, 300-14400 HST/V.32/V.32bis 1:210/41 @ FidoNet 51:3/11 @ AtariNet 100:290/7 @ TurboNet 90:300/1001 @ NeST Sean P. Price P.O. Box 1364 Inyokern, CA 93527 GEnie is a Trademark of General Electric.