UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
shared.h File Reference
#include <errno.h>
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <limits.h>
#include <stddef.h>
#include "ufotypes.h"
#include <algorithm>
#include "sharedptr.h"
#include "autoptr.h"
#include "cxx.h"

Go to the source code of this file.

Macros

#define MAX_VAR   64
 
#define __attribute__(x)   /*NOTHING*/
 
#define UFO_DEPRECATED
 
#define EXPORT
 
#define IMPORT
 
#define inline
 
#define STRINGIFY(x)   #x
 
#define DOUBLEQUOTE(x)   STRINGIFY(x)
 
#define lengthof(x)   (sizeof(x) / sizeof(*(x)))
 
#define endof(x)   ((x) + lengthof((x)))
 
#define CASSERT(x)   extern int ASSERT_COMPILE[((x) != 0) * 2 - 1]
 
#define Q_strcasecmp(a, b)   strcasecmp((a), (b))
 
#define Q_strncasecmp(s1, s2, n)   strncasecmp((s1), (s2), (n))
 
#define Q_strcaseeq(a, b)   (Q_strcasecmp(a, b) == 0)
 
#define Q_streq(a, b)   (strcmp(a, b) == 0)
 
#define Q_strneq(a, b, n)   (strncmp(a, b, n) == 0)
 
#define Q_strvalid(string)   !Q_strnull(string)
 
#define OBJSET(obj, val)   (memset(&(obj), (val), sizeof(obj)))
 
#define OBJZERO(obj)   OBJSET((obj), 0)
 

Functions

const char * Com_SkipPath (const char *pathname)
 Returns just the filename from a given path. More...
 
void Com_ReplaceFilename (const char *fileName, const char *name, char *path, size_t size)
 Replaces the filename from one path with another one. More...
 
void Com_StripExtension (const char *in, char *out, size_t size)
 Removes the file extension from a filename. More...
 
void Com_FilePath (const char *in, char *out, size_t size)
 Returns the path up to, but not including the last /. More...
 
const char * Com_GetExtension (const char *path)
 
void Com_DefaultExtension (char *path, size_t len, const char *extension)
 Sets a default extension if there is none. More...
 
int Com_Filter (const char *pattern, const char *text)
 Match the pattern PATTERN against the string TEXT;. More...
 
char * Com_Trim (char *s)
 Removed leading and trailing whitespaces. More...
 
char * Com_ConvertToASCII7 (char *s)
 Remove high character values and only keep ascii. This can be used to print utf-8 characters to the console. It will replace every high character value with a simple dot. More...
 
char * Com_Chop (char *s)
 Removed trailing whitespaces. More...
 
bool Com_IsValidName (const char *input)
 Checks whether the given input string is allowed to be used as a user-given name string for aircraft, soldiers, bases and so on. More...
 
