A development library for developing Palm OS applications

MoreTextMgr.h File Reference

Functions for text. More...

#include "MorePrefix.h"
#include "MoreMemoryMgr.h"
#include "MoreTypes.h"
#include <TextMgr.h>

Include dependency graph for MoreTextMgr.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.


#define MTxtFreeParamString(p)   MMemFreeHandleFromLockedPtr( p )
 Free the result of a MTxtParamStringByIndex( ) or TxtParamString( ).


char * MTxtParamStringByIndex (ResourceID_t resID, UInt16 index, char *s0, char *s1, char *s2, char *s3)
 ParamString replacement on a string in a string list.

Detailed Description

Functions for text.

Definition in file MoreTextMgr.h.

Define Documentation

#define MTxtFreeParamString  )     MMemFreeHandleFromLockedPtr( p )

Free the result of a MTxtParamStringByIndex( ) or TxtParamString( ).

This is just a macro that maps through to MMemFreeHandleFromLockedPtr, included on the grounds that every function that allocates should have a corresponding deallocation function.

Definition at line 44 of file MoreTextMgr.h.

Function Documentation

char* MTxtParamStringByIndex ResourceID_t  resID,
UInt16  index,
char *  s0,
char *  s1,
char *  s2,
char *  s3

ParamString replacement on a string in a string list.

The return result is a locked handle; you're responsible for freeing it. Use MTxtFreeParamString to free it.

Definition at line 27 of file MoreTextMgr.c.

00029 {
00030         char buffer[255];
00031         SysStringByIndex( resID, index, buffer, sizeof( buffer ) );
00032         return TxtParamString( buffer, s0, s1, s2, s3);
00033         /* TxtParamString( ) allocates space for the returned string in the dynamic
00034            heap through a call to MemHandleNew( ), and then returns the result of
00035            calling  MemHandleLock( ) with this handle. Your code is responsible for
00036            freeing this memory when it is no longer needed, i.e.
00037                MMemFreeHandleFromLockedPtr ( p ); */
00038 } Logo