SilverScreen Solid Modeler

tfile_make

tfile_make

Previous topic Next topic  

tfile_make

Previous topic Next topic JavaScript is required for the print function  

 

SilverScreenAPI

 

int tfile_make ( char *input_path, char *output_path )

 

char *input_path;    // Pointer to a null-terminated character string

char *output_path;   // Pointer to a null-terminated character string

 

 




Synopsis

#include "silver.h"

 

The tfile_make function compiles an ASCII text file into a tfile (text file). The resulting tfile is designed for rapid access to C-style character strings via a message number (see tfile_gets).

 

 

Parameters

intput_path is a null-terminated character string containing the path of the input file

output_path is a null-terminated character string containing the path of the output file

 

 

Return Value

tfile_make returns FALSE if the input file cannot be opened, the output file cannot be created, the input file has a different format than required, or some other error occurs; otherwise tfile_make returns TRUE.

 

 

Remarks

The longest string that can be stored in a tfile is 450 characters. The format of an input file is as follows:

 

First space-delimited token

Remainder of line

An integer value that is a message number

The text making up the string associated with the message number.

 

 

See Also

tfile_open, tfile_gets, tfile_close

 

 

Example

The following is a sample input file:

 

Sample File

 

1   Turning and turning in the widening gyre

2   The falcon cannot hear the falconer;

3   Things fall apart; the centre cannot hold;

4   Mere anarchy is loosed upon the world,

5   The blood-dimmed tide is loosed, and everywhere

6   The ceremony of innocence is drowned;

7   The best lack all conviction, while the worst

8   Are full of passionate intensity.