Table of Contents

9. Text Processing - TextFun,TextTee,PlainText,HTMLText,LaTeXText

DevTools supports a set of text formatting functions to deal with text processing, including images, in a general way. The text formatting functions are designed to form an abstract interface for directing text and images to any number of formatted documents. Currently the text formatting interfaces HTMLText to HTML, LaTeXText to LaTex and PlainText to plain text documents are provided. The module TextTee allows a single text formatting stream to be directed to any number of text formatting interfaces simultaneously.

Table of Contents

9.1 Text Functions - TextFun

The text function module, TextFun maintains function pointers to text functions which form a high level text formatting interface. Each of the associated modules such as TextTee, HTMLText, etc., are designed to implement a specific variety of text processing functions and to load the corresponding function pointers into a TextFun object. Rather than accessing the functions of a particular object such as HTMLText directly, the user accesses the functions through a TextFun object. In this way text processing independence is achieved. The TextFun module contains the following functions.

The text formatting interface is patterned after the concepts of HTML formatted documents. Depending upon the underlying text formatting interface, some text functions may be more or less successfully implemented. For example, back ground color is ignored if a plain text document is formatted using the PlainText module. The abstract text formatting interface contains the following functions.

Table of Contents

9.2 File Operations

The text processing is normally directed to a file, or more generally, a file descriptor. The text functions support opening and closing files as well as connecting and disconnecting to previously existing file descriptors.

Before text formatting can occur to a file, a formatting object and associated text function object must be instanced and a file opened. The following illustrates instancing HTMLText and TextFun objects and setting HTML formatting functions.

   vsy_HTMLText *htmltext;
   vsy_TextFun *tf;
                   /* create text function */
   tf = vsy_TextFunBegin();
                   /* create HTML formatting object */
   htmltext = vsy_HTMLTextBegin();
                   /* load text functions for HTML formatting */
   vsy_HTMLTextTextFun (htmltext,tf);
                   /* open file */
   vsy_TextFunOpenFile (tf,"example.htm");
At this point a file is open and ready to receive text. To close a file and terminate text formatting reverse the process described above. The following code fragment illustrates this process:

                   /* close file */
   vsy_TextFunCloseFile (tf);
                   /* delete objects */
   vsy_HTMLTextEnd (htmltext);
   vsy_TextFunEnd (tf);
Table of Contents

9.3 Text Attributes and Modes

Text attributes are designed to modify the appearance of text primitives and forms. Examples of a text attribute are the width of a horizontal rule primitive or the background color of a page. Forms and form actions are modified by attributes such as the list type for list forms, heading level for heading forms and column alignment for table forms. Note that all colors are specified as floating point red, green, blue components in the interval [0.,1.]. All color components are silently clamped to this interval.

Text modes are attributes which may be enabled and disabled. If a mode is enabled then all subsequent text primitives are affected by the mode until the mode is disabled. An example of a text mode is enabling and disabling an italics font for text string primitives. Not every primitive is affected by a given mode. For example, image files are not affected by the italics mode.

Table of Contents

9.4 Text Primitives

Text primitives include character strings and character space, image files and horizontal rules.

Table of Contents

9.5 Forms and Form Actions

The concept of a form is used to refer to the format in which text primitives are meant to be arranged. Forms include free format, lists and list items, tables and table rows and columns, headings, and titles. The default form is free format. All other forms must be initiated by calling vsy_TextFunFormInit and terminated by calling vsy_TextFunFormTerm. Forms must be nested for certain forms such as lists and tables. Form actions include paragraph and line breaks.

Table of Contents

9.6 Function Descriptions

The currently available TextFun object functions are described in detail in this section.


Table of Contents , TextFun

NAME

*vsy_TextFunBegin - create an instance of a TextFun object

C SPECIFICATION

vsy_TextFun *vsy_TextFunBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created TextFun object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a TextFun object. Memory is allocated for the object private data and the pointer to the data is returned. By default all function pointers are NULL.

Destroy an instance of a TextFun object using

     void vsy_TextFunEnd (vsy_TextFun *textfun)

Return the current value of a TextFun object error flag using

     Vint vsy_TextFunError (vsy_TextFun *textfun)

Make a copy of a TextFun object. The private data from the fromtextfun object is copied to the textfun object. Any previous private data in textfun is lost.

     void vsy_TextFunCopy (vsy_TextFun *textfun,vsy_TextFun *fromtextfun)


Table of Contents , TextFun

NAME

