DIARY.ACC Version 1.7 1/5/90 --------------------- To Registered users receiving this on a disk in the mail: The 'R' on the end of the 1.7R means this version is for you. It is not to be made available for download anywhere, and I would appreciate it if you want to share Diary with anyone, that you give them the standard DIARY_17.ACC, also included on the Diary disk. Your v 1.7R has been personalized for you (take a look at the Help screen). Also, it (a) has the Merge file feature enabled, (b) defaults to non-display of the 'cr' at the end of lines and allows you to toggle that display on and off with Ctl-Return, (c) has the 'Hack' features enabled that let you view/edit memory. To Everyone: Now available is a stripped version of Diary called DIARY17S.ACC in case anyone is in search of a desk accessory text editor that only takes up 38K of ram (compared to 59K for the full version 1.7R). This was accomplished by decreasing the buffer size to 4K and disabling a number of features, most notably the word wrap, since it takes the largest chunk of code (and has given me the most headaches). I think Diary has become a fairly mature piece of software, as well as including some unique features. Therefore, I am starting to request $10 for registration from people who have not previously registered. See information below on what all you get for registering. New for Version 1.7 (1/4/90) ------------------- 1) Full Search/REPLACE options. This includes entering hex byte values in either the search or replace strings to allow access to all 0-255 values. Hex digits must be entered in pairs or the string will be interpreted simply as a string of characters rather than hex values. This is probably irrelevant to most users. 2) For registered users only: Alt-T toggles between normal Text mode and 'Hack' mode. Hack mode is for programmers/hackers who want to be able to load ANY file (or area of RAM) into the editor and see every byte and edit it as if it were a normal text file. It displays 64 bytes per line (32 in low resolution). 3) For registered users only: Alt-V lets you view/edit any part of your ST's memory by loading it into the edit buffer. You can either pick a specific block of ram to load or search ram for any text string or sequence of bytes; Diary will then load a block surrounding the found string. After editing, you can then copy the buffer back into ram at the same or a different location and/or save it as a disk file. This includes addresses from zero up to whatever your operating system thinks is the top of physical RAM (phystop). This includes all the system variables, screen ram, etc. However, with the ramdisk I use (Eternal2), phystop is lowered to fit the ramdisk above it, so phystop becomes lower than the actual top of physical ram. Note that copying from buffer to ram may crash your ST if you try changing something the ST is using at that moment. 4) Alt-E = Encrypt/Decrypt buffer. If you really want secrecy of your words, and are concerned that someone else may have access to your files, this is the solution. This was added due to a request from someone who registered, but I figured others out there might like it too. If you use a password greater than one character long, you probably shouldn't append the encrypted files, since you may not be able to decrypt it after appending. And if you forget your password, you can forget about seeing your text again. Do not expect me to be able to figure it out. 5) Tab: In overwrite mode tab now skips over text to get to the next tabstop, rather than erasing the text. (As before, while in insert mode tab just inserts spaces up to the next tabstop.) 6) Added display of character index (first character in buffer is number zero), and character hex value. This will be more useful to programmer types, but you can also use it to see how full your buffer is. Just hit Shift-ClrHome twice to get the cursor to the end of your text, and 'n' will be the length of the file. 7) Alt-X exits without querying whether you want to save or not. In other words, it does the same thing as clicking on the window's close button. Bugs Fixed in Version 1.7 ------------------------- 1) Fixed bug that I introduced in v 1.6 that didn't display whole window when 'fulling' a window that had been moved down from the top of the screen. 2) Made Diary more compatible with Quick ST, but not totally: There are fewer leftover cursor blocks lying around the screen. You will still get some 'mouse droppings' any time the cursor interacts with the mouse, but this should hopefully be just a minor inconvenience. Note that it all works fine with Turbo ST. 3) Word Wrap: Maybe finally I've zapped all the word wrap bugs??... such as when backspacing twice from the left edge of the screen. 4) Fixed mouse droppings that could occur when doing a page up/down if mouse overlapped cursor. 5) Fixed file selector bug that put two backslashes in the pathname when Diary was loaded from within a folder (such as is possible with MultiDesk by Codehead Software). One reason I hadn't noticed this is that I always use the Universal Item Selector, and that apparently corrects for certain funny things the ST operating system does with pathnames. Thank you, Bob Wenham for pointing it out to me -- now I've got to go back to all my other software creations to fix them! 6) Block marking with F1/F2: I changed/fixed it so that if you hit F2 when the cursor is before an existing marked block, the block is extended to the cursor position. It used to redefine the block to be from its old starting point to the cursor position. As always, you can mark blocks in either direction. 7) Fixed loss of mouse when you hit esc or F10. Hopefully this one wasn't in one of the more widespread versions. 8) No more occasional stray character at the end of a printout. (I had been going one character past the end of the text... oops.) 9) Clearing the buffer after loading part of a file that was too big for the buffer now resets things so that Diary knows you're working on something new that isn't part of a big file. UPGRADES -------- I expect any further additional features for Diary will come more slowly than they have been. (See the HISTORY.TXT file for how far I've come in the last few months.) Diary all started because I wanted a very simple desk accessory text editor that I could include in with some educational / personal enhancement software I had been working on. That was a year ago. So, I am now hoping to put more of my time back on the original project. However, there are still a couple features I would like to add to Diary, including allowing the user to change the right wordwrap margin (which should be fairly simple to add after the changes I made in 1.7) to allow printing out text with wider margins. Also, I still want to attempt using some tricks similar to Quick ST to speed up the text output so those of you without Turbo ST or Quick ST don't have to suffer with the standard text output speed. (Note that of the standard ways of outputting text with the ST operating system, I am using the fastest that I could find.) Registered users can always get the latest version by sending me $2 (or more) to cover my cost of disk and mailing. I will send a post card to all registered users to let you know whenever I come up with a new version. The version available to non-registered users will always have some feature(s) disabled. For instance, non-registered users will always have to live with the 'cr' character at the end of the lines, and will not be able to merge files. This is nothing major, but just a little added incentive to register. Also, the 'hack' features (Alt-T and Alt-V) are only in the registered versions. Some possibilities for the future --------------------------------- 1) Speed up everything using tricks from QuickST source code. Thank you for that upload, Darek Mihocka! This could also allow me to fix the minor bug that allows a little of the Diary window to be temporarily overwritten when you move around a window on top of the Diary window. 2) Maybe create my own sliders/arrows that repeat (the GEM ones don't without TOS 1.4). 3) Make the desktop directory windows update themselves when a file is saved from Diary. For now you have to hit Escape after leaving Diary to get the window updated. (Just as is true with Universal Item Selector). 4) Deal directly with files with other end-of-line characters (e.g., just LF). For now you have to do a full search/replace to change some other end of line character sequence into CR/LF to use Diary in its text mode. 5) One person suggested adding a little picture drawing feature... That could be a fun can of worms for me to get into! INTRO FOR THOSE NEW TO DIARY ---------------------------- You can always hit the Help key or use the drop-down menu if you don't know what you're doing. This program is simply a text editor accessory that opens up a half-screen window which you can move up or down on your screen, and toggle between full and half size. It has no special diary functions (yet) other than being there when you want to jot something down. The text buffer is limited to 10K of text, which it allocates all at once when you boot up. Any text in the buffer stays there until you Clear it or reboot, regardless of whether you have the Diary window open. Diary deals strictly in text with the standard CR/LF at the end of each line (unless in 'Hack' mode). It only displays the 'cr' but the line feed is still there. If you are editing something other than text, just turn off the word-wrap before doing anything else. If you cover up the Diary window by clicking on a desktop or application window, you can get back to Diary either by clicking on any visible part of the Diary window (if any is still showing) or by going to the desktop desk accessory menu and clicking on Diary as if you were opening it. However, I still don't recommend closing (or opening) an application while you've got the Diary window open. Just be nice and orderly and close Diary first. One slightly strange thing in Diary is the simple little drop down menu within the Diary window. The items don't highlight as in a normal menu (since I couldn't justify the added program size to accomplish this), but the menu goes away just by moving the mouse outside the menu without having to click again. Word Wrap (Alt-W, F10, Wrap...) -------------------------------- I should probably explain a little about the Turn Off/On button in the Wrap selection box. With Wrap turned On, Diary will always word wrap to a line length of 75 characters, plus the CR/LF for a total of 77 (or 64 if in 'Hack' mode, or appropriately shorter lengths in low resolution). This occurs automatically when adding to the end of your text and you hit the edge of the window, or when inserting text in a line that reaches the 75 character limit. With Wrap turned Off, you can create/edit lines of any length (within the 10K limit for the whole buffer, of course). Regardless of whether Wrap is turned on or off, you can always force a wrap (reformat of paragraph, line, or whole buffer) with the Wrap! button of the dialog box (F10 or Alt-W). Block Cut/Paste and Delete functions (Alt-B, F1-F5, Delete, Shift-Delete) ------------------------------------ The buffer that is used to hold cut blocks and deleted lines and characters is not very large (1000 bytes). Deleting a line (or multiple lines or characters in sequence) has the same effect as doing a block cut of them. It is similar to the Flash editor in that after deleting, you can paste it back any number of times wherever you want. So to do a block copy, you first cut, then paste at the same location, and finally paste where you want the copy to be. The Undo key does the same thing as F5 (paste). Note that doing multiple backspaces only puts the last character deleted into the paste buffer. Extended lines (longer than one window width) -------------- Be sure to turn off Wrap before trying to edit a line that extends beyond the first window, unless you want it to wrap to 75 characters when you hit the end of the second (or later) window. Simply moving the cursor with the arrow keys beyond the furthest left or right columns of the window will move you to the next or previous section of the line. Shift-left or right arrow takes you to the start/end of the line, no matter how far over it is. A new command, Control-arrow, takes you just to the left or right edge of the current window. Clicking with the mouse by the edge of the window will also take you to the next/previous section of the line. One interesting thing you can now do with wrap turned off is to use Diary instead of a sector editor to Find and then change text strings in PRG, TOS, or any other file. Just be careful not to change the length of them! Text buffer size (or when is 10K equal to 10 megs?) ---------------- I really tried to make the text buffer size configurable by the user, and I thought I'd succeeded until I noticed what was happening to the amount of free memory any time I switched between low and medium resolution. For some reason, no matter what I did, TOS would not realize that I wanted to free up a chunk of memory, and thus it would load Diary (and any later accessories) on top of (higher than) the memory they were already using. This could quickly run you out of free memory, so I went back to the old simple method. Maybe in a later version I'll have another go at it after getting some answers from those more knowledgable than I. As an alternative to a variable buffer size, Diary allows loading in portions of files and then saving this edited portion along with the rest of the original file. Details of the "ANY file size" feature: Despite Diary's small (now 10K) text buffer size, it will handle ANY size file (up to about 10 megs), by loading in only a portion of the file that you want. Block zero is the first 8K block of the file, and the dialog box will allow you to go up to a block starting at about 1K from the end of the file, which would give you over 8K of free space to add text to the end of the file. When you go to save the file, Diary will take care of stringing together the text from the original file with the block of it that you edited to create a new file. This means that it won't overwrite the latest version of the original on disk, since it needs that to create the new version to be saved. For you power users this also means that you should be careful if you have two copies of Diary running at the same time, not to make changes in the same document in both windows, and then expect to be able to save a complete file from both windows. Since you can only load an 8K block of a file that is bigger than 10K, it will require more work to do some things, like doing a cut/paste from the end of a big file to its beginning. To do such a thing you would need to first save the file after the Cut, then read in the other portion of the file, and finally do the Paste. Or to handle a block larger than the paste buffer size, registered users can first save the block to disk and then use the Merge feature to paste it at the desired location. Printing (Alt-P) -------- This allows either printing the whole buffer or just a marked block. Note that you can send any printer control codes you want to set left margin, bold, near letter quality, or any other things your printer can do. All you have to do is look at your printer manual to find out what codes do what. For example, on my printer (which is pretty much Epson compatible) the code to set the left margin is esc-'l'-'x', where x is the number of spaces over to set the margin. To get the escape character, just type Control-[. Then type lowercase L. Then type Control-E to set a left margin of 5, since E is the fifth letter of the alphabet (don't worry about the funny character that appears - that's just what the ST uses for displaying this control code which is normally non-printable). Something for Everyone ---------------------- Incidentally, if you find yourself using this on any sort of regular basis, it is shareware, and I'd be most appreciative of something in return. For the $10 registration I would gladly provide custom versions with whatever buffer size you desire or different ALT-key and function key assignments. Registration will also get you more complete documentation, IF you request it. I am also very interested in suggested improvements, bug reports, etc. Further improvements are expected, and registering will reward you with a more full-featured version than is available for download. If you use Diary, but don't feel that it is worth $10 to you, send me $5 and any suggested improvements, and I will still register you. The Modula-2 source code for the initial version exists as a different file earlier in the ST downloads, and I'd happily provide source to this and later versions to any registered user. Feel free to distribute Diary to friends, BBS's etc, but please also include this documentation file. Oh, and how about a disclaimer: This software and documentation have no warranty of anything. You use it at your own risk. I use it myself all the time, but since I can not possibly check it out with every hardware/software set up out there, I can only offer to try to fix any bugs that you find and report to me. DIARY.ACC version 1.7, copyright 1990 by Craig Harvey GEnie: c.harvey CompuServe: 73047,600 Clear Thinking, BBS: 313-761-2444 P.O. Box 715 Ann Arbor, MI 48105 THANK YOU ( Those who have registered ) --------- James Kleiser James Conway Robert Wenham Clayton Hardiman Kenneth Ledgard, D.D.S. Warren Tryk (Hired Hand Graphics) Chet Walters J. Philip Arno