MorePalmOS
A development library for developing Palm OS applications

MoreTextMgr.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * MorePalmOS
00003  * Copyright (c) 2004 Steven Fisher
00004  *
00005  * Distributed under the Boost Software License, Version 1.0. See accompanying
00006  * license file License.txt or <http://www.boost.org/LICENSE_1_0.txt>.
00007  *
00008  * http://morepalmos.sourceforge.net
00009  *
00010  *   MorePalmOS is the humble begining of an attempt to provide a library for
00011  *   Palm OS development which works around system bugs, illustrate how to
00012  *   use system calls, and provide "glue code" for programming Palm OS
00013  *   applications in a more straightforward way while minimally impacting
00014  *   code size.
00015  *****************************************************************************/
00016 
00017 #include "MorePrefix.h"
00018 #include "MoreTextMgr.h"
00019 #include "MorePrivate.h"
00020 
00021 #include <SysUtils.h>
00022 
00023 /*-----------------------------------------------------------------------------
00024    MTxtParamStringByIndex
00025    Loads a string and replaces ^0..^3.
00026 */
00027 char* MTxtParamStringByIndex( ResourceID_t resID, UInt16 index,
00028                 char *s0, char *s1, char *s2, char *s3)
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 }

SourceForge.net Logo