vsy_TextFunSet - set pointer to text function

C SPECIFICATION

void vsy_TextFunSet (vsy_TextFun *textfun,
                     Vint type,
                     void (*function)())

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
type         Function type being set
             =TEXTFUN_BACKCOLOR        Set BackColor function
             =TEXTFUN_BORDERWIDTH      Set BorderWidth function
             =TEXTFUN_CLOSEFILE        Set CloseFile function
             =TEXTFUN_CONNECTFILE      Set ConnectFile function
             =TEXTFUN_DISCONNECTFILE   Set DisconnectFile function
             =TEXTFUN_FORMACTION       Set FormAction function
             =TEXTFUN_FORMINIT         Set FormInit function
             =TEXTFUN_FORMTERM         Set FormTerm function
             =TEXTFUN_HEADINGLEVEL     Set HeadingLevel function
             =TEXTFUN_HORIZONTALRULE   Set HorizontalRule function
             =TEXTFUN_IMAGEFILE        Set ImageFile function
             =TEXTFUN_LISTTYPE         Set ListType function
             =TEXTFUN_OPENFILE         Set OpenFile function
             =TEXTFUN_QUERYFILE        Set QueryFile function
             =TEXTFUN_RULEWIDTH        Set RuleWidth function
             =TEXTFUN_SETMODE          Set SetMode function
             =TEXTFUN_SPACE            Set Space function
             =TEXTFUN_STRING           Set String function
             =TEXTFUN_TABLECOLOR       Set TableColor function
             =TEXTFUN_TABLEWIDTH       Set TableWidth function
             =TEXTFUN_TEXTCOLOR        Set TextColor function
function     Pointer to text function

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper type is input.

DESCRIPTION

Set pointers to text functions.

Get function as an output argument using

     void vsy_TextFunGet (vsy_TextFun *textfun,
                          Vint type,
                          void (**function)())


Table of Contents , TextFun

NAME

vsy_TextFunSetObj - set pointer to auxiliary object

C SPECIFICATION

void vsy_TextFunSetObj (vsy_TextFun *textfun,
                        Vobject *obj)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
obj          Pointer to auxiliary object

OUTPUT ARGUMENTS

None

DESCRIPTION

Set pointer to text function auxiliary object.

Get obj as an output argument using

     void vsy_TextFunGetObj (vsy_TextFun *textfun,
                             Vobject **obj)


Table of Contents , TextFun

NAME

vsy_TextFunAPI - set built-in text functions

C SPECIFICATION

void vsy_TextFunAPI (vsy_TextFun *textfun,
                     Vint api)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
api          Type of built-in text function to return.
             =TEXTFUN_APIPRINT       Set printing text functions
             =TEXTFUN_APIRETURN      Set return text functions

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper api is input.

DESCRIPTION

Set built in text functions. The TEXTFUN_APIPRINT text functions print each graphics primitive to standard output. The TEXTFUN_APIRETURN text functions simply return.


Table of Contents

9.7 Text Function Descriptions

The currently available text formatting function API is described in detail in this section.


Table of Contents , TextFun

NAME

vsy_TextFunCloseFile - close file

C SPECIFICATION

void vsy_TextFunCloseFile (vsy_TextFun *textfun)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.

OUTPUT ARGUMENTS

None

DESCRIPTION

Close file. The file must have been previously opened with vsy_TextFunOpenFile.


Table of Contents , TextFun

NAME

vsy_TextFunConnectFile - connect to preexisting file

C SPECIFICATION

void vsy_TextFunConnectFile (vsy_TextFun *textfun,
                             FILE *fd)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
fd           File descriptor of file to connect to

OUTPUT ARGUMENTS

None

DESCRIPTION

Connect to a previously opened file. The text interface will now format output to file descriptor fd. Use vsy_TextFunDisconnectFile to disconnect from an existing file.


Table of Contents , TextFun

NAME

vsy_TextFunDisconnectFile - disconnect from file

C SPECIFICATION

void vsy_TextFunDisconnectFile (vsy_TextFun *textfun)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.

OUTPUT ARGUMENTS

None

DESCRIPTION

Disconnect from a file descriptor. This function does not close the file.


Table of Contents , TextFun

NAME

vsy_TextFunOpenFile - open file

C SPECIFICATION

void vsy_TextFunOpenFile (vsy_TextFun *textfun
                          Vchar *pathname)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
pathname     Name of file to open

OUTPUT ARGUMENTS

None

DESCRIPTION

