Registration

In order to receive any information regarding system upgrades and bugs, it
is necessary to register your serial number with me.  To do this
send me a message with your serial number, name, company name and
address, and any other pertinent information via one of the
methods outlined in the Support paragraph below.

Support

Right now the only way I am set up for support is via the post or
CompuServ systems.  Here are my particulars:

 CompuServ ID:   73310,3013

 Taylor Data Services
 #310
 1903 Walnut Street
 Philadelphia, PA 19103


Either way you send it, I'll try my best to respond within 24 hrs.
If the problem turns out to be a bug, and you gave me your phone
number, I'll call you to discuss it and then I'll fix the bug
and send it to you as soon as possible.

Upgrades

Upgrade notices will be mailed out for all major upgrades (which
include any nasty bugs that we find.)  If the upgrade is due to
a bug fix it will be shipped to you free, otherwise, a handling
charge will apply.  If the upgrade is a really big and exciting
change, then a small upgrade fee will apply.

Disk replacements

If your diskette proves to be defective, then I will replace it
free of charge and ship it to you the same way you ship me your
original disk.  The replacement disk will have the same serial
number you registered.  For example if you ship me the bad disk
via FedEx then I will ship the replacement via FedEx.

If for some reason you lose your diskette, send to me the cover
page of the documentation and I will send you a replacement diskette
for a small handling charge of $5.00.  The replacement disk will be
sent to you the same way you ship me your cover page.  The cover
page will be returned to you.

License and Warranty

DispFile() version 6.0 (the SOFTWARE) and accompanying materials are
copyrighted by Taylor Data Services (TDS).  You do not own the SOFTWARE
and are granted a license to distribute the SOFTWARE as part of any
executable programs you develop.  You are not granted rights to
distribute the SOFTWARE in any other form (electronic or otherwise,)
except as an integral part of the executable program you distribute.

You may make as many copies of the SOFTWARE for backup or archival
purposes.  You are not granted rights to copy, distribute or
otherwise duplicate in any form the accompanying material of the
SOFTWARE.

TDS warrants only that the media that the SOFTWARE is distributed
on is defect-free.  TDS's entire liability and your exclusive remedy
will be at TDS's option: 1) replacement of the SOFTWARE, or 2) a refund
of the price paid for the SOFTWARE.  All other warranties, implied or
expressed are disclaimed by TDS.  This limited warranty grants you specific
legal rights which may vary from state to state.


** Start of Manual Pages

DispFile()

Pass control to the DispFile() 'object' passed and process the user's keys

Syntax

DispFile( <nHandle> )

Arguments

<nHandle> is the DispFile() 'object' you want to display and process

Returns

The key pressed that terminated DispFile() as a character value

Description

DispFIle() allows you to display any ASCII text file to the screen
within a Clipper application using a small amount of memory.  It
gives you complete control over how the user is to interact with
the text file.  You can specify colors, view mode, row
and column locking, line lengths, etc.  DispFile() will process the
user's keys until a non-cursor control key is pressed.  Cursor
control keys are defined as:

Up, Down    - moves the cursor line
Left, Right - moves the cursor left/right the number of skip-columns defined
Home        - moves the cursor to the far left of the view window
End         - moves the cursor to the defined right margin column
PgUp, PgDn  - moves the cursor one view-page up/down
Ctrl-PgUp   - moves the cursor to the file top
Ctrl-PgDn   - moves the cursor to the file bottom
Ctrl-Right  - moves the cursor 16 col's to the right
Ctrl-Left   - moves the cursor 16 col's to the left

DispFile() assumes that all lines are terminated with a CR/LF
sequence (0x0d and 0x0a).

If within the data stream a Shift-In code (ascii 15) occurs,
whatever byte follows it will be interpreted as a color attribute.
All text that follows will be displayed within that color
until a Shift-Out code occurs (ascii 14).  The Shift-Out code
reverts back to the normal color immediately -- no stacking of
codes is allowed presently.  See the test file Color.TXT for a
sample of using color shift-codes.

    NOTE:  The following text has 2 carets preceding the color
           codes.  This allows the text to be shown properly
           if viewed from the demo.

If within the data stream a '^^' symbol is found, the next character
is checked to see if it is an attribute change.  See the manual
entry for DF_Setup() for a list of valid codes.

DispFile() 6.0 was created using Clipper 5.01 and can only be used
with 5.0 or greater.  To compile the demo use the following
command:

    Clipper dfdemo /n/m/w

To link the DispFile() 6.0 library to any application using either
Blinker 1.5, RtLink 3.13 or MS Link 5.13, use one of the following
commands:

    Blinker fi dfdemo lib dispfile

    RtLink fi dfdemo lib dispfile

    Link /se:512 /noe dfdemo,,NUL,clipper dbfntx terminal extend dispfile;

This is a sample Blinker 1.5 link file showing where DispFile() 6.0 can
be placed within a Blinker link file:

FILE DFDEMO

BEGINAREA
    ALLOCATE DISPFILE
    ALLOCATE EXTEND
ENDAREA

LIB CLIPPER

Because DispFile() 6.0 contains only well behaved C and Assembler routines
it is possible to overlay them using Blinker 1.5.



Files: DispFile() is found in DispFile.LIB.

See Also: DF_Close(), DF_Convert(), DF_Draw() and DF_Setup()

DF_Setup()


Setup internal variables for file display

Syntax

DF_Setup( <cInFile>, [<nTop>], [<nLeft>], [<nBottom>], [<nRight>],
[<xCNormal>], [<xCHighlight>], [<lBrowse>],
[<nColSkip>], [<nRMargin>], [<nBuffSize>],
[<nColLock>], [<nRowLock>], [<aColorTable>],
[<lScroll>], [<xScrollBack>], [<xScrollChar>] )

Arguments

<cInFile> is the full path and name of the text file to display

<nTop>, <nLeft>, <nBottom>, and <nRight> are the upper left and
lower right window coordinates.  Row values can range from zero to
MaxRow(), and column values can range from zero to MaxCol().  If
not specified the default upper left coordinate is 0,0 and the
lower right is MaxRow(), MaxCol().

<xCNormal> and <xCHighlight> are the normal and highlighted text
colors.  The color values can either be Clipper color codes or
C style numeric attributes.  The default color is W/B (7) for normal
and W/B (15) for the highlight.

<lBrowse> determines whether or not the highlight bar is to be
visible (.F.).  Default value is .F.

<nColSkip> indicates the number of columns to increment for each
left/right arrow key-press.  Default is 1.

<nRMargin> is the right margin. Line data is truncated if
it falls to the right of <nRMargin>.  Default is 255 characters.

<nBuffSize> is the size of the the paging buffer.  Default is 4096
characters.

<nColLock> is the number of columns of the left margin to make
static.  Default is 0.

<nRowLock> is the number of rows at top of the file to make static.
Default is 0.

<aColorTable> is a table of color codes (text or numeric) that corresponds
to 1 of 4 possible attribute changes:

    aColorTable[1] - bold attribute toggled with ^^B
    aColorTable[2] - under line attribute toggled with ^^U
    aColorTable[3] - generic code ^^1
    aColorTable[4] - generic code ^^2
    aColorTable[5] - generic code ^^3
    aColorTable[6] - generic code ^^4
    aColorTable[7] - generic code ^^5

The ^^I and ^^F set or reset the appropriate bit within the attribute code.
These codes both set or reset the appropriate color change.  When using
them to reset, they should be placed in the reverse order in which they
were set.  For example:

    This is normal, ^Band this is bold, ^Iintense bold^I, bold^B normal

All color change attributes are in effect only for the current line.  All
color changes are reset to normal at the start of each new line.

<lScroll> determines whether or not a scroll bar is to appear on the
right edge of the window.

<xScrollBack> is the character or ascii code of the scroll bar background.

<xScrollChar> is the character or ascii code of the scroll bar symbol.

Returns

A handle used to reference the defined DispFile() 'object' within other
calls to DispFile() functions.  If an error occurs the handle value will be
zero and you need to check DF_Error() for the reason why.

Description

DF_Setup() does all of the house keeping routines to set up and initialize
the variables to display a text file to the screen.  It returns a handle
used by the other DispFile() functions.  This allows you to set up as many
DispFile() 'objects' as you need and then implement them when necessary.

Examples

The following code sets up a DispFile() 'object' to display the text file
named TEST.TXT to the full screen.  It uses the color conversion function
DF_Convert() to convert a Clipper color string and it sets up the 'a',
'z', and Alt-F4 keys to terminate.  The key code for the Alt-F4 key can be
found within the file KEYS.H.  DispFile() uses different key codes than
Clipper does so make sure and read KEYS.H for any unusual keys.

nHandle := DF_Setup("TEST.TXT", 0, 0, MaxRow(), MaxCol(),;
                    DF_Convert("B/W"), DF_Convert("W/B"))

Files: DF_Setup() is found in DispFile.LIB.

See Also: DF_Close(), DF_Convert(), DF_Draw() and DispFile()

DF_Draw()

Draw the initial screen page of the DispFile() 'object' passed

Syntax

DF_Draw( <nHandle> )

Arguments

<nHandle> is the DispFile() 'object' you want to have it's initial screen drawn

Returns

NIL

Description

This routine draws the first screen page of the referenced DispFile()
'object' in it's normal color attribute and, if set, draws the scroll bar.

Examples

nHandle := DF_Setup( "TEST.TXT", 0, 0, MaxRow(), MaxCol(), DF_Convert("B/W"), DF_Convert("W/B"), "aAzZ" + Chr(154) )

DF_Draw(nHandle)

Files: DF_Draw() is found in DispFile.LIB.

See Also: DF_Close(), DF_Convert(), DF_Setup() and DispFile()

DF_Close()

Syntax

DF_Close( <nHandle> )

Closes the passed DispFile() 'object' associated file and removes the
DispFile() 'object' from the internal stack.

Arguments

<nHandle> is the DispFile() 'object' you want to close.

Returns

.T. if the file is closed properly, otherwise .F.

Files: DF_Close() is found in DispFile.LIB.

See Also: DF_Convert(), DF_Draw(), DF_Setup() and DispFile()

DF_Convert()

Convert a Clipper color string to a numeric value.

Syntax

DF_Convert( <cColor> )

Arguments

<cColor> is the Clipper color string you want to convert.

Returns

DF_Convert() returns a C-style numeric attribute value.

Description

DF_Convert() converts the passed clipper color string.  The following is a
table of return values for the possible clipper color strings you can pass:


Files: DF_Convert() is found in DispFile.LIB and Example.PRG.

See Also: DF_Close(), DF_Draw(), DF_Setup() and DispFile()

