OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
StdResStr2.cpp
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de/
5  * Copyright (c) 2010-2016, The OpenClonk Team and contributors
6  *
7  * Distributed under the terms of the ISC license; see accompanying file
8  * "COPYING" for details.
9  *
10  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
11  * See accompanying file "TRADEMARK" for details.
12  *
13  * To redistribute this file separately, substitute the full license texts
14  * for the above references.
15  */
16 
17 /* Load strings from a primitive memory string table */
18 
19 #include "C4Include.h"
20 
21 const int ResStrMaxLen = 4096;
22 static char strResult[ResStrMaxLen + 1];
23 const char *LoadResStrNoAmp(const char *id)
24 {
25  const char * str = LoadResStr(id);
26  char * cpd = strResult;
27  for (const char * cps = str; *cps; ++cps, ++cpd)
28  {
29  if (*cps == '&')
30  --cpd;
31  else
32  *cpd = *cps;
33  }
34  *cpd = 0;
35  return strResult;
36 }
const int ResStrMaxLen
Definition: StdResStr2.cpp:21
const char * LoadResStr(const char *id)
Definition: C4Language.h:83
const char * LoadResStrNoAmp(const char *id)
Definition: StdResStr2.cpp:23