Open a file which will be used to output formatted text. Close the file with vsy_TextFunCloseFile.


Table of Contents , TextFun

NAME

vsy_TextFunQueryFile - query current file

C SPECIFICATION

void vsy_TextFunQueryFile (vsy_TextFun *textfun,
                           FILE **fd)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.

OUTPUT ARGUMENTS

fd           Current connected or opened file descriptor

DESCRIPTION

Return the currently open or connected file descriptor.


Table of Contents , TextFun

NAME

vsy_TextFunBackColor - set background RGB color

C SPECIFICATION

void vsy_TextFunBackColor (vsy_TextFun *textfun,
                           Vfloat c[3])

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
c            Current background color RGB values

OUTPUT ARGUMENTS

None

DESCRIPTION

Set the background color. The background color must be set before any other text attributes, primitives or form actions. By default the background color is a light blue, (0.733333,0.866666,1.0).


Table of Contents , TextFun

NAME

vsy_TextFunBorderWidth - set table border width

C SPECIFICATION

void vsy_TextFunBorderWidth (vsy_TextFun *textfun,
                             Vint borderwidth)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
borderwidth  Width of table cell borders in pixels, borderwidth >= 0

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper borderwidth is specified.

DESCRIPTION

Set the width of table cell borders. If the border width is zero then the table cells will have no borders. By default borderwidth is 0.


Table of Contents , TextFun

NAME

vsy_TextFunColumnAlign - set column alignment

C SPECIFICATION

void vsy_TextFunColumnAlign (vsy_TextFun *textfun,
                             Vint align)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
align        Table column alignment
             =SYS_TEXT_LEFT            Left
             =SYS_TEXT_RIGHT           Right
             =SYS_TEXT_MIDDLE          Middle

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper align is specified.

DESCRIPTION

Set alignment of text in a table column. A table is formatted using form actions.


Table of Contents , TextFun

NAME

vsy_TextFunListType - set current list type

C SPECIFICATION

void vsy_TextFunListType (vsy_TextFun *textfun,
                          Vint listtype)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
listtype     Current listtype
             =SYS_TEXT_UNORDERED       Unordered list
             =SYS_TEXT_ORDERED         Ordered list
             =SYS_TEXT_MENU            Menu list

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper listtype is specified.

DESCRIPTION

Set the current list type. A list is formatted using form actions. The default listtype is SYS_TEXT_UNORDERED.


Table of Contents , TextFun

NAME

vsy_TextFunHeadingLevel - set heading level

C SPECIFICATION

void vsy_TextFunHeadingLevel (vsy_TextFun *textfun,
                              Vint level)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
level        Heading level 1 <= level <= 5.

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if a level out of range is specified.

DESCRIPTION

Set the current heading level A heading is formatted using form actions. The default level is 1.


Table of Contents , TextFun

NAME

vsy_TextFunRuleWidth - set rule width

C SPECIFICATION

void vsy_TextFunRuleWidth (vsy_TextFun *textfun,
                           Vint rulewidth)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
rulewidth    Current horizontal rule width

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper rulewidth is specified.

DESCRIPTION

Set the current horizontal rule width. The rule width must be a positive integer. A horizontal rule is formatted using vsy_TextFunHorizontalRule. The default rulewidth is 1.


Table of Contents , TextFun

NAME

vsy_TextFunSetMode - set text mode

C SPECIFICATION

void vsy_TextFunSetMode (vsy_TextFun *textfun,
                         Vint mode,
                         Vint flag)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
mode         Text mode
             =SYS_TEXT_BOLD            Bold font
             =SYS_TEXT_CENTER          Center text
             =SYS_TEXT_ITALICS         Italics font
             =SYS_TEXT_PREFORMATTED    Preformatted text
             =SYS_TEXT_TYPEWRITER      Typewriter font
             =SYS_TEXT_HANDLEERR       Invoke error handler
flag         Mode flag
             =SYS_OFF      Turn mode off
             =SYS_ON       Turn mode on

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_ENUM is generated if an improper mode is specified.

DESCRIPTION

Enable and disable a text formatting modes.

The SYS_TEXT_BOLD mode is used to format text using the bold form of the current font. By default SYS_TEXT_BOLD mode is off.

The SYS_TEXT_CENTER mode is used to center text. By default SYS_TEXT_CENTER mode is off.

The SYS_TEXT_ITALICS mode is used to format text using the italic form of the current font. By default SYS_TEXT_ITALICS mode is off.

The SYS_TEXT_PREFORMATTED mode is used to format text in a preformatted form. By default SYS_TEXT_PREFORMATTED mode is off.

The SYS_TEXT_TYPEWRITER mode is used to format text using a monospaced font. By default SYS_TEXT_TYPEWRITER mode is off.

The SYS_TEXT_HANDLEERR mode is used to toggle invoking the error handler if an error is detected. In some applications an error handler is used which utilizes text functions. If an error occurs within the text functions it is possible to create an infinite loop of the text functions calling themselves. By default SYS_TEXT_HANDLEERR mode is off.


Table of Contents , TextFun

NAME

vsy_TextFunTableColor - set table RGB color

C SPECIFICATION

void vsy_TextFunTableColor (vsy_TextFun *textfun,
                            Vfloat c[3])

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
c            Current table color RGB values

OUTPUT ARGUMENTS

None

DESCRIPTION

Set the table color. The table color may be set before any call to vsy_TextFunFormInit with SYS_TEXT_ROW or SYS_TEXT_COLUMN to affect the following table row or column respectively. By default the table color is a light blue, (0.733333,0.866666,1.0). This is the same as the default background color


Table of Contents , TextFun

NAME

vsy_TextFunTableWidth - set table width

C SPECIFICATION

void vsy_TextFunTableWidth (vsy_TextFun *textfun,
                            Vint tablewidth)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
tablewidth   Width of table in percent of page, tablewidth >= 0

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper tablewidth is specified.

DESCRIPTION

Set the width of a table. If the table width is zero then the table will be sized by contents. By default tablewidth is 0.


Table of Contents , TextFun

NAME

vsy_TextFunTextColor - set text RGB color

C SPECIFICATION

void vsy_TextFunTextColor (vsy_TextFun *textfun,
                           Vfloat c[3])

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
c            Current text color RGB values

OUTPUT ARGUMENTS

None

DESCRIPTION

Set the text color. The text color may be set before any string primitive using vsy_TextFunString. By default the text color is black, (0.,0.,0.).


Table of Contents , TextFun

NAME

vsy_TextFunSpace - character spaces

C SPECIFICATION

void vsy_TextFunSpace (vsy_TextFun *textfun,
                       Vint nspaces)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
nspaces      Number of character spaces in space primitive

OUTPUT ARGUMENTS

None

DESCRIPTION

Generate a text primitive consisting of a number, nspaces, of character spaces.


Table of Contents , TextFun

NAME

vsy_TextFunString - character string

C SPECIFICATION

void vsy_TextFunString (vsy_TextFun *textfun,
                        const Vchar *string)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
string       Character string primitive

OUTPUT ARGUMENTS

None

DESCRIPTION

Generate a text string primitive.


Table of Contents , TextFun

NAME

vsy_TextFunImageFile - image file

C SPECIFICATION

void vsy_TextFunImageFile (vsy_TextFun *textfun,
                           Vchar *pathname)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
pathname     Name of image file primitive

OUTPUT ARGUMENTS

None

DESCRIPTION

Define an image file primitive. The pathname contains the image.


Table of Contents , TextFun

NAME

vsy_TextFunHorizontalRule - horizontal rule

C SPECIFICATION

void vsy_TextFunHorizontalRule (vsy_TextFun *textfun)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.

OUTPUT ARGUMENTS

None

DESCRIPTION

Generate a horizontal line across the width of the page. The width the of the horizontal rule is determined by the current rule width set using vsy_TextFunRuleWidth.


Table of Contents , TextFun

NAME

vsy_TextFunFormInit - initiate form

C SPECIFICATION

void vsy_TextFunFormInit(vsy_TextFun *textfun,
                         Vint form)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
form         Text form
             =SYS_TEXT_TITLE           Page title
             =SYS_TEXT_HEADING         Heading
             =SYS_TEXT_LIST            List
             =SYS_TEXT_ITEM            List item
             =SYS_TEXT_TABLE           Table
             =SYS_TEXT_COLUMN          Table column
             =SYS_TEXT_ROW             Table row

OUTPUT ARGUMENTS

None

DESCRIPTION

Initiate a text format. Each text form is terminated using vsy_TextFunFormTerm.


Table of Contents , TextFun

NAME

vsy_TextFunFormTerm - terminate form

C SPECIFICATION

void vsy_TextFunFormInit(vsy_TextFun *textfun,
                         Vint form)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
form         Text form

OUTPUT ARGUMENTS

None

DESCRIPTION

