rvctext.h File Reference

<mi32/rvctext.h> Definitions for RVC TEXT objects More...

#include <mi32/rvcdefns.h>

Include dependency graph for rvctext.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  RVCQUERYINFO
 Query info class. More...
struct  RVCTEXTINFO
 Text info class. More...

Functions

RVCAPPLIBEXPORT int MfCloseText (int id, RVCTEXTINFO *info, int isize, int hdrtype)
RVCAPPLIBEXPORT int MfMakeText (int findex, RVCTEXTINFO *info, int isize, int hdrtype)
RVCAPPLIBEXPORT int MfOpenText (int fileindex, INT32 inode, RVCTEXTINFO *info, int isize, int hdrtype, UINT32 flags)
int MfReadQueryHeader (int fhandle, RVCINODENUM inode, RVCQUERYINFO *info)
RVCAPPLIBEXPORT INT32 MfReadText (int id, char *ptr, INT32 len)
RVCAPPLIBEXPORT int MfReadTextIni (int findex, INT32 inode, RVCTEXTINFO *info, int isize, int hdrtype, INIHANDLE handle)
RVCAPPLIBEXPORT INT32 MfReadTextLine (int id, INT32 maxlen, char *ptr)
RVCAPPLIBEXPORT INT32 MfReadTextLineString (int id, MISTRING &string)
RVCAPPLIBEXPORT INT32 MfReadTextLineUnicode (int id, INT32 maxlen, UNICODE *ptr)
RVCAPPLIBEXPORT INT32 MfReadTextString (int id, MISTRING &string, INT32 maxlen)
RVCAPPLIBEXPORT INT32 MfReadTextUnicode (int id, UNICODE *uc, INT32 len)
RVCAPPLIBEXPORT int MfTextIsUnicode (int id)
RVCAPPLIBEXPORT int MfTextMakeLink (int findex, RVCTEXTINFO *info, int isize, int hdrtype, const UNICODE *filename, const char *encstr)
RVCAPPLIBEXPORT int MfTextReadAll (int fhandle, INT32 inode, RVCTEXTINFO *info, int isize, int hdrtype, UNICODE **buf, UINT32 flags)
RVCAPPLIBEXPORT int MfTextWriteAll (int fhandle, INT32 inode, RVCTEXTINFO *info, int isize, int hdrtype, const UNICODE *buf, UINT32 flags=0)
RVCAPPLIBEXPORT int MfTruncateText (int id, INT32 size)
int MfWriteQueryHeader (int fhandle, RVCINODENUM inode, RVCQUERYINFO *info)
RVCAPPLIBEXPORT INT32 MfWriteText (int id, const char *ptr, INT32 len)
RVCAPPLIBEXPORT int MfWriteTextIni (int findex, INT32 inode, RVCTEXTINFO *info, int isize, int hdrtype, INIHANDLE handle)
RVCAPPLIBEXPORT INT32 MfWriteTextLine (int id, const char *ptr)
RVCAPPLIBEXPORT INT32 MfWriteTextLineUnicode (int id, const UNICODE *us)
RVCAPPLIBEXPORT INT32 MfWriteTextUnicode (int id, const UNICODE *uc, INT32 len)


Detailed Description

<mi32/rvctext.h> Definitions for RVC TEXT objects

Definition in file rvctext.h.


Function Documentation

RVCAPPLIBEXPORT int MfCloseText int  id,
RVCTEXTINFO info,
int  isize,
int  hdrtype
 

Main level function to close opened text objects.

Parameters:
id  Handle returned by MfOpenText()
info  Any header containing RVCTEXTINFO
isize  Size of object header
hdrtype  RVCCONV_????

RVCAPPLIBEXPORT int MfMakeText int  findex,
RVCTEXTINFO info,
int  isize,
int  hdrtype
 

Main level function to make text objects.

Returns:
: text object handle > 0 or error < 0 If the "IsUnicode" flag is set in the header, the object will contain 2-byte Unicode text. See Also: MfOpenText()
Parameters:
findex  File handle returned by MfOpenFile()
info  Any header containing RVCTEXTINFO
isize  Size of object header
hdrtype  RVCCONV_????

RVCAPPLIBEXPORT int MfOpenText int  fileindex,
INT32  inode,
RVCTEXTINFO info,
int  isize,
int  hdrtype,
UINT32  flags
 

Main level function to open text objects.