const char * va (const char *format,...) __attribute__((format(__printf__
 
const char int Q_FloatSort (const void *float1, const void *float2)
 Compare two floats. More...
 
int Q_StringSort (const void *string1, const void *string2) __attribute__((nonnull))
 Compare two strings. More...
 
unsigned int Com_HashKey (const char *name, int hashsize)
 returns hash key for a string More...
 
void Com_MakeTimestamp (char *ts, const size_t tslen)
 Creates a timestamp with date and time at the specified location. More...
 
bool Com_sprintf (char *dest, size_t size, const char *fmt,...) __attribute__((format(__printf__
 
bool Q_strnull (const char *string)
 
void Q_strncpyz (char *dest, const char *src, size_t destsize) __attribute__((nonnull))
 Safe strncpy that ensures a trailing zero. More...
 
int Q_vsnprintf (char *str, size_t size, const char *format, va_list ap)
 Safe (null terminating) vsnprintf implementation. More...
 
void Q_strcat (char *dest, size_t destsize, const char *src,...) __attribute__((nonnull
 
void format (__printf__, 3, 4)))
 
char * Q_strlwr (char *str) __attribute__((nonnull))
 Converts a string to lowercase. More...
 
const char * Q_stristr (const char *str, const char *substr) __attribute__((nonnull))
 Checks in case insensitive manner whether str contains substr. More...
 
bool Q_strreplace (const char *source, const char *pattern, const char *replace, char *dest, size_t destsize)
 Replaces the first occurence of the given pattern in the source string with the given replace string. More...
 
char const * Q_strstart (char const *str, char const *start) __attribute__((nonnull))
 Matches the start of a string. More...
 
void Com_Printf (const char *fmt,...) __attribute__((format(__printf__
 
void void Com_DPrintf (int level, const char *msg,...) __attribute__((format(__printf__
 
void void void Com_Error (int code, const char *fmt,...) __attribute__((noreturn
 
void void void format (__printf__, 2, 3)))
 
void UFO_assert (bool condition, const char *fmt,...) __attribute__((format(__printf__
 

Macro Definition Documentation

#define __attribute__ (   x)    /*NOTHING*/

Definition at line 58 of file shared.h.

#define CASSERT (   x)    extern int ASSERT_COMPILE[((x) != 0) * 2 - 1]

Definition at line 107 of file shared.h.

#define endof (   x)    ((x) + lengthof((x)))

Definition at line 106 of file shared.h.

Referenced by TEST_F().

#define EXPORT

Definition at line 74 of file shared.h.

#define IMPORT

Definition at line 75 of file shared.h.

#define inline

Definition at line 85 of file shared.h.

#define lengthof (   x)    (sizeof(x) / sizeof(*(x)))

returns the amount of elements - not the amount of bytes

Definition at line 105 of file shared.h.

Referenced by AII_UpdateOneInstallationDelay(), AIR_Move(), AIR_NewAircraft(), AIR_Refuel(), B_SellOrAddItems(), B_SetBaseTitle_f(), B_UpdateBuildingConstructions(), BDEF_AddSlotToSlotList(), CHRSH_ApplyImplant(), CHRSH_UpdateImplants(), CL_ActorAddToTeamList(), CL_ActorDie(), CL_ActorRevitalised(), CL_ActorWound(), CL_AllocateActorSkin(), CL_ParticleRunTimed(), CL_ParticleSpawnTimed(), Com_BreakIntoDebugger(), Com_ParseMapDefinition(), Con_Clear(), Con_DrawInput(), Con_DrawString(), Con_Init(), CP_DateConvertLong(), CP_TEAM_FillEmployeeList_f(), InventoryInterface::EquipActorNormal(), G_ClientMove(), G_TouchEdicts(), G_TouchSolids(), G_TouchTriggers(), G_UpdateCharacterBodycount(), GAME_GetCharacter(), GAME_GetCharacterArraySize(), GAME_GetCharacterByUCN(), GAME_InitializeBattlescape(), GAME_MP_RunFrame(), GAME_SaveCharacter(), GAME_Shutdown(), GEO_Draw(), HOS_EntryWoundData(), HUD_ActorSelectionChangeListener(), HUD_ActorWoundData_f(), HUD_MapDebugCursor(), HUD_PopupFiremodeReservation(), HUD_UpdateActorFireMode(), HUD_UpdateActorMove(), IN_JoystickMove(), INS_UpdateInstallationData(), Irc_AppendToBuffer(), LE_GetClipModel(), LE_GetDrawModel(), NET_ReadDir(), NET_WriteDir(), R_CheckExtension(), R_CreateFramebuffer(), R_CullBox(), R_CullMeshModel(), R_CullSphere(), R_DrawBoundingBoxBatched(), R_DrawChar(), R_DrawCircle(), R_DrawFill(), R_DumpOpenGlState(), R_FillArrayData(), R_GetProcAddressExt(), R_InitConvolveProgram(), R_ModAllocateActorSkin(), R_ModReloadSurfacesArrays(), R_StageColor(), R_TextureAlphaMode(), R_TextureMode(), R_TextureSolidMode(), RS_GetTechForItem(), RS_GetTechForTeam(), RunImplant(), SV_CreateWorldSector(), SV_GetServerDataForEdict(), SV_ParseAssemblySeeds(), SV_QueueEvent(), Sys_Access(), Sys_Cwd(), Sys_FindFirst(), Sys_Fopen(), Sys_GetCurrentUser(), Sys_ListFilteredFiles(), Sys_Mkdir(), Sys_Remove(), Sys_Rename(), Sys_TTYConsoleHistoryAdd(), Sys_TTYConsoleHistoryPrevious(), TEST_F(), UI_CheckActionTokenTypeSanity(), UI_ContainerNodeAutoPlaceItem(), UI_ContainerNodeUpdateEquipment(), UI_GetActionTokenType(), UR_DialogStartStore_f(), VID_GetModeNums(), and WEB_CGameGetURL().

#define MAX_VAR   64

Definition at line 36 of file shared.h.

Referenced by actorL_tostring(), AIL_InitActor(), AIR_AircraftFillList_f(), B_LoadXML(), B_SetBaseTitle_f(), BDEF_BaseDefenceMenuUpdate_f(), BDEF_RemoveBattery_f(), CHRSH_CharGetBody(), CHRSH_CharGetHead(), CL_DisplayHomebasePopup(), CL_DownloadUMPMap(), CL_EventAddMail(), CL_LanguageInit(), CL_ParseMapParticle(), CL_ParsePtlCmds(), CL_ParticleAppear(), CL_ParticleSpawnEvent(), CM_LoadMap(), Cmd_GetCommandDesc(), Com_ParseGameTypes(), Com_ParseTerrainDefinition(), Com_ParseValue(), Com_SetValue(), Com_ValueToStr(), CP_CheckTriggerEvent(), CP_TEAM_FillEmployeeList_f(), uiModelNode::draw(), uiTextEntryNode::draw(), uiText2Node::drawText(), uiTextNode::drawText(), uiBaseInventoryNode::drawTooltip(), uiContainerNode::drawTooltip(), E_CreateEmployee(), E_GetCounts_f(), ED_ParseEdict(), FS_NextScriptHeader(), GAME_MP_Connect_f(), GAME_MP_QueryMasterServerThread(), GAME_MP_ServerListDiscoveryCallback(), GAME_MP_SetTeamNum(), GAME_SK_ChangeEquip_f(), HOS_EntryWoundData(), HTTP_ResolvURL(), HUD_DisplayFiremodeEntry(), HUD_PopupFiremodeReservation(), HUD_UpdateActorLoad_f(), INS_DestroyInstallation_f(), INV_UpdateActorLoad_f(), Irc_Client_CmdJoin(), Irc_Client_CmdKick(), Irc_Client_CmdKill(), Irc_Client_CmdMode(), Irc_Client_CmdNick(), Irc_Client_CmdPart(), Irc_Client_CmdPrivmsg(), Irc_Client_CmdQuit(), Irc_Client_CmdRplNamreply(), Irc_Client_Names_f(), Irc_Logic_AddChannelName(), LE_GetAnim(), MS_LoadXML(), NAT_DrawCharts_f(), NAT_ListStats_f(), pos3L_tostring(), R_ModBeginLoading(), Rimp_Init(), S_Init(), SAV_GameSave_f(), STAT_GetExpenses_f(), SV_Map(), SV_ParseMapcycle(), SVC_Info(), Sys_Fopen(), Sys_GetCurrentUser(), TEST_F(), Touch_NextMapTrigger(), TR_Add_f(), UFO_CampaignCheckEvents(), UI_AddLineChartCoord(), UI_AddLineChartLine(), UI_BuildRadarImageList(), UI_DrawModelNode(), UI_MaterialEditorUpdate(), UI_ParseProperty(), UI_ReadNodePath(), UI_ShowChartDots(), UI_ShowChartLine(), UI_Tooltip(), UP_SetMailHeader(), WEB_Auth(), WEB_CGameDelete(), WEB_CGameGetURL(), WEB_GetToFile(), and WEB_ListCGameFilesCallback().

#define OBJSET (   obj,
  val 
)    (memset(&(obj), (val), sizeof(obj)))

Definition at line 177 of file shared.h.

Referenced by Grid_CalcPathing(), Grid_FindPath(), MSO_InitCallbacks(), and SV_RmaPrintMap().

#define OBJZERO (   obj)    OBJSET((obj), 0)

Definition at line 178 of file shared.h.

Referenced by AB_BuildBase(), AII_InitialiseSlot(), AIR_ParseAircraft(), AM_ClearBattle(), AM_Go(), ASE_FreeGeomObject(), ASE_Load(), B_AddBlockedTile(), B_Destroy(), B_IsBuildingDestroyable(), B_ListBuildings_f(), B_ParseBaseTemplate(), B_ParseBuildings(), BuildFacelights(), BuildPatches(), CHAR_ParseData(), CheckNodraws(), chrScoreGlobal_s::chrScoreGlobal_s(), CHRSH_ApplyImplant(), CIN_InitCinematic(), CIN_OGM_LoadAudioFrame(), CIN_ROQ_OpenCinematic(), CITY_Parse(), CL_AddUGV(), CL_AllocateActorSkin(), CL_ClearState(), CL_EntPerish(), CL_Init(), CL_LanguageShutdown(), CL_ParseCampaignEvents(), CL_ParseEvent(), CL_ParseEventMails(), CL_ParseMessageID(), CL_ParseMessageIDs(), CL_ParseNations(), CL_ParseParticle(), CL_ParsePtlCmds(), CL_ParseRanks(), CL_ParseResults(), CL_ParseSequence(), CL_ParticleSpawn(), CL_PopupInit(), CL_SpawnParseEntitystring(), CL_StartGame(), uiWindowNode::clone(), CM_AddMapTile(), CM_LoadMap(), Cmd_Shutdown(), Com_BreakIntoDebugger(), Com_MacroExpandString(), Com_ParseActorNames(), Com_ParseBodyPart(), Com_ParseCharacterTemplate(), Com_ParseEquipment(), Com_ParseGameTypes(), Com_ParseImplant(), Com_ParseInventory(), Com_ParseItem(), Com_ParseMapDefinition(), Com_ParseScripts(), Com_ParseTeam(), Com_ParseUGVs(), Com_Shutdown(), COMP_ParseComponents(), Con_Init(), CP_BaseAttackPrepareBattle(), CP_CreateNewMission(), CP_ParseCampaign(), CP_ParseEventTrigger(), CP_ResetCampaignData(), CP_StartSelectedMission(), CP_UpdateNationXVIInfection(), Cvar_Shutdown(), InventoryInterface::destroyInventoryInterface(), uiImageNode::draw(), E_LoadXML(), ED_AllocEntityDef(), ED_AllocRange(), ED_Parse(), ED_ParseEdict(), ED_ParseEntities(), EmitBrushes(), entity_s::entity_s(), FixTjuncs(), FS_CreateOpenPipeFile(), FS_ListFiles(), G_ClientConnect(), G_ResetClientData(), G_SpawnEntities(), GAME_LoadItem(), GAME_LoadTeamInfo(), GAME_MP_AddServerToList(), GAME_MP_ParseTeamInfoMessage(), GAME_MP_PingServers_f(), GAME_MP_Shutdown(), GAME_ParseModes(), GAME_SaveTeam(), GAME_Shutdown(), GAME_UpdateActiveTeamList(), GetCGameAPI(), HTTP_GetToFile(), HTTP_GetURL(), HUD_InitUI(), HUD_RemainingTUs_f(), IN_JoystickMove(), IN_StartupJoystick(), trace_s::init(), chrScoreMission_s::init(), Edict::init(), le_s::init(), Routing::init(), character_s::init(), Inventory::init(), InventoryInterface::initInventory(), INS_Build(), INS_LoadXML(), INS_ParseInstallations(), Irc_Client_CmdPrivmsg(), Irc_Proto_Join(), Key_Init(), LM_AddModel(), LoadBSPFile(), LoadMapFile(), main(), MakeHeadnodePortals(), MD2SkinFix(), MD5Final(), mdfour_tail(), MIS_LoadXML(), MSO_ParseCategory(), MSO_ParseMessageSettings(), NET_Connect(), NET_DatagramSocketNew(), NET_GetAddrinfoForNode(), uiGeoscapeNode::onLoading(), ParseBrush(), ParseMapEntity(), PR_ClearSelectedItems(), PR_QueueNew(), ProcessLevel(), PTL_InitStartup(), Qcommon_Init(), R_ClearGrass(), R_CreateFramebuffer(), R_DeleteImage(), R_Draw2DMapMarkers(), R_Draw3DMapMarkers(), R_DrawParticleModel(), R_FontAnalyze(), R_FontCleanCache(), R_FontInit(), R_FontShutdown(), R_Init(), R_InitFBObjects(), R_InitMiscTexture(), R_InitPrograms(), R_LoadImageData(), R_LoadModel(), R_LoadObjModel(), R_LoadObjModelFace(), R_LoadShader(), R_ModAddMapTile(), R_ShutdownFBObjects(), R_ShutdownImages(), R_ShutdownModels(), R_ShutdownProgram(), R_ShutdownShader(), R_UpdateLightList(), R_WriteCompressedTGA(), RADAR_InitialiseUFOs(), ReactionFireTargetList::ReactionFireTargetList(), AiAction::reset(), Rimp_Init(), RotatePointAroundVector(), RS_ParseTechnologies(), RS_ResetTechs(), S_FreeChannel(), S_FreeSamples(), S_Init(), S_Stop(), SAV_GameSave(), SAV_Init(), SEQ_ExecuteModel(), SEQ_ExecuteObj2D(), SEQ_InitContext(), SEQ_Shutdown(), GameTest::SetUp(), ParticleTest::SetUpTestCase(), ScriptTest::SetUpTestCase(), FootStepTest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), MapDefTest::SetUpTestCase(), CampaignTest::SetUpTestCase(), shot_mock_s::shot_mock_s(), STATS_Update_f(), StringToFilter(), SV_Init(), SV_LoadModelAABB(), SV_ParseAssembly(), SV_ParseMapTile(), SV_ParseMapTileSet(), SV_PrepareTilesToPlace(), SV_Shutdown(), SV_Trace(), SVC_BucketForAddress(), SVC_DirectConnect(), Sys_TTYConsoleHistoryClear(), SZ_Init(), TEST_F(), TEST_Init(), TexinfoForBrushTexture(), TR_DestinationCapacityList_f(), TR_LoadXML(), TR_TransferStart(), TUT_ParseTutorials(), UI_AllocStaticKeyBinding(), UI_AllocStaticSprite(), UI_ContainerNodeDrawFreeSpace(), UI_DrawItem(), UI_DrawModelNode(), UI_ExecuteConFuncActions(), UI_ExecuteEventActions(), UI_ExecuteEventActionsEx(), UI_FreeRadarImages(), UI_Init(), UI_InitNodes(), UI_InitOptionIteratorAtIndex(), UI_ParseFont(), UI_ParseUIModel(), UI_ReleaseVariable(), UI_ResetTimers(), UI_Shutdown(), UP_ParseChapter(), WEB_ListCGameFilesCallback(), woundInfo_s::woundInfo_s(), and WriteBSPFile().

#define Q_strcaseeq (   a,
 
)    (Q_strcasecmp(a, b) == 0)

Definition at line 135 of file shared.h.

Referenced by MSO_ParseOptionType().

#define Q_streq (   a,
 
)    (strcmp(a, b) == 0)

Definition at line 136 of file shared.h.

Referenced by AC_KillOne_f(), AI_SearchGrenade(), AIL_reactionfire(), AIL_reload(), AIM_AircraftEquipSlotSelect_f(), AIM_AircraftItemtypeByName_f(), AIR_GetAircraftSilent(), AIR_ParseAircraft(), ASE_KeyGEOMOBJECT(), ASE_KeyMAP_DIFFUSE(), ASE_KeyMATERIAL(), ASE_KeyMATERIAL_LIST(), ASE_KeyMESH(), ASE_KeyMESH_FACE_LIST(), ASE_KeyMESH_TVERTLIST(), ASE_KeyMESH_VERTEX_LIST(), ASE_KeyTFACE_LIST(), ASE_ParseBracedBlock(), ASE_Process(), ASE_SkipEnclosingBraces(), B_BuildingDestroy_f(), B_GetBaseTemplate(), B_GetBuildingTemplateSilent(), B_GetBuildingTypeByBuildingID(), B_ItemIsStoredInBaseStorage(), B_ParseBaseTemplate(), B_ParseBuildings(), B_SetBaseTitle_f(), BDEF_AddBattery_f(), BDEF_BaseDefenceMenuUpdate_f(), BDEF_GetItemTypeFromID(), BDEF_RemoveBattery_f(), BDEF_UpdateActiveBattery_f(), BuildLights(), CalcTextureReflectivity(), Cbuf_AddEarlyCommands(), Check_EntityWithBrushes(), Check_ExtraBrushesForWorldspawn(), Check_IsOptimisable(), Check_Stats(), Check_SurfProp(), Check_SurfProps(), Check_TargetExists(), CheckEntities(), CheckMixedFaceContents(), CheckTexturesBasedOnFlags(), CHRSH_GetTemplateByID(), CITY_GetById(), CL_CanMultiplayerStart(), CL_CheckAndQueueDownload(), CL_CheckOrDownloadFile(), CL_ConnectionlessPacket(), CL_FindSequenceCommand(), CL_FinishHTTPDownload(), CL_GetEventMail(), CL_GetLocaleID(), CL_GetMessageID(), CL_GetRankIdx(), CL_LanguageInitMenu(), CL_LanguageTest(), CL_LanguageTryToSet(), CL_ParseActorSkin(), CL_ParseClientData(), CL_ParseLanguages(), CL_ParseMapParticle(), CL_ParseMessageID(), CL_ParseMessageIDs(), CL_ParseNations(), CL_ParseParticle(), CL_ParsePtlCmds(), CL_ParseRanks(), CL_ParseSequence(), CL_ParticleGet(), CL_ParticleGetArt(), CL_QueueHTTPDownload(), CL_SetRatioFilter_f(), CL_SpawnCall(), CL_SpawnParseEntitystring(), CL_StartHTTPDownload(), Cmd_Alias_f(), Cmd_RemoveCommand(), Cmd_TableCheck(), Cmd_TableFind(), CMod_LoadEntityString(), Com_DeveloperSet_f(), Com_FindNameType(), Com_GetAircraftIdNum(), Com_GetBodyTemplateByID(), Com_GetCharacterTemplateByID(), Com_GetConstInt(), Com_GetCrashedAircraftIdNum(), Com_GetMapDefinitionByID(), Com_GetNameListByID(), Com_GetRandomMapAssemblyNameForCrashedCraft(), Com_GetTeamDefinitionByID(), Com_GetTerrainType(), Com_GetUGVByIDSilent(), Com_IsValidName(), Com_ParseActorNames(), Com_ParseActorSounds(), Com_ParseAircraftNames(), Com_ParseArmourOrResistance(), Com_ParseBlockToken(), Com_ParseBodyPart(), Com_ParseBodyTemplate(), Com_ParseCharacterTemplate(), Com_ParseDamageTypes(), Com_ParseEquipment(), Com_ParseFire(), Com_ParseFireDefinition(), Com_ParseGameTypes(), Com_ParseImplant(), Com_ParseInventory(), Com_ParseItem(), Com_ParseItemEffect(), Com_ParseMapDefinition(), Com_ParseScripts(), Com_ParseTeam(), Com_ParseUGVs(), Com_ParseValue(), Com_ParseVersion(), Com_RegisterConstInt(), Com_SetGameType(), Com_SetValue(), Com_UnregisterConstVariable(), COMP_GetComponentsByID(), COMP_ParseComponents(), CompareAttributes(), CP_CheckTriggerEvent(), CP_CreateBattleParameters(), CP_GetAlienMissionTypeByID(), CP_GetCampaign(), CP_GetEventsByID(), CP_GetMissionByIDSilent(), CP_OnGeoscape(), CP_ParseAlienTeam(), CP_ParseCampaign(), CP_ParseResearchableCampaignStates(), CP_ParseResearchedCampaignItems(), CP_ParseScriptCampaignRelated(), CP_ParseScriptFirst(), CP_ParseScriptSecond(), CP_TriggerEventLoadXML(), Cvar_FindVar(), Cvar_FixCheatVars(), Cvar_Set2(), uiOptionTreeNode::draw(), uiSelectBoxNode::draw(), uiOptionListNode::draw(), uiTabNode::draw(), E_GetEmployeeType(), ED_Block2Constant(), ED_CallSpawn(), ED_FindKeyDefInArray(), ED_GetEntityDef(), ED_GetKeyDefEntity(), ED_ParseEntities(), ED_ParseType(), ED_ProcessRanges(), ED_Type2Constant(), EntityForModel(), EpairCheckForDuplicate(), FaceFromPortal(), TerrainDefs::findByName(), FindMiptex(), FindTargetEntity(), FS_AddGameDirectory(), FS_BuildFileList(), FS_GetFileData(), FS_LoadPackFile(), FS_NextPath(), FS_NextScriptHeader(), G_ClientConnect(), G_EdictsFindTargetEntity(), G_FindEdictGroups(), G_GetEquipDefByID(), G_InventoryRemoveItemByID(), G_MissionThink(), G_MissionTouch(), GAME_ChangeEquip(), GAME_CP_CampaignDescription_f(), GAME_LoadCharacter(), GAME_LoadItem(), GAME_MP_AddServerToList(), GAME_MP_HandleServerCommand(), GAME_MP_PingServers_f(), GAME_MP_ProcessPingReply(), GAME_MP_RconCallback(), GAME_MP_ServerInfoCallback(), GAME_MP_TeamNum_f(), GAME_ParseModes(), GAME_SetMode_f(), GAME_SK_ChangeEquip_f(), GEO_CenterOnPoint_f(), GEO_SelectObject_f(), GEO_SetOverlay(), GEO_SetOverlay_f(), GetToken(), HTTP_ExtractComponents(), HUD_CheckCLHud(), HUD_ExecuteAction_f(), HUD_LeftHandChangeListener(), HUD_RemainingTUs_f(), HUD_RightHandChangeListener(), HUD_TUChangeListener(), Info_BoolForKey(), INS_GetInstallationTemplateByID(), INS_GetType(), INS_ParseInstallations(), INV_GetEquipmentDefinitionByID(), INV_GetFilterTypeID(), INV_ItemMatchesFilter(), INVSH_GetImplantByIDSilent(), INVSH_GetInventoryDefinitionByID(), INVSH_GetItemByIDSilent(), Irc_AppendToBuffer(), Irc_Client_CmdKick(), Irc_Client_CmdNick(), Irc_Client_CmdPrivmsg(), Irc_GetExternalIP(), objDef_s::isAmmo(), objDef_s::isArmour(), IsInlineModelEntity(), IsInvalidEntityToken(), Key_Bind_f(), Key_GetBinding(), Key_Unbind_f(), Key_Unbindall_f(), LE_GetAnim(), LIST_ContainsString(), LM_GetByID(), M_Change_f(), M_ParseMusic(), M_Start(), Mem_FindPool(), MSO_LoadXML(), MSO_ParseCategory(), MSO_ParseMessageSettings(), MSO_ParseNotifyType(), MSO_ParseOption(), MSO_Set_f(), MSO_Toggle_f(), mxml_ufo_type_cb(), NAT_DrawCharts_f(), NAT_GetNationByID(), NAT_ListStats_f(), ParseMapEntity(), ParseUMP(), PR_FinishDisassembly(), R_AnimGet(), R_ConstByName(), R_DeleteImage(), R_GetFont(), R_GetImage(), R_GetModel(), R_GetTagIndexByName(), R_LoadMaterials(), R_LoadObjSkin(), R_LoadProgram(), R_ParseStage(), R_ProgramVariable(), Rcon_Validate(), RS_InitTree(), RS_ParseTechnologies(), RS_RequirementsMet(), S_FindByName(), SEQ_ExecuteCamera(), SEQ_ExecuteModel(), SEQ_ExecuteObj2D(), SEQ_ExecutePrecache(), SEQ_Find2D(), SEQ_FindEnt(), SEQ_InitContext(), SetImpliedFlags(), SetKeyValue(), skipTest(), SL_Parameter(), SP_trigger_nextmap(), SV_AssembleMap_(), SV_ConnectionlessPacket(), SV_ExecuteUserCommand(), SV_FindIndex(), SV_GetMapTile(), SV_GetMapTileSet(), SV_GetPlayerClientStructure(), SV_LoadModelAABB(), SV_Map_f(), SV_MapcycleAdd_f(), SV_NextMapcycle(), SV_ParseAssembly(), SV_ParseMapcycle(), SV_ParseUMP(), SV_PrintAssemblyStats(), SVC_BucketForAddress(), Sys_FindFirst(), Sys_FindNext(), Sys_IsATTY(), TEST_BEP(), TEST_F(), Test_Parameters(), TEST_RegisterProperty(), GameTest::testCountSpawnpointsForMap(), GameTest::testCountSpawnpointsForMapInMultiplayerMode(), GameTest::testCountSpawnpointsForMapWithAssembly(), GameTest::testCountSpawnpointsForMapWithAssemblyAndAircraft(), GameTest::testCountSpawnpointsForMapWithAssemblyAndAircraftAndUfo(), GameTest::testCountSpawnpointsGetNum2x2ValueForAircraft(), GameTest::testCountSpawnpointsGetNumteamValueForAircraft(), GameTest::testCountSpawnpointsGetNumteamValueForUFO(), TexinfoForBrushTexture(), TR_Add_f(), TR_GetTransferType(), U2M_Parameter(), UI_AddLineChartLine(), UI_CloseWindowByRef(), UI_CreateWindow(), UI_DrawModelNode(), UI_DrawModelNodeWithUIModel(), UI_FindOptionByValue(), UI_GenInjectedString(), UI_GetBooleanFromExpression(), UI_GetDataIDByName(), UI_GetFontByID(), UI_GetNode(), UI_GetSpriteByName(), UI_GetUIModel(), UI_GetWindowPositionFromStackByName(), UI_InitializeNodeBehaviour(), UI_MessageDraw(), UI_NodeInstanceOf(), UI_ParseCallAction(), UI_ParseComponent(), UI_ParseExcludeRect(), UI_ParseExpression(), UI_ParseFont(), UI_ParseSetAction(), UI_ParseUIModel(), UI_ParseValueExpression(), UI_ParseWindow(), UI_PushDropDownWindow_f(), UI_RadioButtonNodeIsSelected(), UI_ReadNodePath(), UI_Restart_f(), UI_SelectMap_f(), UI_TokenIsReserved(), UI_TokenIsValue(), UI_WindowNodeAddIndexedNode(), UI_WindowNodeGetIndexedChild(), UM_Parameter(), UP_Article(), UP_ParseChapter(), US_SelectStoredUfo_f(), ValueForKey(), WEB_AuthResponse(), WEB_ListCGameFilesCallback(), and XML_GetBool().

#define Q_strncasecmp (   s1,
  s2,
 
)    strncasecmp((s1), (s2), (n))
#define Q_strneq (   a,
  b,
 
)    (strncmp(a, b, n) == 0)
#define STRINGIFY (   x)    #x

Definition at line 89 of file shared.h.

#define UFO_DEPRECATED

Definition at line 64 of file shared.h.

Function Documentation

char* Com_Chop ( char *  s)

Removed trailing whitespaces.

Parameters
sThe string that is modified
Returns
The start of the input string

Definition at line 48 of file shared.cpp.

Referenced by Cmd_TokenizeString(), and Com_Trim().

char* Com_ConvertToASCII7 ( char *  s)

Remove high character values and only keep ascii. This can be used to print utf-8 characters to the console. It will replace every high character value with a simple dot.

Definition at line 82 of file shared.cpp.

References length.

Referenced by TEST_F().

void Com_DefaultExtension ( char *  path,
size_t  len,
const char *  extension 
)

Sets a default extension if there is none.

Definition at line 297 of file shared.cpp.

References Com_sprintf(), MAX_OSPATH, and Q_strncpyz().

Referenced by Com_WriteConfig_f(), Key_WriteBindings_f(), main(), R_LoadModelAsync(), R_ModLoadAliasMD2Model(), R_ModLoadMDX(), and RT_WriteCSVFiles().

void void Com_DPrintf ( int  level,
const char *  msg,
  ... 
)
void void void Com_Error ( int  code,
const char *  fmt,
  ... 
)
void Com_FilePath ( const char *  in,
char *  out,
size_t  size 
)

Returns the path up to, but not including the last /.

Definition at line 319 of file shared.cpp.

References Q_strncpyz().

Referenced by ExportLightmaps(), FS_BuildFileList(), Sys_FindFirst(), and TEST_F().

int Com_Filter ( const char *  pattern,
const char *  text 
)

Match the pattern PATTERN against the string TEXT;.

Returns
1 if it matches, 0 otherwise.
Note
A match means the entire string TEXT is used up in matching.
In the pattern string, `*' matches any sequence of characters, `?' matches any character, [SET] matches any character in the specified set, [!SET] matches any character not in the specified set.
A set is composed of characters or ranges; a range looks like character hyphen character (as in 0-9 or A-Z). [0-9a-zA-Z_] is the set of characters allowed in C identifiers. Any other character in the pattern must be matched exactly.
To suppress the special syntactic significance of any of `[]*?!-\', and match the character exactly, precede it with a `\'.

Definition at line 145 of file shared.cpp.

References Com_FilterAfterStar().

Referenced by Com_FilterAfterStar(), Sys_FindFirst(), Sys_FindNext(), and Sys_ListFilteredFiles().

const char* Com_GetExtension ( const char *  path)
Parameters
pathThe path resp. filename to extract the extension from
Returns
nullptr if the given path name does not contain an extension

Definition at line 282 of file shared.cpp.

Referenced by CL_CheckAndQueueDownload(), CL_FinishHTTPDownload(), CL_QueueHTTPDownload(), CL_StartHTTPDownload(), FS_LoadPackFile(), MD2Check(), MD2SkinFix(), R_FindModel(), R_LoadModelAsync(), R_ModelExists(), and SV_LoadModelAABB().

bool Com_IsValidName ( const char *  input)

Checks whether the given input string is allowed to be used as a user-given name string for aircraft, soldiers, bases and so on.

Parameters
[in]inputThe input string to check
Returns
true if the string is valid and can be used as a name, false otherwise

Definition at line 612 of file shared.cpp.

References Q_streq, and Q_strvalid.

Referenced by AIR_ChangeAircraftName_f(), B_BuildBase_f(), B_ChangeBaseName_f(), and E_ChangeName_f().

void Com_MakeTimestamp ( char *  ts,
const size_t  tslen 
)

Creates a timestamp with date and time at the specified location.

Parameters
tsptr to the resulting string
tslenlength of target buffer

Definition at line 352 of file shared.cpp.

References Com_sprintf().

Referenced by CL_LogEvent(), Com_vPrintf(), and SAV_GameSave().

void Com_Printf ( const char *  fmt,
  ... 
)
void Com_ReplaceFilename ( const char *  inputPath,
const char *  expectedFileName,
char *  outputPath,
size_t  size 
)

Replaces the filename from one path with another one.

Parameters
[in]inputPathThe full path to a filename
[in]expectedFileNameThe filename to insert into the given full path
[out]outputPathThe target buffer
[in]sizeThe size of the target buffer

Definition at line 239 of file shared.cpp.

References Q_strncpyz().

Referenced by R_AliasModelGetSkin().

const char* Com_SkipPath ( const char *  pathname)
bool Com_sprintf ( char *  dest,
size_t  size,
const char *  fmt,
  ... 
)
void Com_StripExtension ( const char *  in,
char *  out,
const size_t  size 
)
char* Com_Trim ( char *  s)

Removed leading and trailing whitespaces.

Parameters
sThe string that is modified
Returns
The first none whitespace character of the given input string

Definition at line 65 of file shared.cpp.

References Com_Chop().

Referenced by GAME_MP_AddChatMessage(), and R_LoadObjModel_().

void format ( __printf__  ,
,
 
)
void void void format ( __printf__  ,
,
 
)
const char int Q_FloatSort ( const void float1,
const void float2 
)

Compare two floats.

Parameters
[in]float1The first float
[in]float2The second float
Returns
An integer less than, equal to, or greater than zero if float1 is found, respectively, to be less than, to match, or be greater than float2
Note
sort function pointer for qsort

Definition at line 372 of file shared.cpp.

Referenced by AIR_GetAircraftWeaponRanges().

void Q_strcat ( char *  dest,
size_t  destsize,
const char *  src,
  ... 
)
int Q_StringSort ( const void string1,
const void string2 
)

Compare two strings.

Parameters
[in]string1The first string
[in]string2The second string
Returns
An integer less than, equal to, or greater than zero if string1 is found, respectively, to be less than, to match, or be greater than string2
Note
sort function pointer for qsort

Definition at line 385 of file shared.cpp.

Referenced by Com_MapDefSort(), FS_AddGameDirectory(), FS_ListFiles(), FS_LoadPackFile(), FS_MapDefSort(), Irc_Client_Names_f(), LIST_AddStringSorted(), and TEST_F().

const char* Q_stristr ( const char *  str,
const char *  substr 
)

Checks in case insensitive manner whether str contains substr.

Parameters
[in]strThe source string
[in]substrThe string to search in the source string
Returns
The start pointer where substr begins, or null if substr is no part of str

Definition at line 563 of file shared.cpp.

References Q_strncasecmp.

Referenced by R_SearchForVendor().

char* Q_strlwr ( char *  str)

Converts a string to lowercase.

Parameters
[in,out]strThe string that is converted to lowercase

Definition at line 438 of file shared.cpp.

Referenced by FS_ListFiles(), FS_LoadPackFile(), and WEB_Auth().

void Q_strncpyz ( char *  dest,
const char *  src,
size_t  destsize 
)

Safe strncpy that ensures a trailing zero.

Parameters
destDestination pointer
srcSource pointer
destsizeSize of destination buffer (this should be a sizeof size due to portability)

Definition at line 457 of file shared.cpp.

References Sys_Error(), and UTF8_strncpyz().

Referenced by _Mem_CreatePool(), AIL_InitActor(), AIM_AircraftEquipMenuUpdate(), AIR_ChangeAircraftName_f(), AIR_LoadAircraftXML(), AIR_NewAircraft(), AIR_ParseAircraft(), B_LoadXML(), B_SetBaseTitle_f(), B_SetName(), BDEF_BaseDefenceMenuUpdate_f(), BDEF_RemoveBattery_f(), Check_SetNodraw(), CheckMixedFaceContents(), CheckTexturesBasedOnFlags(), CIN_ROQ_OpenCinematic(), CIN_RunCinematic(), CL_AddMapParticle(), CL_CheckOrDownloadFile(), CL_DownloadUMPMap(), CL_HTTP_Progress(), CL_Init(), CL_LanguageInit(), CL_LanguageTest(), CL_ParseClientinfo(), CL_ParseMapParticle(), CL_ParseParticle(), CL_ParsePtlCmds(), CL_ParseSequence(), CL_ParticleGetArt(), CL_ParticleSpawnTimed(), CL_QueueHTTPDownload(), CL_SetHTTPServer(), CM_AddMapTile(), CM_LoadMap(), Cmd_Alias_f(), Cmd_GenericCompleteFunction(), Cmd_GetCommandDesc(), Cmd_TokenizeString(), CMod_LoadEntityString(), CMod_LoadSurfaces(), Com_ConsoleCompleteCommand(), Com_DefaultExtension(), Com_FilePath(), Com_GetCharacterModel(), Com_GetCharacterValues(), Com_MacroExpandString(), Com_ParseActorNames(), Com_ParseBodyPart(), Com_ParseCharacterTemplate(), Com_ParseDamageTypes(), Com_ParseEquipment(), Com_ParseGameTypes(), Com_ParseInventory(), Com_ParseTeam(), Com_ParseTerrainDefinition(), Com_ParseValue(), Com_RegisterConstInt(), Com_ReplaceFilename(), Com_SetValue(), Com_ValueToStr(), Com_WriteConfig_f(), COMP_ParseComponents(), Con_LoadConsoleHistory(), CP_CheckTriggerEvent(), CP_CreateCivilianTeam(), CP_ParseAlienTeam(), CP_ParseCampaign(), CP_TEAM_FillEmployeeList_f(), uiModelNode::draw(), uiTextNode::drawText(), E_ChangeName_f(), E_CreateEmployee(), E_GetCounts_f(), ED_ParseEdict(), FindMiptex(), FS_AddGameDirectory(), FS_BuildFileList(), FS_CreateOpenPipeFile(), FS_CreatePath(), FS_GetCwd(), FS_GetFileData(), FS_GetMaps(), FS_ListFiles(), FS_LoadPackFile(), FS_NextScriptHeader(), FS_OpenFile(), G_ClientUserinfoChanged(), G_SpawnEntities(), GAME_LoadCharacter(), GAME_MP_AddChatMessage(), GAME_MP_Connect_f(), GAME_MP_ParseServerInfoMessage(), GAME_MP_ProcessPingReply(), GAME_MP_QueryMasterServerThread(), GAME_ParseModes(), GAME_SaveTeam(), GAME_SetServerInfo(), GAME_TeamSlotComments_f(), GetUMPName(), HTTP_Encode(), HTTP_ExtractComponents(), HTTP_GetURLInternal(), HTTP_Header(), HUD_ActorWoundData_f(), HUD_DisplayActions_f(), HUD_DisplayFiremodes_f(), HUD_UpdateActorFireMode(), Info_SetValueForKey(), INS_Build(), INS_ChangeInstallationName_f(), INS_LoadXML(), Irc_AppendToBuffer(), Irc_Client_CmdKick(), Irc_Client_CmdPrivmsg(), Irc_Client_CmdRplNamreply(), Irc_Client_CmdRplWhoisaccount(), Irc_Client_CmdRplWhoisidle(), Irc_Client_CmdRplWhoisserver(), Irc_Client_CmdRplWhoisuser(), Irc_Client_CmdRplWhoreply(), Irc_Client_CmdRplWhowasuser(), Irc_Client_Names_f(), Irc_Client_Topic_f(), Irc_ParseName(), Irc_Proto_Join(), Irc_Proto_ProcessServerMsg(), Key_Console(), Key_WriteBindings_f(), LM_AddModel(), LoadModel(), M_Start(), main(), MIS_LoadXML(), MS_AddNewMessage(), MS_LoadXML(), NAT_DrawCharts_f(), NAT_ListStats_f(), NET_AddrinfoToString(), NET_SockaddrToStrings(), NET_StreamPeerToName(), uiTextEntryNode::onFocusGained(), ParseBrush(), ParseFromMemory(), ParseUMP(), R_FindModel(), R_FontFindTruncFit(), R_FontGenerateTexture(), R_FontMakeChunks(), R_FontSetTruncationMarker(), R_InitExtensions(), R_LoadActorSkinsFromModel(), R_LoadAnimImages(), R_LoadImageData(), R_LoadModel(), R_LoadObjSkin(), R_LoadProgram(), R_LoadShader(), R_ModBeginLoading(), R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), R_ModLoadAliasMD3Model(), R_ModLoadAnims(), R_PrintInfo(), R_ProgramVariable(), S_Init(), S_MumbleUpdate(), SAV_GameSave(), SAV_GameSave_f(), SEQ_ExecuteModel(), SEQ_ExecuteObj2D(), BodyData::setId(), MapInfo::setName(), SL_Parameter(), SL_SliceTheWorld(), SP_misc_model(), STAT_GetExpenses_f(), STRHUNK_Add(), SV_CompleteMapCommand(), SV_Map(), SV_Map_f(), SV_NextMapcycle(), SV_ParseAssembly(), SV_ParseMapcycle(), SV_ParseMapTile(), SV_ParseMapTileSet(), SV_ParseUMP(), SV_SetConfigString(), SV_UserinfoChanged(), SVC_BucketForAddress(), SVC_DirectConnect(), Sys_ConsoleInput(), Sys_FindFirst(), Sys_GetCurrentUser(), TEST_F(), Test_Parameters(), TEST_RegisterProperty(), TexinfoForBrushTexture(), Touch_NextMapTrigger(), TR_Add_f(), U2M_Parameter(), UFO_CampaignCheckEvents(), UI_AddLineChartLine(), UI_AllocNodeWithoutNew(), UI_AllocStaticSprite(), UI_AllocStaticString(), UI_AutoGenerateSprite(), UI_BuildRadarImageList(), UI_CloneNode(), UI_DisplayNotice(), UI_DrawModelNode(), UI_InitOption(), UI_Option_SetLabel(), UI_Option_SetValue(), UI_ParseAndLoadLuaScript(), UI_ParseProperty(), UI_ReadNodePath(), UI_TextEntryNodeEdit(), UI_TextNodeGenerateLineSplit(), UM_Parameter(), UnparseEntities(), UP_SetMailHeader(), US_LoadXML(), US_StoreUFO(), WEB_Auth(), and WEB_CGameGetURL().

bool Q_strnull ( const char *  string)
inline

Definition at line 138 of file shared.h.

Referenced by AIR_ChangeAircraftName_f(), AIR_GetAircraft(), AIR_PostLoadInitMissions(), Cbuf_InsertText(), CHRSH_CharGenAbilitySkills(), CHRSH_GetTemplateByID(), CL_CheckOrDownloadFile(), CL_ParticleGet(), CL_ParticleSpawn(), CLMN_AddBindings(), Com_GetAircraftIdNum(), Com_GetCharacterTemplateByID(), Com_GetConstIntFromNamespace(), Com_GetCrashedAircraftIdNum(), Com_ParseImplant(), Com_ParseItem(), CP_CheckTriggerEvent(), uiTextureNode::draw(), uiTBarNode::draw(), uiItemNode::draw(), uiModelNode::draw(), uiImageNode::draw(), GAME_MP_ParseServerInfoMessage(), GAME_MP_Rcon(), GAME_MP_RunFrame(), GAME_SaveTeam_f(), GetToken(), HTTP_ExtractComponents(), HTTP_GetURLInternal(), HTTP_PutFile(), Info_SetValueForKey(), Key_StringToKeynum(), LM_GetByID(), M_Start(), ParseBrush(), ParseEntity(), ParseMapEntity(), R_DrawModelDirect(), R_LoadImage(), R_LoadObjModelLine(), Rcon_Validate(), RS_GetTechByID(), S_LoadAndPlaySample(), SCR_DrawString(), SVC_BucketForAddress(), SVC_DirectConnect(), TEST_CheckImage(), TEST_CheckModel(), TEST_CheckParticle(), TEST_CheckSound(), TEST_F(), GameTest::testCountSpawnpointsGetNum2x2ValueForAircraft(), GameTest::testCountSpawnpointsGetNumteamValueForAircraft(), GameTest::testCountSpawnpointsGetNumteamValueForUFO(), UI_AddLineChartCoord(), UI_AddLineChartLine(), UI_DrawItem(), UI_DrawModelNode(), UI_DrawTooltip(), UI_MessageGetIcon(), UI_SetKeyBindingEx(), UI_ShowChartDots(), UI_ShowChartLine(), WEB_CGameUpload(), WEB_CheckAuth(), and XML_AddStringValue().

bool Q_strreplace ( const char *  source,
const char *  pattern,
const char *  replace,
char *  dest,
size_t  destsize 
)

Replaces the first occurence of the given pattern in the source string with the given replace string.

Parameters
sourceThe source string
patternThe pattern that should be replaced
replaceThe replacement string
destThe target buffer
destsizeThe size of the target buffer
Note
If this function returns false, the target string might be in an undefined stage. E.g. don't rely on it being 0-terminated.
Returns
false if the pattern wasn't found or the target buffer is to small to store the resulting string, if the replacement was successful.

Definition at line 596 of file shared.cpp.

References len.

Referenced by main(), R_CheckExtension(), R_GetProcAddressExt(), TEST_F(), and WEB_CGameGetURL().

char const* Q_strstart ( char const *  str,
char const *  start 
)

Matches the start of a string.

Returns a pointer just past the prefix in str, if start is a prefix of str, otherwise a null pointer is returned

Parameters
[in]strThe source string to scan.
[in]startThe string to match.
Returns
Zero if no match is found, otherwise returns the pointer of the first character in str after the match. const char* name = "*cvar:version"; char *p = Q_strstrart(name, "*cvar:"); // <– p now points to the substring "version"

Definition at line 587 of file shared.cpp.

Referenced by BS_Buy_f(), BS_ShowInfo_f(), BuildLights(), Cbuf_AddText(), Check_IsInfoStart(), CheckEntities(), CL_ConnectionlessPacket(), CL_Translate(), Cmd_GenericCompleteFunction(), Com_GetAircraftIdNum(), Com_GetCrashedAircraftIdNum(), CP_CheckTriggerEvent(), CP_IsAlienEquipmentSelectable(), HUD_ExecuteAction_f(), INV_EquipmentDefSanityCheck(), IsInlineModelEntity(), LE_GetAnim(), main(), uiRadioButtonNode::onActivate(), uiTextEntryNode::onLeftClick(), uiContainerNode::onLoaded(), uiTabNode::onWindowOpened(), R_ModLoadAliasMD2MeshUnindexed(), R_ParseStage(), uiAbstractValueNode::setDelta(), uiAbstractValueNode::setMax(), uiAbstractValueNode::setMin(), uiAbstractValueNode::setValue(), SV_Map(), TEST_F(), Test_Parameters(), TR_Add_f(), UFO_AnalyseTestWindow(), UI_AbstractOption_GetCurrentValue(), UI_CloneCvarOrFloat(), UI_FreeCvarOrFloat(), UI_GenInjectedString(), UI_GetFloatFromNodeProperty(), UI_GetReferenceFloat(), UI_NodeSetProperty(), UI_NodeSetPropertyFromActionValue(), and UI_ParseValueExpression().

void UFO_assert ( bool  condition,
const char *  fmt,
  ... 
)
const char* va ( const char *  format,
  ... 
)