From: Kenny G. <ken...@us...> - 2007-04-30 09:15:08
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7996/src/server Modified Files: adminmanager.cpp cachemanager.cpp client.cpp gem.cpp gmeventmanager.cpp guildmanager.cpp psserverchar.cpp questmanager.cpp serverstatus.cpp usermanager.cpp workmanager.cpp Log Message: - Change all %zu's to %lu's in my last commit - apparently MSVC does not comply to the C99 standard. I guess %zu works in CS calls but not printf. %lu seems to work on both MSVC and gcc. Index: adminmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/adminmanager.cpp,v retrieving revision 1.393 retrieving revision 1.394 diff -C2 -d -r1.393 -r1.394 *** adminmanager.cpp 17 Apr 2007 06:21:24 -0000 1.393 --- adminmanager.cpp 30 Apr 2007 09:14:32 -0000 1.394 *************** *** 3885,3889 **** } ! Debug4(LOG_ADMIN, me->clientnum, "Sending %d items from the %s category to client %s\n",items.GetSize(),msg.type.GetData(),client->GetName()); msg2.SendMessage(); --- 3885,3889 ---- } ! Debug4(LOG_ADMIN, me->clientnum, "Sending %lu items from the %s category to client %s\n", items.GetSize(), msg.type.GetData(), client->GetName()); msg2.SendMessage(); *************** *** 4046,4050 **** if (!item) { ! Error2("Cannot RemoveItemIndex on slot %u.\n",slot); psserver->SendSystemError(me->clientnum, "Cannot remove %s from %s's inventory.", msg.item.GetData(), source->GetActor()->GetName() ); --- 4046,4050 ---- if (!item) { ! Error2("Cannot RemoveItemIndex on slot %lu.\n", slot); psserver->SendSystemError(me->clientnum, "Cannot remove %s from %s's inventory.", msg.item.GetData(), source->GetActor()->GetName() ); Index: cachemanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/cachemanager.cpp,v retrieving revision 1.213 retrieving revision 1.214 diff -C2 -d -r1.213 -r1.214 *** cachemanager.cpp 30 Apr 2007 01:42:44 -0000 1.213 --- cachemanager.cpp 30 Apr 2007 09:14:32 -0000 1.214 *************** *** 329,333 **** } } ! Notify2( LOG_STARTUP, "%zu Skills Loaded", result.Count() ); return true; } --- 329,333 ---- } } ! Notify2( LOG_STARTUP, "%lu Skills Loaded", result.Count() ); return true; } *************** *** 352,356 **** limits.Push(limit); } ! Notify2( LOG_STARTUP, "%zu Limitations Loaded", result.Count() ); return true; } --- 352,356 ---- limits.Push(limit); } ! Notify2( LOG_STARTUP, "%lu Limitations Loaded", result.Count() ); return true; } *************** *** 412,416 **** msg_strings.Register(newsector->name,(csStringID)maxCommonStrID); } ! Notify2( LOG_STARTUP, "%zu Sectors Loaded", result.Count() ); return true; } --- 412,416 ---- msg_strings.Register(newsector->name,(csStringID)maxCommonStrID); } ! Notify2( LOG_STARTUP, "%lu Sectors Loaded", result.Count() ); return true; } *************** *** 543,547 **** msg_strings.Register(result[currentrow]["string"],(csStringID)result[currentrow].GetUInt32("id")); ! Notify2( LOG_STARTUP, "%zu Common Strings Loaded", msg_strings.GetSize() ); return true; } --- 543,547 ---- msg_strings.Register(result[currentrow]["string"],(csStringID)result[currentrow].GetUInt32("id")); ! Notify2( LOG_STARTUP, "%lu Common Strings Loaded", msg_strings.GetSize() ); return true; } *************** *** 585,589 **** } ! Notify2( LOG_STARTUP, "%zu Quests Loaded", result.Count() ); return true; } --- 585,589 ---- } ! Notify2( LOG_STARTUP, "%lu Quests Loaded", result.Count() ); return true; } *************** *** 728,732 **** } ! Notify2( LOG_STARTUP, "%zu Trade Combinations Loaded", result.Count() ); return true; } --- 728,732 ---- } ! Notify2( LOG_STARTUP, "%lu Trade Combinations Loaded", result.Count() ); return true; } *************** *** 810,814 **** } ! Notify2( LOG_STARTUP, "%zu Trade Processes Loaded", result.Count() ); return true; } --- 810,814 ---- } ! Notify2( LOG_STARTUP, "%lu Trade Processes Loaded", result.Count() ); return true; } *************** *** 864,868 **** } ! Notify2( LOG_STARTUP, "%zu Tips Loaded", result.Count() ); return true; } --- 864,868 ---- } ! Notify2( LOG_STARTUP, "%lu Tips Loaded", result.Count() ); return true; } *************** *** 1062,1066 **** ! Notify2( LOG_STARTUP, "%zu Traits Loaded", traitlist.GetSize() ); return true; } --- 1062,1066 ---- ! Notify2( LOG_STARTUP, "%lu Traits Loaded", traitlist.GetSize() ); return true; } *************** *** 1147,1151 **** } } ! Notify2( LOG_STARTUP, "%zu Races Loaded", result.Count() ); return true; } --- 1147,1151 ---- } } ! Notify2( LOG_STARTUP, "%lu Races Loaded", result.Count() ); return true; } *************** *** 1487,1491 **** } } ! Notify2( LOG_STARTUP, "%zu Item Categories Loaded", categories.Count() ); return true; } --- 1487,1491 ---- } } ! Notify2( LOG_STARTUP, "%lu Item Categories Loaded", categories.Count() ); return true; } *************** *** 1569,1573 **** } ! Notify2( LOG_STARTUP, "%zu Factions Loaded", result_factions.Count() ); return true; } --- 1569,1573 ---- } ! Notify2( LOG_STARTUP, "%lu Factions Loaded", result_factions.Count() ); return true; } *************** *** 1590,1594 **** } } ! Notify2( LOG_STARTUP, "%zu Spells Loaded", spells.Count() ); return true; } --- 1590,1594 ---- } } ! Notify2( LOG_STARTUP, "%lu Spells Loaded", spells.Count() ); return true; } *************** *** 1679,1683 **** if (!stats) { ! Error3("Error in LoadWorldItems! Item instance %zu could not load base stats %zu. Check the item_stats_id_standard value for this item. Skipping.\n", result[i].GetUInt32("id"), result[i].GetUInt32("item_stats_id_standard")); continue; --- 1679,1683 ---- if (!stats) { ! Error3("Error in LoadWorldItems! Item instance %lu could not load base stats %lu. Check the item_stats_id_standard value for this item. Skipping.\n", result[i].GetUInt32("id"), result[i].GetUInt32("item_stats_id_standard")); continue; *************** *** 1695,1699 **** if (!item->Load(result[i])) { ! Error2("Error in LoadWorldItems! Item instance %zu could not be loaded. Skipping.\n",result[i].GetUInt32("id")); delete item; continue; --- 1695,1699 ---- if (!item->Load(result[i])) { ! Error2("Error in LoadWorldItems! Item instance %lu could not be loaded. Skipping.\n",result[i].GetUInt32("id")); delete item; continue; *************** *** 1759,1763 **** } } ! Notify2( LOG_STARTUP, "%zu Item Stats Loaded", result.Count() ); return true; } --- 1759,1763 ---- } } ! Notify2( LOG_STARTUP, "%lu Item Stats Loaded", result.Count() ); return true; } Index: client.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/client.cpp,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** client.cpp 15 Apr 2007 06:07:13 -0000 1.132 --- client.cpp 30 Apr 2007 09:14:32 -0000 1.133 *************** *** 44,48 **** Client::Client () ! : accumulatedLag(0), ready(false),mute(false), accountID(0), playerID(0), securityLevel(0), superclient(false), lastResponse(-1), name(""), zombie(false), waypointEffectID(0) --- 44,48 ---- Client::Client () ! : accumulatedLag(0), zombie(false), ready(false), mute(false), accountID(0), playerID(0), securityLevel(0), superclient(false), lastResponse(-1), name(""), waypointEffectID(0) Index: gem.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/gem.cpp,v retrieving revision 1.441 retrieving revision 1.442 diff -C2 -d -r1.441 -r1.442 *** gem.cpp 30 Apr 2007 01:42:44 -0000 1.441 --- gem.cpp 30 Apr 2007 09:14:32 -0000 1.442 *************** *** 1047,1051 **** { csString status; ! status.Format("Warning: Spent %u time getting untouched objects in proxlist for %s, %zu nearby entities!", csGetTicks() - time, GetName(), count); psserver->GetLogCSV()->Write(CSV_STATUS, status); --- 1047,1051 ---- { csString status; ! status.Format("Warning: Spent %u time getting untouched objects in proxlist for %s, %lu nearby entities!", csGetTicks() - time, GetName(), count); psserver->GetLogCSV()->Write(CSV_STATUS, status); *************** *** 1070,1074 **** csString status; status.Format("Warning: Spent %u time touching entities in proxlist for %s," ! " counted %zu nearby entities, %zu untouched objects that it watches!", csGetTicks() - time, GetName(), count, debug_count); psserver->GetLogCSV()->Write(CSV_STATUS, status); --- 1070,1074 ---- csString status; status.Format("Warning: Spent %u time touching entities in proxlist for %s," ! " counted %lu nearby entities, %lu untouched objects that it watches!", csGetTicks() - time, GetName(), count, debug_count); psserver->GetLogCSV()->Write(CSV_STATUS, status); *************** *** 1919,1923 **** if (scripts.GetSize()) { ! Debug4(LOG_COMBAT,actor->GetPlayerID(),"-----InvokeScripts %zu %s %s",scripts.GetSize(), actor->GetName(), target->GetName()); for (scriptID=0; scriptID < scripts.GetSize(); scriptID++) { --- 1919,1923 ---- if (scripts.GetSize()) { ! Debug4(LOG_COMBAT,actor->GetPlayerID(),"-----InvokeScripts %lu %s %s",scripts.GetSize(), actor->GetName(), target->GetName()); for (scriptID=0; scriptID < scripts.GetSize(); scriptID++) { Index: gmeventmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/gmeventmanager.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** gmeventmanager.cpp 30 Apr 2007 01:42:44 -0000 1.12 --- gmeventmanager.cpp 30 Apr 2007 09:14:32 -0000 1.13 *************** *** 484,488 **** if (client->GetPlayerID() == theEvent->gmID) { ! eventDesc.AppendFmt(". Participants: %zu. Online: ", theEvent->playerID.GetSize()); csArray<int>::Iterator iter = theEvent->playerID.GetIterator(); while (iter.HasNext()) --- 484,488 ---- if (client->GetPlayerID() == theEvent->gmID) { ! eventDesc.AppendFmt(". Participants: %lu. Online: ", theEvent->playerID.GetSize()); csArray<int>::Iterator iter = theEvent->playerID.GetIterator(); while (iter.HasNext()) Index: guildmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/guildmanager.cpp,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -d -r1.151 -r1.152 *** guildmanager.cpp 30 Apr 2007 01:42:44 -0000 1.151 --- guildmanager.cpp 30 Apr 2007 09:14:32 -0000 1.152 *************** *** 986,990 **** { printf("*****************************************************************************\n" ! "Guild %s has %zu members and will be deleted in %d minutes.\n" "*****************************************************************************\n", (const char *)guild->name, guild->members.GetSize(), GUILD_KICK_GRACE ); --- 986,990 ---- { printf("*****************************************************************************\n" ! "Guild %s has %lu members and will be deleted in %d minutes.\n" "*****************************************************************************\n", (const char *)guild->name, guild->members.GetSize(), GUILD_KICK_GRACE ); Index: psserverchar.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/psserverchar.cpp,v retrieving revision 1.508 retrieving revision 1.509 diff -C2 -d -r1.508 -r1.509 *** psserverchar.cpp 30 Apr 2007 02:24:43 -0000 1.508 --- psserverchar.cpp 30 Apr 2007 09:14:32 -0000 1.509 *************** *** 521,525 **** (uint32_t)0, chardata->Inventory().MaxWeight() ); ! printf("Sending %zu items...\n", chardata->Inventory().GetInventoryIndexCount()-1); for (size_t i=1; i < chardata->Inventory().GetInventoryIndexCount(); i++) { --- 521,525 ---- (uint32_t)0, chardata->Inventory().MaxWeight() ); ! printf("Sending %lu items...\n", chardata->Inventory().GetInventoryIndexCount()-1); for (size_t i=1; i < chardata->Inventory().GetInventoryIndexCount(); i++) { Index: questmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/questmanager.cpp,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** questmanager.cpp 30 Apr 2007 01:42:45 -0000 1.118 --- questmanager.cpp 30 Apr 2007 09:14:32 -0000 1.119 *************** *** 666,682 **** if (item_name == "circle" || item_name == "circles") { ! itemlist.Format("<l money=\"%zu,0,0,0\">", count); } else if (item_name == "octa" || item_name == "octas") { ! itemlist.Format("<l money=\"0,%zu,0,0\">", count); } else if (item_name == "hexa" || item_name == "hexas") { ! itemlist.Format("<l money=\"0,0,%zu,0\">", count); } else if (item_name == "tria" || item_name == "trias") { ! itemlist.Format("<l money=\"0,0,0,%zu\">", count); } else --- 666,682 ---- if (item_name == "circle" || item_name == "circles") { ! itemlist.Format("<l money=\"%lu,0,0,0\">", count); } else if (item_name == "octa" || item_name == "octas") { ! itemlist.Format("<l money=\"0,%lu,0,0\">", count); } else if (item_name == "hexa" || item_name == "hexas") { ! itemlist.Format("<l money=\"0,0,%lu,0\">", count); } else if (item_name == "tria" || item_name == "trias") { ! itemlist.Format("<l money=\"0,0,0,%lu\">", count); } else *************** *** 685,691 **** itemlist = "<l money=\"0,0,0,0\">"; if (quality_string.Compare("")) ! itemlist.AppendFmt("<item n=\"%s\" c=\"%zu\" />",item_name.GetData(),count); else ! itemlist.AppendFmt("<item n=\"%s\" c=\"%zu\" q=\"%s\" />",item_name.GetData(),count, quality_string.GetData()); } } --- 685,691 ---- itemlist = "<l money=\"0,0,0,0\">"; if (quality_string.Compare("")) ! itemlist.AppendFmt("<item n=\"%s\" c=\"%lu\" />",item_name.GetData(),count); else ! itemlist.AppendFmt("<item n=\"%s\" c=\"%lu\" q=\"%s\" />",item_name.GetData(),count, quality_string.GetData()); } } Index: serverstatus.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/serverstatus.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** serverstatus.cpp 30 Apr 2007 01:42:45 -0000 1.34 --- serverstatus.cpp 30 Apr 2007 09:14:32 -0000 1.35 *************** *** 76,80 **** ClientConnectionSet * clients = EntityManager::GetSingleton().GetClients(); ! reportString.Format("<server_report time=\"%s\" now=\"%ld\" number=\"%u\" client_count=\"%zu\" mob_births=\"%u\" mob_deaths=\"%u\" player_deaths=\"%u\" sold_items=\"%u\" sold_value=\"%u\">\n", timeString.GetData(), now, ServerStatus::count, clients->Count(), ServerStatus::mob_birthcount, ServerStatus::mob_deathcount, ServerStatus::player_deathcount, ServerStatus::sold_items, ServerStatus::sold_value ); ClientIterator i(*clients); --- 76,80 ---- ClientConnectionSet * clients = EntityManager::GetSingleton().GetClients(); ! reportString.Format("<server_report time=\"%s\" now=\"%ld\" number=\"%u\" client_count=\"%lu\" mob_births=\"%u\" mob_deaths=\"%u\" player_deaths=\"%u\" sold_items=\"%u\" sold_value=\"%u\">\n", timeString.GetData(), now, ServerStatus::count, clients->Count(), ServerStatus::mob_birthcount, ServerStatus::mob_deathcount, ServerStatus::player_deathcount, ServerStatus::sold_items, ServerStatus::sold_value ); ClientIterator i(*clients); Index: usermanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/usermanager.cpp,v retrieving revision 1.304 retrieving revision 1.305 diff -C2 -d -r1.304 -r1.305 *** usermanager.cpp 17 Apr 2007 06:21:25 -0000 1.304 --- usermanager.cpp 30 Apr 2007 09:14:32 -0000 1.305 *************** *** 1032,1036 **** // Could be about to overflow by now, so check. ! temp.Format("%u shown from %u players online\n", count, clients->Count()); if (temp.Length() + message.Length() > 1000) { --- 1032,1036 ---- // Could be about to overflow by now, so check. ! temp.Format("%u shown from %lu players online\n", count, clients->Count()); if (temp.Length() + message.Length() > 1000) { *************** *** 1595,1599 **** if (count) { ! Debug3(LOG_LOOT, client->GetClientNum(),"Sending %u loot items to %s.\n",count,client->GetActor()->GetName() ); loot.SendMessage(); } --- 1595,1599 ---- if (count) { ! Debug3(LOG_LOOT, client->GetClientNum(), "Sending %lu loot items to %s.\n", count, client->GetActor()->GetName()); loot.SendMessage(); } *************** *** 1659,1663 **** if (count) { ! Debug3(LOG_QUESTS, client->GetClientNum(),"Sending %u quests to player %s.\n",count,client->GetName() ); quests.SendMessage(); } --- 1659,1663 ---- if (count) { ! Debug3(LOG_QUESTS, client->GetClientNum(), "Sending %lu quests to player %s.\n", count, client->GetName()); quests.SendMessage(); } *************** *** 1677,1681 **** { Debug3(LOG_QUESTS, client->GetClientNum(), ! "Sending %u events to player %s.\n", count, client->GetName() ); gmEvents.SendMessage(); --- 1677,1681 ---- { Debug3(LOG_QUESTS, client->GetClientNum(), ! "Sending %lu events to player %s.\n", count, client->GetName() ); gmEvents.SendMessage(); Index: workmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/workmanager.cpp,v retrieving revision 1.242 retrieving revision 1.243 diff -C2 -d -r1.242 -r1.243 *** workmanager.cpp 30 Apr 2007 01:42:45 -0000 1.242 --- workmanager.cpp 30 Apr 2007 09:14:32 -0000 1.243 *************** *** 1696,1700 **** // Go thru all the trasnformations and check if one is possible ! Debug2( LOG_TRADE, 0,"Found %zu transformations\n", transArray->GetSize() ); psItemStats* workStats = workItem->GetCurrentStats(); psTradeTransformations* transCandidate; --- 1696,1700 ---- // Go thru all the trasnformations and check if one is possible ! Debug2( LOG_TRADE, 0,"Found %lu transformations\n", transArray->GetSize() ); psItemStats* workStats = workItem->GetCurrentStats(); psTradeTransformations* transCandidate; |