Terminate a text format.


Table of Contents , TextFun

NAME

vsy_TextFunFormAction - perform form action

C SPECIFICATION

void vsy_TextFunFormAction (vsy_TextFun *textfun,
                            Vint formaction)

INPUT ARGUMENTS

textfun      Pointer to TextFun object.
formaction   Text form action
             =SYS_TEXT_PARAGRAPH       Paragraph break
             =SYS_TEXT_LINEBREAK       Line break

OUTPUT ARGUMENTS

None

DESCRIPTION

Perform a form action.

The action SYS_TEXT_PARAGRAPH marks the beginning of a new paragraph. A line break is performed and a blank line is inserted.

The action SYS_TEXT_LINEBREAK forces text immediately after the line break onto the next line.


Table of Contents

9.8 Text Tee - TextTee

Use a TextTee object to split or tee text functions. A TextTee object accepts text functions as input and immediately calls one or more text function objects as output. In this way a stream of text primitives may be directed to many text formatting interfaces simultaneously.

Use vsy_TextTeeBegin to instance a TextTee object. Establish the input text functions in a TextFun object using vsy_TextTeeTextFun. Use up to eight calls to vsy_TextTeeSetObject to set the TextFun objects used as output.

Table of Contents

9.9 Function Descriptions

The currently available TextTee functions are described in detail in this section.


Table of Contents , TextTee

NAME

*vsy_TextTeeBegin - create an instance of a TextTee object

C SPECIFICATION

vsy_TextTee *vsy_TextTeeBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created TextTee object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a TextTee object. Memory is allocated for the object private data and the pointer to the data is returned. The output text function objects are set to NULL.

Destroy an instance of a TextTee object using

     void vsy_TextTeeEnd (vsy_TextTee *texttee)

Return the current value of a TextTee object error flag using

     Vint vsy_TextTeeError (vsy_TextTee *texttee)


Table of Contents , TextTee

NAME

vsy_TextTeeTextFun - return pointers to text functions

C SPECIFICATION

void vsy_TextTeeTextFun (vsy_TextTee *texttee,
                         vsy_TextFun *textfun)

INPUT ARGUMENTS

texttee      Pointer to TextTee object.
textfun      Pointer to TextFun object to be filled with text functions

OUTPUT ARGUMENTS

None

DESCRIPTION

Fill a TextFun object with text functions.


Table of Contents , TextTee

NAME

vsy_TextTeeSetObject - set pointers to output text function objects

C SPECIFICATION

void vsy_TextTeeSetObject (vsy_TextTee *texttee,
                           Vint objecttype,
                           Vobject *object)

INPUT ARGUMENTS

texttee      Pointer to TextTee object.
objecttype   The name of the object type to be set.
             =VSY_TEXTFUN            TextFun object
             =VSY_TEXTFUN_TEE        TextFun object
             =VSY_TEXTFUN_0          TextFun object
             =VSY_TEXTFUN_1          TextFun object
             =VSY_TEXTFUN_2          TextFun object
             =VSY_TEXTFUN_3          TextFun object
             =VSY_TEXTFUN_4          TextFun object
             =VSY_TEXTFUN_5          TextFun object
             =VSY_TEXTFUN_6          TextFun object
             =VSY_TEXTFUN_7          TextFun object
object       Pointer to the object to be set.

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

DESCRIPTION

Set a pointer to an output text function object. This function may be called repeatedly to set up to 8 output text functions. Note that VSY_TEXTFUN is the same as VSY_TEXTFUN_0, VSY_TEXTFUN_TEE is the same as VSY_TEXTFUN_1 and VSY_TEXTFUN_n is the same as VSY_TEXTFUN + n.


Table of Contents

9.10 Plain Text Format - PlainText

Use a PlainText object to format to plain text documents. Plain text documents contain only simple text with no special embedded formatting text strings. The PlainText module contains the following functions.

Use vsy_PlainTextBegin to instance a PlainText object. Establish the input text functions in a TextFun object using vsy_PlainTextTextFun. The character width of the plain text document may be specified using vsy_PlainTextSetPageWidth. Destroy a PlainText object using vsy_PlainTextEnd.

Table of Contents

9.11 Function Descriptions

The currently available PlainText functions are described in detail in this section.


Table of Contents , PlainText

NAME

*vsy_PlainTextBegin - create an instance of a PlainText object

C SPECIFICATION

