[32;1mC PROGRAMMING SECTION - PROJECTS SUPPLEMENT.                    JJB TEMPLAR[m

[32;3mText Display programs: feature table:[m

                                           r                            y
                                          e                            a
                                         d                            l
                                        a                        e   p
                                       e                        r   s
                                      R                        o   i       r
                                     e   e   s                M   D       e
                            e   s   s   r   w            t   h   t   w   w
                           r   s   u   o   e            s   c   x   e   e
                          o   e   o   m   n   y        o   u   e   i   i
                         M   L   M   V   V   T        M   M   T   V   V
                       +---+---+---+---+---+---+    +---+---+---+---+---+
Forward page ......... | X | X | X | X | X | X | .. | X | X | X | X | X | 11
Backward page ........ | X | X | X | X | X | X | .. | X | X | X | X | X | 11
CLI & WB ............. | X | X | X | X | X | X | .. | X | X | X | X | X | 11
Forward line ......... | X | X | X | - | - | X | .. | X | X | X | X | X | 9
Help ................. | X | X | - | X | X | X | .. | X | X | - | X | - | 7
Move specific ........ | X | X | X | - | - | X | .. | X | - | - | X | X | 7
Search forward ....... | X | X | X | - | - | X | .. | X | X | - | - | - | 6
ANSI support ......... | X | - | - | - | - | X | .. |1/2|1/2| - | - | - | 4
                       +---+---+---+---+---+---+    +---+---+---+---+---+

                       +---+---+---+---+---+---+    +---+---+---+---+---+
Top/Bottom ........... | X | X | X | - | - | X | .. | X | X | X | X | X | 9
Dirty data OK ........ | X | X | X | - | - | X | .. | X | X | X | X | X | 9
Backward line ........ | - | X | X | - | - | X | .. | X | X | X | X | X | 8
Repeat search ........ | X | X | X | - | - | X | .. | - | X | - | - | - | 5
Print file ........... | - | X | - | - | - | X | .. | X | X | - | - | X | 5
Vertical bar ......... | - | - | X | - | - | X | .. | X | - | - | X | X | 5
Horizontal clip ...... | - | - | X | - | - | X | .. | - | - | X | X | X | 5
Resizes OK ........... | X | - | X | n | n | X | .. | n | n | X | X | n | 5
Multiple files ....... | - | X | - | X | X | X | .. | - | - | - | - | X | 5
Screen size .......... | - | - | - | - | X | X | .. | X | X | - | X | - | 5
Uses '?' ............. | X | - | - |GUR| - | X | .. | X | - | - | X | - | 4
Can load file ........ | - | X | X | - | X | X | .. | - | - | - | - | - | 4
Reverse search ....... | - | X | - | - | - | X | .. | - | X | - | - | - | 3
Repaint .............. | X | X | - | - | - | X | .. | - | - | - | - | - | 3
Text() wrap .......... | n | n | n | X | X | n | .. | n | X | n | n | n | 3
VScreen 1024 ......... | X | - | - | - | - | X | .. | - | - | - | X | - | 3
Click move ........... | - | - | - | X | - | X | .. | - | n | - | - | X | 3
Invokes editor ....... | X | X | - | - | - | X | .. | - | - | - | - | - | 3
CLI commands ......... | - | X | - | - | - | X | .. | X | - | - | - | - | 3
Piping ............... | X | X | - | - | - | - | .. | - | - | - | - | - | 2
Icon(ify)ise ......... | - | - | - | - | - | X | .. | X | - | - | - | - | 2
Smooth scroll ........ | - | - | - | - | - | - | .. | X | X | - | - | - | 2
Pure ................. | X | - | - | - | - | X | .. | - | - | - | - | - | 2
Marks ................ | - | X | - | - | - | X | .. | - | - | - | - | - | 2
Run-time modes ....... | - | X | - | - | - | X | .. | - | - | - | - | - | 2
Print page ........... | - | - | X | - | - | - | .. | X | - | - | - | - | 2
Horizontal move ...... | - | - | X | - | - | X | .. | - | - | - | - | - | 2
ToolType args ........ | - | - | - | - | X | X | .. | - | - | - | - | - | 2
Wildcard search ...... | - | - | X | - | - | X | .. | - | - | - | - | - | 2
Pages (^L) ........... | X | - | - | - | - | X | .. | - | - | - | - | - | 2
Uses CLI window ...... | * | - | - | - | - | - | .. | - | - | - | - | - | 1
Dynamic help ......... | * | - | - | - | - | - | .. | - | - | - | - | - | 1
Binary file check .... | * | - | - | - | - | ? | .. | - | - | - | - | - | 1
Both case search ..... | * | - | - | - | - | ? | .. | - | - | - | - | - | 1
Repeat command ....... | - | * | - | - | - | ? | .. | - | - | - | - | - | 1
IFF pic display ...... | - | - | * | - | - | - | .. | - | - | - | - | - | 1
Word wrap ............ | - | - | n | - | - | n | .. | * | - | n | n | n | 1
Save page/file ....... | - | - | - | - | - | - | .. | * | - | - | - | - | 1
Color change ......... | - | - | - | - | - | - | .. | * | - | - | - | - | 1
Custom format ........ | - | - | - | - | - | - | .. | * | - | - | - | - | 1
Automatic scroll ..... | - | - | - | - | - | - | .. | - | * | - | - | - | 1
ENV:default .......... | - | - | - | - | - | * | .. | - | - | - | - | - | 1
Audible bell ......... | - | - | - | - | - | * | .. | - | - | - | - | - | 1
                       +---+---+---+---+---+---+    +---+---+---+---+---+
                         23  22  18   7   9  36       23  17   9  15  13

[32;3mKey ..................[m * = only program with this feature.
                       X = has this feature.
                       - = does not have (as far as I know) this feature.
                       n = not applicable.
                     1/2 = partial support for this feature.
                     GUR = GURUed when I tried to check for this feature.
                       ? = this is a feature I would like ty to have.

[32;3mFeature by feature ...[m

    [32mForward page:[m
        I included programs that could do this via scrollbar.
    [32mBackward page:[m
        I included programs that could do this via scrollbar.
    [32mCLI & WB:[m
        All programs here have that capability. However, the "more" program
        on AMICUS 24 and 25 GURUs from the CLI. It is a VERY simple prog,
        and doesn't get any other mention here.
    [32mForward line:[m
        I included programs that could do this via scrollbar.
    [32mHelp:[m
        I included programs that had help in the titlebar or prompt.
    [32mMove specific (3 types):[m
        1.  Ability to go to a specific line.
        2.  Ability to go to a specific percentage within the file.
        3.  Ability to jump around with a scroll bar.
    [32mSearch forward:[m
        Care nought for case. Note that all searches are based on lines as
        follows:
                found = 0;      line = first_line;
                while (!found) found = match(line++,pattern);
        That is, if the pattern is split between two lines, it will not be
        found (eg: search "be<NL>        found").
    [32mANSI support:[m
        Most programs that draw the text via the graphics.library do not
        handle ANSI sequences to change color, etc. Those that do often
        fail to handle concatenated codes (like ^[[32;1m) or blank codes
        (like ^[[m). These are marked with a "1/2". All the programs with
        full ANSI support achieve it by using the console.device to display
        the text.

    [32mTop/Bottom:[m
        The ability to go to the start or end of the file with one command.
    [32mDirty data OK:[m
        This means the program handles files that contain zeros, or other
        non-printable characters. A common problem among those that do not
        handle this properly is finding an EOF character within the data.
        This causes a premature termination. Ty1.3, on the other hand, used
        to go into an infinite loop in some circumstances.
    [32mBackward line:[m
        I included programs that could do this via scrollbar.
    [32mRepeat search:[m
        The ability to repeat the last search. For those programs with
        reverse search, the ability to repeat a search backwards as well.
    [32mPrint file:[m
        The ability to print the entire file. None of the print routines
        claim to handle any special formatting (ie: programs just copy the
        file to PRT:). MuchMore uses the clumsy method of calling Execute()
        with "TYPE FROM <file> TO PRT:".
    [32mVertical bar:[m
        Good accuracy is difficult to achieve with disk-based programs,
        without sacrificing other features or speed. On the other hand, it
        is quite easy to implememt an accurate scroll bar if the program is
        RAM-based.
    [32mHorizontal clip:[m
        Some people to not enjoy having long lines wrap. Note that programs
        that draw the text themselves (via Text(), or whatever), find it
        very easy to clip, as do programs that do not handle ANSI sequences
        (since ANSI sequences can turn, say, 8 real characters into 0
        displayed characters). It is more impressive, therefore, if Text()
        programs do wrap long lines.
    [32mResizes OK:[m
        Not applicable here means the program has no sizing gadget. Most
        programs that do have sizing gadgets handle resizing alright. The
        exception is "less". I myself consider it better to not have a
        sizing gadget if a program can't handle it properly.
    [32mMultiple files:[m
        Can accept multiple files from the startup (ie: args). This is
        distinct from the ability to load new files. Note that "viewer"
        is the only one of these programs that has no way to go to a
        previous file, as opposed to going to the next file.
    [32mScreen size:[m
        This is the ability to open the display window to the maximum size
        available, or for programs with custom screens, the ability to open
        the screen to the maximum size available. This is distinct from
        VScreen modified displays.
    [32mUses '?':[m
        That is, the program will give some information if you specify a
        '?' as an argument (on the CLI).
    [32mCan load file:[m
        This is the ability to load more files after the program has
        started. Most programs use a simple single-line format for getting
        the filename, with the exception of "MouseReader". This may
        contribute to its size (12K bigger than the next largest, "less").
    [32mReverse search:[m
        The ability to search backwards.
    [32mRepaint:[m
        A holdover from (at least) UNIX terminal oriented programs, this
        command redraws the text in case the terminal has stuffed it. In
        a host-terminal situation this may be a possibility, if the user
        had, say, cycled the terminal's power. In the case of the Amiga,
        this applies if you resized a console window, for example. Larn has
        this feature, as do many programs ported from UNIX versions.
    [32mText() wrap:[m
        This means the program uses Text() or some custom drawing code to
        display the text, and wraps the text. Not applicable means the
        program doesn't use Text(), or clips the text, or does word wrap.
    [32mVScreen 1024:[m
        This means the program can handle being resized to the maximum
        width in a "vscreen 1024 256" screen. "More" can be resized, "ty"
        has a "boom" gadget, can be resized, and has a "maxim" option, and
        "view" automatically resizes itself on startup. "View" has a width
        limit that results in lines being truncated before the right
        border. "Ty" also has a width limit (arbitrary at compile time)
        that would show if ESC sequences were present, or the screen was
        wider than 1024 pixels.
    [32mClick move:[m
        If the user clicks in the top half of the display window, the
        program goes backwards in the text. And a click in the bottom half
        means go forwards in the file. This is not applicable if the prog
        automatically scrolls and clicks are used to stop the scrolling.
    [32mInvokes editor:[m
        This is the ability to invoke some sort of environment variable to
        edit the current file. "More" and "ty" use ENV:EDITOR, "less" uses
        editor:. "Ty" does not handle this as neatly as "more", but can
        invoke the editor from WB, unlike "more".
    [32mCLI commands:[m
        A holdover from single-display (terminal to UNIX) or single-task
        systems (all microcomputers except the Amiga!). This means the
        program allows the user to make DOS commands within itself. I have
        included the ability to create a CLI here, since that is just a
        more complicated method of doing the same thing.
    [32mPiping:[m
        The ability to be on the end of a piping sequence, for example:
                    type foo.prg opt h | more
    [32mIcon(ify)ise:[m
        This is the ability to shrink the display window to a small size,
        which the user can then put to one side for a while. "Most" uses
        its own code to do a plain iconise, "ty" uses Leo Schwab's Iconify
        function to turn itself into an icon-sized image.
    [32mSmooth scroll:[m
        Most programs scroll the text a line at a time. Programs with
        smooth scroll move the text a pixel at a time.
    [32mPure:[m
        This means the program can have its 'p' bit set in its protection
        field. That is, it is residentiable, and re-entrant. I tested this
        by the following sequence (using WShell):
                resi -r foo.prg     ; load the thing into the resident list
                foo.prg bar.txt     ; test it.
                foo.prg bar.txt     ; try it again. If it is not pure,
                                    ; WShell says so.
                resi -d foo.prg     ; remove it from the list.
        WShell keeps a checksum for programs in its resident list, and thus
        can tell if the program segments have been modified after the first
        use.
    [32mMarks:[m
        The ability to tie some location in the file to a "mark". Then the
        user can go straight to that position with a "go to mark" command.
        I have included all the "less" variations on this here (eg: go to
        last position).
    [32mRun-time modes:[m
        Some programs use a set of flags to indicate various modes. This
        means the program allows the user to alter these flags while the
        program is running (as opposed to just letting the user set the
        flags at startup).
    [32mPrint page:[m
        The ability to print only the page being displayed. This is of
        limited use with RAM-based programs, as most the files involved
        will be small anyway, but it could be useful for disk-based progs.
    [32mHorizontal move:[m
        This is the ability to move sideways in the text display, so long
        lines can be seen in all their glory. This is one of the basic
        features of ty1.3, and can also be done with MouseReader.
    [32mToolType args:[m
        The ToolTypes variable in WB icons allows the user to give
        arguments (settings or flags, as opposed to input filenames) to
        programs in the WB environment. As far as I know, only vnews and ty
        make use of this aspect of Workbench (ty's usage was thought of
        independently, though).
    [32mWildcard search:[m
        "MouseReader" and "ty" use the '?' character as a wildcard when
        searching. Not sophisticated, but small and quick.
    [32mPages (^L):[m
        "More" handles the ^L character as a page seperator. So when moving
        forward, if a ^L is encountered then the text display is blank to
        the bottom of the display window, until the user moves forward to
        the next page. "Ty" can also page, and is OK going forward, but
        moving backwards isn't pretty.
    [32mUses CLI window:[m
        The ability to use the CLI window if started from the CLI. Not only
        is "more" the only program to do this, it does it intelligently.
        Thus if you launch it into the background, it opens its own window
        instead of continuing to use the CLI window.
    [32mDynamic help:[m
        "More" changes the contents of its "help" screen if some commands
        are not possible (eg: can't go backwards when piping).
    [32mBinary file check:[m
        "More" checks to see if an input file may be a binary file (eg: a
        program, or a picture file), and warns the user if necessary.
    [32mBoth case search:[m
        "More" can search either case-sensitive or case-insensitive. A
        case-sensitive search can be faster, as strings to not have to be
        normalized before/while comparing. Depends on how it's implemented.
    [32mRepeat command:[m
        "Less" will repeat many of its commands if the user prefixes them
        with a number (eg: 100 * forward line).
    [32mIFF pic display:[m
        "MouseReader" can load and display ordinary IFF ILBM pictures. It
        does not handle HAM or Overscan, or other "fancy" picture types.
    [32mWord wrap:[m
        "Most" will wrap a word to the next line if a line is too long,
        rather than just split the word. This is not applicable if a
        program clips long lines rather than doing any wrapping.
    [32mSave page/file:[m
        "Most" allows you to save a page or a file. Saving a page is not
        very useful because "most" is RAM-based. And saving a file?
    [32mColor change:[m
        "Most" draws text itself, and this operation allows the user to
        change which of the 4 WB colors is used as background/foreground.
        This is not the same as bringing up a color changing requester
        (like vpalette).
    [32mCustom format:[m
        "Most" claims to be able to decode a custom compression format. I
        do not have any example files to test this with. It also claims to
        decode IFF text files. Tony Wills has not been able to get it to do
        so, however. And finally, it claims to be able to display IFF ILBMs
        too. Not on my machine.
    [32mAutomatic scroll:[m
        "MuchMore" scrolls the text automatically. It has the best
        scrolling of all the programs I've seen. Unlike most programs,
        which display a pageful of text and wait for the user to issue a
        command, "MuchMore" starts scrolling and the user has to stop the
        scrolling if they wish.
    [32mENV:default:[m
        "Ty" uses an environment variable "ENV:ty" to set up default
        settings. This necessitated writing a function to find ENV: without
        bringing up a requester if it wasn't there.
    [32mAudible bell:[m
        My preference is for an audible bell rather then using DisplayBeep,
        so "ty" defaults to using such a thing. It can be silenced, if the
        user want it to be.

[32;3mDoing some sums:[m

    The feature table has been ordered by the "popularity" of features
    amongst the various implementors. Where features have the same sum of
    implementors, they are in no particular order.

    Vertically, it appears "ty" has the greatest number of features :D.
    This may well be because I made the table, and I may have unconsiously
    determined a set of features best suited to "ty". Note however that I
    did not include many of the particulars from either "less" or "ty",
    deeming them too arcane to be of immediate interest.

    In terms of feature per byte, "more" and "most" are far ahead of "ty",
    "less", "MouseReader" and "MuchMore". However, the usefulness of some
    of their features is dubious (well, for "most" anyway). This size
    difference is due in part to language, the amount (and implementation)
    of help, Intuition support, and the code required for some of the
    tricks the larger programs have (eg: marks, reverse search, search
    algorithm, file requester, backwards disk-based line movement, reverse
    movement buffering, ENV: checking, CLI/WB arguments, multiple files,
    etc).
