Unicode WIP:

- a lot of set_string calls replaced.

Now I mostly have to work on the report-writing code and this is done.
This commit is contained in:
Enno Rehling 2007-07-21 15:35:07 +00:00
parent d2094d6205
commit 7031e9d032
21 changed files with 170 additions and 131 deletions

View File

@ -93,7 +93,7 @@ crtag(const char * key)
{ {
static const struct locale * lang = NULL; static const struct locale * lang = NULL;
if (!lang) lang = find_locale(TAG_LOCALE); if (!lang) lang = find_locale(TAG_LOCALE);
return locale_string(lang, key); return (const xmlChar*)locale_string(lang, key);
} }
#else #else
#define crtag(x) (x) #define crtag(x) (x)
@ -104,7 +104,7 @@ crtag(const char * key)
typedef struct translation { typedef struct translation {
struct translation * next; struct translation * next;
char * key; char * key;
const char * value; const xmlChar * value;
} translation; } translation;
#define TRANSMAXHASH 257 #define TRANSMAXHASH 257
@ -112,7 +112,7 @@ static translation * translation_table[TRANSMAXHASH];
static translation * junkyard; static translation * junkyard;
static const char * static const char *
add_translation(const char * key, const char * value) add_translation(const char * key, const xmlChar * value)
{ {
int kk = ((key[0] << 5) + key[0]) % TRANSMAXHASH; int kk = ((key[0] << 5) + key[0]) % TRANSMAXHASH;
translation * t = translation_table[kk]; translation * t = translation_table[kk];

View File

@ -940,7 +940,7 @@ restart_cmd(unit * u, struct order * ord)
return 0; return 0;
} }
if (!checkpasswd(u->faction, s_pass, false)) { if (!checkpasswd(u->faction, (const char *)s_pass, false)) {
cmistake(u, ord, 86, MSG_EVENT); cmistake(u, ord, 86, MSG_EVENT);
log_warning(("NEUSTART mit falschem Passwort für Partei %s: %s\n", log_warning(("NEUSTART mit falschem Passwort für Partei %s: %s\n",
factionid(u->faction), s_pass)); factionid(u->faction), s_pass));
@ -973,7 +973,7 @@ quit_cmd(unit * u, struct order * ord)
skip_token(); /* skip keyword */ skip_token(); /* skip keyword */
passwd = getstrtoken(); passwd = getstrtoken();
if (checkpasswd(f, passwd, false)) { if (checkpasswd(f, (const char *)passwd, false)) {
if (EnhancedQuit()) { if (EnhancedQuit()) {
int f2_id = getid(); int f2_id = getid();
if (f2_id>0) { if (f2_id>0) {
@ -1065,7 +1065,7 @@ parse_restart(void)
} }
if (fval(f, FFL_OVERRIDE)) { if (fval(f, FFL_OVERRIDE)) {
free(f->override); free(f->override);
f->override = (xmlChar*)strdup(itoa36(rng_int())); f->override = strdup(itoa36(rng_int()));
freset(f, FFL_OVERRIDE); freset(f, FFL_OVERRIDE);
} }
if (turn!=f->lastorders) { if (turn!=f->lastorders) {
@ -1898,7 +1898,8 @@ banner_cmd(unit * u, struct order * ord)
init_tokens(ord); init_tokens(ord);
skip_token(); skip_token();
set_string(&u->faction->banner, getstrtoken()); free(u->faction->banner);
u->faction->banner = xstrdup(getstrtoken());
add_message(&u->faction->msgs, msg_message("changebanner", "value", add_message(&u->faction->msgs, msg_message("changebanner", "value",
u->faction->banner)); u->faction->banner));
@ -1931,9 +1932,10 @@ email_cmd(unit * u, struct order * ord)
static int static int
password_cmd(unit * u, struct order * ord) password_cmd(unit * u, struct order * ord)
{ {
xmlChar pbuf[32]; char pbuf[32];
int i; int i;
const xmlChar * s; const xmlChar * s;
boolean pwok = true;
init_tokens(ord); init_tokens(ord);
skip_token(); skip_token();
@ -1943,23 +1945,23 @@ password_cmd(unit * u, struct order * ord)
for(i=0; i<6; i++) pbuf[i] = (char)(97 + rng_int() % 26); for(i=0; i<6; i++) pbuf[i] = (char)(97 + rng_int() % 26);
pbuf[6] = 0; pbuf[6] = 0;
} else { } else {
boolean pwok = true; char *c;
xmlChar *c;
xstrlcpy(pbuf, s, 31); strlcpy(pbuf, (const char *)s, 31);
pbuf[31] = 0; pbuf[31] = 0;
c = pbuf; c = pbuf;
while (*c) { while (*c && pwok) {
if (!isalnum(*c)) pwok = false; if (!isalnum(*c)) pwok = false;
c++; c++;
} }
if (pwok == false) {
cmistake(u, ord, 283, MSG_EVENT);
for(i=0; i<6; i++) pbuf[i] = (char)(97 + rng_int() % 26);
pbuf[6] = 0;
}
} }
set_string(&u->faction->passw, pbuf); free(u->faction->passw);
if (pwok == false) {
cmistake(u, ord, 283, MSG_EVENT);
u->faction->passw = strdup(itoa36(rng_int()));
} else {
u->faction->passw = strdup(pbuf);
}
fset(u->faction, FFL_OVERRIDE); fset(u->faction, FFL_OVERRIDE);
ADDMSG(&u->faction->msgs, msg_message("changepasswd", ADDMSG(&u->faction->msgs, msg_message("changepasswd",
"value", u->faction->passw)); "value", u->faction->passw));
@ -3816,14 +3818,14 @@ warn_password(void)
faction * f = factions; faction * f = factions;
while (f) { while (f) {
boolean pwok = true; boolean pwok = true;
const xmlChar * c = f->passw; const char * c = f->passw;
while (*c) { while (*c && pwok) {
if (!isalnum((unsigned char)*c)) pwok = false; if (!isalnum((unsigned char)*c)) pwok = false;
c++; c++;
} }
if (pwok == false) { if (!pwok) {
free(f->passw); free(f->passw);
f->passw = (xmlChar*)strdup(itoa36(rng_int())); f->passw = strdup(itoa36(rng_int()));
ADDMSG(&f->msgs, msg_message("illegal_password", "newpass", f->passw)); ADDMSG(&f->msgs, msg_message("illegal_password", "newpass", f->passw));
} }
f = f->next; f = f->next;

View File

@ -1015,11 +1015,13 @@ godcurse(void)
static unit * static unit *
split_unit(region * r, unit *u) split_unit(region * r, unit *u)
{ {
unit *u2 = createunit(r, u->faction, 0, u->race); unit *u2 = create_unit(r, u->faction, 0, u->race, 0, u->name, u);
int newsize = u->number/2; int newsize = u->number/2;
set_string(&u2->name, u->name); if (u->display) {
set_string(&u2->display, u->display); free(u2->display);
u2->display = xstrdup(u->display);
}
transfermen(u, u2, newsize); transfermen(u, u2, newsize);
return u2; return u2;
} }

View File

@ -48,9 +48,7 @@ summon_igjarjuk(struct unit * u, const struct item_type * itype, int amount, str
static boolean static boolean
give_igjarjuk(const struct unit * src, const struct unit * d, const struct item_type * itype, int n, struct order * ord) give_igjarjuk(const struct unit * src, const struct unit * d, const struct item_type * itype, int n, struct order * ord)
{ {
sprintf(buf, "Eine höhere Macht hindert %s daran, das Objekt zu übergeben. " ADDMSG(&src->faction->msgs, msg_feedback(src, ord, "error_giveeye", ""));
"'ES IST DEINS, MEIN KIND. DEINS GANZ ALLEIN'.", unitname(src));
mistake(src, ord, buf, MSG_COMMERCE);
return false; return false;
} }

View File

@ -16,12 +16,13 @@
#include <eressea.h> #include <eressea.h>
#include "weapons.h" #include "weapons.h"
#include <unit.h> #include <kernel/unit.h>
#include <build.h> #include <kernel/build.h>
#include <race.h> #include <kernel/race.h>
#include <item.h> #include <kernel/item.h>
#include <battle.h> #include <kernel/message.h>
#include <pool.h> #include <kernel/battle.h>
#include <kernel/pool.h>
/* util includes */ /* util includes */
#include <util/functions.h> #include <util/functions.h>
@ -50,13 +51,14 @@ attack_firesword(const troop * at, const struct weapon_type * wtype, int *casual
if (fi->catmsg == -1) { if (fi->catmsg == -1) {
int i, k=0; int i, k=0;
message * msg;
for (i=0;i<=at->index;++i) { for (i=0;i<=at->index;++i) {
struct weapon * wp = fi->person[i].melee; struct weapon * wp = fi->person[i].melee;
if (wp!=NULL && wp->type == wtype) ++k; if (wp!=NULL && wp->type == wtype) ++k;
} }
sprintf(buf, "%d Kämpfer aus %s benutz%s Flammenschwert%s:", k, unitname(fi->unit), msg = msg_message("battle::useflamingsword", "amount unit", k, fi->unit);
(k==1)?"t sein ":"en ihre",(k==1)?"":"er"); message_all(fi->side->battle, msg);
battlerecord(fi->side->battle, buf); msg_release(msg);
fi->catmsg = 0; fi->catmsg = 0;
} }
@ -104,11 +106,14 @@ attack_catapult(const troop * at, const struct weapon_type * wtype, int * casual
if (af->catmsg == -1) { if (af->catmsg == -1) {
int i, k=0; int i, k=0;
message * msg;
for (i=0;i<=at->index;++i) { for (i=0;i<=at->index;++i) {
if (af->person[i].reload==0 && af->person[i].missile == wp) ++k; if (af->person[i].reload==0 && af->person[i].missile == wp) ++k;
} }
sprintf(buf, "%d Kämpfer aus %s feuer%s Katapult ab:", k, unitname(au), (k==1)?"t sein":"n ihr"); msg = msg_message("battle::usecatapult", "amount unit", k, au);
battlerecord(b, buf); message_all(b, msg);
msg_release(msg);
af->catmsg = 0; af->catmsg = 0;
} }

View File

@ -444,9 +444,10 @@ new_building(const struct building_type * btype, region * r, const struct locale
if (b->type->name==NULL) { if (b->type->name==NULL) {
bname = LOC(lang, btype->_name); bname = LOC(lang, btype->_name);
} else { } else {
/* TODO: optimization potential: make b->name NULL and use this as default */
bname = LOC(lang, buildingtype(btype, b, 0)); bname = LOC(lang, buildingtype(btype, b, 0));
} }
set_string(&b->name, bname); b->name = xstrdup(bname);
} }
return b; return b;
} }

View File

@ -100,7 +100,7 @@ unused_faction_id(void)
} }
faction * faction *
addfaction(const char *email, const xmlChar * password, addfaction(const char *email, const char * password,
const struct race * frace, const struct locale *loc, const struct race * frace, const struct locale *loc,
int subscription) int subscription)
{ {
@ -114,12 +114,12 @@ addfaction(const char *email, const xmlChar * password,
log_error(("Invalid email address for faction %s: %s\n", itoa36(f->no), email)); log_error(("Invalid email address for faction %s: %s\n", itoa36(f->no), email));
} }
set_string(&f->override, (const xmlChar *)pass); f->override = strdup(pass);
if (password) { if (password) {
set_string(&f->passw, password); f->passw = strdup(password);
} else { } else {
pass = itoa36(rng_int()); pass = itoa36(rng_int());
set_string(&f->passw, (const xmlChar *)pass); f->passw = strdup(pass);
} }
f->lastorders = turn; f->lastorders = turn;
@ -137,7 +137,7 @@ addfaction(const char *email, const xmlChar * password,
fhash(f); fhash(f);
snprintf(buf, sizeof(buf), "%s %s", LOC(loc, "factiondefault"), factionid(f)); snprintf(buf, sizeof(buf), "%s %s", LOC(loc, "factiondefault"), factionid(f));
set_string(&f->name, (const xmlChar*)buf); f->name = xstrdup(buf);
return f; return f;
} }
@ -166,7 +166,7 @@ addplayer(region *r, faction * f)
} }
boolean boolean
checkpasswd(const faction * f, const xmlChar * passwd, boolean shortp) checkpasswd(const faction * f, const char * passwd, boolean shortp)
{ {
#ifdef SHORTPWDS #ifdef SHORTPWDS
shortpwd * slist = f->shortpwds; shortpwd * slist = f->shortpwds;
@ -178,8 +178,8 @@ checkpasswd(const faction * f, const xmlChar * passwd, boolean shortp)
slist = slist->next; slist = slist->next;
} }
#endif #endif
if (xstrcmp(f->passw, passwd)==0) return true; if (strcmp(f->passw, passwd)==0) return true;
if (xstrcmp(f->override, passwd)==0) return true; if (strcmp(f->override, passwd)==0) return true;
return false; return false;
} }

View File

@ -67,8 +67,8 @@ typedef struct faction {
xmlChar *name; xmlChar *name;
xmlChar *banner; xmlChar *banner;
char *email; char *email;
xmlChar *passw; char *passw;
xmlChar *override; char *override;
#ifdef SHORTPWDS #ifdef SHORTPWDS
struct shortpwd * shortpwds; struct shortpwd * shortpwds;
#endif #endif
@ -121,10 +121,10 @@ extern const struct unit * random_unit_in_faction(const struct faction *f);
extern const char * factionname(const struct faction * f); extern const char * factionname(const struct faction * f);
extern void * resolve_faction(variant data); extern void * resolve_faction(variant data);
extern struct unit * addplayer(struct region *r, faction * f); extern struct unit * addplayer(struct region *r, faction * f);
extern struct faction * addfaction(const char *email, const xmlChar* password, extern struct faction * addfaction(const char *email, const char* password,
const struct race * frace, const struct race * frace,
const struct locale *loc, int subscription); const struct locale *loc, int subscription);
extern boolean checkpasswd(const faction * f, const xmlChar * passwd, boolean shortp); extern boolean checkpasswd(const faction * f, const char * passwd, boolean shortp);
extern void destroyfaction(faction * f); extern void destroyfaction(faction * f);
extern void set_alliance(struct faction * a, struct faction * b, int status); extern void set_alliance(struct faction * a, struct faction * b, int status);

View File

@ -175,7 +175,7 @@ new_ship(const ship_type * stype, const struct locale * lang, region * r)
sh->region = r; sh->region = r;
sprintf((char*)buffer, "%s %s", LOC(lang, stype->name[0]), shipid(sh)); sprintf((char*)buffer, "%s %s", LOC(lang, stype->name[0]), shipid(sh));
set_string(&sh->name, buffer); sh->name = xstrdup(buffer);
shash(sh); shash(sh);
addlist(&r->ships, sh); addlist(&r->ships, sh);
return sh; return sh;

View File

@ -1271,17 +1271,18 @@ createunitid(unit *u, int id)
void void
name_unit(unit *u) name_unit(unit *u)
{ {
free(u->name);
if (u->race->generate_name) { if (u->race->generate_name) {
const xmlChar * gen_name = u->race->generate_name(u); const xmlChar * gen_name = u->race->generate_name(u);
if (gen_name) { if (gen_name) {
set_string(&u->name, gen_name); u->name = xstrdup(gen_name);
} else { } else {
set_string(&u->name, racename(u->faction->locale, u, u->race)); u->name = xstrdup(racename(u->faction->locale, u, u->race));
} }
} else { } else {
xmlChar name[16]; xmlChar name[16];
sprintf((char*)name, "%s %s", LOC(u->faction->locale, "unitdefault"), itoa36(u->no)); sprintf((char*)name, "%s %s", LOC(u->faction->locale, "unitdefault"), itoa36(u->no));
set_string(&u->name, name); u->name = xstrdup(name);
} }
} }
@ -1326,9 +1327,9 @@ create_unit(region * r, faction * f, int number, const struct race *urace, int i
if (!dname) { if (!dname) {
name_unit(u); name_unit(u);
} else {
u->name = xstrdup(dname);
} }
else set_string(&u->name, dname);
if (count_unit(u)) f->no_units++; if (count_unit(u)) f->no_units++;
if (creator) { if (creator) {

View File

@ -119,7 +119,7 @@ nrt_register(const struct message_type * mtype, const struct locale * lang, cons
else nrt->section = NULL; else nrt->section = NULL;
messagetypes[hash] = nrt; messagetypes[hash] = nrt;
assert(string && *string); assert(string && *string);
nrt->string = xstrdup(string); nrt->string = strdup(string);
*c = '\0'; *c = '\0';
for (i=0;i!=mtype->nparameters;++i) { for (i=0;i!=mtype->nparameters;++i) {
if (i!=0) *c++ = ' '; if (i!=0) *c++ = ' ';

View File

@ -13,6 +13,7 @@
#include "translation.h" #include "translation.h"
#include "log.h" #include "log.h"
#include "bsdstring.h"
/* libc includes */ /* libc includes */
#include <assert.h> #include <assert.h>
@ -21,7 +22,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <util/bsdstring.h>
/** /**
** simple operand stack ** simple operand stack
**/ **/

View File

@ -22,7 +22,21 @@
#ifndef CONFIG_H #ifndef CONFIG_H
#define CONFIG_H #define CONFIG_H
#ifdef _MSC_VER
# pragma warning (disable: 4201 4214 4514 4115 4711)
# pragma warning(disable: 4056)
/* warning C4056: overflow in floating point constant arithmetic */
# pragma warning(disable: 4201)
/* warning C4201: Nicht dem Standard entsprechende Erweiterung : Struktur/Union ohne Namen */
# pragma warning(disable: 4214)
/* warning C4214: Nicht dem Standard entsprechende Erweiterung : Basistyp fuer Bitfeld ist nicht int */
# pragma warning(disable: 4100)
/* warning C4100: <name> : unreferenced formal parameter */
# pragma warning(disable: 4996)
/* warning C4100: <name> was declared deprecated */
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE
#endif
#ifdef __cplusplus #ifdef __cplusplus
# include <cstdio> # include <cstdio>
@ -64,18 +78,6 @@ extern "C" {
# define _XOPEN_SOURCE # define _XOPEN_SOURCE
#endif #endif
#ifdef _MSC_VER
# pragma warning (disable: 4201 4214 4514 4115 4711)
# pragma warning(disable: 4056)
/* warning C4056: overflow in floating point constant arithmetic */
# pragma warning(disable: 4201)
/* warning C4201: Nicht dem Standard entsprechende Erweiterung : Struktur/Union ohne Namen */
# pragma warning(disable: 4214)
/* warning C4214: Nicht dem Standard entsprechende Erweiterung : Basistyp fuer Bitfeld ist nicht int */
# pragma warning(disable: 4100)
/* warning C4100: <name> : unreferenced formal parameter */
#endif
#ifdef __GNUC__ #ifdef __GNUC__
# ifndef _BSD_SOURCE # ifndef _BSD_SOURCE
# define _BSD_SOURCE # define _BSD_SOURCE
@ -140,6 +142,7 @@ typedef struct stat stat_type;
/* Microsoft Visual C */ /* Microsoft Visual C */
#ifdef _MSC_VER #ifdef _MSC_VER
# include <string.h> /* must be included here so strdup is not redefined */
# define R_OK 4 # define R_OK 4
# define HAVE__MKDIR_WITHOUT_PERMISSION # define HAVE__MKDIR_WITHOUT_PERMISSION
# define HAVE_INLINE # define HAVE_INLINE

View File

@ -75,44 +75,41 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug|Win32.ActiveCfg = Debug|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug|Win32.ActiveCfg = Debug|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug|Win32.Build.0 = Debug|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug|Win32.Build.0 = Debug|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.ActiveCfg = Debug64|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.ActiveCfg = Debug|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.Build.0 = Debug64|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Debug64|Win32.Build.0 = Debug|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Profile|Win32.ActiveCfg = Profile|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Profile|Win32.ActiveCfg = Profile|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Profile|Win32.Build.0 = Profile|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Profile|Win32.Build.0 = Profile|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release|Win32.ActiveCfg = Release|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release|Win32.ActiveCfg = Release|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release|Win32.Build.0 = Release|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release|Win32.Build.0 = Release|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.ActiveCfg = Release64|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.ActiveCfg = Release|Win32
{330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.Build.0 = Release64|Win32 {330712B5-8B27-4B17-B3CF-7A02CC0F93C3}.Release64|Win32.Build.0 = Release|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug|Win32.ActiveCfg = Debug|Win32 {B859D542-781E-4647-BCAB-3FE5ED077366}.Debug|Win32.ActiveCfg = Debug|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug|Win32.Build.0 = Debug|Win32 {B859D542-781E-4647-BCAB-3FE5ED077366}.Debug|Win32.Build.0 = Debug|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug64|Win32.ActiveCfg = Debug64|Win32 {B859D542-781E-4647-BCAB-3FE5ED077366}.Debug64|Win32.ActiveCfg = Debug|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Debug64|Win32.Build.0 = Debug64|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Profile|Win32.ActiveCfg = Profile|Win32 {B859D542-781E-4647-BCAB-3FE5ED077366}.Profile|Win32.ActiveCfg = Profile|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Profile|Win32.Build.0 = Profile|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release|Win32.ActiveCfg = Release|Win32 {B859D542-781E-4647-BCAB-3FE5ED077366}.Release|Win32.ActiveCfg = Release|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release|Win32.Build.0 = Release|Win32 {B859D542-781E-4647-BCAB-3FE5ED077366}.Release|Win32.Build.0 = Release|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release64|Win32.ActiveCfg = Release64|Win32 {B859D542-781E-4647-BCAB-3FE5ED077366}.Release64|Win32.ActiveCfg = Release|Win32
{B859D542-781E-4647-BCAB-3FE5ED077366}.Release64|Win32.Build.0 = Release64|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug|Win32.ActiveCfg = Debug|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug|Win32.ActiveCfg = Debug|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug|Win32.Build.0 = Debug|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug|Win32.Build.0 = Debug|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.ActiveCfg = Debug64|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.ActiveCfg = Debug|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.Build.0 = Debug64|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Debug64|Win32.Build.0 = Debug|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Profile|Win32.ActiveCfg = Profile|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Profile|Win32.ActiveCfg = Profile|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Profile|Win32.Build.0 = Profile|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Profile|Win32.Build.0 = Profile|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release|Win32.ActiveCfg = Release|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release|Win32.ActiveCfg = Release|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release|Win32.Build.0 = Release|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release|Win32.Build.0 = Release|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.ActiveCfg = Release64|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.ActiveCfg = Release|Win32
{79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.Build.0 = Release64|Win32 {79659D44-EC28-42B9-9475-6C0D62D0AAE0}.Release64|Win32.Build.0 = Release|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug|Win32.ActiveCfg = Debug|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug|Win32.ActiveCfg = Debug|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug|Win32.Build.0 = Debug|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug|Win32.Build.0 = Debug|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.ActiveCfg = Debug64|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.ActiveCfg = Debug|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.Build.0 = Debug64|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Debug64|Win32.Build.0 = Debug|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Profile|Win32.ActiveCfg = Profile|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Profile|Win32.ActiveCfg = Profile|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Profile|Win32.Build.0 = Profile|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Profile|Win32.Build.0 = Profile|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release|Win32.ActiveCfg = Release|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release|Win32.ActiveCfg = Release|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release|Win32.Build.0 = Release|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release|Win32.Build.0 = Release|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.ActiveCfg = Release64|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.ActiveCfg = Release|Win32
{C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.Build.0 = Release64|Win32 {C14E3D2B-8189-4570-A4E3-9010C873E4FD}.Release64|Win32.Build.0 = Release|Win32
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug|Win32.ActiveCfg = Debug|Win32 {EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug|Win32.ActiveCfg = Debug|Win32
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug|Win32.Build.0 = Debug|Win32 {EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug|Win32.Build.0 = Debug|Win32
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug64|Win32.ActiveCfg = Debug|Win32 {EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Debug64|Win32.ActiveCfg = Debug|Win32
@ -125,64 +122,64 @@ Global
{EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Release64|Win32.Build.0 = Release|Win32 {EDB0DE67-8215-4AF7-ACA1-F23CB11FF211}.Release64|Win32.Build.0 = Release|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug|Win32.ActiveCfg = Debug|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Debug|Win32.ActiveCfg = Debug|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug|Win32.Build.0 = Debug|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Debug|Win32.Build.0 = Debug|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.ActiveCfg = Debug64|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.ActiveCfg = Debug|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.Build.0 = Debug64|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Debug64|Win32.Build.0 = Debug|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Profile|Win32.ActiveCfg = Profile|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Profile|Win32.ActiveCfg = Profile|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Profile|Win32.Build.0 = Profile|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Profile|Win32.Build.0 = Profile|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release|Win32.ActiveCfg = Release|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Release|Win32.ActiveCfg = Release|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release|Win32.Build.0 = Release|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Release|Win32.Build.0 = Release|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.ActiveCfg = Release64|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.ActiveCfg = Release|Win32
{601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.Build.0 = Release64|Win32 {601CF164-F483-4DE7-8014-64BDD30680B5}.Release64|Win32.Build.0 = Release|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug|Win32.ActiveCfg = Debug|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug|Win32.ActiveCfg = Debug|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug|Win32.Build.0 = Debug|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug|Win32.Build.0 = Debug|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.ActiveCfg = Debug64|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.ActiveCfg = Debug|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.Build.0 = Debug64|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Debug64|Win32.Build.0 = Debug|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Profile|Win32.ActiveCfg = Profile|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Profile|Win32.ActiveCfg = Profile|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Profile|Win32.Build.0 = Profile|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Profile|Win32.Build.0 = Profile|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release|Win32.ActiveCfg = Release|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release|Win32.ActiveCfg = Release|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release|Win32.Build.0 = Release|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release|Win32.Build.0 = Release|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.ActiveCfg = Release64|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.ActiveCfg = Release|Win32
{4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.Build.0 = Release64|Win32 {4C837BEC-A428-4287-84B3-8F8F9DE7FA00}.Release64|Win32.Build.0 = Release|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug|Win32.ActiveCfg = Debug|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug|Win32.ActiveCfg = Debug|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug|Win32.Build.0 = Debug|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug|Win32.Build.0 = Debug|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.ActiveCfg = Debug64|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.ActiveCfg = Debug|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.Build.0 = Debug64|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Debug64|Win32.Build.0 = Debug|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Profile|Win32.ActiveCfg = Profile|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Profile|Win32.ActiveCfg = Profile|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Profile|Win32.Build.0 = Profile|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Profile|Win32.Build.0 = Profile|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release|Win32.ActiveCfg = Release|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release|Win32.ActiveCfg = Release|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release|Win32.Build.0 = Release|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release|Win32.Build.0 = Release|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.ActiveCfg = Release64|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.ActiveCfg = Release|Win32
{0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.Build.0 = Release64|Win32 {0EE778AB-8445-40DB-8F65-6BE378A91B97}.Release64|Win32.Build.0 = Release|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug|Win32.ActiveCfg = Debug|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug|Win32.ActiveCfg = Debug|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug|Win32.Build.0 = Debug|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug|Win32.Build.0 = Debug|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.ActiveCfg = Debug64|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.ActiveCfg = Debug|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.Build.0 = Debug64|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Debug64|Win32.Build.0 = Debug|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Profile|Win32.ActiveCfg = Profile|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Profile|Win32.ActiveCfg = Profile|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Profile|Win32.Build.0 = Profile|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Profile|Win32.Build.0 = Profile|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release|Win32.ActiveCfg = Release|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release|Win32.ActiveCfg = Release|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release|Win32.Build.0 = Release|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release|Win32.Build.0 = Release|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.ActiveCfg = Release64|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.ActiveCfg = Release|Win32
{EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.Build.0 = Release64|Win32 {EF495253-2EEC-4F83-B6C0-D651F88B2198}.Release64|Win32.Build.0 = Release|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug|Win32.ActiveCfg = Debug|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug|Win32.ActiveCfg = Debug|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug|Win32.Build.0 = Debug|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug|Win32.Build.0 = Debug|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.ActiveCfg = Debug64|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.ActiveCfg = Debug|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.Build.0 = Debug64|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Debug64|Win32.Build.0 = Debug|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Profile|Win32.ActiveCfg = Profile|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Profile|Win32.ActiveCfg = Profile|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Profile|Win32.Build.0 = Profile|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Profile|Win32.Build.0 = Profile|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release|Win32.ActiveCfg = Release|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release|Win32.ActiveCfg = Release|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release|Win32.Build.0 = Release|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release|Win32.Build.0 = Release|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.ActiveCfg = Release64|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.ActiveCfg = Release|Win32
{1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.Build.0 = Release64|Win32 {1D80D05F-BCF5-4971-8F06-D9581FD3B1F4}.Release64|Win32.Build.0 = Release|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug|Win32.ActiveCfg = Debug|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug|Win32.ActiveCfg = Debug|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug|Win32.Build.0 = Debug|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug|Win32.Build.0 = Debug|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.ActiveCfg = Debug64|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.ActiveCfg = Debug|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.Build.0 = Debug64|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Debug64|Win32.Build.0 = Debug|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Profile|Win32.ActiveCfg = Profile|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Profile|Win32.ActiveCfg = Profile|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Profile|Win32.Build.0 = Profile|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Profile|Win32.Build.0 = Profile|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release|Win32.ActiveCfg = Release|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release|Win32.ActiveCfg = Release|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release|Win32.Build.0 = Release|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release|Win32.Build.0 = Release|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.ActiveCfg = Release64|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.ActiveCfg = Release|Win32
{749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.Build.0 = Release64|Win32 {749A2F7C-B9C3-4CEB-B1B2-1D4587E68719}.Release64|Win32.Build.0 = Release|Win32
{57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug|Win32.ActiveCfg = Debug|Win32 {57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug|Win32.ActiveCfg = Debug|Win32
{57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug|Win32.Build.0 = Debug|Win32 {57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug|Win32.Build.0 = Debug|Win32
{57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug64|Win32.ActiveCfg = Debug|Win32 {57BA2AEE-5C65-4839-9294-C0FA2915A06C}.Debug64|Win32.ActiveCfg = Debug|Win32

View File

@ -1,5 +1,4 @@
#include <config.h> #include <config.h>
#include <cstring>
#include <eressea.h> #include <eressea.h>
#include "list.h" #include "list.h"
#include "objects.h" #include "objects.h"

View File

@ -102,14 +102,14 @@ static void
lua_setstring(const char * lname, const char * key, const char * str) lua_setstring(const char * lname, const char * key, const char * str)
{ {
struct locale * lang = find_locale(lname); struct locale * lang = find_locale(lname);
locale_setstring(lang, key, str); locale_setstring(lang, key, (const xmlChar*)str);
} }
static const char * static const char *
lua_getstring(const char * lname, const char * key) lua_getstring(const char * lname, const char * key)
{ {
struct locale * lang = find_locale(lname); struct locale * lang = find_locale(lname);
return locale_getstring(lang, key); return (const char*)locale_getstring(lang, key);
} }
#define ISLANDSIZE 20 #define ISLANDSIZE 20

View File

@ -31,14 +31,15 @@
#endif #endif
#include <ostream> #include <ostream>
#include <cstring>
using namespace luabind; using namespace luabind;
static faction * static faction *
add_faction(const char * email, const char * racename, const char * lang) add_faction(const char * email, const char * racename, const char * lang)
{ {
const race * frace = findrace(racename, default_locale); const race * frace = findrace((const xmlChar*)racename, default_locale);
if (frace==NULL) frace = findrace(racename, find_locale("de")); if (frace==NULL) frace = findrace((const xmlChar*)racename, find_locale("de"));
if (frace==NULL) frace = findrace(racename, find_locale("en")); if (frace==NULL) frace = findrace((const xmlChar*)racename, find_locale("en"));
if (frace==NULL) return NULL; if (frace==NULL) return NULL;
locale * loc = find_locale(lang); locale * loc = find_locale(lang);
faction * f = addfaction(email, NULL, frace, loc, 0); faction * f = addfaction(email, NULL, frace, loc, 0);
@ -202,7 +203,8 @@ faction_items(const faction& f) {
void void
faction_set_passw(faction& f, const char * passw) faction_set_passw(faction& f, const char * passw)
{ {
set_string(&f.passw, passw); free(f.passw);
f.passw = strdup(passw);
} }
const char * const char *
@ -214,19 +216,21 @@ faction_get_passw(const faction& f)
void void
faction_set_banner(faction& f, const char * banner) faction_set_banner(faction& f, const char * banner)
{ {
set_string(&f.banner, banner); free(f.banner);
f.banner = BAD_CAST strdup(banner);
} }
const char * const char *
faction_get_banner(const faction& f) faction_get_banner(const faction& f)
{ {
return f.banner; return (const char*)f.banner;
} }
void void
faction_set_email(faction& f, const char * email) faction_set_email(faction& f, const char * email)
{ {
set_string(&f.email, email); free(f.email);
f.email = strdup(email);
} }
const char * const char *

View File

@ -156,13 +156,13 @@ update_subscriptions(void)
static void static void
message_unit(unit& sender, unit& target, const char * str) message_unit(unit& sender, unit& target, const char * str)
{ {
deliverMail(target.faction, sender.region, &sender, str, &target); deliverMail(target.faction, sender.region, &sender, (const xmlChar *)str, &target);
} }
static void static void
message_faction(unit& sender, faction& target, const char * str) message_faction(unit& sender, faction& target, const char * str)
{ {
deliverMail(&target, sender.region, &sender, str, NULL); deliverMail(&target, sender.region, &sender, (const xmlChar *)str, NULL);
} }
static void static void

View File

@ -50,17 +50,17 @@ region_ships(const region& r) {
static void static void
region_setname(region& r, const char * name) { region_setname(region& r, const char * name) {
if (r.land) rsetname((&r), name); if (r.land) rsetname((&r), (const xmlChar *)name);
} }
static const char * static const char *
region_getterrain(const region& r) { region_getterrain(const region& r) {
return r.terrain->_name; return (const char *)r.terrain->_name;
} }
static const char * static const char *
region_getname(const region& r) { region_getname(const region& r) {
if (r.land) return r.land->name; if (r.land) return (const char *)r.land->name;
return NULL; return NULL;
} }
@ -98,7 +98,7 @@ region_setinfo(region& r, const char * info)
static const char * static const char *
region_getinfo(const region& r) { region_getinfo(const region& r) {
return r.display; return (const char *)r.display;
} }
static int static int
@ -111,7 +111,7 @@ region_plane(const region& r)
static void static void
region_addnotice(region& r, const char * str) region_addnotice(region& r, const char * str)
{ {
addmessage(&r, NULL, str, MSG_MESSAGE, ML_IMPORTANT); addmessage(&r, NULL, (const xmlChar *)str, MSG_MESSAGE, ML_IMPORTANT);
} }
static std::ostream& static std::ostream&

View File

@ -98,7 +98,7 @@ lua_callspell(castorder *co)
if (hashpos!=NULL) { if (hashpos!=NULL) {
ptrdiff_t len = hashpos - fname; ptrdiff_t len = hashpos - fname;
assert(len<sizeof(buf)); assert(len<sizeof(fbuf));
strncpy(fbuf, fname, len); strncpy(fbuf, fname, len);
fbuf[len] = '\0'; fbuf[len] = '\0';
fname = fbuf; fname = fbuf;

View File

@ -1364,12 +1364,23 @@
</type> </type>
<text locale="de">""AAAAAAAGHHHHHH!" - Ein Schrei durchzieht die Region, $unit($unit) windet sich vor Schmerz."</text> <text locale="de">""AAAAAAAGHHHHHH!" - Ein Schrei durchzieht die Region, $unit($unit) windet sich vor Schmerz."</text>
</message> </message>
<message name="error_giveeye" section="events">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Eine höhere Macht hindert $unit($unit) daran, das Objekt zu übergeben. 'ES IST DEINS, MEIN KIND. DEINS GANZ ALLEIN'."</text>
</message>
<message name="praytoigjarjuk" section="events"> <message name="praytoigjarjuk" section="events">
<type> <type>
<arg name="unit" type="unit"/> <arg name="unit" type="unit"/>
</type> </type>
<text locale="de">"$unit($unit) sendet ein Stoßgebet an den Herrn der Schreie."</text> <text locale="de">"$unit($unit) sendet ein Stoßgebet an den Herrn der Schreie."</text>
</message> </message>
<message name="iceberg_melt" section="events"> <message name="iceberg_melt" section="events">
<type> <type>
<arg name="region" type="region"/> <arg name="region" type="region"/>
@ -7099,6 +7110,22 @@
<text locale="fr">"The wormhole in $region($region) disappears."</text> <text locale="fr">"The wormhole in $region($region) disappears."</text>
<text locale="en">"The wormhole in $region($region) disappears."</text> <text locale="en">"The wormhole in $region($region) disappears."</text>
</message> </message>
<message name="battle::useflamingsword" section="battle">
<type>
<arg name="unit" type="unit"/>
<arg name="amount" type="int"/>
</type>
<text locale="de">"$int($amount) Krieger von $unit($unit) benutzen ihre Flammenschwerter."</text>
<text locale="en">"$int($amount) fighters of $unit($unit) are using their flaming sword."</text>
</message>
<message name="battle::usecatapult" section="battle">
<type>
<arg name="unit" type="unit"/>
<arg name="amount" type="int"/>
</type>
<text locale="de">"$int($amount) Krieger von $unit($unit) feuern ihre Katapulte ab."</text>
<text locale="en">"$int($amount) fighters of $unit($unit) launch their catapults."</text>
</message>
<message name="battle::starters" section="battle"> <message name="battle::starters" section="battle">
<type> <type>
<arg name="factions" type="string"/> <arg name="factions" type="string"/>