vsy_PlainText *vsy_PlainTextBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created PlainText object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a PlainText object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of a PlainText object using

     void vsy_PlainTextEnd (vsy_PlainText *plaintext)

Return the current value of a PlainText object error flag using

     Vint vsy_PlainTextError (vsy_PlainText *plaintext)


Table of Contents , PlainText

NAME

vsy_PlainTextTextFun - return pointers to text functions

C SPECIFICATION

void vsy_PlainTextTextFun (vsy_PlainText *plaintext,
                           vsy_TextFun *textfun)

INPUT ARGUMENTS

plaintext    Pointer to PlainText object.
textfun      Pointer to TextFun object to be filled with text functions

OUTPUT ARGUMENTS

None

DESCRIPTION

Fill a TextFun object with text functions.


Table of Contents , PlainText

NAME

vsy_PlainTextSetPageWidth - specify page width

C SPECIFICATION

void vsy_PlainTextSetPageWidth (vsy_PlainText *plaintext,
                                Vint pagewidth)

INPUT ARGUMENTS

plaintext    Pointer to PlainText object.
pagewidth    Page width in characters, pagewidth >= 20

OUTPUT ARGUMENTS

None

ERRORS

SYS_ERROR_VALUE is generated if an improper pagewidth is specified.

DESCRIPTION

Specify the plain text page width in characters. The default pagewidth is 80.


Table of Contents

9.12 HTML Text Format - HTMLText

Use a HTMLText object to format to HTML text documents. HTML text documents contain HTML formatting text strings. The HTMLText module contains the following functions.

Use vsy_HTMLTextBegin to instance a HTMLText object. Establish the input text functions in a TextFun object using vsy_HTMLTextTextFun. Destroy a HTMLText object using vsy_HTMLTextEnd.

Table of Contents

9.13 Function Descriptions

The currently available HTMLText functions are described in detail in this section.


Table of Contents , HTMLText

NAME

*vsy_HTMLTextBegin - create an instance of a HTMLText object

C SPECIFICATION

vsy_HTMLText *vsy_HTMLTextBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created HTMLText object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a HTMLText object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of a HTMLText object using

     void vsy_HTMLTextEnd (vsy_HTMLText *htmltext)

Return the current value of a HTMLText object error flag using

     Vint vsy_HTMLTextError (vsy_HTMLText *htmltext)


Table of Contents , HTMLText

NAME

vsy_HTMLTextTextFun - return pointers to text functions

C SPECIFICATION

void vsy_HTMLTextTextFun (vsy_HTMLText *htmltext,
                          vsy_TextFun *textfun)

INPUT ARGUMENTS

htmltext     Pointer to HTMLText object.
textfun      Pointer to TextFun object to be filled with text functions

OUTPUT ARGUMENTS

None

DESCRIPTION

Fill a TextFun object with text functions.


Table of Contents

9.14 LaTeX Text Format - LaTeXText

Use a LaTeXText object to format to LaTeX text documents. LaTeX text documents contain LaTeX formatting text strings. The LaTeXText module contains the following functions.

Use vsy_LaTeXTextBegin to instance a LaTeXText object. Establish the input text functions in a TextFun object using vsy_LaTeXTextTextFun. Destroy a LaTeXText object using vsy_LaTeXTextEnd.

Table of Contents

9.15 Function Descriptions

The currently available LaTeXText functions are described in detail in this section.


Table of Contents , LaTeXText

NAME

*vsy_LaTeXTextBegin - create an instance of a LaTeXText object

C SPECIFICATION

vsy_LaTeXText *vsy_LaTeXTextBegin ()

ARGUMENTS

None

FUNCTION RETURN VALUE

The function returns a pointer to the newly created LaTeXText object. If the object creation fails, NULL is returned.

DESCRIPTION

Create an instance of a LaTeXText object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of a LaTeXText object using

     void vsy_LaTeXTextEnd (vsy_LaTeXText *latextext)

Return the current value of a LaTeXText object error flag using

     Vint vsy_LaTeXTextError (vsy_LaTeXText *latextext)


Table of Contents , LaTeXText

NAME

vsy_LaTeXTextTextFun - return pointers to text functions

C SPECIFICATION

void vsy_LaTeXTextTextFun (vsy_LaTeXText *latextext,
                           vsy_TextFun *textfun)

INPUT ARGUMENTS

latextext    Pointer to LaTeXText object.
textfun      Pointer to TextFun object to be filled with text functions

OUTPUT ARGUMENTS

None

DESCRIPTION

Fill a TextFun object with text functions.