Returns:
: text object handle > 0 or error < 0 If the "IsUnicode" flag is set in the header, the object contains 2-byte Unicode text. See Also: MfCloseText(), MfReadText(), MfReadTextUnicode(), MfReadTextLine() MfReadTextLineUnicode(), MfWriteText(), MfWriteTextLine(), MfWriteTextUnicode() MfSeekText(), MfTellText(), MfTruncateText(), MfTextLength(), MfTextIsUnicode() MfReadTextIni(), MfTextReadAll() MfTextWriteAll(), MfTextMakeLink()
Parameters:
fileindex  File handle returned by MfOpenFile()
inode  Generic object inode to open
info  Any header containing RVCTEXTINFO
isize  Size of object header structure
hdrtype  Conversion type: RVCCONV_????
flags  Requires an RVCMODE_Write for writing

int MfReadQueryHeader int  fhandle,
RVCINODENUM  inode,
RVCQUERYINFO info
[inline]
 

Read query header.

Parameters:
fhandle  Open file handle
inode  Object inode
info  Query header passed / returned

Definition at line 138 of file rvctext.h.

RVCAPPLIBEXPORT INT32 MfReadText int  id,
char *  ptr,
INT32  len
 

Read a buffer from a text object (ASCII).

Returns:
number of characters read or error < 0 R_ReadPastEnd if no more to read. If the object contains 2-Byte Unicode text, any character > 255 will be converted to 127.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
ptr  Buffer to read into
len  Number of characters to read

RVCAPPLIBEXPORT int MfReadTextIni int  findex,
INT32  inode,
RVCTEXTINFO info,
int  isize,
int  hdrtype,
INIHANDLE  handle
 

Read a text object to an in memory Ini buffer.

Parameters:
findex  Open RVC file handle
inode  Inode of text object
info  Text object info or DispParm object info header
isize  Size of header
hdrtype  Header conversion type
handle  In memory Ini handle from IniOpen()

RVCAPPLIBEXPORT INT32 MfReadTextLine int  id,
INT32  maxlen,
char *  ptr
 

Read a line from a text object (ASCII).

