Documentation from msg.h

ROV

Introduction

[top]

ROV - Easy applications from C

Copyright - © Jason Tribbeck / 7th ARM 1994-2001

Contributing authors - Jason Tribbeck

File - msg.h

Type - subsystem

Description

The msg subsystem is an interface to the MessageTrans module. It maintains a single messages file in memory.

msg_read

[top]

Read a messages file.

Parameters:

 - char *file_name - the name of the messages file.

Returns:

 -  non-zero for success.

int msg_read(char *file_name);

msg_lookup4

[top]

Lookup a string with four replacement variables.

Parameters:

 - char *token - the messages string to look up.
 - char *rep1 - the first replacement.
 - char *rep2 - the second replacement.
 - char *rep3 - the third replacement.
 - char *rep4 - the fourth replacement.

Returns:

 -  the string with replacements.

Note - The string is held in a static area of memory, and must be copied before calling another msg_lookup function.

char *msg_lookup4(char *token,
		  char *rep1,
		  char *rep2,
		  char *rep3,
		  char *rep4);

See also: msg_lookup(), msg_lookup1(), msg_lookup2(), msg_lookup3(), msg_lookupbuffer(), msg_lookupfull(), msg_lookuprom()

msg_lookup3

[top]

Lookup a string with three replacement variables.

Parameters:

 - char *token - the messages string to look up.
 - char *rep1 - the first replacement.
 - char *rep2 - the second replacement.
 - char *rep3 - the third replacement.

Returns:

 -  the string with replacements.

Note - The string is held in a static area of memory, and must be copied before calling another msg_lookup function.

char *msg_lookup3(char *token,
		  char *rep1,
		  char *rep2,
		  char *rep3);

See also: msg_lookup(), msg_lookup1(), msg_lookup2(), msg_lookup4(), msg_lookupbuffer(), msg_lookupfull(), msg_lookuprom()

msg_lookup2

[top]

Lookup a string with two replacement variables.

Parameters:

 - char *token - the messages string to look up.
 - char *rep1 - the first replacement.
 - char *rep2 - the second replacement.

Returns:

 -  the string with replacements.

Note - The string is held in a static area of memory, and must be copied before calling another msg_lookup function.

char *msg_lookup2(char *token,
		  char *rep1,
		  char *rep2);

See also: msg_lookup(), msg_lookup1(), msg_lookup3(), msg_lookup4(), msg_lookupbuffer(), msg_lookupfull(), msg_lookuprom()

msg_lookup1

[top]

Lookup a string with one replacement variable.

Parameters:

 - char *token - the messages string to look up.
 - char *rep - the replacement.

Returns:

 -  the string with replacements.

Note - The string is held in a static area of memory, and must be copied before calling another msg_lookup function.

char *msg_lookup1(char *token, char *rep);

See also: msg_lookup(), msg_lookup2(), msg_lookup3(), msg_lookup4(), msg_lookupbuffer(), msg_lookupfull(), msg_lookuprom()

msg_lookup

[top]

Lookup a string with no replacement variables.

Parameters:

 - char *token - the messages string to look up.

Returns:

 -  the string with replacements.

Note - The string is held in a static area of memory, and must be copied before calling another msg_lookup function.

char *msg_lookup(char *token);

See also: msg_lookup1(), msg_lookup2(), msg_lookup3(), msg_lookup4(), msg_lookupbuffer(), msg_lookupfull(), msg_lookuprom()

msg_lookuprom

[top]

Lookup a string but do not copy.

Parameters:

 - char *token - the messages string to look up.

Note - Unlike other msg_lookup calls, this call returns the looked up string as a pointer into the messages file itself, which must not be edited. This means that if you use this, you must be able to cope with ctrl terminated strings.

char *msg_lookuprom(char *token);

See also: msg_lookup(), msg_lookup1(), msg_lookup2(), msg_lookup3(), msg_lookup4(), msg_lookupbuffer(), msg_lookupfull()

msg_lookupbuffer

[top]

Lookup a string and copy to a buffer.

Parameters:

 - char *token - the messages string to look up.
 - char *buffer - the buffer to store the result in.

char *msg_lookupbuffer(char *token,
		       char *buffer);

See also: msg_lookup(), msg_lookup1(), msg_lookup2(), msg_lookup3(), msg_lookup4(), msg_lookupfull(), msg_lookuprom()

msg_lookupfull

[top]

Lookup a string with four replacement variables.

Parameters:

 - char *token - the messages string to look up.
 - char *buffer - the buffer to store the result.
 - int blen - the buffer length.
 - char *rep1 - the first replacement.
 - char *rep2 - the second replacement.
 - char *rep3 - the third replacement.
 - char *rep4 - the fourth replacement.

Returns:

 -  the string with replacements.

Note - The string is held in a static area of memory, and must be copied before calling another msg_lookup function.

char *msg_lookupfull(char *token,
		     char *buffer,
		     int blen,
		     char *rep1,
		     char *rep2,
		     char *rep3,
		     char *rep4);

See also: msg_lookup(), msg_lookup1(), msg_lookup2(), msg_lookup3(), msg_lookupbuffer(), msg_lookuprom()


Generated Thu Feb 7 23:22:52 2002