summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2008-11-02 11:20:15 +0000
committerskidd13 <skidd13@openttd.org>2008-11-02 11:20:15 +0000
commit706dd0f86c2453eadb44742ca62d6c5d690e9238 (patch)
tree852231dcb9853107b3876ca33a89cbeb47f20133 /src/strgen
parentc03e55b32a4b9bf64c516d38ce75ff5c8ab39748 (diff)
downloadopenttd-706dd0f86c2453eadb44742ca62d6c5d690e9238.tar.xz
(svn r14555) -Codechange: replace ttd_strlcat and ttd_strlcpy with strecat and strecpy where direct conversion is possible
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index ed630d67f..ccf4c1398 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -643,11 +643,11 @@ static void HandlePragma(char *str)
if (!memcmp(str, "id ", 3)) {
_next_string_id = strtoul(str + 3, NULL, 0);
} else if (!memcmp(str, "name ", 5)) {
- ttd_strlcpy(_lang_name, str + 5, sizeof(_lang_name));
+ strecpy(_lang_name, str + 5, lastof(_lang_name));
} else if (!memcmp(str, "ownname ", 8)) {
- ttd_strlcpy(_lang_ownname, str + 8, sizeof(_lang_ownname));
+ strecpy(_lang_ownname, str + 8, lastof(_lang_ownname));
} else if (!memcmp(str, "isocode ", 8)) {
- ttd_strlcpy(_lang_isocode, str + 8, sizeof(_lang_isocode));
+ strecpy(_lang_isocode, str + 8, lastof(_lang_isocode));
} else if (!memcmp(str, "plural ", 7)) {
_lang_pluralform = atoi(str + 7);
if (_lang_pluralform >= lengthof(_plural_form_counts))
@@ -668,7 +668,7 @@ static void HandlePragma(char *str)
if (s == NULL) break;
if (_numgenders >= MAX_NUM_GENDER) error("Too many genders, max %d", MAX_NUM_GENDER);
- ttd_strlcpy(_genders[_numgenders], s, sizeof(_genders[_numgenders]));
+ strecpy(_genders[_numgenders], s, lastof(_genders[_numgenders]));
_numgenders++;
}
} else if (!memcmp(str, "case ", 5)) {
@@ -679,7 +679,7 @@ static void HandlePragma(char *str)
if (s == NULL) break;
if (_numcases >= MAX_NUM_CASES) error("Too many cases, max %d", MAX_NUM_CASES);
- ttd_strlcpy(_cases[_numcases], s, sizeof(_cases[_numcases]));
+ strecpy(_cases[_numcases], s, lastof(_cases[_numcases]));
_numcases++;
}
} else {