Returns:
number of characters read or error < 0 R_ReadPastEnd if no more to read. This function will read up (and including) the next newline ('
') character or to the end of the object, or maxlen characters, which ever comes first. The buffer will always be NULL-terminated. If the object contains 2-Byte Unicode text, any character > 255 will be converted to 127.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
maxlen  Maximum number of characters to read
ptr  Buffer to read into

RVCAPPLIBEXPORT INT32 MfReadTextLineString int  id,
MISTRING string
 

Read a line from a text object (Unicode).

Returns:
number of characters read or error < 0 R_ReadPastEnd if no more to read. This function will read up (and including) the next newline ('
') character or to the end of the object, or maxlen characters, which ever comes first. If the object contains 1-byte ASCII text, all characters will be promoted to Unicode characters in the range 0 to 255.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
string  String to read into

RVCAPPLIBEXPORT INT32 MfReadTextLineUnicode int  id,
INT32  maxlen,
UNICODE ptr
 

Read a line from a text object (Unicode).

Returns:
number of characters read or error < 0 R_ReadPastEnd if no more to read. This function will read up (and including) the next newline ('
') character or to the end of the object, or maxlen characters, which ever comes first. The buffer will always be NULL-terminated. If the object contains 1-byte ASCII text, all characters will be promoted to Unicode characters in the range 0 to 255.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
maxlen  Maximum number of characters (not bytes) to read
ptr  Buffer to read into

RVCAPPLIBEXPORT INT32 MfReadTextString int  id,
MISTRING string,
INT32  maxlen
 

Read a line from a text object (Unicode).

Returns:
number of characters read or error < 0 R_ReadPastEnd if no more to read. This function will read up (and including) the next newline ('
') character or to the end of the object, or maxlen characters, which ever comes first. If the object contains 1-byte ASCII text, all characters will be promoted to Unicode characters in the range 0 to 255.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
string  String to read into
maxlen  Maximum number of characters (not bytes) to read

RVCAPPLIBEXPORT INT32 MfReadTextUnicode int  id,
UNICODE uc,
INT32  len
 

Read a buffer from a text object (Unicode).

Returns:
number of characters read or error < 0 R_ReadPastEnd if no more to read. If the object contains 1-byte ASCII text, all characters will be promoted to Unicode characters in the range 0 to 255.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
uc  Buffer to read into
len  Number of characters (not bytes) to read

RVCAPPLIBEXPORT int MfTextIsUnicode int  id  ) 
 

Main level function to return if the text object is in UNICODE.

Returns:
true if the text object is in UNICODE, false if not
Parameters:
id  Handle returned by MfMakeText or MfOpenText

RVCAPPLIBEXPORT int MfTextMakeLink int  findex,
RVCTEXTINFO info,
int  isize,
int  hdrtype,
const UNICODE filename,
const char *  encstr
 

Make a link to an external text file with a text object.

Parameters:
findex  File handle returned by MfOpenFile()
info  Any header containing RVCTEXTINFO
isize  Size of object header
hdrtype  RVCCONV_????
filename  Name of file to link to
encstr  File encoding string, must be less than 64 bytes

RVCAPPLIBEXPORT int MfTextReadAll int  fhandle,
INT32  inode,
RVCTEXTINFO info,
int  isize,
int  hdrtype,
UNICODE **  buf,
UINT32  flags
 

Read complete text object into a UNICODE buffer.

Parameters:
fhandle  File handle returned by MfOpenFile()
inode  Inode of text object to read
info  Any header containing RVCTEXTINFO
isize  Size of object header
hdrtype  RVCCONV_????
buf  Buffer to allocate and read into, free by using MfFree()
flags  Flags, see MfOpenText

RVCAPPLIBEXPORT int MfTextWriteAll int  fhandle,
INT32  inode,
RVCTEXTINFO info,
int  isize,
int  hdrtype,
const UNICODE buf,
UINT32  flags = 0
 

Write complete text object from a UNICODE buffer.

Parameters:
fhandle  File handle returned by MfOpenFile()
inode  Inode of text object to read
info  Any header containing RVCTEXTINFO
isize  Size of object header
hdrtype  RVCCONV_????
buf  Buffer to write from
flags  Flags, see MfOpenText

RVCAPPLIBEXPORT int MfTruncateText int  id,
INT32  size
 

Resize test object to new length.

Parameters:
id  Handle from MfOpenText() or MfMakeText()
size  New length to set it to

int MfWriteQueryHeader int  fhandle,
RVCINODENUM  inode,
RVCQUERYINFO info
[inline]
 

Write query header.

Parameters:
fhandle  Open file handle
inode  Object inode
info  Query header to write

Definition at line 147 of file rvctext.h.

RVCAPPLIBEXPORT INT32 MfWriteText int  id,
const char *  ptr,
INT32  len
 

Write a buffer to a text object (ASCII).

Returns:
number of characters written or error < 0 If the object contains 2-byte Unicode text, all characters will be promoted to Unicode characters in the range 0 to 255.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
ptr  Buffer to write
len  Number of characters to write

RVCAPPLIBEXPORT int MfWriteTextIni int  findex,
INT32  inode,
RVCTEXTINFO info,
int  isize,
int  hdrtype,
INIHANDLE  handle
 

Write an in memory Ini buffer to a text object.

Returns:
error code if < 0, succesful if 0 NOTE: If new object, these fields in the 'info' parameter must be set: name, desc, source, parentinode, objtype
Parameters:
findex  Open RVC file handle
inode  Inode of text object, -1 if new, info.parentinode must be set
info  Text object info or DispParm object info header
isize  Size of header
hdrtype  Header conversion type
handle  In memory Ini handle from IniOpen()

RVCAPPLIBEXPORT INT32 MfWriteTextLine int  id,
const char *  ptr
 

Write a line to a text object (ASCII).

Returns:
number of characters written or error < 0 If the object contains 2-byte Unicode text, all characters will be promoted to Unicode charactLineUnicode Write a line to a text object (Unicode)
Parameters:
id  Handle returned by MfMakeText or MfOpenText
ptr  NULL-terminated buffer to write

RVCAPPLIBEXPORT INT32 MfWriteTextLineUnicode int  id,
const UNICODE us
 

Write a line to a text object (ASCII).

Returns:
number of characters written or error < 0 If the object contains 1-Byte ASCII text, any character > 255 will be converted to 127 before being written out.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
us  NULL-terminated buffer to write

RVCAPPLIBEXPORT INT32 MfWriteTextUnicode int  id,
const UNICODE uc,
INT32  len
 

Write a buffer to a text object (Unicode).

Returns:
number of characters written or error < 0 If the object contains 1-Byte ASCII text, any character > 255 will be converted to 127 before being written out.
Parameters:
id  Handle returned by MfMakeText or MfOpenText
uc  Buffer to write
len  Number of characters (not bytes) to write


Generated on Tue Dec 14 13:19:15 2004 for TNTsdk by  doxygen 1.3.8-20040913