Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:zSystems
blobwars
blobwars-glibc-2.38.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File blobwars-glibc-2.38.patch of Package blobwars
Index: blobwars-2.00/src/CAudio.cpp =================================================================== --- blobwars-2.00.orig/src/CAudio.cpp +++ blobwars-2.00/src/CAudio.cpp @@ -156,11 +156,11 @@ bool Audio::loadMusic(const char *filena line[l - 1] = 0; if(!strncasecmp(line, "title=", 6)) - strlcpy(songtitle, line + 6, sizeof songtitle); + bw_strlcpy(songtitle, line + 6, sizeof songtitle); else if(!strncasecmp(line, "album=", 6)) - strlcpy(songalbum, line + 6, sizeof songalbum); + bw_strlcpy(songalbum, line + 6, sizeof songalbum); else if(!strncasecmp(line, "artist=", 7)) - strlcpy(songartist, line + 7, sizeof songartist); + bw_strlcpy(songartist, line + 7, sizeof songartist); else if(!strncasecmp(line, "license=", 8)) { if(!strncasecmp(line + 8, "CC-BY ", 6)) @@ -173,7 +173,7 @@ bool Audio::loadMusic(const char *filena if(fp) fclose(fp); - strlcpy(levelMusicName, filename, sizeof levelMusicName); + bw_strlcpy(levelMusicName, filename, sizeof levelMusicName); return true; } Index: blobwars-2.00/src/CData.cpp =================================================================== --- blobwars-2.00.orig/src/CData.cpp +++ blobwars-2.00/src/CData.cpp @@ -37,8 +37,8 @@ void Data::set(const char *key, const ch return; } - strlcpy(this->key, key, sizeof this->key); - strlcpy(this->value, value, sizeof this->value); + bw_strlcpy(this->key, key, sizeof this->key); + bw_strlcpy(this->value, value, sizeof this->value); this->current = current; this->target = target; } Index: blobwars-2.00/src/CEngine.cpp =================================================================== --- blobwars-2.00.orig/src/CEngine.cpp +++ blobwars-2.00/src/CEngine.cpp @@ -61,7 +61,7 @@ Engine::Engine() binaryBuffer = NULL; #ifdef FRAMEWORK_SDL char pakPath[PATH_MAX]; - strlcpy(pakPath, PAKFULLPATH, sizeof(pakPath)); + bw_strlcpy(pakPath, PAKFULLPATH, sizeof(pakPath)); if (CFBundleGetMainBundle() != NULL) { CFURLRef pakURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR(PAKNAME), NULL, NULL); if (pakURL != NULL) { @@ -227,7 +227,7 @@ void Engine::getInput() } keyState[event.key.keysym.scancode] = 1; - strlcpy(lastKeyPressed, SDL_GetKeyName(SDL_GetKeyFromScancode(event.key.keysym.scancode)), sizeof lastKeyPressed); + bw_strlcpy(lastKeyPressed, SDL_GetKeyName(SDL_GetKeyFromScancode(event.key.keysym.scancode)), sizeof lastKeyPressed); addKeyEvent(); break; @@ -356,7 +356,7 @@ void Engine::clearInput() void Engine::setUserHome(const char *path) { - strlcpy(userHomeDirectory, path, sizeof userHomeDirectory); + bw_strlcpy(userHomeDirectory, path, sizeof userHomeDirectory); debug(("User Home = %s\n", path)); } @@ -539,7 +539,7 @@ void Engine::setInfoMessage(const char * { if (priority >= messagePriority) { - strlcpy(this->message, message, sizeof this->message); + bw_strlcpy(this->message, message, sizeof this->message); messageTime = 180; messagePriority = priority; messageType = type; @@ -1038,7 +1038,7 @@ int Engine::getValueOfFlagTokens(const c char line[1024]; bool found; int value; - strlcpy(line, realLine, sizeof line); + bw_strlcpy(line, realLine, sizeof line); int flags = 0; Index: blobwars-2.00/src/CEntity.cpp =================================================================== --- blobwars-2.00.orig/src/CEntity.cpp +++ blobwars-2.00/src/CEntity.cpp @@ -53,7 +53,7 @@ Entity::Entity() void Entity::setName(const char *name) { - strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->name, name, sizeof this->name); } void Entity::setSprites(Sprite *sprite1, Sprite *sprite2, Sprite *sprite3) Index: blobwars-2.00/src/CFileData.cpp =================================================================== --- blobwars-2.00.orig/src/CFileData.cpp +++ blobwars-2.00/src/CFileData.cpp @@ -37,7 +37,7 @@ void FileData::set(const char *filename, return; } - strlcpy(this->filename, filename, sizeof this->filename); + bw_strlcpy(this->filename, filename, sizeof this->filename); this->fSize = fSize; this->cSize = cSize; Index: blobwars-2.00/src/CGame.cpp =================================================================== --- blobwars-2.00.orig/src/CGame.cpp +++ blobwars-2.00/src/CGame.cpp @@ -57,8 +57,8 @@ void Game::clear() bulletsHit[i] = bulletsFired[i] = 0; } - strlcpy(mapName, "data/grasslands1", sizeof mapName); - strlcpy(stageName, "Grasslands", sizeof stageName); + bw_strlcpy(mapName, "data/grasslands1", sizeof mapName); + bw_strlcpy(stageName, "Grasslands", sizeof stageName); continuesUsed = 0; levelsStarted = 0; @@ -212,12 +212,12 @@ void Game::totalUpStats() void Game::setStageName(const char *name) { - strlcpy(stageName, name, sizeof stageName); + bw_strlcpy(stageName, name, sizeof stageName); } void Game::setMapName(const char *name) { - strlcpy(mapName, name, sizeof mapName); + bw_strlcpy(mapName, name, sizeof mapName); } void Game::setMissionOver(int reason) Index: blobwars-2.00/src/CGameData.cpp =================================================================== --- blobwars-2.00.orig/src/CGameData.cpp +++ blobwars-2.00/src/CGameData.cpp @@ -91,7 +91,7 @@ void GameData::setMIARescueCount(const c data = (Data*)data->next; if (strcmp(newKey, data->key) == 0) { - strlcpy(data->value, "MIAs", sizeof data->value); + bw_strlcpy(data->value, "MIAs", sizeof data->value); data->current = rescues; data->target = total; return; Index: blobwars-2.00/src/CGraphics.cpp =================================================================== --- blobwars-2.00.orig/src/CGraphics.cpp +++ blobwars-2.00/src/CGraphics.cpp @@ -574,7 +574,7 @@ void Graphics::loadFont(int i, const cha Sprite *Graphics::addSprite(const char *name) { Sprite *sprite = new Sprite; - strlcpy(sprite->name, name, sizeof sprite->name); + bw_strlcpy(sprite->name, name, sizeof sprite->name); spriteList.add(sprite); @@ -908,8 +908,8 @@ void Graphics::clearChatString() void Graphics::createChatString(const char *in) { - strlcat(chatString, " ", sizeof chatString); - strlcat(chatString, in, sizeof chatString); + bw_strlcat(chatString, " ", sizeof chatString); + bw_strlcat(chatString, in, sizeof chatString); } void Graphics::drawChatString(SDL_Surface *surface, int y) Index: blobwars-2.00/src/CHub.cpp =================================================================== --- blobwars-2.00.orig/src/CHub.cpp +++ blobwars-2.00/src/CHub.cpp @@ -34,8 +34,8 @@ HubLevel::HubLevel() void HubLevel::set(const char *stageName, const char *filename, int x, int y) { - strlcpy(this->stageName, stageName, sizeof this->stageName); - strlcpy(this->filename, filename, sizeof this->filename); + bw_strlcpy(this->stageName, stageName, sizeof this->stageName); + bw_strlcpy(this->filename, filename, sizeof this->filename); this->x = x; this->y = y; } Index: blobwars-2.00/src/CKeyboard.cpp =================================================================== --- blobwars-2.00.orig/src/CKeyboard.cpp +++ blobwars-2.00/src/CKeyboard.cpp @@ -52,7 +52,7 @@ const char *Keyboard::translateKey(int s SDL_Keycode key = SDL_GetKeyFromScancode((SDL_Scancode)scancode); - strlcpy(keyName, _(SDL_GetKeyName(key)), sizeof keyName); + bw_strlcpy(keyName, _(SDL_GetKeyName(key)), sizeof keyName); /* This is not really neccessary, but it just makes Index: blobwars-2.00/src/CLineDef.cpp =================================================================== --- blobwars-2.00.orig/src/CLineDef.cpp +++ blobwars-2.00/src/CLineDef.cpp @@ -34,9 +34,9 @@ LineDef::LineDef() void LineDef::set(const char *name, const char *linkName, const char *activateMessage, int x, int y, int width, int height) { - strlcpy(this->name, name, sizeof this->name); - strlcpy(this->linkName, linkName, sizeof this->linkName); - strlcpy(this->activateMessage, activateMessage, sizeof this->activateMessage); + bw_strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->linkName, linkName, sizeof this->linkName); + bw_strlcpy(this->activateMessage, activateMessage, sizeof this->activateMessage); this->x = x; this->y = y; this->width = width; Index: blobwars-2.00/src/CMap.cpp =================================================================== --- blobwars-2.00.orig/src/CMap.cpp +++ blobwars-2.00/src/CMap.cpp @@ -244,7 +244,7 @@ void Map::destroyPersistant(const char * if (strcmp(p->stageName, name) == 0) { - strlcpy(p->stageName, "@none@", sizeof p->stageName); + bw_strlcpy(p->stageName, "@none@", sizeof p->stageName); p->clear(); return; } @@ -253,7 +253,7 @@ void Map::destroyPersistant(const char * void Map::setName(const char *name) { - strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->name, name, sizeof this->name); if (strstr(name, "BioMech")) { Index: blobwars-2.00/src/CMedalServer.cpp =================================================================== --- blobwars-2.00.orig/src/CMedalServer.cpp +++ blobwars-2.00/src/CMedalServer.cpp @@ -49,7 +49,7 @@ bool MedalServer::connect(const char *pr debug(("Connected %s to %s:%d\n", privateKey, MEDAL_SERVER_HOST, MEDAL_SERVER_PORT)); - strlcpy(this->privateKey, privateKey, sizeof this->privateKey); + bw_strlcpy(this->privateKey, privateKey, sizeof this->privateKey); connected = true; return true; @@ -69,7 +69,7 @@ int MedalServer::postMedal(const char *s char *store; char medal[128]; - strlcpy(medal, str, sizeof medal); + bw_strlcpy(medal, str, sizeof medal); for (unsigned int i = 0 ; i < strlen(medal) ; i++) { @@ -123,7 +123,7 @@ int MedalServer::postMedal(const char *s if (response == 4) { - strlcpy(rubyMessage, message, sizeof rubyMessage); + bw_strlcpy(rubyMessage, message, sizeof rubyMessage); gotRuby = true; } else Index: blobwars-2.00/src/CObjective.cpp =================================================================== --- blobwars-2.00.orig/src/CObjective.cpp +++ blobwars-2.00/src/CObjective.cpp @@ -35,8 +35,8 @@ Objective::Objective() Objective::Objective(const char *description, const char *target, int targetValue, bool required) { - strlcpy(this->description, description, sizeof this->description); - strlcpy(this->target, target, sizeof this->target); + bw_strlcpy(this->description, description, sizeof this->description); + bw_strlcpy(this->target, target, sizeof this->target); this->targetValue = targetValue; this->required = required; Index: blobwars-2.00/src/CPak.cpp =================================================================== --- blobwars-2.00.orig/src/CPak.cpp +++ blobwars-2.00/src/CPak.cpp @@ -55,7 +55,7 @@ void Pak::showPakErrorAndExit() void Pak::setPakFile(const char *pakFilename) { #if USEPAK - strlcpy(this->pakFilename, pakFilename, sizeof this->pakFilename); + bw_strlcpy(this->pakFilename, pakFilename, sizeof this->pakFilename); debug(("Pak : Filename set to %s\n", pakFilename)); Index: blobwars-2.00/src/CPersistData.cpp =================================================================== --- blobwars-2.00.orig/src/CPersistData.cpp +++ blobwars-2.00/src/CPersistData.cpp @@ -38,7 +38,7 @@ bool PersistData::setData(const char *da return false; } - strlcpy(this->data, data, sizeof this->data); + bw_strlcpy(this->data, data, sizeof this->data); return true; } Index: blobwars-2.00/src/CPersistant.cpp =================================================================== --- blobwars-2.00.orig/src/CPersistant.cpp +++ blobwars-2.00/src/CPersistant.cpp @@ -35,7 +35,7 @@ Persistant::~Persistant() void Persistant::setName(const char *name) { - strlcpy(this->stageName, name, sizeof this->stageName); + bw_strlcpy(this->stageName, name, sizeof this->stageName); } void Persistant::clear() Index: blobwars-2.00/src/CSpawnPoint.cpp =================================================================== --- blobwars-2.00.orig/src/CSpawnPoint.cpp +++ blobwars-2.00/src/CSpawnPoint.cpp @@ -43,7 +43,7 @@ void SpawnPoint::reset() void SpawnPoint::create(const char *name, int x, int y, int spawnType, int spawnSubType, int minInterval, int maxInterval, bool active) { - strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->name, name, sizeof this->name); this->x = x; this->y = y; this->spawnType = spawnType; Index: blobwars-2.00/src/CSwitch.cpp =================================================================== --- blobwars-2.00.orig/src/CSwitch.cpp +++ blobwars-2.00/src/CSwitch.cpp @@ -38,10 +38,10 @@ Switch::Switch() void Switch::set(const char *name, const char *linkName, const char *requiredObjectName, const char *activateMessage, int type, int x, int y, bool activated) { - strlcpy(this->name, name, sizeof this->name); - strlcpy(this->linkName, linkName, sizeof this->linkName); - strlcpy(this->requiredObjectName, requiredObjectName, sizeof this->requiredObjectName); - strlcpy(this->activateMessage, activateMessage, sizeof this->activateMessage); + bw_strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->linkName, linkName, sizeof this->linkName); + bw_strlcpy(this->requiredObjectName, requiredObjectName, sizeof this->requiredObjectName); + bw_strlcpy(this->activateMessage, activateMessage, sizeof this->activateMessage); this->type = type; this->x = x; this->y = y; Index: blobwars-2.00/src/CTeleporter.cpp =================================================================== --- blobwars-2.00.orig/src/CTeleporter.cpp +++ blobwars-2.00/src/CTeleporter.cpp @@ -30,7 +30,7 @@ Teleporter::Teleporter() void Teleporter::setName(const char *name) { - strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->name, name, sizeof this->name); } void Teleporter::set(int x, int y, int destX, int destY) Index: blobwars-2.00/src/CTrain.cpp =================================================================== --- blobwars-2.00.orig/src/CTrain.cpp +++ blobwars-2.00/src/CTrain.cpp @@ -77,7 +77,7 @@ bool Train::waitsForPlayer() void Train::setName(const char *name) { - strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->name, name, sizeof this->name); } void Train::set(int startX, int startY, int endX, int endY, int pause, bool fromStart) Index: blobwars-2.00/src/CTrap.cpp =================================================================== --- blobwars-2.00.orig/src/CTrap.cpp +++ blobwars-2.00/src/CTrap.cpp @@ -31,7 +31,7 @@ Trap::Trap() void Trap::setName(const char *name) { - strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->name, name, sizeof this->name); } void Trap::setTrapType(int type) Index: blobwars-2.00/src/CWeapon.cpp =================================================================== --- blobwars-2.00.orig/src/CWeapon.cpp +++ blobwars-2.00/src/CWeapon.cpp @@ -35,7 +35,7 @@ Weapon::Weapon() void Weapon::setName(const char *name) { - strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->name, name, sizeof this->name); } int Weapon::getSpeed(int face) const Index: blobwars-2.00/src/CWidget.cpp =================================================================== --- blobwars-2.00.orig/src/CWidget.cpp +++ blobwars-2.00/src/CWidget.cpp @@ -44,10 +44,10 @@ void Widget::setProperties(const char *n exit(1); } - strlcpy(this->name, name, sizeof this->name); - strlcpy(this->groupName, groupName, sizeof this->groupName); - strlcpy(this->label, label, sizeof this->label); - strlcpy(this->options, options, sizeof this->options); + bw_strlcpy(this->name, name, sizeof this->name); + bw_strlcpy(this->groupName, groupName, sizeof this->groupName); + bw_strlcpy(this->label, label, sizeof this->label); + bw_strlcpy(this->options, options, sizeof this->options); this->x = x; this->y = y; this->min = min; Index: blobwars-2.00/src/aquaBoss.cpp =================================================================== --- blobwars-2.00.orig/src/aquaBoss.cpp +++ blobwars-2.00/src/aquaBoss.cpp @@ -288,7 +288,7 @@ void aquaBossMainInit() debug(("aquaBossMainInit\n")); map.boss[0] = new Boss(); - strlcpy(map.boss[0]->name, "BioMech Aqua Blob", sizeof map.boss[0]->name); + bw_strlcpy(map.boss[0]->name, "BioMech Aqua Blob", sizeof map.boss[0]->name); map.boss[0]->health = 45 * game.skill; map.boss[0]->maxHealth = 45 * game.skill; map.boss[0]->setSprites(graphics.getSprite("AquaBossRight", true), graphics.getSprite("AquaBossLeft", true), graphics.getSprite("AquaBossLeft", true)); Index: blobwars-2.00/src/cutscene.cpp =================================================================== --- blobwars-2.00.orig/src/cutscene.cpp +++ blobwars-2.00/src/cutscene.cpp @@ -54,7 +54,7 @@ void createSceneList() line = strtok(NULL, "\n"); if (strcmp(line, "@none@") != 0) { - strlcpy(scene->sprite, line, sizeof scene->sprite); + bw_strlcpy(scene->sprite, line, sizeof scene->sprite); debug(("Loading cutscene image %s\n", scene->sprite)); graphics.quickSprite(scene->sprite, graphics.loadImage(scene->sprite)); } Index: blobwars-2.00/src/droidBoss.cpp =================================================================== --- blobwars-2.00.orig/src/droidBoss.cpp +++ blobwars-2.00/src/droidBoss.cpp @@ -366,7 +366,7 @@ void droidBossInit() debug(("droidBossInit\n")); map.boss[0] = new Boss(); - strlcpy(map.boss[0]->name, "BioMech Jetpack Blob", sizeof map.boss[0]->name); + bw_strlcpy(map.boss[0]->name, "BioMech Jetpack Blob", sizeof map.boss[0]->name); map.boss[0]->health = 30 * game.skill; map.boss[0]->maxHealth = 30 * game.skill; map.boss[0]->setSprites(graphics.getSprite("JetpackBlobRight1", true), graphics.getSprite("JetpackBlobLeft1", true), graphics.getSprite("JetpackBlobLeft1", true)); @@ -388,7 +388,7 @@ void droidBossInit() for (int i = 1 ; i < 6 ; i++) { map.boss[i] = new Boss(); - strlcpy(map.boss[i]->name, "Orb Bomb", sizeof map.boss[i]->name); + bw_strlcpy(map.boss[i]->name, "Orb Bomb", sizeof map.boss[i]->name); map.boss[i]->setSprites(graphics.getSprite("DroidOrb", true), graphics.getSprite("DroidOrb", true), graphics.getSprite("DroidOrb", true)); map.boss[i]->active = false; map.boss[i]->face = 1; Index: blobwars-2.00/src/finalBattle.cpp =================================================================== --- blobwars-2.00.orig/src/finalBattle.cpp +++ blobwars-2.00/src/finalBattle.cpp @@ -148,7 +148,7 @@ void galdovInitBlackDroids() map.boss[i] = new Boss(); } debug(("BlackDroid %d init\n", i)); - strlcpy(map.boss[i]->name, "BlackDrod", sizeof map.boss[i]->name); + bw_strlcpy(map.boss[i]->name, "BlackDrod", sizeof map.boss[i]->name); map.boss[i]->health = -90; map.boss[i]->maxHealth = -90; map.boss[i]->setSprites(graphics.getSprite("BlackDroidRight", true), graphics.getSprite("BlackDroidLeft", true), graphics.getSprite("BlackDroidDie", true)); @@ -494,7 +494,7 @@ void galdovFinalSplit() if (map.boss[i] == NULL) { map.boss[i] = new Boss(); - strlcpy(map.boss[i]->name, "MiniGaldov", sizeof map.boss[i]->name); + bw_strlcpy(map.boss[i]->name, "MiniGaldov", sizeof map.boss[i]->name); map.boss[i]->health = 10 * game.skill; map.boss[i]->maxHealth = 10 * game.skill; } @@ -558,7 +558,7 @@ void galdovFinalInit() debug(("galdovFinalInit\n")); map.boss[0] = new Boss(); - strlcpy(map.boss[0]->name, "Galdov", sizeof map.boss[0]->name); + bw_strlcpy(map.boss[0]->name, "Galdov", sizeof map.boss[0]->name); map.boss[0]->health = 45 * game.skill; map.boss[0]->maxHealth = 45 * game.skill; map.boss[0]->setSprites(graphics.getSprite("GaldovRight", true), graphics.getSprite("GaldovLeft", true), graphics.getSprite("GaldovDie", true)); @@ -682,7 +682,7 @@ void galdovFinalShieldInit() delete map.boss[i]; } map.boss[i] = new Boss(); - strlcpy(map.boss[i]->name, "OrbBomb", sizeof map.boss[i]->name); + bw_strlcpy(map.boss[i]->name, "OrbBomb", sizeof map.boss[i]->name); map.boss[i]->setSprites(graphics.getSprite("DroidOrb", true), graphics.getSprite("DroidOrb", true), graphics.getSprite("DroidOrb", true)); map.boss[i]->health = 999999; map.boss[i]->maxHealth = 99999; Index: blobwars-2.00/src/galdov.cpp =================================================================== --- blobwars-2.00.orig/src/galdov.cpp +++ blobwars-2.00/src/galdov.cpp @@ -457,7 +457,7 @@ void galdovInit() debug(("galdovInit\n")); map.boss[0] = new Boss(); - strlcpy(map.boss[0]->name, "Galdov", sizeof map.boss[0]->name); + bw_strlcpy(map.boss[0]->name, "Galdov", sizeof map.boss[0]->name); map.boss[0]->health = 45 * game.skill; map.boss[0]->maxHealth = 45 * game.skill; map.boss[0]->setSprites(graphics.getSprite("GaldovRight", true), graphics.getSprite("GaldovLeft", true), graphics.getSprite("GaldovLeft", true)); @@ -481,7 +481,7 @@ void galdovInit() for (int i = 1 ; i < 10 ; i++) { map.boss[i] = new Boss(); - strlcpy(map.boss[i]->name, "Fake", sizeof map.boss[i]->name); + bw_strlcpy(map.boss[i]->name, "Fake", sizeof map.boss[i]->name); map.boss[i]->setSprites(graphics.getSprite("GaldovRight", true), graphics.getSprite("GaldovLeft", true), graphics.getSprite("GaldovLeft", true)); map.boss[i]->x = 9999; map.boss[i]->y = 9999; Index: blobwars-2.00/src/game.cpp =================================================================== --- blobwars-2.00.orig/src/game.cpp +++ blobwars-2.00/src/game.cpp @@ -314,7 +314,7 @@ int gameover() Widget *widget = engine.getWidgetByName("gameOverNo"); char postfix[100]; snprintf(postfix, sizeof postfix, " (%d)", game.canContinue); - strlcat(widget->label, postfix, sizeof widget->label); + bw_strlcat(widget->label, postfix, sizeof widget->label); } while (true) @@ -571,7 +571,7 @@ int doGame() #if DEBUG Uint32 now, then, frameCounter; char fps[10]; - strlcpy(fps, "fps", sizeof fps); + bw_strlcpy(fps, "fps", sizeof fps); #endif engine.messageTime = -1; Index: blobwars-2.00/src/headers.h =================================================================== --- blobwars-2.00.orig/src/headers.h +++ blobwars-2.00/src/headers.h @@ -57,8 +57,8 @@ extern DECLSPEC int SDLCALL SDL_GetGamma #endif #if !defined(OpenBSD) && !defined(FreeBSD) && !defined(__APPLE__) -static inline void strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); } -static inline void strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; } +static inline void bw_strlcat(char *dest, const char *src, size_t n) { strncat(dest, src, n - 1); } +static inline void bw_strlcpy(char *dest, const char *src, size_t n) { strncpy(dest, src, n); dest[n - 1] = 0; } #endif #include "defs.h" Index: blobwars-2.00/src/hub.cpp =================================================================== --- blobwars-2.00.orig/src/hub.cpp +++ blobwars-2.00/src/hub.cpp @@ -281,7 +281,7 @@ void createObjectivesPanel(const char *l } else { - strlcpy(string, _(data->value), sizeof string); + bw_strlcpy(string, _(data->value), sizeof string); if (strlen(string) >= 25) { @@ -547,8 +547,8 @@ int doHub() int rtn = -1; - strlcpy(level, "@none@", sizeof level); - strlcpy(game.stageName, "@none@", sizeof game.stageName); + bw_strlcpy(level, "@none@", sizeof level); + bw_strlcpy(game.stageName, "@none@", sizeof game.stageName); bool showData = false; bool showStats = false; @@ -577,7 +577,7 @@ int doHub() if ((numberOfHubs == 0) && (gameData.completedWorld)) { game.setMapName("data/spaceStation"); - strlcpy(game.stageName, "Space Station", sizeof game.stageName); + bw_strlcpy(game.stageName, "Space Station", sizeof game.stageName); createObjectivesPanel("Space Station"); showData = true; showStats = showMIAs = false; Index: blobwars-2.00/src/loadSave.cpp =================================================================== --- blobwars-2.00.orig/src/loadSave.cpp +++ blobwars-2.00/src/loadSave.cpp @@ -43,14 +43,14 @@ void initSaveSlots() if (!fp) { - strlcpy(string, "%.2d - %s", sizeof string); + bw_strlcpy(string, "%.2d - %s", sizeof string); snprintf(engine.saveSlot[i], sizeof engine.saveSlot[i], string, (i + 1), _("Empty")); } else { if (fread(&tempGame, sizeof(Game), 1, fp) != 1) { - strlcpy(string, "%.2d - %s", sizeof string); + bw_strlcpy(string, "%.2d - %s", sizeof string); snprintf(engine.saveSlot[i], sizeof engine.saveSlot[i], string, (i + 1), _("Corrupt Save Data")); } else @@ -170,7 +170,7 @@ bool loadGame(int slot) } sscanf(line, "%[^\n\r]", string[0]); - strlcpy(stageName, string[0], sizeof stageName); + bw_strlcpy(stageName, string[0], sizeof stageName); if (strcmp(stageName, "@EOF@") == 0) { @@ -196,7 +196,7 @@ bool loadGame(int slot) graphics.showErrorAndExit("Unexpected end of file reading save data", ""); } - strlcpy(persistData->data, line, sizeof persistData->data); + bw_strlcpy(persistData->data, line, sizeof persistData->data); //debug(("Read %d: %s", i, persistData->data)); @@ -250,7 +250,7 @@ int confirmSave() for (int i = 0 ; i < 5 ; i++) { snprintf(widgetName, sizeof widgetName, "slot%d", i + 1); - strlcpy(engine.getWidgetByName(widgetName)->label, engine.saveSlot[i], sizeof engine.getWidgetByName(widgetName)->label); + bw_strlcpy(engine.getWidgetByName(widgetName)->label, engine.saveSlot[i], sizeof engine.getWidgetByName(widgetName)->label); } engine.highlightWidget("slot1"); Index: blobwars-2.00/src/main.cpp =================================================================== --- blobwars-2.00.orig/src/main.cpp +++ blobwars-2.00/src/main.cpp @@ -160,8 +160,8 @@ int main(int argc, char *argv[]) else if (strcmp(argv[i], "-mono") == 0) engine.useAudio = 1; else if (strcmp(argv[i], "-version") == 0) {showVersion(); exit(0);} else if (strcmp(argv[i], "--help") == 0) showHelp(); - else if (strcmp(argv[i], "-record") == 0) {recordMode = REPLAY_MODE::RECORD; strlcpy(replayData.filename, argv[++i], sizeof replayData.filename);} - else if (strcmp(argv[i], "-playback") == 0) {recordMode = REPLAY_MODE::PLAYBACK; strlcpy(replayData.filename, argv[++i], sizeof replayData.filename);} + else if (strcmp(argv[i], "-record") == 0) {recordMode = REPLAY_MODE::RECORD; bw_strlcpy(replayData.filename, argv[++i], sizeof replayData.filename);} + else if (strcmp(argv[i], "-playback") == 0) {recordMode = REPLAY_MODE::PLAYBACK; bw_strlcpy(replayData.filename, argv[++i], sizeof replayData.filename);} else if (strcmp(argv[i], "-map") == 0) {if (argc > i + 1) {game.setMapName(argv[++i]); requiredSection = SECTION_GAME;}} else if (strcmp(argv[i], "-listmaps") == 0) listMaps(); else if (strcmp(argv[i], "-credits") == 0) requiredSection = SECTION_CREDITS; @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) case REPLAY_MODE::RECORD: requiredSection = SECTION_GAME; - strlcpy(replayData.header.map, game.mapName, sizeof replayData.header.map); + bw_strlcpy(replayData.header.map, game.mapName, sizeof replayData.header.map); replayData.header.skill = game.skill = 3; replayData.setMode(REPLAY_MODE::RECORD); break; Index: blobwars-2.00/src/mapEditor.cpp =================================================================== --- blobwars-2.00.orig/src/mapEditor.cpp +++ blobwars-2.00/src/mapEditor.cpp @@ -284,7 +284,7 @@ void collectMapData() if (!strstr(string, " ENEMY \"")) { str = new String; - strlcpy(str->string, string, sizeof str->string); + bw_strlcpy(str->string, string, sizeof str->string); stringTail->next = str; stringTail = str; } Index: blobwars-2.00/src/mias.cpp =================================================================== --- blobwars-2.00.orig/src/mias.cpp +++ blobwars-2.00/src/mias.cpp @@ -23,20 +23,20 @@ Foundation, Inc., 59 Temple Place - Suit void initMIAPhrases() { - strlcpy(mia_scared[0], "help me...", sizeof mia_scared[0]); - strlcpy(mia_scared[1], "i don't wanna die...", sizeof mia_scared[1]); - strlcpy(mia_scared[2], "please... someone help...", sizeof mia_scared[2]); - strlcpy(mia_scared[3], "i... i'm scared...", sizeof mia_scared[3]); - strlcpy(mia_scared[4], "i wanna go home...", sizeof mia_scared[4]); - strlcpy(mia_scared[5], "what was that?!", sizeof mia_scared[5]); - strlcpy(mia_scared[6], "i don't like it here...", sizeof mia_scared[6]); + bw_strlcpy(mia_scared[0], "help me...", sizeof mia_scared[0]); + bw_strlcpy(mia_scared[1], "i don't wanna die...", sizeof mia_scared[1]); + bw_strlcpy(mia_scared[2], "please... someone help...", sizeof mia_scared[2]); + bw_strlcpy(mia_scared[3], "i... i'm scared...", sizeof mia_scared[3]); + bw_strlcpy(mia_scared[4], "i wanna go home...", sizeof mia_scared[4]); + bw_strlcpy(mia_scared[5], "what was that?!", sizeof mia_scared[5]); + bw_strlcpy(mia_scared[6], "i don't like it here...", sizeof mia_scared[6]); } void addMIA(const char *name, int x, int y, int type) { Entity *mia = new Entity(); - strlcpy(mia->name, name, sizeof mia->name); + bw_strlcpy(mia->name, name, sizeof mia->name); mia->id = type; mia->baseThink = 60; mia->health = 180; Index: blobwars-2.00/src/player.cpp =================================================================== --- blobwars-2.00.orig/src/player.cpp +++ blobwars-2.00/src/player.cpp @@ -67,7 +67,7 @@ void presentPlayerMedal(const char *tnam // Copy the input, so that threading // doesn't trip us up! char *data = new char[128]; - strlcpy(data, tname, 128); + bw_strlcpy(data, tname, 128); SDL_Thread *thread = SDL_CreateThread(medalWorker, "MedalWorker", (void*)data); Index: blobwars-2.00/src/switches.cpp =================================================================== --- blobwars-2.00.orig/src/switches.cpp +++ blobwars-2.00/src/switches.cpp @@ -66,11 +66,11 @@ void checkSwitchContact(Entity *ent) if (swt->type == SWT_PRESSURE) { - strlcpy(swt->requiredObjectName, "@none@", sizeof swt->requiredObjectName); + bw_strlcpy(swt->requiredObjectName, "@none@", sizeof swt->requiredObjectName); } checkObjectives(swt->name, true); - strlcpy(swt->name, "Switch", sizeof swt->name); + bw_strlcpy(swt->name, "Switch", sizeof swt->name); } else { Index: blobwars-2.00/src/tankBoss.cpp =================================================================== --- blobwars-2.00.orig/src/tankBoss.cpp +++ blobwars-2.00/src/tankBoss.cpp @@ -383,7 +383,7 @@ void tankBossMGInit() debug(("tankBossMGInit\n")); map.boss[0] = new Boss(); - strlcpy(map.boss[0]->name, "BioMech Tank V1.1", sizeof map.boss[0]->name); + bw_strlcpy(map.boss[0]->name, "BioMech Tank V1.1", sizeof map.boss[0]->name); map.boss[0]->health = 65 * game.skill; map.boss[0]->maxHealth = 65 * game.skill; map.boss[0]->setSprites(graphics.getSprite("BlobTankCannonRight", true), graphics.getSprite("BlobTankCannonLeft", true), graphics.getSprite("BlobTankCannonLeft", true)); @@ -605,7 +605,7 @@ void tankBossGLInit() debug(("tankBossGLInit\n")); map.boss[1] = new Boss(); - strlcpy(map.boss[1]->name, "BioMech Tank V2.6", sizeof map.boss[1]->name); + bw_strlcpy(map.boss[1]->name, "BioMech Tank V2.6", sizeof map.boss[1]->name); map.boss[1]->health = 65 * game.skill; map.boss[1]->maxHealth = 65 * game.skill; map.boss[1]->setSprites(graphics.getSprite("BlobTankGrenadeRight", true), graphics.getSprite("BlobTankGrenadeLeft", true), graphics.getSprite("BlobTankGrenadeLeft", true)); Index: blobwars-2.00/src/title.cpp =================================================================== --- blobwars-2.00.orig/src/title.cpp +++ blobwars-2.00/src/title.cpp @@ -119,7 +119,7 @@ void setupSaveWidgets() for (int i = 0 ; i < 5 ; i++) { snprintf(widgetName, sizeof widgetName, "save%d", i + 1); - strlcpy(engine.getWidgetByName(widgetName)->label, engine.saveSlot[i], sizeof engine.getWidgetByName(widgetName)->label); + bw_strlcpy(engine.getWidgetByName(widgetName)->label, engine.saveSlot[i], sizeof engine.getWidgetByName(widgetName)->label); if ((strstr(engine.saveSlot[i], _("Empty"))) || (strstr(engine.saveSlot[i], _("Corrupt")))) { @@ -127,7 +127,7 @@ void setupSaveWidgets() } snprintf(widgetName, sizeof widgetName, "slot%d", i + 1); - strlcpy(engine.getWidgetByName(widgetName)->label, engine.saveSlot[i], sizeof engine.getWidgetByName(widgetName)->label); + bw_strlcpy(engine.getWidgetByName(widgetName)->label, engine.saveSlot[i], sizeof engine.getWidgetByName(widgetName)->label); } } @@ -146,7 +146,7 @@ void loadTitleWidgets() setupSaveWidgets(); Widget *widget = engine.getWidgetByName("labelManual"); - strlcpy(widget->label, GAMEPLAYMANUAL, sizeof widget->label); + bw_strlcpy(widget->label, GAMEPLAYMANUAL, sizeof widget->label); showTitleWidgets(); } Index: blobwars-2.00/src/CCutscene.cpp =================================================================== --- blobwars-2.00.orig/src/CCutscene.cpp +++ blobwars-2.00/src/CCutscene.cpp @@ -30,6 +30,6 @@ Cutscene::Cutscene() void Cutscene::appendText(const char *line) { - strlcat(text, " ", sizeof text); - strlcat(text, line, sizeof text); + bw_strlcat(text, " ", sizeof text); + bw_strlcat(text, line, sizeof text); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor