home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
utility
/
patch
/
sten103
/
changes.101
next >
Wrap
Text File
|
1990-03-28
|
18KB
|
352 lines
STeno Changes for 1.01
======================
Paragraph Reformatting
----------------------
Without a doubt the most-requested enhancement has been the ability to
reformat paragraphs. This has been added, and works similar to the way
Word Writer and 1ST Word handle reformatting, ie. just move the insertion
point to the first line of a paragraph and hit F10. There is even a
"Reformat to End" command which will reformat all of the text from the
insertion point to the end of the file.
The important point to note about reformatting is that the indent level is
based on the *second* line of the paragraph. Actually, the line after the
cursor is used to determine the indent level, so if you press F10 with the
cursor in the middle of a paragraph you'll find that the rest of the
paragraph is formatted according to the indent level of the line after the
one you started on. This allows you to easily have both indents and
outdents without having to resort to special types of tabs like Word Writer
('indent' vs. 'tab').
For reformatting purposes a 'paragraph' is considered to be a sequence of
non-blank lines. A line which contains only blanks or tabs is considered
to be a blank line.
The right margin is taken from the current word wrap column, so you can
vary your right margins simply by altering the wrap column as you reformat.
Fully justified text is not currently supported for 2 reasons.
1 Justified text *without* proportional typefaces or micro-spacing
between characters and words is, for most people, harder to read than
text which is "ragged right". This is due to the fact that extra
blanks are inserted between words in order to make a flush right
margin, which causes the inter-word spacing to vary within a single
line. Using a proportional typeface or a non- proportional typeface
with microspacing allows the padding to be distributed evenly between
all of the words and characters in the line, resulting in consistent
inter-word spacing and much more readable text. Just to prove my
point, check out the paragraph for reason #2. It didn't turn out all
that horrible, but imagine how much of a pain it would be to read if
all of its lines were as bad a the third one. Yeah, I know.... this is
basically my way of saying "nahhhh, I don't really want to bother doing
that".
2 STeno deals with pure-ASCII files, and there is no foolproof way
to handle justified paragraphs properly with pure-ASCII files.
The problem arises when you decide to reformat a justified
paragraph. If extra ASCII blank characters were used in order to
fill lines, then many words would have two or more blanks between
them and STeno wouldn't be able to tell which ones were the
'real' ones. Some editors solve this by reducing multiple blanks
to single blanks and then apply some typical formatting rules
putting two blanks after periods, question marks, etc. Of
course, if you didn't want to have two blanks after those
characters you'd have to go and manually fix things up again, and
any tables or other special alignment you used blanks for would
be pretty much wrecked.
The way around this of course is to use some special character rather
than an ASCII blank to represent the inserted spaces, but saving such a
character would produce a file that is not pure ASCII, and would
probably not be too readable from the desktop. Since STeno uses plain
old ASCII this is not an acceptable solution.
Printer Setup
-------------
There is a new "Printer Setup..." command under the File menu. Selecting
this brings up a new dialog which allows you to set several options which
control the way STeno prints:
o The Printer Initialization String is simply a sequence of characters
that STeno will send to the printer at the beginning of a "Print" or
"Print Selection" command. You can enter up to 35 characters on this
line; what you put, if anything, will depend on your printer. Most
printers use different escape sequences to select things like the font
type and pitch - check your printer manual to find out what you need to
use.
Since the dialog uses a standard GEM text entry field there are a
couple of things to point out. You can't enter a 'null' character
(ASCII value of 0) since that character is used by GEM (and STeno) to
terminate the string itself. Fortunately most printers will accept
either null or the '0' character interchangeably. The other quirk is
that the commercial at sign '@' cannot be used as the first character
in the string. If GEM sees '@' as the first character it automatically
considers the entire string to be empty. This was probably done as a
convenience for programmers when creating dialog boxes, but turns out
to be more of a hindrance than a help. You'll notice this in *any* GEM
dialog text fields that allow arbitrary text (you won't see it in
places that allow only digits or filename characters however), so it
has nothing to do with STeno.
o The Left Margin Offset field lets you specify how many blanks to add to
the beginning of each line sent to the printer.
o The Print Page Banner box determines whether or not STeno will print a
three line banner at the start of each page. The first line will
contain the file name, the current date, and the page number. Lines
two and three are left blank to separate the banner from the file data.
o The Send LF after CR box tells STeno to send either a carriage return /
linefeed pair after each line or just a carriage return. If your
printer is configured for automatic line feeds after carriage returns
then make sure this box is off (white).
o The Lines Per Page entry tells STeno the *total* number of lines
available on each page. Subtract 6 from this number to determine the
number of lines STeno will print the file data on. Three lines are
used at the start of the page for the banner and three are left at the
bottom of the page in order to skip over the page break. Naturally,
STeno won't let you set this number to less than 7.
Setting the Lines Per Page to 0 effectively sets up an infinitely
large page. You'll get the banner at the beginning of printing if it's
enabled, but you won't get any other blank lines inserted during
printing.
o The Use FF To Eject Page box tells STeno whether or not it should send
an ASCII form-feed character (value 12) to go to the next page or
simply enough blank lines to reach the Lines Per Page total. Virtually
all printers understand the form-feed character, and it usually gets
you to the next page much more quickly than a bunch of blank lines.
o Eject Last Page determines if STeno will stop after the last line has
been printed or advance the paper to the beginning of the next page.
The Accessory Title Changes!
----------------------------
The accessory title in the GEM "Desk" drop-down menu will now show "STeno:
<filename>", where <filename> is either "Untitled" or the name of the
current file. This is the same information that STeno uses for the window
title and is a really nice way to see what file you have loaded, especially
if you like to load multiple STenos.
Since GEM limits desk accessory titles to 20 characters, the extension
portion of the filename will not be shown if the title would exceed 20
characters. For example, " STeno: DESKTOP.INF" just fits (all
accessories put 2 blanks at the beginning), but a long file name such as "
STeno: FILENAME.EXT" is too big, so STeno just shows: " STeno:
FILENAME".
Those of you who are using STeno from within MultiDesk will just see
"STeno", since MultiDesk makes its own copy of the original name used and
STeno's changes go unnoticed.
STENOCFG.TTP Is Now Obsolete
----------------------------
The "Save Settings" command was added and all of the parameters changed by
the STENOCFG.TTP utility can now be changed from within STeno.
ALT-G was used as the keyboard equivalent for this command since that's
what STalker uses also. This meant changing the keyboard shortcut for
"Find Next" to something else: Shift-ALT-A. This is more in line with the
keystrokes used by Microsoft Word on the Mac, which served as the basis for
many of the other keyboard equivalents.
When you invoke the Save Settings commands, STeno will look for either
STENO.ACC or STENO.PRG (depending on how it is currently being run) in the
current directory. If it can't find itself it will present you with a file
selector asking you to locate STENO.ACC/PRG as appropriate. It will then
open the executable file and store the current settings inside it, making
them the defaults for future sessions. If you select the wrong file or if
some other sort of error occurs while STeno updates the file a warning
message will be displayed. Note that for this feature to work you must
*not* use a compression utility like DC*Squish or PACKER on the executable
file. You can compress the executable after you've saved your settings,
but the Save Settings command has no chance of working on a compressed
file.
The following settings are saved:
o The "Ignore upper/lower case differences" setting from the Find and
Change commands. Note that this is now common to both commands, so
changing it in one place changes it in the other also.
o The path for Open and Save.
o The values from the Preferences dialog.
o The font size.
o The current window size and location.
At startup time STeno checks this and will revert to the default size
if it determines that the stored size would be unuseable. Such a
situation can arise fairly easily if you switch between a Moniterm and
a normal screen, or between mono and colour. In the latter case it
happens if you position the STeno window in the bottom half of the
screen and then save the settings. The saved location indicates
coordinates with an X value greater than 200, but the colour screen
only has 640x200 resolution so STeno simply creates a window the full
size of the screen.
Word-Sized Cursor Movement and Text Selection
---------------------------------------------
Word-sized cursor movements are now possible using the Control key with the
arrow keys. For example, Control + Right Arrow moves the insertion point
to the beginning of the next word. A "word" is defined as a sequence of
non-blank characters.
You can also select single or multiple words simply by double-clicking. If
you start a selection operation with a double-click rather than a
single-click, STeno will keep whole words together in the selection range.
To select a single word simply move the mouse pointer over it and
double-click.
New Preferences Dialog
----------------------
A new "Preferences..." command was added to the Options menu. This brings
up a dialog box that lets you set the accessory buffer size and the drive
to use for the cut/copy/paste clipboard file.
A change to the clipboard drive will take effect right away, but a change
in the accessory buffer size will only take effect after rebooting.
If the clipboard drive doesn't exist at startup time (you might have
specified a RAM Disk and then rebooted without it) STeno will use the
highest available drive. STeno searches the bitmap returned by the
Drvmap() call, starting with the bit corresponding to drive 'P' and working
backwards. This feature will mainly help users who boot from a floppy and
want to use a RAM-Disk or their B drive for the clipboard. Note that some
RAM-Disks allow drive letters greater than 'P' - this is not officially
supported by GEMDOS, and on TOS 1.4 an attempt to open a file on a
nonexistent drive greater than 'P' sends the machine off into la-la land.
The buffer size setting is the same as before (as set by the STENOCFG
utility). It determines how much memory STeno will grab from the system.
Due to the overhead of the data structures and memory management used by
STeno, this is *not* the same as the maximum file size, ie. a 32K buffer
does not mean you'll be able to edit a 32K file. Depending on the nature
of the file (how many blank lines there are, average line length, etc.) the
overhead is usually around 20-25%. The alternative is much slower
operation, especially with large files.
Still on the topic of memory consumption, the "STeno Info..." dialog now
shows the size of the largest available block along with the other
information it showed before. STeno does its own memory management within
the block it allocates from the system at startup time. When operating as
a program, STeno will simply get more memory from the system if it runs
out, but this is something it can't do when running as an accessory due to
the nature of GEMDOS and desk accessories.
There are two types of data that contend for memory in STeno: the contents
of each line, ie. the actual data; and the array of line pointers. The
line pointer array is one of the main reasons why STeno has reasonably
quick editing operations, but it adds some overhead and is often the cause
of an "out of memory" message. Each entry in the line pointer array
occupies 6 bytes, and the array itself must be in contiguous memory. This
means that a 1000 line file requires 6000 bytes in a single block of
memory. By now you can probably see the reason for adding the "Largest
Block" display. If you run out of memory before you suspect you should, it
usually means that STeno could not find a single block big enough to allow
it to increase the size of the line array. You may have 7000 bytes free in
a 1000 line file, but those 7000 bytes are probably scattered all over the
buffer rather than in a single big chunk.
If you run into an "Out of memory" and need to add more lines there are two
things you can do. Obviously you can increase the overall buffer size via
the "Preferences..." command, but that requires a re-boot before it takes
effect. The other way is simply to save your file and then load it back in
again. The reason this helps is that when you use the "Open..." or "New"
commands, STeno will allocate roughly one fifth of the available space for
the line array. For a 32K buffer this means you'll start out with just
over 6K or 1000 lines. This will be decreased if necessary as a file gets
loaded but the one fifth ratio seems to be pretty good for most text files.
In the future I may consider putting a fixed upper limit on the number of
lines, and allocating the necessary space at start-up time. Naturally this
would be configurable via the "Preferences..." dialog, but this approach is
likely to be more confusing to the novice than the current (automatic)
approach. Feel free to put in your two cents worth on this issue,
preferably via e-mail.
Delete Line
-----------
A "Delete Line" command has been added: Shift-Delete. This will delete
the line the cursor is currently on, regardless of the cursor column within
the line.
Other Miscellaneous Changes and Bug Fixes
-----------------------------------------
o Cut and Copy now are available all of the time, rather than just when
there is currently text selected. If you choose one of them when
nothing is selected then the current scrap will be cleared.
o The SCRAP.TXT file used for the clipboard is now hidden according to
TOS 1.4.
o The disappearing mouse problem that sometimes happened when the STeno
window was behind another one has been fixed.
o Fixed a bug that caused a number of strange problems. It was most
noticeable if a copy+paste was attempted when STeno was out of memory.
It was actually a problem in the code to join two lines when the first
is blank, so it could also have happened if you had the cursor on an
empty line and hit Delete. It was the kind of bug that didn't show up
right away, but caused strange things (crashes, out of memory errors)
to happen later on.
o Fixed a problem that caused STeno to temporarily go off into space if
you had text selected ahead of the portion of the file shown in the
window. As soon as you did something to deselect that text (moving the
cursor or doing a Find Next for example) STeno would temporarily take a
picnic.
o Fixed a problem in handling large files (more than 5461 lines). This
was actually a bug in the Laser C code generator. STeno keeps an array
of a structure with one element per line. To access the data for a
particular line, the C code is something like:
"lines[line_number].data". Laser C generated code that assumed the
array would never be larger than 32K, so since each structure element
is 6 bytes, and 6 * 5462 > 32K, things got pretty messed up.
o Fixed a problem that occurred if you tried to Cut more than half of a
medium or large file.
o STENO.PRG would lock up from many shell programs like Gulam if you
tried to invoke it twice - this has been fixed.
Questions or Comments
---------------------
As always, questions, comments, and suggestions are welcome. You can
reach us by mail, phone, or e-mail:
Strata Software
94 Rowe Drive
Kanata Ontario Canada
K2L 3Y9
Phone/Fax: (613) 591-1922
GEnie: E.ROSENQUIST
Bix: e_rosenquist
CompuServe: 72711,2503