Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

q_shared.h File Reference

#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 dependency graph for q_shared.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  growList_t

Defines

#define ALIGN_OFF
#define ALIGN_ON
#define BLINK_DIVISOR   200
#define EQUAL_EPSILON   0.001
#define FILE_HASH_SIZE   1024
#define id386   0
#define max(x, y)   ( ( ( x ) > ( y ) ) ? ( x ) : ( y ) )
#define MAX_INFO_KEY   1024
#define MAX_INFO_STRING   1024
#define MAX_INFO_VALUE   1024
#define MAX_MAP_AREA_BYTES   32
#define MAX_NAME_LENGTH   32
#define MAX_OSPATH   128
#define MAX_QINT   0x7fffffff
#define MAX_QPATH   64
#define MAX_STRING_CHARS   1024
#define MAX_STRING_TOKENS   256
#define MAX_TOKEN_CHARS   1024
#define min(x, y)   ( ( ( x ) < ( y ) ) ? ( x ) : ( y ) )
#define MIN_QINT   (-MAX_QINT-1)
#define NULL   ((void *)0)
#define PITCH   0
#define PROP_GAP_WIDTH   3
#define PROP_HEIGHT   27
#define PROP_SMALL_SIZE_SCALE   0.75
#define PROP_SPACE_WIDTH   8
#define PULSE_DIVISOR   75
#define Q3_VERSION   "DOOM 0.01"
#define QDECL
#define ROLL   2
#define sign(f)   ( ( f > 0 ) ? 1 : ( ( f < 0 ) ? -1 : 0 ) )
#define UI_BIGFONT   0x00000020
#define UI_BLINK   0x00001000
#define UI_CENTER   0x00000001
#define UI_DROPSHADOW   0x00000800
#define UI_FORMATMASK   0x00000007
#define UI_GIANTFONT   0x00000040
#define UI_INVERSE   0x00002000
#define UI_LEFT   0x00000000
#define UI_PULSE   0x00004000
#define UI_RIGHT   0x00000002
#define UI_SMALLFONT   0x00000010
#define YAW   1

Typedefs

typedef unsigned char byte
typedef int clipHandle_t
typedef int fileHandle_t
typedef int qhandle_t
typedef int sfxHandle_t

Enumerations

enum  cbufExec_t { EXEC_NOW, EXEC_INSERT, EXEC_APPEND }
enum  errorParm_t {
  ERR_NONE, ERR_FATAL, ERR_DROP, ERR_DISCONNECT,
  ERR_NEED_CD
}
enum  fsMode_t { FS_READ, FS_WRITE, FS_APPEND, FS_APPEND_SYNC }
enum  fsOrigin_t { FS_SEEK_CUR, FS_SEEK_END, FS_SEEK_SET }
enum  jointHandle_t { INVALID_JOINT = -1 }
enum  qboolean { qfalse, qtrue }

Functions

float BigFloat (float l)
int BigLong (int l)
short BigShort (short l)
int Com_AddToGrowList (growList_t *list, void *data)
void Com_BeginParseSession (const char *filename)
float Com_Clamp (float min, float max, float value)
void Com_DefaultExtension (char *path, int maxSize, const char *extension)
void QDECL Com_DPrintf (const char *msg,...)
void Com_EndParseSession (void)
void QDECL Com_Error (int level, const char *error,...)
int Com_Filter (const char *filter, const char *name, int casesensitive)
int Com_GetCurrentParseLine (void)
void * Com_GrowListElement (const growList_t *list, int index)
int Com_HashString (const char *fname)
int Com_IndexForGrowListElement (const growList_t *list, const void *element)
void Com_InitGrowList (growList_t *list, int maxElements)
void Com_MatchToken (const char *(*buf_p), const char *match, qboolean warning)
const char * Com_Parse (const char *(*data_p))
void Com_Parse1DMatrix (const char *(*buf_p), int x, float *m)
void Com_Parse2DMatrix (const char *(*buf_p), int y, int x, float *m)
void Com_Parse3DMatrix (const char *(*buf_p), int z, int y, int x, float *m)
float Com_ParseFloat (const char *(*buf_p))
int Com_ParseInfos (const char *buf, int max, char infos[][MAX_INFO_STRING])
int Com_ParseInt (const char *(*buf_p))
const char * Com_ParseOnLine (const char *(*data_p))
const char * Com_ParseRestOfLine (const char *(*data_p))
void QDECL Com_Printf (const char *msg,...)
void Com_ScriptError (const char *msg,...)
void Com_ScriptWarning (const char *msg,...)
void Com_SkipBracedSection (const char *(*program))
char * Com_SkipPath (char *pathname)
void Com_SkipRestOfLine (const char *(*data))
void QDECL Com_sprintf (char *dest, int size, const char *fmt,...)
const char * Com_StringContains (const char *str1, const char *str2, int casesensitive)
void Com_StripExtension (const char *in, char *out)
void Com_UngetToken (void)
void Info_NextPair (const char *(*s), char key[MAX_INFO_KEY], char value[MAX_INFO_VALUE])
void Info_RemoveKey (char *s, const char *key)
void Info_SetValueForKey (char *s, const char *key, const char *value)
qboolean Info_Validate (const char *s)
char * Info_ValueForKey (const char *s, const char *key)
float LittleFloat (float l)
int LittleLong (int l)
short LittleShort (short l)
char * Q_CleanStr (char *string)
int Q_isalpha (int c)
int Q_islower (int c)
int Q_isprint (int c)
int Q_isupper (int c)
int Q_PrintStrlen (const char *string)
void Q_strcat (char *dest, int size, const char *src)
int Q_stricmp (const char *s1, const char *s2)
int Q_stricmpn (const char *s1, const char *s2, int n)
char * Q_strlwr (char *s1)
int Q_strncmp (const char *s1, const char *s2, int n)
void Q_strncpyz (char *dest, const char *src, int destsize)
char * Q_strrchr (const char *string, int c)
char * Q_strupr (char *s1)
void Swap_Init (void)
char *QDECL va (char *format,...)


Define Documentation

#define ALIGN_OFF
 

Definition at line 36 of file q_shared.h.

#define ALIGN_ON
 

Definition at line 35 of file q_shared.h.

#define BLINK_DIVISOR   200
 

Definition at line 296 of file q_shared.h.

#define EQUAL_EPSILON   0.001
 

Definition at line 215 of file q_shared.h.

#define FILE_HASH_SIZE   1024
 

Definition at line 530 of file q_shared.h.

#define id386   0
 

Definition at line 82 of file q_shared.h.

#define max x,
y   )     ( ( ( x ) > ( y ) ) ? ( x ) : ( y ) )
 

Definition at line 234 of file q_shared.h.

#define MAX_INFO_KEY   1024
 

Definition at line 254 of file q_shared.h.

#define MAX_INFO_STRING   1024
 

Definition at line 253 of file q_shared.h.

#define MAX_INFO_VALUE   1024
 

Definition at line 255 of file q_shared.h.

#define MAX_MAP_AREA_BYTES   32
 

Definition at line 275 of file q_shared.h.

#define MAX_NAME_LENGTH   32
 

Definition at line 261 of file q_shared.h.

#define MAX_OSPATH   128
 

Definition at line 259 of file q_shared.h.

#define MAX_QINT   0x7fffffff
 

Definition at line 230 of file q_shared.h.

#define MAX_QPATH   64
 

Definition at line 258 of file q_shared.h.

#define MAX_STRING_CHARS   1024
 

Definition at line 249 of file q_shared.h.

#define MAX_STRING_TOKENS   256
 

Definition at line 250 of file q_shared.h.

#define MAX_TOKEN_CHARS   1024
 

Definition at line 251 of file q_shared.h.

#define min x,
y   )     ( ( ( x ) < ( y ) ) ? ( x ) : ( y ) )
 

Definition at line 235 of file q_shared.h.

#define MIN_QINT   (-MAX_QINT-1)
 

Definition at line 231 of file q_shared.h.

#define NULL   ((void *)0)
 

Definition at line 227 of file q_shared.h.

#define PITCH   0
 

Definition at line 243 of file q_shared.h.

#define PROP_GAP_WIDTH   3
 

Definition at line 291 of file q_shared.h.

#define PROP_HEIGHT   27
 

Definition at line 293 of file q_shared.h.

#define PROP_SMALL_SIZE_SCALE   0.75
 

Definition at line 294 of file q_shared.h.

#define PROP_SPACE_WIDTH   8
 

Definition at line 292 of file q_shared.h.

#define PULSE_DIVISOR   75
 

Definition at line 297 of file q_shared.h.

#define Q3_VERSION   "DOOM 0.01"
 

Definition at line 32 of file q_shared.h.

#define QDECL
 

Definition at line 87 of file q_shared.h.

#define ROLL   2
 

Definition at line 245 of file q_shared.h.

#define sign  )     ( ( f > 0 ) ? 1 : ( ( f < 0 ) ? -1 : 0 ) )
 

Definition at line 239 of file q_shared.h.

#define UI_BIGFONT   0x00000020
 

Definition at line 304 of file q_shared.h.

#define UI_BLINK   0x00001000
 

Definition at line 307 of file q_shared.h.

#define UI_CENTER   0x00000001
 

Definition at line 300 of file q_shared.h.

#define UI_DROPSHADOW   0x00000800
 

Definition at line 306 of file q_shared.h.

#define UI_FORMATMASK   0x00000007
 

Definition at line 302 of file q_shared.h.

#define UI_GIANTFONT   0x00000040
 

Definition at line 305 of file q_shared.h.

#define UI_INVERSE   0x00002000
 

Definition at line 308 of file q_shared.h.

#define UI_LEFT   0x00000000
 

Definition at line 299 of file q_shared.h.

#define UI_PULSE   0x00004000
 

Definition at line 309 of file q_shared.h.

#define UI_RIGHT   0x00000002
 

Definition at line 301 of file q_shared.h.

#define UI_SMALLFONT   0x00000010
 

Definition at line 303 of file q_shared.h.

#define YAW   1
 

Definition at line 244 of file q_shared.h.


Typedef Documentation

typedef unsigned char byte
 

Definition at line 213 of file q_shared.h.

typedef int clipHandle_t
 

Definition at line 220 of file q_shared.h.

typedef int fileHandle_t
 

Definition at line 219 of file q_shared.h.

typedef int qhandle_t
 

Definition at line 217 of file q_shared.h.

typedef int sfxHandle_t
 

Definition at line 218 of file q_shared.h.


Enumeration Type Documentation

enum cbufExec_t
 

Enumeration values:
EXEC_NOW 
EXEC_INSERT 
EXEC_APPEND 

Definition at line 264 of file q_shared.h.

00264              {
00265     EXEC_NOW,           // don't return until completed, a VM should NEVER use this,
00266                         // because some commands might cause the VM to be unloaded...
00267     EXEC_INSERT,        // insert at current position, but don't run yet
00268     EXEC_APPEND         // add to end of the command buffer (normal case)
00269 } cbufExec_t;

enum errorParm_t
 

Enumeration values:
ERR_NONE 
ERR_FATAL 
ERR_DROP 
ERR_DISCONNECT 
ERR_NEED_CD 

Definition at line 280 of file q_shared.h.

00280              {
00281     ERR_NONE,
00282     ERR_FATAL,                  // exit the entire game with a popup window
00283     ERR_DROP,                   // print to console and disconnect from game
00284     ERR_DISCONNECT,             // don't kill server
00285     ERR_NEED_CD                 // pop up the need-cd dialog
00286 } errorParm_t;

enum fsMode_t
 

Enumeration values:
FS_READ 
FS_WRITE 
FS_APPEND 
FS_APPEND_SYNC 

Definition at line 596 of file q_shared.h.

00596              {
00597     FS_READ,
00598     FS_WRITE,
00599     FS_APPEND,
00600     FS_APPEND_SYNC
00601 } fsMode_t;

enum fsOrigin_t
 

Enumeration values:
FS_SEEK_CUR 
FS_SEEK_END 
FS_SEEK_SET 

Definition at line 603 of file q_shared.h.

00603              {
00604     FS_SEEK_CUR,
00605     FS_SEEK_END,
00606     FS_SEEK_SET
00607 } fsOrigin_t;

enum jointHandle_t
 

Enumeration values:
INVALID_JOINT 

Definition at line 222 of file q_shared.h.

00222              {
00223     INVALID_JOINT = -1
00224 } jointHandle_t;

enum qboolean
 

Enumeration values:
qfalse 
qtrue 

Definition at line 211 of file q_shared.h.

00211 {qfalse, qtrue} qboolean;


Function Documentation

float BigFloat float  l  ) 
 

Definition at line 1052 of file l_cmd.c.

References _BigFloat, b, byte, in, and l.

01053 {
01054     union {byte b[4]; float f;} in, out;
01055     
01056     in.f = l;
01057     out.b[0] = in.b[3];
01058     out.b[1] = in.b[2];
01059     out.b[2] = in.b[1];
01060     out.b[3] = in.b[0];
01061     
01062     return out.f;
01063 }

int BigLong int  l  ) 
 

Definition at line 1035 of file l_cmd.c.

References _BigLong, byte, and l.

Referenced by ByteSwapTri(), LoadLBM(), Texture_InitPalette(), TRI_LoadPolysets(), and WriteLBMfile().

01036 {
01037     byte    b1,b2,b3,b4;
01038 
01039     b1 = l&255;
01040     b2 = (l>>8)&255;
01041     b3 = (l>>16)&255;
01042     b4 = (l>>24)&255;
01043 
01044     return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
01045 }

short BigShort short  l  ) 
 

Definition at line 1019 of file l_cmd.c.

References _BigShort, byte, and l.

Referenced by CL_Connect_f(), CL_GlobalServers_f(), CL_LocalServers_f(), CL_Rcon_f(), CL_RequestAuthorization(), CL_RequestMotd(), CL_ServersResponsePacket(), LoadLBM(), NET_StringToAdr(), SV_Ban_f(), SV_BanNum_f(), SV_GetChallenge(), SV_MasterHeartbeat(), and WriteLBMfile().

01020 {
01021     byte    b1,b2;
01022 
01023     b1 = l&255;
01024     b2 = (l>>8)&255;
01025 
01026     return (b1<<8) + b2;
01027 }

int Com_AddToGrowList growList_t list,
void *  data
 

Definition at line 43 of file q_shared.cpp.

References Com_AddToGrowList(), Com_Allocate(), Com_Dealloc(), Com_DPrintf(), Com_Error(), Com_InitGrowList(), growList_t::currentElements, data, growList_t::elements, ERR_DROP, ERR_FATAL, growList_t::maxElements, and memcpy().

Referenced by Com_AddToGrowList().

00043                                                       {
00044     void    **old;
00045 
00046     if ( list->currentElements != list->maxElements ) {
00047         list->elements[list->currentElements] = data;
00048         return list->currentElements++;
00049     }
00050 
00051     // grow, reallocate and move
00052     old = list->elements;
00053 
00054     if ( list->maxElements < 0 ) {
00055         Com_Error( ERR_FATAL, "Com_AddToGrowList: maxElements = %i", list->maxElements );
00056     }
00057 
00058     if ( list->maxElements == 0 ) {
00059         // initialize the list to hold 100 elements
00060         Com_InitGrowList( list, 100 );
00061         return Com_AddToGrowList( list, data );
00062     }
00063 
00064     list->maxElements *= 2;
00065 
00066     Com_DPrintf( "Resizing growlist to %i maxElements\n", list->maxElements );
00067 
00068     list->elements = (void **)Com_Allocate( list->maxElements * sizeof( void * ) );
00069 
00070     if ( !list->elements ) {
00071         Com_Error( ERR_DROP, "Growlist alloc failed" );
00072     }
00073 
00074     memcpy( list->elements, old, list->currentElements * sizeof( void * ) );
00075 
00076     Com_Dealloc( old );
00077 
00078     return Com_AddToGrowList( list, data );
00079 }

Here is the call graph for this function:

void Com_BeginParseSession const char *  filename  ) 
 

Definition at line 58 of file q_parse.cpp.

References Com_Error(), ERR_FATAL, parseInfo_t::lines, MAX_PARSE_INFO, parseInfo_t::parseFile, parseInfo, parseInfoNum, pi, and Q_strncpyz().

Referenced by idCameraDef::load().

00058                                                    {
00059     if ( parseInfoNum == MAX_PARSE_INFO - 1 ) {
00060         Com_Error( ERR_FATAL, "Com_BeginParseSession: session overflow" );
00061     }
00062     parseInfoNum++;
00063     pi = &parseInfo[parseInfoNum];
00064 
00065     pi->lines = 1;
00066     Q_strncpyz( pi->parseFile, filename, sizeof( pi->parseFile ) );
00067 }

Here is the call graph for this function:

float Com_Clamp float  min,
float  max,
float  value
 

Definition at line 26 of file q_shared.c.

References value.

Referenced by ArenaServers_MenuInit(), PlayerSettings_SetMenuItems(), Preferences_SetMenuItems(), Punkbuster_ConfirmDisable(), Punkbuster_ConfirmEnable(), ServerOptions_MenuInit(), ServerOptions_SetMenuItems(), ServerOptions_Start(), UI_AddBotsMenu_Init(), UI_DrawHandicap(), UI_Handicap_HandleKey(), UI_OwnerDrawWidth(), UI_RunMenuScript(), and UI_SPSkillMenu_Init().

00026                                                      {
00027     if ( value < min ) {
00028         return min;
00029     }
00030     if ( value > max ) {
00031         return max;
00032     }
00033     return value;
00034 }

void Com_DefaultExtension char *  path,
int  maxSize,
const char *  extension
 

Definition at line 285 of file q_shared.cpp.

References Com_sprintf(), Q_strncpyz(), src, and strlen().

00285                                                                             {
00286     char    oldPath[MAX_QPATH];
00287     char    *src;
00288 
00289 //
00290 // if path doesn't have a .EXT, append extension
00291 // (extension should include the .)
00292 //
00293     src = path + strlen(path) - 1;
00294 
00295     while (*src != '/' && src != path) {
00296         if ( *src == '.' ) {
00297             return;                 // it has an extension
00298         }
00299         src--;
00300     }
00301 
00302     Q_strncpyz( oldPath, path, sizeof( oldPath ) );
00303     Com_sprintf( path, maxSize, "%s%s", oldPath, extension );
00304 }

Here is the call graph for this function:

void QDECL Com_DPrintf const char *  msg,
  ...
 

Definition at line 209 of file common.c.

References com_developer, Com_Printf(), cvar_s::integer, Q_vsnprintf, QDECL, va_end, va_list, and va_start.

Referenced by CIN_PlayCinematic(), CIN_StopCinematic(), CL_BeginDownload(), CL_ConnectionlessPacket(), CL_GetServerCommand(), CL_GetSnapshot(), CL_NextDemo(), CL_PacketEvent(), CL_ParseDownload(), CL_PlayCinematic_f(), CL_RefPrintf(), CL_ServerInfoPacket(), CL_ServersResponsePacket(), CL_UISystemCalls(), CL_WritePacket(), CM_AddFacetBevels(), CM_LoadMap(), CM_SetBorderInward(), Cmd_TokenizeString(), Com_AddToGrowList(), Cvar_Get(), Cvar_Set2(), FS_FOpenFileRead(), FS_PureServerSetLoadedPaks(), FS_ReadFile(), FS_SV_FOpenFileWrite(), GLimp_SetGamma(), MainWndProc(), RoQInterrupt(), RoQShutdown(), S_ChannelSetup(), S_FreeOldestSound(), S_GetSoundtime(), S_LoadSound(), S_RawSamples(), S_StartBackgroundTrack(), S_Update(), SCR_DrawScreenField(), SNDDMA_Init(), SNDDMA_InitDS(), SNDDMA_Shutdown(), SV_AddEntitiesVisibleFromPoint(), SV_CheckTimeouts(), SV_ClientCommand(), SV_ClientEnterWorld(), SV_ConnectionlessPacket(), SV_DirectConnect(), SV_DoneDownload_f(), SV_DropClient(), SV_ExecuteClientCommand(), SV_ExecuteClientMessage(), SV_GetChallenge(), SV_LinkEntity(), SV_Netchan_Transmit(), SV_Netchan_TransmitNextFragment(), SV_NextDownload_f(), SV_RankBegin(), SV_RankCleanupCBF(), SV_RankCloseContext(), SV_RankDecodePlayerID(), SV_RankDecodePlayerKey(), SV_RankEncodeGameID(), SV_RankEnd(), SV_RankError(), SV_RankJoinGameCBF(), SV_RankNewGameCBF(), SV_RankQuit(), SV_RankReportInt(), SV_RankReportStr(), SV_RankSendReportsCBF(), SV_RankUserCBF(), SV_RankUserCreate(), SV_RankUserLogin(), SV_RankUserLogout(), SV_RankUserValidate(), SV_SendClientGameState(), SV_StopDownload_f(), SV_UserMove(), SV_VerifyPaks_f(), SV_WriteDownloadToClient(), SV_WriteSnapshotToClient(), Sys_ConsoleInput(), and VID_AppActivate().

00209                                               {
00210     va_list     argptr;
00211     char        msg[MAXPRINTMSG];
00212         
00213     if ( !com_developer || !com_developer->integer ) {
00214         return;         // don't confuse non-developers with techie stuff...
00215     }
00216 
00217     va_start (argptr,fmt);  
00218     Q_vsnprintf (msg, sizeof(msg), fmt, argptr);
00219     va_end (argptr);
00220     
00221     Com_Printf ("%s", msg);
00222 }

Here is the call graph for this function:

void Com_EndParseSession void   ) 
 

Definition at line 74 of file q_parse.cpp.

References Com_Error(), ERR_FATAL, parseInfo, parseInfoNum, and pi.

00074                                  {
00075     if ( parseInfoNum == 0 ) {
00076         Com_Error( ERR_FATAL, "Com_EndParseSession: session underflow" );
00077     }
00078     parseInfoNum--;
00079     pi = &parseInfo[parseInfoNum];
00080 }

Here is the call graph for this function:

void QDECL Com_Error int  level,
const char *  error,
  ...
 

Definition at line 444 of file cg_main.c.

References CG_Error(), error(), QDECL, Sys_Printf(), TranslateString(), va_end, va_list, va_start, and vsprintf().

Referenced by BaseWindingForPlane(), BG_CanItemBeGrabbed(), BG_EvaluateTrajectory(), BG_EvaluateTrajectoryDelta(), BG_FindItemForHoldable(), BG_FindItemForWeapon(), BotImport_HunkAlloc(), BotImport_Print(), Cbuf_ExecuteText(), CheckWinding(), ChopWindingInPlace(), CIN_HandleForVideo(), CL_AddReliableCommand(), CL_CgameError(), CL_CgameSystemCalls(), CL_CheckForResend(), CL_ConfigstringModified(), CL_Disconnect_f(), CL_GetParseEntityState(), CL_GetServerCommand(), CL_GetSnapshot(), CL_GetUserCmd(), CL_InitCGame(), CL_InitRef(), CL_InitUI(), CL_JoystickEvent(), CL_ParseDownload(), CL_ParseGamestate(), CL_ParsePacketEntities(), CL_ParseServerMessage(), CL_PlayDemo_f(), CL_ReadDemoMessage(), CL_SetCGameTime(), CL_UISystemCalls(), ClipWindingEpsilon(), CM_AdjustAreaPortalState(), CM_AreasConnected(), CM_ClipHandleToModel(), CM_EdgePlaneNum(), CM_FindPlane(), CM_FindPlane2(), CM_FloodArea_r(), CM_GeneratePatchCollide(), CM_InlineModel(), CM_LeafArea(), CM_LeafCluster(), CM_LoadMap(), CM_PatchCollideFromGrid(), CM_SetBorderInward(), CMod_LoadBrushes(), CMod_LoadBrushSides(), CMod_LoadLeafBrushes(), CMod_LoadLeafs(), CMod_LoadLeafSurfaces(), CMod_LoadNodes(), CMod_LoadPatches(), CMod_LoadPlanes(), CMod_LoadShaders(), CMod_LoadSubmodels(), Com_AddToGrowList(), Com_BeginParseSession(), Com_EndParseSession(), Com_Error_f(), Com_EventLoop(), Com_GetRealEvent(), Com_GrowListElement(), Com_InitHunkMemory(), Com_InitSmallZoneMemory(), Com_InitZoneMemory(), COM_MatchToken(), Com_ParseExt(), Com_ScriptError(), Com_sprintf(), Cvar_Get(), Cvar_Update(), Field_VariableSizeDraw(), FreeWinding(), FS_CopyFile(), FS_FCloseFile(), FS_FileForHandle(), FS_FileIsInPAK(), FS_FOpenFileAppend(), FS_FOpenFileByMode(), FS_FOpenFileRead(), FS_FOpenFileWrite(), FS_FreeFile(), FS_FreeFileList(), FS_HandleForFile(), FS_InitFilesystem(), FS_ListFilteredFiles(), FS_Read(), FS_Read2(), FS_ReadFile(), FS_Rename(), FS_Restart(), FS_Seek(), FS_SetRestrictions(), FS_SV_FOpenFileRead(), FS_SV_FOpenFileWrite(), FS_SV_Rename(), FS_Write(), FS_WriteFile(), Hex(), Hunk_Alloc(), Hunk_AllocateTempMemory(), Hunk_FreeTempMemory(), Hunk_Trash(), Info_RemoveKey(), Info_RemoveKey_Big(), Info_SetValueForKey(), Info_SetValueForKey_Big(), Info_ValueForKey(), InstImm(), InstImmU(), MSG_Copy(), MSG_ReadBits(), MSG_ReadDeltaEntity(), MSG_WriteBits(), MSG_WriteByte(), MSG_WriteChar(), MSG_WriteDeltaEntity(), MSG_WriteShort(), NET_OpenIP(), Netchan_Transmit(), PC_CopyToken(), Q_strcat(), Q_strncpyz(), S_AddLoopingSound(), S_AddRealLoopingSound(), S_FindName(), S_StartSound(), S_UpdateEntityPosition(), SCR_DrawScreenField(), SCR_UpdateScreen(), SV_AddEntitiesVisibleFromPoint(), SV_BotFreeClient(), SV_BotInitBotLib(), SV_BuildClientSnapshot(), SV_DirectConnect(), SV_GameError(), SV_GameSystemCalls(), SV_GetConfigstring(), SV_GetServerinfo(), SV_GetUsercmd(), SV_GetUserinfo(), SV_InitGameProgs(), SV_Netchan_TransmitNextFragment(), SV_QsortEntityNumbers(), SV_RestartGameProgs(), SV_SetBrushModel(), SV_SetConfigstring(), SV_SetUserinfo(), SV_Startup(), SV_SvEntityForGentity(), Sys_Init(), Sys_LoadDll(), Sys_SendPacket(), Sys_UnloadDll(), VM_Call(), VM_CallCompiled(), VM_CallInterpreted(), VM_Compile(), VM_Create(), VM_PrepareInterpreter(), VM_Restart(), Z_CheckHeap(), Z_Free(), and Z_TagMalloc().

00444                                                           {
00445     va_list     argptr;
00446     char        text[1024];
00447 
00448     va_start (argptr, error);
00449     vsprintf (text, error, argptr);
00450     va_end (argptr);
00451 
00452     CG_Error( "%s", text);
00453 }

Here is the call graph for this function:

int Com_Filter const char *  filter,
const char *  name,
int  casesensitive
 

Definition at line 147 of file q_shared.cpp.

References Com_StringContains(), i, name, ptr(), strlen(), and toupper().

Referenced by Cmd_List_f(), Com_FilterPath(), and Cvar_List_f().

00148 {
00149     char buf[MAX_TOKEN_CHARS];
00150     const char *ptr;
00151     int i, found;
00152 
00153     while(*filter) {
00154         if (*filter == '*') {
00155             filter++;
00156             for (i = 0; *filter; i++) {
00157                 if (*filter == '*' || *filter == '?') break;
00158                 buf[i] = *filter;
00159                 filter++;
00160             }
00161             buf[i] = '\0';
00162             if (strlen(buf)) {
00163                 ptr = Com_StringContains(name, buf, casesensitive);
00164                 if (!ptr) return qfalse;
00165                 name = ptr + strlen(buf);
00166             }
00167         }
00168         else if (*filter == '?') {
00169             filter++;
00170             name++;
00171         }
00172         else if (*filter == '[' && *(filter+1) == '[') {
00173             filter++;
00174         }
00175         else if (*filter == '[') {
00176             filter++;
00177             found = qfalse;
00178             while(*filter && !found) {
00179                 if (*filter == ']' && *(filter+1) != ']') break;
00180                 if (*(filter+1) == '-' && *(filter+2) && (*(filter+2) != ']' || *(filter+3) == ']')) {
00181                     if (casesensitive) {
00182                         if (*name >= *filter && *name <= *(filter+2)) found = qtrue;
00183                     }
00184                     else {
00185                         if (toupper(*name) >= toupper(*filter) &&
00186                             toupper(*name) <= toupper(*(filter+2))) found = qtrue;
00187                     }
00188                     filter += 3;
00189                 }
00190                 else {
00191                     if (casesensitive) {
00192                         if (*filter == *name) found = qtrue;
00193                     }
00194                     else {
00195                         if (toupper(*filter) == toupper(*name)) found = qtrue;
00196                     }
00197                     filter++;
00198                 }
00199             }
00200             if (!found) return qfalse;
00201             while(*filter) {
00202                 if (*filter == ']' && *(filter+1) != ']') break;
00203                 filter++;
00204             }
00205             filter++;
00206             name++;
00207         }
00208         else {
00209             if (casesensitive) {
00210                 if (*filter != *name) return qfalse;
00211             }
00212             else {
00213                 if (toupper(*filter) != toupper(*name)) return qfalse;
00214             }
00215             filter++;
00216             name++;
00217         }
00218     }
00219     return qtrue;
00220 }

Here is the call graph for this function:

int Com_GetCurrentParseLine void   ) 
 

Definition at line 87 of file q_parse.cpp.

References parseInfo_t::lines, and pi.

00087                                     {
00088     return pi->lines;
00089 }

void* Com_GrowListElement const growList_t list,
int  index
 

Definition at line 81 of file q_shared.cpp.

References Com_Error(), growList_t::currentElements, growList_t::elements, and ERR_DROP.

00081                                                                {
00082     if ( index < 0 || index >= list->currentElements ) {
00083         Com_Error( ERR_DROP, "Com_GrowListElement: %i out of range of %i", 
00084             index, list->currentElements );
00085     }
00086     return list->elements[index];
00087 }

Here is the call graph for this function:

int Com_HashString const char *  fname  ) 
 

Definition at line 229 of file q_shared.cpp.

References FILE_HASH_SIZE, i, and tolower().

00229                                         {
00230     int     i;
00231     long    hash;
00232     char    letter;
00233 
00234     hash = 0;
00235     i = 0;
00236     while (fname[i] != '\0') {
00237         letter = tolower(fname[i]);
00238         if (letter =='.') break;                // don't include extension
00239         if (letter =='\\') letter = '/';        // damn path names
00240         hash+=(long)(letter)*(i+119);
00241         i++;
00242     }
00243     hash &= (FILE_HASH_SIZE-1);
00244     return hash;
00245 }

Here is the call graph for this function:

int Com_IndexForGrowListElement const growList_t list,
const void *  element
 

Definition at line 89 of file q_shared.cpp.

References growList_t::currentElements, growList_t::elements, and i.

00089                                                                                {
00090     int     i;
00091 
00092     for ( i = 0 ; i < list->currentElements ; i++ ) {
00093         if ( list->elements[i] == element ) {
00094             return i;
00095         }
00096     }
00097     return -1;
00098 }

void Com_InitGrowList growList_t list,
int  maxElements
 

Definition at line 37 of file q_shared.cpp.

References Com_Allocate(), growList_t::currentElements, growList_t::elements, and growList_t::maxElements.

Referenced by Com_AddToGrowList().

00037                                                            {
00038     list->maxElements = maxElements;
00039     list->currentElements = 0;
00040     list->elements = (void **)Com_Allocate( list->maxElements * sizeof( void * ) );
00041 }

Here is the call graph for this function:

void Com_MatchToken const char **  buf_p,
const char *  match,
qboolean  warning
 

Definition at line 390 of file q_parse.cpp.

References Com_Parse(), Com_ScriptError(), Com_ScriptWarning(), match(), strcmp(), and token.

Referenced by Com_Parse1DMatrix(), Com_Parse2DMatrix(), Com_Parse3DMatrix(), idSplinePosition::parse(), idInterpolatedPosition::parse(), idFixedPosition::parse(), idCameraFOV::parse(), idCameraEvent::parse(), and idCameraDef::parse().

00390                                                                                  {
00391     const char  *token;
00392 
00393     token = Com_Parse( buf_p );
00394     if ( strcmp( token, match ) ) {
00395         if (warning) {
00396             Com_ScriptWarning( "MatchToken: %s != %s", token, match );
00397         } else {
00398             Com_ScriptError( "MatchToken: %s != %s", token, match );
00399         }
00400     }
00401 }

Here is the call graph for this function:

const char* Com_Parse const char **  data_p  ) 
 

Definition at line 362 of file q_parse.cpp.

References Com_ParseExt(), pi, qtrue, parseInfo_t::token, and parseInfo_t::ungetToken.

Referenced by Com_MatchToken(), Com_Parse1DMatrix(), Com_ParseFloat(), Com_ParseInfos(), Com_ParseInt(), Com_SkipBracedSection(), idSplinePosition::parse(), idInterpolatedPosition::parse(), idFixedPosition::parse(), idCameraFOV::parse(), idCameraEvent::parse(), idCameraDef::parse(), idSplineList::parse(), and idCameraPosition::parseToken().

00362                                                {
00363     if ( pi->ungetToken ) {
00364         pi->ungetToken = qfalse;
00365         return pi->token;
00366     }
00367     return Com_ParseExt( data_p, qtrue );
00368 }

Here is the call graph for this function:

void Com_Parse1DMatrix const char **  buf_p,
int  x,
float *  m
 

Definition at line 498 of file q_parse.cpp.

References atof(), Com_MatchToken(), Com_Parse(), i, m, and token.

Referenced by Com_Parse2DMatrix(), idInterpolatedPosition::parse(), idFixedPosition::parse(), and idSplineList::parse().

00498                                                                 {
00499     const char  *token;
00500     int     i;
00501 
00502     Com_MatchToken( buf_p, "(" );
00503 
00504     for (i = 0 ; i < x ; i++) {
00505         token = Com_Parse(buf_p);
00506         m[i] = atof(token);
00507     }
00508 
00509     Com_MatchToken( buf_p, ")" );
00510 }

Here is the call graph for this function:

void Com_Parse2DMatrix const char **  buf_p,
int  y,
int  x,
float *  m
 

Definition at line 512 of file q_parse.cpp.

References Com_MatchToken(), Com_Parse1DMatrix(), i, m, and x.

Referenced by Com_Parse3DMatrix().

00512                                                                        {
00513     int     i;
00514 
00515     Com_MatchToken( buf_p, "(" );
00516 
00517     for (i = 0 ; i < y ; i++) {
00518         Com_Parse1DMatrix (buf_p, x, m + i * x);
00519     }
00520 
00521     Com_MatchToken( buf_p, ")" );
00522 }

Here is the call graph for this function:

void Com_Parse3DMatrix const char **  buf_p,
int  z,
int  y,
int  x,
float *  m
 

Definition at line 524 of file q_parse.cpp.

References Com_MatchToken(), Com_Parse2DMatrix(), i, m, x, and y.

00524                                                                               {
00525     int     i;
00526 
00527     Com_MatchToken( buf_p, "(" );
00528 
00529     for (i = 0 ; i < z ; i++) {
00530         Com_Parse2DMatrix (buf_p, y, x, m + i * x*y);
00531     }
00532 
00533     Com_MatchToken( buf_p, ")" );
00534 }

Here is the call graph for this function:

float Com_ParseFloat const char **  buf_p  ) 
 

Definition at line 476 of file q_parse.cpp.

References atof(), Com_Parse(), and token.

Referenced by idCameraDef::parse().

00476                                              {
00477     const char      *token;
00478 
00479     token = Com_Parse( buf_p );
00480     if ( !token[0] ) {
00481         return 0;
00482     }
00483     return atof( token );
00484 }

Here is the call graph for this function:

int Com_ParseInfos const char *  buf,
int  max,
char  infos[][MAX_INFO_STRING]
 

Definition at line 420 of file q_shared.cpp.

References Com_Parse(), Com_ParseOnLine(), Com_Printf(), count, Info_SetValueForKey(), Q_strncpyz(), strcmp(), and token.

00420                                                                               {
00421     const char  *token;
00422     int     count;
00423     char    key[MAX_TOKEN_CHARS];
00424 
00425     count = 0;
00426 
00427     while ( 1 ) {
00428         token = Com_Parse( &buf );
00429         if ( !token[0] ) {
00430             break;
00431         }
00432         if ( strcmp( token, "{" ) ) {
00433             Com_Printf( "Missing { in info file\n" );
00434             break;
00435         }
00436 
00437         if ( count == max ) {
00438             Com_Printf( "Max infos exceeded\n" );
00439             break;
00440         }
00441 
00442         infos[count][0] = 0;
00443         while ( 1 ) {
00444             token = Com_Parse( &buf );
00445             if ( !token[0] ) {
00446                 Com_Printf( "Unexpected end of info file\n" );
00447                 break;
00448             }
00449             if ( !strcmp( token, "}" ) ) {
00450                 break;
00451             }
00452             Q_strncpyz( key, token, sizeof( key ) );
00453 
00454             token = Com_ParseOnLine( &buf );
00455             if ( !token[0] ) {
00456                 token = "<NULL>";
00457             }
00458             Info_SetValueForKey( infos[count], key, token );
00459         }
00460         count++;
00461     }
00462 
00463     return count;
00464 }

Here is the call graph for this function:

int Com_ParseInt const char **  buf_p  ) 
 

Definition at line 486 of file q_parse.cpp.

References atof(), atoi, Com_Parse(), and token.

00486                                          {
00487     const char      *token;
00488 
00489     token = Com_Parse( buf_p );
00490     if ( !token[0] ) {
00491         return 0;
00492     }
00493     return atoi( token );
00494 }

Here is the call graph for this function:

const char* Com_ParseOnLine const char **  data_p  ) 
 

Definition at line 375 of file q_parse.cpp.

References Com_ParseExt(), pi, qfalse, parseInfo_t::token, and parseInfo_t::ungetToken.

Referenced by Com_ParseInfos(), Com_ParseRestOfLine(), idSplinePosition::parse(), idInterpolatedPosition::parse(), idFixedPosition::parse(), idCameraFOV::parse(), idCameraEvent::parse(), and idSplineList::parse().

00375                                                      {
00376     if ( pi->ungetToken ) {
00377         pi->ungetToken = qfalse;
00378         return pi->token;
00379     }
00380     return Com_ParseExt( data_p, qfalse );
00381 }

Here is the call graph for this function:

const char* Com_ParseRestOfLine const char **  data_p  ) 
 

Definition at line 456 of file q_parse.cpp.

References Com_ParseOnLine(), line, Q_strcat(), and token.

00456                                                          {
00457     static char line[MAX_TOKEN_CHARS];
00458     const char *token;
00459 
00460     line[0] = 0;
00461     while( 1 ) {
00462         token = Com_ParseOnLine( data_p );
00463         if ( !token[0] ) {
00464             break;
00465         }
00466         if ( line[0] ) {
00467             Q_strcat( line, sizeof(line), " " );
00468         }
00469         Q_strcat( line, sizeof(line), token );
00470     }
00471 
00472     return line;
00473 }

Here is the call graph for this function:

void QDECL Com_Printf const char *  msg,
  ...
 

Definition at line 243 of file l_cmd.c.

References Log_Print(), Sys_Printf(), TranslateString(), va_end, va_list, va_start, and vsprintf().

Referenced by Alias_Parse(), BG_AddPredictableEventToPlayerstate(), BG_CanItemBeGrabbed(), BotImport_Print(), Cbuf_AddText(), Cbuf_InsertText(), CG_DrawClientScore(), CG_ParseAnimationFile(), CG_RegisterClientModelname(), CG_RegisterClientSkin(), Character_Parse(), CL_AdjustTimeDelta(), CL_CgameSystemCalls(), CL_CheckTimeout(), CL_Clientinfo_f(), CL_Configstrings_f(), CL_Connect_f(), CL_ConnectionlessPacket(), CL_DemoCompleted(), CL_DisconnectPacket(), CL_ForwardCommandToServer(), CL_ForwardToServer_f(), CL_GlobalServers_f(), CL_Init(), CL_InitCGame(), CL_InitDownloads(), CL_InitRef(), CL_KeyEvent(), CL_KeyState(), CL_LocalServers_f(), CL_MouseMove(), CL_OpenedPK3List_f(), CL_PacketEvent(), CL_ParseDownload(), CL_ParsePacketEntities(), CL_ParseServerMessage(), CL_ParseSnapshot(), CL_Ping_f(), CL_PlayDemo_f(), CL_Rcon_f(), CL_ReadDemoMessage(), CL_Reconnect_f(), CL_Record_f(), CL_ReferencedPK3List_f(), CL_RefPrintf(), CL_RequestAuthorization(), CL_RequestMotd(), CL_SendCmd(), CL_ServerInfoPacket(), CL_ServersResponsePacket(), CL_ServerStatus_f(), CL_ServerStatusResponse(), CL_Setenv_f(), CL_SetModel_f(), CL_Shutdown(), CL_StopRecord_f(), CL_UISystemCalls(), CL_WalkDemoExt(), CL_WritePacket(), ClientForString(), CM_AddFacetBevels(), CM_DrawDebugSurface(), CM_GridPlane(), Cmd_AddCommand(), Cmd_Echo_f(), Cmd_Exec_f(), Cmd_List_f(), Cmd_Vstr_f(), Com_DPrintf(), Com_Error(), Com_EventLoop(), Com_Frame(), Com_Freeze_f(), Com_Init(), Com_InitHunkMemory(), Com_InitJournaling(), Com_Meminfo_f(), Com_ModifyMsec(), COM_ParseError(), Com_ParseInfos(), COM_ParseWarning(), Com_Printf(), Com_PushEvent(), Com_RunAndTimeServerPacket(), Com_ScriptWarning(), Com_sprintf(), Com_TouchMemory(), Com_WriteCDKey(), Com_WriteConfig_f(), Com_WriteConfigToFile(), Con_Dump_f(), Console_Key(), CreateGameWindow(), Cvar_Command(), Cvar_Get(), Cvar_List_f(), Cvar_Reset_f(), Cvar_Set2(), Cvar_Set_f(), Cvar_SetA_f(), Cvar_SetS_f(), Cvar_SetU_f(), Cvar_Toggle_f(), Field_CompleteCommand(), Font_Report(), FS_CopyFile(), FS_CreatePath(), FS_Dir_f(), FS_FOpenFileAppend(), FS_FOpenFileRead(), FS_FOpenFileWrite(), FS_NewDir_f(), FS_Path_f(), FS_Rename(), FS_SetRestrictions(), FS_Startup(), FS_SV_FOpenFileRead(), FS_SV_FOpenFileWrite(), FS_SV_Rename(), FS_TouchFile_f(), FS_Write(), FS_WriteFile(), G_ParseInfos(), GameType_Parse(), idSplineList::getPosition(), GetWavinfo(), GLimp_ChangeMode(), GLimp_EndFrame(), GLimp_FrontEndSleep(), GLimp_Init(), GLimp_RenderThreadWrapper(), GLimp_SetGamma(), GLimp_Shutdown(), Hunk_Clear(), Hunk_FreeTempMemory(), IN_ActivateDIMouse(), IN_Frame(), IN_Init(), IN_InitDIMouse(), IN_JoyMove(), IN_KeyDown(), IN_Startup(), IN_StartupJoystick(), IN_StartupMIDI(), IN_StartupMouse(), Info_Print(), Info_SetValueForKey(), Info_SetValueForKey_Big(), Key_Bind_f(), Key_Bindlist_f(), Key_Unbind_f(), MapList_Parse(), MidiInfo_f(), MSG_ReadDeltaEntity(), MSG_ReadDeltaPlayerstate(), MSG_ReportChangeVectors_f(), MSG_WriteBigString(), MSG_WriteString(), NET_CompareAdr(), NET_CompareBaseAdr(), NET_GetLocalAddress(), NET_Init(), NET_IPSocket(), NET_IPXSocket(), NET_OpenIP(), NET_OpenSocks(), NET_SendPacket(), Netchan_Process(), Netchan_Transmit(), Netchan_TransmitNextFragment(), PC_SourceError(), PC_SourceWarning(), PM_CorrectAllSolid(), PM_GroundTrace(), PM_GroundTraceMissed(), PM_StepSlideMove(), PrintMatches(), processSystemDefinedEvent(), R_Init(), RE_RegisterModel(), RE_RegisterShader(), RE_RegisterShaderLightMap(), RE_RegisterShaderNoMip(), RE_RegisterSkin(), readQuadInfo(), ReleaseAllDisplays(), S_AddLoopingSound(), S_AddRealLoopingSound(), S_DisplayFreeMemory(), S_Init(), S_LoadSound(), S_Music_f(), S_RegisterSound(), S_SoundInfo_f(), S_SoundList_f(), S_StartBackgroundTrack(), S_StartLocalSound(), S_StartSound(), S_Update(), S_UpdateBackgroundTrack(), sendEventForCharacter(), SHOWNET(), SND_setup(), SNDDMA_Activate(), SNDDMA_BeginPainting(), SNDDMA_GetDMAPos(), SNDDMA_Init(), SNDDMA_InitDS(), SNDDMA_Shutdown(), String_Report(), SV_AddServerCommand(), SV_AreaEntities_r(), SV_AuthorizeIpPacket(), SV_Ban_f(), SV_BanNum_f(), SV_BotLibSetup(), SV_ClientCommand(), SV_ConSay_f(), SV_DirectConnect(), SV_DumpUser_f(), SV_ExecuteClientMessage(), SV_GamePrint(), SV_GameSystemCalls(), SV_GetChallenge(), SV_GetPlayerByName(), SV_GetPlayerByNum(), SV_Kick_f(), SV_KickNum_f(), SV_Map_f(), SV_MapRestart_f(), SV_MasterHeartbeat(), SV_NextDownload_f(), SV_PacketEvent(), SV_SectorList_f(), SV_SendClientSnapshot(), SV_SendServerCommand(), SV_Serverinfo_f(), SV_Shutdown(), SV_SpawnServer(), SV_Status_f(), SV_Systeminfo_f(), SV_UnlinkEntity(), SV_UserMove(), SV_WriteDownloadToClient(), SVC_RemoteCommand(), Sys_ConfigureFPU(), Sys_ConsoleInputInit(), Sys_ConsoleInputShutdown(), Sys_FadeScreen(), Sys_FadeScreens(), Sys_GetGammaTable(), Sys_GetPacket(), Sys_Init(), Sys_InitInput(), Sys_LoadDll(), Sys_ProcessMouseMovedEvent(), Sys_ProcessorCount(), Sys_QueEvent(), Sys_QueryVideoMemory(), Sys_ResumeGL(), Sys_SendPacket(), Sys_ShowIP(), Sys_Shutdown(), Sys_ShutdownInput(), Sys_StartMouseInput(), Sys_StopMouseInput(), Sys_UnfadeScreen(), Sys_UnfadeScreens(), Sys_UnloadDll(), Team_Parse(), UI_LoadMenus(), UI_ParseAnimationFile(), UI_ParseInfos(), UI_ParseMenu(), UI_RegisterClientModelname(), UI_RunMenuScript(), UI_SetActiveMenu(), UI_StopServerRefresh(), UpdateIPBans(), VM_Call(), VM_CallInterpreted(), VM_Compile(), VM_Create(), VM_LoadSymbols(), VM_Restart(), VM_StackTrace(), VM_VmInfo_f(), VM_VmProfile_f(), and WinMain().

00244 {
00245     va_list argptr;
00246     char text[1024];
00247 
00248     va_start(argptr, fmt);
00249     vsprintf(text, fmt, argptr);
00250     va_end(argptr);
00251     Log_Print(text);
00252 } //end of the funcion Com_Printf

Here is the call graph for this function:

void Com_ScriptError const char *  msg,
  ...
 

Definition at line 98 of file q_parse.cpp.

References Com_Error(), ERR_DROP, parseInfo_t::lines, parseInfo_t::parseFile, pi, string(), va_end, va_list, va_start, and vsprintf().

Referenced by Com_MatchToken(), and Com_UngetToken().

00098                                              {
00099     va_list     argptr;
00100     char        string[32000];
00101 
00102     va_start( argptr, msg );
00103     vsprintf( string, msg,argptr );
00104     va_end( argptr );
00105 
00106     Com_Error( ERR_DROP, "File %s, line %i: %s", pi->parseFile, pi->lines, string );
00107 }

Here is the call graph for this function:

void Com_ScriptWarning const char *  msg,
  ...
 

Definition at line 109 of file q_parse.cpp.

References Com_Printf(), parseInfo_t::lines, parseInfo_t::parseFile, pi, string(), va_end, va_list, va_start, and vsprintf().

Referenced by Com_MatchToken().

00109                                                {
00110     va_list     argptr;
00111     char        string[32000];
00112 
00113     va_start( argptr, msg );
00114     vsprintf( string, msg,argptr );
00115     va_end( argptr );
00116 
00117     Com_Printf( "File %s, line %i: %s", pi->parseFile, pi->lines, string );
00118 }

Here is the call graph for this function:

void Com_SkipBracedSection const char **  program  ) 
 

Definition at line 413 of file q_parse.cpp.

References Com_Parse(), program(), and token.

00413                                                      {
00414     const char          *token;
00415     int             depth;
00416 
00417     depth = 0;
00418     do {
00419         token = Com_Parse( program );
00420         if( token[1] == 0 ) {
00421             if( token[0] == '{' ) {
00422                 depth++;
00423             }
00424             else if( token[0] == '}' ) {
00425                 depth--;
00426             }
00427         }
00428     } while( depth && *program );
00429 }

Here is the call graph for this function:

char* Com_SkipPath char *  pathname  ) 
 

Definition at line 253 of file q_shared.cpp.

00254 {
00255     char    *last;
00256     
00257     last = pathname;
00258     while (*pathname)
00259     {
00260         if (*pathname=='/')
00261             last = pathname+1;
00262         pathname++;
00263     }
00264     return last;
00265 }

void Com_SkipRestOfLine const char **  data  ) 
 

Definition at line 436 of file q_parse.cpp.

References c, data, parseInfo_t::lines, p, and pi.

00436                                                 {
00437     const char  *p;
00438     int     c;
00439 
00440     p = *data;
00441     while ( (c = *p++) != 0 ) {
00442         if ( c == '\n' ) {
00443             pi->lines++;
00444             break;
00445         }
00446     }
00447 
00448     *data = p;
00449 }

void QDECL Com_sprintf char *  dest,
int  size,
const char *  fmt,
  ...
 

Definition at line 870 of file q_shared.c.

References Com_Error(), Com_Printf(), ERR_FATAL, Q_strncpyz(), QDECL, va_end, va_list, va_start, and vsprintf().

Referenced by AAS_LoadFiles(), AAS_ReadRouteCache(), AAS_WriteRouteCache(), ArenaServers_UpdateMenu(), ArenaServers_UpdatePicture(), BotDeathmatchAI(), BotGetActivateGoal(), BotInitLibrary(), BotMatch_CheckPoint(), BotPrintActivateGoalInfo(), BotRecordNodeSwitch(), BotReportStatus(), BotSayTeamOrderAlways(), BotSetInfoConfigString(), BuildShaderStateConfig(), CG_DrawAreaPowerUp(), CG_DrawBlueScore(), CG_DrawClientScore(), CG_DrawField(), CG_DrawPlayerAmmoValue(), CG_DrawPlayerArmorValue(), CG_DrawPlayerHealth(), CG_DrawPlayerScore(), CG_DrawRedScore(), CG_DrawReward(), CG_DrawSelectedPlayerArmor(), CG_DrawSelectedPlayerHealth(), CG_DrawTeamOverlay(), CG_FindClientHeadFile(), CG_FindClientModelFile(), CG_HarvesterSkulls(), CG_LoadingClient(), CG_ParseServerinfo(), CG_ParseVoiceChats(), CG_PlaceString(), CG_RegisterClientModelname(), CG_RegisterGraphics(), CG_RegisterSounds(), CG_TellAttacker_f(), CG_TellTarget_f(), CG_VoiceChatListForClient(), CG_VoiceChatLocal(), CG_VoiceTellAttacker_f(), CG_VoiceTellTarget_f(), CIN_PlayCinematic(), CL_AddKeyUpCommands(), CL_BeginDownload(), CL_DemoFilename(), CL_GetServerCommand(), CL_InitCGame(), CL_KeyEvent(), CL_PlayDemo_f(), CL_Record_f(), CL_RequestMotd(), CL_SendPureChecksums(), CL_ServerStatusResponse(), CL_WalkDemoExt(), Cmd_CallTeamVote_f(), Cmd_CallVote_f(), COM_BeginParseSession(), Com_DefaultExtension(), COM_DefaultExtension(), Console_Key(), Cvar_SetValue(), Cvar_WriteVariables(), DeathmatchScoreboardMessage(), Demos_MenuInit(), Field_CompleteCommand(), FS_BuildOSPath(), FS_ComparePaks(), FS_FOpenFileRead(), FS_GamePureChecksum(), G_ItemDisabled(), G_LogPrintf(), G_RemapTeamShaders(), G_Say(), GL_CheckErrors(), Hunk_Log(), Hunk_SmallLog(), Info_SetValueForKey(), Info_SetValueForKey_Big(), LoadScriptFile(), Message_Key(), NET_AdrToString(), NET_BaseAdrToString(), ParseSkyParms(), PlayerIcon(), PlayerModel_BuildList(), PS_SetBaseFolder(), QGL_EnableLogging(), QGL_Init(), R_LoadSubmodels(), R_ScreenShot_f(), R_ScreenshotFilename(), R_ScreenshotFilenameJPEG(), R_ScreenShotJPEG_f(), RE_RegisterFont(), S_Play_f(), ScanAndLoadShaderFiles(), ServerOptions_SetMenuItems(), ServerOptions_Start(), ServerPlayerIcon(), SP_target_speaker(), SpecifyServer_Event(), SpecifyServer_MenuInit(), StartServer_Cache(), StartServer_Update(), SV_ClientCommand(), SV_Map_f(), SV_TouchCGame(), SV_WriteDownloadToClient(), SVC_Status(), Sys_ListFiles(), Sys_ListFilteredFiles(), Sys_LoadDll(), Team_GetLocationMsg(), TeamplayInfoMessage(), UI_BuildFindPlayerList(), UI_BuildQ3Model_List(), UI_CalcPostGameStats(), UI_CanShowTierVideo(), UI_FeederItemText(), UI_FindClientHeadFile(), UI_GetAwardLevel(), UI_GetBestScore(), UI_GetServerStatusInfo(), UI_hasSkinForBase(), UI_LoadBestScores(), UI_LoadDemos(), UI_LogAwardData(), UI_PrintTime(), UI_ReadableSize(), UI_RegisterClientModelname(), UI_RegisterClientSkin(), UI_RunMenuScript(), UI_SetBestScore(), UI_ShowTierVideo(), UI_SPLevelMenu_MenuDraw(), UI_SPPostgameMenu_DrawAwardsMedals(), UI_SPUnlock_f(), UI_SPUnlockMedals_f(), UI_StartSkirmish(), UI_TeamOrdersMenu_ListEvent(), UpdateTournamentInfo(), VM_Create(), VM_LoadSymbols(), VM_Restart(), VM_ValueToSymbol(), vtos(), and Z_LogZoneHeap().

00870                                                                     {
00871     int     len;
00872     va_list     argptr;
00873     char    bigbuffer[32000];   // big, but small enough to fit in PPC stack
00874 
00875     va_start (argptr,fmt);
00876     len = vsprintf (bigbuffer,fmt,argptr);
00877     va_end (argptr);
00878     if ( len >= sizeof( bigbuffer ) ) {
00879         Com_Error( ERR_FATAL, "Com_sprintf: overflowed bigbuffer" );
00880     }
00881     if (len >= size) {
00882         Com_Printf ("Com_sprintf: overflow of %i in %i\n", len, size);
00883 #ifdef  _DEBUG
00884         __asm {
00885             int 3;
00886         }
00887 #endif
00888     }
00889     Q_strncpyz (dest, bigbuffer, size );
00890 }

Here is the call graph for this function:

const char* Com_StringContains const char *  str1,
const char *  str2,
int  casesensitive
 

Definition at line 118 of file q_shared.cpp.

References i, j, strlen(), and toupper().

Referenced by Com_Filter().

00118                                                                                        {
00119     int len, i, j;
00120 
00121     len = strlen(str1) - strlen(str2);
00122     for (i = 0; i <= len; i++, str1++) {
00123         for (j = 0; str2[j]; j++) {
00124             if (casesensitive) {
00125                 if (str1[j] != str2[j]) {
00126                     break;
00127                 }
00128             }
00129             else {
00130                 if (toupper(str1[j]) != toupper(str2[j])) {
00131                     break;
00132                 }
00133             }
00134         }
00135         if (!str2[j]) {
00136             return str1;
00137         }
00138     }
00139     return NULL;
00140 }

Here is the call graph for this function:

void Com_StripExtension const char *  in,
char *  out
 

Definition at line 272 of file q_shared.cpp.

References in.

00272                                                      {
00273     while ( *in && *in != '.' ) {
00274         *out++ = *in++;
00275     }
00276     *out = 0;
00277 }

void Com_UngetToken void   ) 
 

Definition at line 129 of file q_parse.cpp.

References Com_ScriptError(), pi, and parseInfo_t::ungetToken.

00129                             {
00130     if ( pi->ungetToken ) {
00131         Com_ScriptError( "UngetToken called twice" );
00132     }
00133     pi->ungetToken = qtrue;
00134 }

Here is the call graph for this function:

void Info_NextPair const char **  s,
char  key[MAX_INFO_KEY],
char  value[MAX_INFO_VALUE]
 

Definition at line 792 of file q_shared.cpp.

References head, and s.

Referenced by CL_SystemInfoChanged(), ServerInfo_MenuDraw(), and UI_ServerInfoMenu().

00792                                                                                               {
00793     char    *o;
00794     const char  *s;
00795 
00796     s = *head;
00797 
00798     if ( *s == '\\' ) {
00799         s++;
00800     }
00801     key[0] = 0;
00802     value[0] = 0;
00803 
00804     o = key;
00805     while ( *s != '\\' ) {
00806         if ( !*s ) {
00807             *o = 0;
00808             *head = s;
00809             return;
00810         }
00811         *o++ = *s++;
00812     }
00813     *o = 0;
00814     s++;
00815 
00816     o = value;
00817     while ( *s != '\\' && *s ) {
00818         *o++ = *s++;
00819     }
00820     *o = 0;
00821 
00822     *head = s;
00823 }

void Info_RemoveKey char *  s,
const char *  key
 

Definition at line 1032 of file q_shared.c.

References Com_Error(), ERR_DROP, s, strchr(), strcmp(), strcpy(), and strlen().

Referenced by Info_SetValueForKey().

01032                                                 {
01033     char    *start;
01034     char    pkey[MAX_INFO_KEY];
01035     char    value[MAX_INFO_VALUE];
01036     char    *o;
01037 
01038     if ( strlen( s ) >= MAX_INFO_STRING ) {
01039         Com_Error( ERR_DROP, "Info_RemoveKey: oversize infostring" );
01040     }
01041 
01042     if (strchr (key, '\\')) {
01043         return;
01044     }
01045 
01046     while (1)
01047     {
01048         start = s;
01049         if (*s == '\\')
01050             s++;
01051         o = pkey;
01052         while (*s != '\\')
01053         {
01054             if (!*s)
01055                 return;
01056             *o++ = *s++;
01057         }
01058         *o = 0;
01059         s++;
01060 
01061         o = value;
01062         while (*s != '\\' && *s)
01063         {
01064             if (!*s)
01065                 return;
01066             *o++ = *s++;
01067         }
01068         *o = 0;
01069 
01070         if (!strcmp (key, pkey) )
01071         {
01072             strcpy (start, s);  // remove this part
01073             return;
01074         }
01075 
01076         if (!*s)
01077             return;
01078     }
01079 
01080 }

Here is the call graph for this function:

void Info_SetValueForKey char *  s,
const char *  key,
const char *  value
 

Definition at line 1165 of file q_shared.c.

References Com_Error(), Com_Printf(), Com_sprintf(), ERR_DROP, Info_RemoveKey(), s, strcat(), strchr(), strcpy(), strlen(), and value.

Referenced by ArenaServers_InsertFavorites(), BotDeathmatchAI(), BotSetUserInfo(), CL_CheckForResend(), CL_RequestMotd(), CL_ServerInfoPacket(), Cmd_TeamTask_f(), Com_ParseInfos(), Cvar_InfoString(), G_AddBot(), G_LoadArenas(), G_ParseInfos(), LAN_GetServerInfo(), SV_DirectConnect(), SV_RankNewGameCBF(), SV_UserinfoChanged(), SVC_Info(), SVC_Status(), UI_LoadArenas(), UI_LogAwardData(), UI_ParseInfos(), UI_SetBestScore(), UI_ShowTierVideo(), UI_SPUnlock_f(), and UI_SPUnlockMedals_f().

01165                                                                         {
01166     char    newi[MAX_INFO_STRING];
01167 
01168     if ( strlen( s ) >= MAX_INFO_STRING ) {
01169         Com_Error( ERR_DROP, "Info_SetValueForKey: oversize infostring" );
01170     }
01171 
01172     if (strchr (key, '\\') || strchr (value, '\\'))
01173     {
01174         Com_Printf ("Can't use keys or values with a \\\n");
01175         return;
01176     }
01177 
01178     if (strchr (key, ';') || strchr (value, ';'))
01179     {
01180         Com_Printf ("Can't use keys or values with a semicolon\n");
01181         return;
01182     }
01183 
01184     if (strchr (key, '\"') || strchr (value, '\"'))
01185     {
01186         Com_Printf ("Can't use keys or values with a \"\n");
01187         return;
01188     }
01189 
01190     Info_RemoveKey (s, key);
01191     if (!value || !strlen(value))
01192         return;
01193 
01194     Com_sprintf (newi, sizeof(newi), "\\%s\\%s", key, value);
01195 
01196     if (strlen(newi) + strlen(s) > MAX_INFO_STRING)
01197     {
01198         Com_Printf ("Info string length exceeded\n");
01199         return;
01200     }
01201 
01202     strcat (newi, s);
01203     strcpy (s, newi);
01204 }

Here is the call graph for this function:

qboolean Info_Validate const char *  s  ) 
 

Definition at line 1148 of file q_shared.c.

References qboolean, s, and strchr().

Referenced by ClientUserinfoChanged().

01148                                         {
01149     if ( strchr( s, '\"' ) ) {
01150         return qfalse;
01151     }
01152     if ( strchr( s, ';' ) ) {
01153         return qfalse;
01154     }
01155     return qtrue;
01156 }

Here is the call graph for this function:

char* Info_ValueForKey const char *  s,
const char *  key
 

Definition at line 936 of file q_shared.c.

References Com_Error(), ERR_DROP, Q_stricmp(), s, strlen(), and value.

Referenced by ArenaServers_Insert(), BotFirstClientInRankings(), BotIsFirstInRankings(), BotIsLastInRankings(), BotIsObserver(), BotLastClientInRankings(), BotMapScripts(), BotMapTitle(), BotNumActivePlayers(), BotNumTeamMates(), BotRandomOpponentName(), BotSameTeam(), BotSortTeamMatesByBaseTravelTime(), BotTeam(), BotTeamOrders(), BotTeamplayReport(), BotUpdateInfoConfigStrings(), CG_DrawAttacker(), CG_DrawInformation(), CG_LoadingClient(), CG_NewClientInfo(), CG_Obituary(), CG_ParseServerinfo(), CL_InitCGame(), CL_MotdPacket(), CL_ServerInfoPacket(), CL_SetServerInfo(), CL_SystemInfoChanged(), ClientConnect(), ClientFromName(), ClientName(), ClientOnSameTeamFromName(), ClientSkin(), ClientSpawn(), ClientUserinfoChanged(), G_AddBot(), G_AddRandomBot(), G_BotConnect(), G_GetArenaInfoByMap(), G_GetBotInfoByName(), G_InitBots(), G_InitSessionData(), InGame_MenuInit(), Prepname(), ServerOptions_InitBotNames(), StartServer_Cache(), StartServer_GametypeEvent(), SV_DirectConnect(), SV_UserinfoChanged(), SVC_Status(), Svcmd_BotList_f(), TeamMain_MenuInit(), UI_AddBotsMenu_Init(), UI_AddBotsMenu_SortCompare(), UI_BotSelectMenu_Default(), UI_BotSelectMenu_SortCompare(), UI_BotSelectMenu_UpdateGrid(), UI_BuildPlayerList(), UI_BuildServerDisplayList(), UI_CalcPostGameStats(), UI_CanShowTierVideo(), UI_DrawConnectScreen(), UI_FeederItemText(), UI_FeederSelection(), UI_GetArenaInfoByMap(), UI_GetArenaInfoByNumber(), UI_GetAwardLevel(), UI_GetBestScore(), UI_GetBotInfoByName(), UI_GetBotNameByNumber(), UI_GetCurrentGame(), UI_GetSpecialArenaInfo(), UI_LoadArenas(), UI_LogAwardData(), UI_RemoveBotsMenu_GetBots(), UI_RunMenuScript(), UI_SetBestScore(), UI_ShowTierVideo(), UI_SPArena_Start(), UI_SPLevelMenu(), UI_SPLevelMenu_MenuDraw(), UI_SPLevelMenu_SetBots(), UI_SPLevelMenu_SetMenuArena(), UI_SPLevelMenu_SetMenuItems(), UI_SPPostgameMenu_f(), UI_SPPostgameMenu_MenuDraw(), UI_SPPostgameMenu_MenuDrawScoreLine(), UI_TeamOrdersMenu_BuildBotList(), UI_TeamOrdersMenu_f(), and UI_TierCompleted().

00936                                                          {
00937     char    pkey[BIG_INFO_KEY];
00938     static  char value[2][BIG_INFO_VALUE];  // use two buffers so compares
00939                                             // work without stomping on each other
00940     static  int valueindex = 0;
00941     char    *o;
00942     
00943     if ( !s || !key ) {
00944         return "";
00945     }
00946 
00947     if ( strlen( s ) >= BIG_INFO_STRING ) {
00948         Com_Error( ERR_DROP, "Info_ValueForKey: oversize infostring" );
00949     }
00950 
00951     valueindex ^= 1;
00952     if (*s == '\\')
00953         s++;
00954     while (1)
00955     {
00956         o = pkey;
00957         while (*s != '\\')
00958         {
00959             if (!*s)
00960                 return "";
00961             *o++ = *s++;
00962         }
00963         *o = 0;
00964         s++;
00965 
00966         o = value[valueindex];
00967 
00968         while (*s != '\\' && *s)
00969         {
00970             *o++ = *s++;
00971         }
00972         *o = 0;
00973 
00974         if (!Q_stricmp (key, pkey) )
00975             return value[valueindex];
00976 
00977         if (!*s)
00978             break;
00979         s++;
00980     }
00981 
00982     return "";
00983 }

Here is the call graph for this function:

float LittleFloat float  l  ) 
 

Definition at line 1065 of file l_cmd.c.

References _LittleFloat, and l.

Referenced by AAS_SwapAASData(), CMod_LoadPatches(), CMod_LoadPlanes(), CMod_LoadSubmodels(), HL_SwapBSPFile(), ParseFace(), ParseFlare(), ParseMesh(), ParseTriSurf(), Q1_SwapBSPFile(), Q2_SwapBSPFile(), Q3_SwapBSPFile(), R_LoadMD3(), R_LoadMD4(), R_LoadPlanes(), R_LoadSubmodels(), Sin_SwapBSPFile(), and SwapBSPFile().

01066 {
01067     return l;
01068 }

int LittleLong int  l  ) 
 

Definition at line 1047 of file l_cmd.c.

References _LittleLong, and l.

Referenced by AAS_LoadAASFile(), AAS_SwapAASData(), AAS_WriteAASFile(), AAS_WriteAASLump(), AddLump(), CL_Netchan_Decode(), CL_PacketEvent(), CL_ReadDemoMessage(), CL_Record_f(), CL_WriteDemoMessage(), CM_Checksum(), CM_LoadMap(), CM_LumpChecksum(), CMod_LoadBrushes(), CMod_LoadBrushSides(), CMod_LoadLeafBrushes(), CMod_LoadLeafs(), CMod_LoadLeafSurfaces(), CMod_LoadNodes(), CMod_LoadPatches(), CMod_LoadShaders(), CMod_LoadSubmodels(), CMod_LoadVisibility(), FGetLittleLong(), FindMiptex(), FindQuakeFilesInPak(), FS_LoadZipFile(), HL_AddLump(), HL_LoadBSPFile(), HL_SwapBSPFile(), HL_WriteBSPFile(), LoadBMP(), LoadLBM(), LoadMapFromBSP(), MSG_ReadBits(), MSG_WriteBits(), Netchan_Process(), ParseFace(), ParseFlare(), ParseMesh(), ParseTriSurf(), Q1_AddLump(), Q1_LoadBSPFile(), Q1_SwapBSPFile(), Q1_WriteBSPFile(), Q2_AddLump(), Q2_LoadBSPFile(), Q2_LoadBSPFileTexinfo(), Q2_SwapBSPFile(), Q2_WriteBSPFile(), Q3_AddLump(), Q3_SwapBlock(), Q3_SwapBSPFile(), Q3_WriteBSPFile(), R_LoadFogs(), R_LoadMarksurfaces(), R_LoadMD3(), R_LoadMD4(), R_LoadNodesAndLeafs(), R_LoadShaders(), R_LoadSubmodels(), R_LoadSurfaces(), R_LoadVisibility(), RE_LoadWorldMap(), RE_RegisterModel(), ShaderForShaderNum(), Sin_AddLump(), Sin_LoadBSPFile(), Sin_LoadBSPFileTexinfo(), Sin_SwapBSPFile(), Sin_WriteBSPFile(), SwapBlock(), SwapBSPFile(), Texture_LoadTexture(), unzlocal_getLong(), VM_Create(), VM_Restart(), WriteBSPFile(), and yuv_to_rgb24().

01048 {
01049     return l;
01050 }

short LittleShort short  l  ) 
 

Definition at line 1029 of file l_cmd.c.

References _LittleShort, and l.

Referenced by AAS_SwapAASData(), FGetLittleShort(), HL_SwapBSPFile(), LoadBMP(), LoadPCX(), LoadTGA(), LoadTGABuffer(), MSG_ReadBits(), MSG_WriteBits(), Q1_SwapBSPFile(), Q2_SwapBSPFile(), R_LoadMD3(), ResampleSfx(), ResampleSfxRaw(), S_ByteSwapRawSamples(), Sin_SwapBSPFile(), unzlocal_getShort(), and WritePCXfile().

01030 {
01031     return l;
01032 }

char* Q_CleanStr char *  string  ) 
 

Definition at line 848 of file q_shared.c.

References c, d, Q_IsColorString, and s.

Referenced by ArenaServers_Insert(), CG_DrawInformation(), CG_LoadingClient(), ClientFromName(), ClientName(), ClientOnSameTeamFromName(), Cmd_CallTeamVote_f(), Controls_MenuInit(), G_AddRandomBot(), G_RemoveRandomBot(), PlayerModel_SetMenuItems(), PlayerSettings_DrawName(), Prepname(), Rankings_DrawName(), ServerOptions_InitPlayerItems(), SV_GetPlayerByName(), UI_BotSelectMenu_UpdateGrid(), UI_BuildFindPlayerList(), UI_BuildPlayerList(), UI_RemoveBotsMenu_SetBotNames(), UI_SPLevelMenu_MenuDraw(), UI_SPLevelMenu_SetBots(), UI_SPPostgameMenu_MenuDrawScoreLine(), and UI_TeamOrdersMenu_BuildBotList().

00848                                  {
00849     char*   d;
00850     char*   s;
00851     int     c;
00852 
00853     s = string;
00854     d = string;
00855     while ((c = *s) != 0 ) {
00856         if ( Q_IsColorString( s ) ) {
00857             s++;
00858         }       
00859         else if ( c >= 0x20 && c <= 0x7E ) {
00860             *d++ = c;
00861         }
00862         s++;
00863     }
00864     *d = '\0';
00865 
00866     return string;
00867 }

int Q_isalpha int  c  ) 
 

Definition at line 677 of file q_shared.c.

References c.

Referenced by MenuField_Key(), Rankings_DrawName(), and Rankings_DrawPassword().

00678 {
00679     if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
00680         return ( 1 );
00681     return ( 0 );
00682 }

int Q_islower int  c  ) 
 

Definition at line 663 of file q_shared.c.

References c.

Referenced by MenuField_Key().

00664 {
00665     if (c >= 'a' && c <= 'z')
00666         return ( 1 );
00667     return ( 0 );
00668 }

int Q_isprint int  c  ) 
 

Definition at line 656 of file q_shared.c.

References c.

Referenced by ScrollList_Key().

00657 {
00658     if ( c >= 0x20 && c <= 0x7E )
00659         return ( 1 );
00660     return ( 0 );
00661 }

int Q_isupper int  c  ) 
 

Definition at line 670 of file q_shared.c.

References c.

Referenced by MenuField_Key(), and ScrollList_Key().

00671 {
00672     if (c >= 'A' && c <= 'Z')
00673         return ( 1 );
00674     return ( 0 );
00675 }

int Q_PrintStrlen const char *  string  ) 
 

Definition at line 825 of file q_shared.c.

References p, and Q_IsColorString.

Referenced by CG_DrawAttacker(), and Field_VariableSizeDraw().

00825                                         {
00826     int         len;
00827     const char  *p;
00828 
00829     if( !string ) {
00830         return 0;
00831     }
00832 
00833     len = 0;
00834     p = string;
00835     while( *p ) {
00836         if( Q_IsColorString( p ) ) {
00837             p += 2;
00838             continue;
00839         }
00840         p++;
00841         len++;
00842     }
00843 
00844     return len;
00845 }

void Q_strcat char *  dest,
int  size,
const char *  src
 

Definition at line 814 of file q_shared.c.

References Com_Error(), ERR_FATAL, Q_strncpyz(), src, and strlen().

Referenced by BuildShaderStateConfig(), CG_BuildSpectatorString(), CL_SendPureChecksums(), Com_ParseRestOfLine(), Com_Printf(), ConcatRemaining(), Field_CompleteCommand(), FS_ComparePaks(), FS_LoadedPakChecksums(), FS_LoadedPakNames(), FS_LoadedPakPureChecksums(), FS_ReferencedPakChecksums(), FS_ReferencedPakNames(), FS_ReferencedPakPureChecksums(), Item_EnableShowViaCvar(), Item_RunScript(), keyConcatArgs(), PC_Script_Parse(), QGL_Init(), ServerInfo_MenuDraw(), SVC_RemoteCommand(), Sys_DefaultHomePath(), UI_RunMenuScript(), and UpdateIPBans().

00814                                                        {
00815     int     l1;
00816 
00817     l1 = strlen( dest );
00818     if ( l1 >= size ) {
00819         Com_Error( ERR_FATAL, "Q_strcat: already overflowed" );
00820     }
00821     Q_strncpyz( dest + l1, src, size - l1 );
00822 }

Here is the call graph for this function:

int Q_stricmp const char *  s1,
const char *  s2
 

Definition at line 785 of file q_shared.c.

References Q_stricmpn().

Referenced by AAS_IndexFromString(), AddRemap(), AddTriangleModels(), Alias_Parse(), ArenaServers_Compare(), ArenaServers_DoRefresh(), ArenaServers_InsertFavorites(), ArenaServers_LoadFavorites(), ArenaServers_Remove(), Asset_Parse(), BG_FindItem(), BindingFromName(), BindingIDFromName(), BotAI(), BotAlreadySelected(), BotChooseInitialChatMessage(), BotFindWayPoint(), BotGetLevelItemGoal(), BotGetMapLocationGoal(), BotGetTeamMateTaskPreference(), BotLoadInitialChat(), BotMapScripts(), BotMatch_CTF(), BotMatch_StopTeamLeaderShip(), BotMatch_TaskPreference(), BotMatch_WhatIsMyCommand(), BotMatch_WhoIsTeamLeader(), BotNearestVisibleItem(), BotNumInitialChats(), BotReportStatus(), BotSetBrushModelTypes(), BotSetEntityNumForGoal(), BotSetInfoConfigString(), BotTeamAI(), BotVoiceChat_StopLeader(), BotVoiceChat_WhoIsLeader(), BotVoiceChatCommand(), CG_ClientNumFromName(), CG_ConsoleCommand(), CG_GetVoiceChat(), CG_HeadModelVoiceChats(), CG_ParseAnimationFile(), CG_ParseVoiceChats(), CG_ParticleExplosion(), CG_ScanForExistingClientInfo(), CG_ServerCommand(), CG_SetDeferredClientInfo(), CG_VoiceChatListForClient(), Character_Parse(), CheckCvars(), CheckParm(), CL_CDKeyValidate(), CL_ConnectionlessPacket(), CL_MapLoading(), CL_PlayCinematic_f(), CL_SystemInfoChanged(), ClientCommand(), ClientConnect(), ClientForString(), ClientFromName(), ClientOnSameTeamFromName(), ClientUserinfoChanged(), Cmd_CallTeamVote_f(), Cmd_CallVote_f(), Cmd_ExecuteString(), Cmd_Give_f(), Com_SafeMode(), ConsoleCommand(), Controls_GetKeyAssignment(), Cvar_FindVar(), Cvar_WriteVariables(), Demos_MenuInit(), EmitShader(), Favorites_Add(), FindClientByName(), FindEnemyByName(), FindShaderInShaderText(), FS_AddFileToList(), FS_AddGameDirectory(), FS_FOpenFileRead(), FS_GetFileList(), FS_GetModList(), FS_ListFilteredFiles(), FS_LoadZipFile(), FS_Restart(), FS_Startup(), FS_SV_FOpenFileRead(), G_AddRandomBot(), G_Find(), G_GetArenaInfoByMap(), G_GetBotInfoByName(), G_InitBots(), G_ParseField(), G_SpawnString(), GameType_Parse(), GametypeBits(), GL_TextureMode(), GLimp_EndFrame(), GLimp_Init(), GLW_CreateWindow(), GLW_SetMode(), GLW_StartOpenGL(), GraphicsOptions_SetMenuItems(), Hunk_SmallLog(), Info_ValueForKey(), Item_EnableShowViaCvar(), Item_Multi_FindCvarByValue(), Item_Multi_Setting(), Item_RunScript(), Key_GetKey(), Key_StringToKeynum(), KeywordHash_Find(), LAN_CompareServers(), LibVarGet(), Load256Image(), Load32BitImage(), LoadAlphaMap(), LoadConfig_MenuInit(), MapList_Parse(), Menu_FindItemByName(), Menu_GetMatchingItemByNumber(), Menu_ItemsMatchingGroup(), MenuParse_name(), Menus_ActivateByName(), Menus_FindByName(), NameToAFunc(), NameToDstBlendMode(), NameToGenFunc(), NameToSrcBlendMode(), NET_IPSocket(), idSplinePosition::parse(), idInterpolatedPosition::parse(), idFixedPosition::parse(), idCameraFOV::parse(), idCameraEvent::parse(), idCameraDef::parse(), idSplineList::parse(), ParseDeform(), ParseShader(), ParseShaderFile(), ParseSort(), ParseStage(), ParseSurfaceParm(), ParseTexMod(), idCameraPosition::parseToken(), PC_PushScript(), PC_Script_Parse(), PlayerIcon(), PlayerIntroSound(), PlayerModel_SetMenuItems(), R_FindShader(), R_FindShaderByName(), R_LoadEntities(), R_LoadImage(), R_RemapShader(), RE_BeginFrame(), RE_RegisterFont(), RE_RegisterShaderFromImage(), RE_RegisterSkin(), S_FindName(), Save256Image(), Script_SetColor(), Script_SetItemColor(), ServerPlayerIcon(), idCameraDef::setActiveTargetByName(), SetTeam(), ShaderInfoForShader(), SP_worldspawn(), SV_AuthorizeIpPacket(), SV_ConnectionlessPacket(), SV_GetPlayerByName(), SV_Kick_f(), SV_Map_f(), Sys_Init(), Sys_ListFiles(), Sys_ListFilteredFiles(), target_location_linkup(), Team_Parse(), UI_AddBotsMenu_SortCompare(), UI_AIFromName(), UI_AIIndex(), UI_AIIndexFromName(), UI_BotSelectMenu_Default(), UI_BotSelectMenu_SortCompare(), UI_BuildQ3Model_List(), UI_BuildServerDisplayList(), UI_ConsoleCommand(), UI_DrawConnectScreen(), UI_EnglishMapName(), UI_GetArenaInfoByMap(), UI_GetBotInfoByName(), UI_GetSpecialArenaInfo(), UI_HeadCountByTeam(), UI_LoadDemos(), UI_LoadMenus(), UI_LoadMovies(), UI_OpponentLeaderModel(), UI_ParseAnimationFile(), UI_ParseGameInfo(), UI_ParseMenu(), UI_ParseTeamInfo(), UI_RunMenuScript(), UI_SortServerStatusInfo(), UI_SPArena_Start(), UI_SPLevelMenu_MenuDraw(), UI_TeamArenaExists(), UI_TeamIndexFromName(), UI_Update(), VM_Create(), WIN_DisableAltTab(), and WIN_EnableAltTab().

00785                                                {
00786     return (s1 && s2) ? Q_stricmpn (s1, s2, 99999) : -1;
00787 }

Here is the call graph for this function:

int Q_stricmpn const char *  s1,
const char *  s2,
int  n
 

Definition at line 727 of file q_shared.c.

References n.

Referenced by CG_ServerCommand(), Com_AddStartupCommands(), FindMatches(), FS_GetModList(), FS_ListFilteredFiles(), FS_ReferencedPakChecksums(), FS_ReferencedPakNames(), ParseDeform(), ParseShader(), PlayerModel_BuildList(), PrintMatches(), Q_stricmp(), Q_stristr(), SV_Map_f(), and UI_BuildQ3Model_List().

00727                                                        {
00728     int     c1, c2;
00729 
00730     // bk001129 - moved in 1.17 fix not in id codebase
00731         if ( s1 == NULL ) {
00732            if ( s2 == NULL )
00733              return 0;
00734            else
00735              return -1;
00736         }
00737         else if ( s2==NULL )
00738           return 1;
00739 
00740 
00741     
00742     do {
00743         c1 = *s1++;
00744         c2 = *s2++;
00745 
00746         if (!n--) {
00747             return 0;       // strings are equal until end point
00748         }
00749         
00750         if (c1 != c2) {
00751             if (c1 >= 'a' && c1 <= 'z') {
00752                 c1 -= ('a' - 'A');
00753             }
00754             if (c2 >= 'a' && c2 <= 'z') {
00755                 c2 -= ('a' - 'A');
00756             }
00757             if (c1 != c2) {
00758                 return c1 < c2 ? -1 : 1;
00759             }
00760         }
00761     } while (c1);
00762     
00763     return 0;       // strings are equal
00764 }

char* Q_strlwr char *  s1  ) 
 

Definition at line 790 of file q_shared.c.

References s, and tolower().

Referenced by FS_LoadZipFile(), GLimp_Init(), GLW_LoadOpenGL(), InitOpenGL(), R_LoadMD3(), R_LoadMD4(), and RE_RegisterSkin().

00790                            {
00791     char    *s;
00792 
00793     s = s1;
00794     while ( *s ) {
00795         *s = tolower(*s);
00796         s++;
00797     }
00798     return s1;
00799 }

Here is the call graph for this function:

int Q_strncmp const char *  s1,
const char *  s2,
int  n
 

Definition at line 766 of file q_shared.c.

References n.

Referenced by CheckTeamVote(), CL_ConnectionlessPacket(), CL_ConsolePrint(), R_LoadEntities(), SpecifyLeague_Event(), SV_ConnectionlessPacket(), and SV_ReplacePendingServerCommands().

00766                                                       {
00767     int     c1, c2;
00768     
00769     do {
00770         c1 = *s1++;
00771         c2 = *s2++;
00772 
00773         if (!n--) {
00774             return 0;       // strings are equal until end point
00775         }
00776         
00777         if (c1 != c2) {
00778             return c1 < c2 ? -1 : 1;
00779         }
00780     } while (c1);
00781     
00782     return 0;       // strings are equal
00783 }

void Q_strncpyz char *  dest,
const char *  src,
int  destsize
 

Definition at line 548 of file l_cmd.c.

References Com_Error(), ERR_FATAL, src, and strncpy().

Referenced by ArenaServers_Insert(), ArenaServers_LoadFavorites(), BotCreateWayPoint(), BotLoadChatFile(), BotMatch_NewLeader(), BotVoiceChatCommand(), CG_CenterPrint(), CG_ConfigStringModified(), CG_DrawInformation(), CG_LoadClientInfo(), CG_LoadingClient(), CG_LoadingString(), CG_NewClientInfo(), CG_Obituary(), CG_ParseServerinfo(), CG_PlayVoiceChat(), CG_ServerCommand(), CG_StartMusic(), CG_TestModel_f(), CG_VoiceChatLocal(), CL_AddReliableCommand(), CL_BeginDownload(), CL_CheckForResend(), CL_Connect_f(), CL_ConnectionlessPacket(), CL_GetPing(), CL_GetPingInfo(), CL_MapLoading(), CL_MotdPacket(), CL_NextDemo(), CL_ParseCommandString(), CL_PlayDemo_f(), CL_Record_f(), CL_RequestAuthorization(), CL_ServerInfoPacket(), CL_ServerStatus(), CL_SetServerInfo(), ClientCleanName(), ClientUserinfoChanged(), CM_LoadMap(), Cmd_ArgsBuffer(), Cmd_ArgvBuffer(), Cmd_CallTeamVote_f(), Cmd_Exec_f(), Cmd_TokenizeString(), Com_AppendCDKey(), Com_BeginParseSession(), Com_DefaultExtension(), COM_DefaultExtension(), Com_ParseInfos(), Com_ReadCDKey(), Com_sprintf(), Com_WriteCDKey(), Com_WriteConfig_f(), Console_Key(), CreateInternalShaders(), Cvar_InfoStringBuffer(), Cvar_Update(), Cvar_VariableStringBuffer(), FindMatches(), FS_AddGameDirectory(), FS_FOpenFileAppend(), FS_FOpenFileRead(), FS_FOpenFileWrite(), FS_InitFilesystem(), FS_LoadZipFile(), FS_Restart(), FS_SV_FOpenFileRead(), FS_SV_FOpenFileWrite(), G_BotConnect(), G_InitBots(), G_ParseInfos(), G_ProcessIPBans(), G_Say(), G_SpawnBots(), GetClientState(), GetClipboardData(), GetConfigString(), GLimp_Init(), GLW_LoadOpenGL(), Key_GetBindingBuf(), Key_KeynumToStringBuf(), LAN_AddServer(), LAN_GetServerAddressString(), LAN_GetServerInfo(), MSG_WriteBigString(), MSG_WriteString(), NET_StringToAdr(), PlayerIcon(), PlayerIntroSound(), PlayerModel_PicEvent(), PlayerModel_SetMenuItems(), PlayerSettings_DrawName(), PlayerSettings_SetMenuItems(), Prepname(), Q_strcat(), QGL_Init(), R_FindShader(), R_GetEntityToken(), R_InitSkins(), R_LoadEntities(), R_TakeScreenshot(), Rankings_DrawPassword(), RE_LoadWorldMap(), RE_RegisterFont(), RE_RegisterModel(), RE_RegisterShaderFromImage(), RE_RegisterSkin(), ReadWeightConfig(), S_Play_f(), S_StartBackgroundTrack(), ServerOptions_InitBotNames(), ServerOptions_LevelshotDraw(), ServerOptions_SetMenuItems(), ServerPlayerIcon(), SP_target_speaker(), SpecifyLeague_GetList(), SpecifyLeague_MenuInit(), StartServer_Cache(), StartServer_GametypeEvent(), SV_AddServerCommand(), SV_BeginDownload_f(), SV_BotGetConsoleMessage(), SV_DirectConnect(), SV_GameSystemCalls(), SV_GetConfigstring(), SV_GetPlayerByName(), SV_GetServerinfo(), SV_GetUserinfo(), SV_Map_f(), SV_MapRestart_f(), SV_RankUserValidate(), SV_ReplacePendingServerCommands(), SV_SetConfigstring(), SV_SetUserinfo(), SV_SpawnServer(), SV_UpdateUserinfo_f(), SV_UserinfoChanged(), Sys_DefaultHomePath(), Sys_GetClipboardData(), Sys_GetEvent(), Sys_LoadDll(), Sys_SetDefaultCDPath(), Sys_SetDefaultHomePath(), Sys_SetDefaultInstallPath(), Sys_SetErrorText(), Text_PaintCenter_AutoWrapped(), UI_AddBotsMenu_SetBotNames(), UI_BotSelectMenu_SelectEvent(), UI_BotSelectMenu_UpdateGrid(), UI_BuildFindPlayerList(), UI_BuildPlayerList(), UI_CalcPostGameStats(), UI_ConsoleCommand(), UI_DrawConnectScreen(), UI_DrawGLInfo(), UI_DrawProportionalString_AutoWrapped(), UI_DrawServerRefreshDate(), UI_DriverInfo_Menu(), UI_FeederSelection(), UI_GetServerStatusInfo(), UI_Mods_ParseInfos(), UI_ParseInfos(), UI_RegisterClientModelname(), UI_RemoveBotsMenu_SetBotNames(), UI_RunMenuScript(), UI_SPLevelMenu_MenuDraw(), UI_SPLevelMenu_SetBots(), UI_SPLevelMenu_SetMenuArena(), UI_SPPostgameMenu_f(), UI_SPPostgameMenu_MenuDrawScoreLine(), UI_TeamOrdersMenu_BuildBotList(), VM_Create(), VM_LoadSymbols(), VM_Restart(), and WinMain().

00548                                                              {
00549     strncpy( dest, src, destsize-1 );
00550     dest[destsize-1] = 0;
00551 }

Here is the call graph for this function:

char* Q_strrchr const char *  string,
int  c
 

Definition at line 684 of file q_shared.c.

References s.

Referenced by CG_LoadingClient(), PlayerIcon(), PlayerIntroSound(), S_Play_f(), and ServerPlayerIcon().

00685 {
00686     char cc = c;
00687     char *s;
00688     char *sp=(char *)0;
00689 
00690     s = (char*)string;
00691 
00692     while (*s)
00693     {
00694         if (*s == cc)
00695             sp = s;
00696         s++;
00697     }
00698     if (cc == 0)
00699         sp = s;
00700 
00701     return sp;
00702 }

char* Q_strupr char *  s1  ) 
 

Definition at line 801 of file q_shared.c.

References s, and toupper().

Referenced by ArenaServers_Insert(), BindingFromName(), Controls_DrawKeyBinding(), Demos_MenuInit(), LoadConfig_MenuInit(), PlayerModel_PicEvent(), PlayerModel_SetMenuItems(), ServerOptions_SetMenuItems(), StartServer_Cache(), StartServer_GametypeEvent(), StartServer_Update(), UI_LoadDemos(), UI_LoadMovies(), UI_SPLevelMenu_MenuDraw(), and UI_SPLevelMenu_SetMenuArena().

00801                            {
00802     char    *s;
00803 
00804     s = s1;
00805     while ( *s ) {
00806         *s = toupper(*s);
00807         s++;
00808     }
00809     return s1;
00810 }

Here is the call graph for this function:

void Swap_Init void   ) 
 

Definition at line 389 of file q_shared.cpp.

References _BigFloat, _BigLong, _BigShort, _LittleFloat, _LittleLong, _LittleShort, and byte.

00390 {
00391     byte    swaptest[2] = {1,0};
00392 
00393 // set the byte swapping variables in a portable manner 
00394     if ( *(short *)swaptest == 1)
00395     {
00396         _BigShort = ShortSwap;
00397         _LittleShort = ShortNoSwap;
00398         _BigLong = LongSwap;
00399         _LittleLong = LongNoSwap;
00400         _BigFloat = FloatSwap;
00401         _LittleFloat = FloatNoSwap;
00402     }
00403     else
00404     {
00405         _BigShort = ShortNoSwap;
00406         _LittleShort = ShortSwap;
00407         _BigLong = LongNoSwap;
00408         _LittleLong = LongSwap;
00409         _BigFloat = FloatNoSwap;
00410         _LittleFloat = FloatSwap;
00411     }
00412 
00413 }

char* QDECL va char *  format,
  ...
 

Definition at line 149 of file aas_cfg.c.

References format, QDECL, string(), va_end, va_list, va_start, and vsprintf().

Referenced by _UI_Init(), ArenaServers_DoRefresh(), ArenaServers_Go(), ArenaServers_LoadFavorites(), ArenaServers_SaveChanges(), ArenaServers_StartRefresh(), AssetCache(), BotCTFSeekGoals(), BotInterbreeding(), BotReadSessionData(), BotSetInfoConfigString(), BotSetTeamStatus(), BotWriteSessionData(), BroadcastTeamChange(), CalculateRanks(), CG_CheckOrderPending(), CG_ClearParticles(), CG_DrawActiveFrame(), CG_DrawFPS(), CG_DrawInformation(), CG_DrawMedal(), CG_DrawOldScoreboard(), CG_DrawOldTourneyScoreboard(), CG_DrawScores(), CG_DrawSnapshot(), CG_DrawTeamVote(), CG_DrawTimer(), CG_DrawVote(), CG_DrawWarmup(), CG_GetGameStatusText(), CG_GetKillerText(), CG_HeadModelVoiceChats(), CG_LoadClientInfo(), CG_LoadingClient(), CG_MapRestart(), CG_Obituary(), CG_ParseServerinfo(), CG_ParseVoiceChats(), CG_PlaceString(), CG_RegisterGraphics(), CG_SetSelectedPlayerName(), CG_SizeDown_f(), CG_SizeUp_f(), CG_TargetCommand_f(), CG_UseItem(), Character_Parse(), CheatsOk(), CheckExitRules(), CheckTeamVote(), CheckTournament(), CheckVote(), CL_BeginDownload(), CL_CheckForResend(), CL_CheckUserinfo(), CL_GetServerCommand(), CL_ParseDownload(), CL_Reconnect_f(), CL_ResetPureClientAtServer(), CL_SendPureChecksums(), CL_ServerInfoPacket(), ClientBegin(), ClientCommand(), ClientConnect(), ClientNumberFromString(), ClientUserinfoChanged(), Cmd_CallTeamVote_f(), Cmd_CallVote_f(), Cmd_God_f(), Cmd_Noclip_f(), Cmd_Notarget_f(), Cmd_SetViewpos_f(), Cmd_TeamTask_f(), Cmd_TeamVote_f(), Cmd_Vote_f(), Cmd_Vstr_f(), Cmd_Where_f(), Com_Error(), Com_Init(), Com_Printf(), ConsoleCommand(), Cvar_Toggle_f(), DeathmatchScoreboardMessage(), Demos_MenuEvent(), EA_DropInv(), EA_DropItem(), EA_Say(), EA_SayTeam(), EA_Tell(), EA_UseInv(), EA_UseItem(), Favorites_Add(), FS_ComparePaks(), FS_idPak(), FS_LoadedPakChecksums(), FS_LoadedPakPureChecksums(), FS_ReferencedPakChecksums(), FS_ReferencedPakPureChecksums(), G_AddBot(), G_AddRandomBot(), G_GetBotInfoByNumber(), G_LoadArenas(), G_LoadArenasFromFile(), G_LoadBots(), G_LoadBotsFromFile(), G_ParseInfos(), G_RankRunFrame(), G_ReadSessionData(), G_RemoveRandomBot(), G_SayTo(), G_SpawnBots(), G_TeamCommand(), G_UpdateCvars(), G_VoiceTo(), G_WriteClientSessionData(), G_WriteSessionData(), GetMenuBuffer(), InputLineWndProc(), LAN_GetServerInfo(), LoadConfig_MenuEvent(), MapList_Parse(), Menu_AddItem(), Menu_Draw(), Menu_PaintAll(), NET_OpenIP(), NET_OpenIPX(), Netchan_Init(), CDlgCamera::OnFileOpen(), CDlgCamera::OnFileSave(), PC_Script_Parse(), PlayerIntroSound(), PlayerModel_BuildList(), PlayerSettings_MenuEvent(), Preferences_Cache(), PrintMsg(), QGL_EnableLogging(), R_LoadLightmaps(), R_Register(), RB_StageIteratorGeneric(), RB_StageIteratorLightmappedMultitexture(), RB_StageIteratorVertexLitTexture(), RE_RegisterFont(), RoQShutdown(), idCameraDef::save(), Script_Exec(), ServerOptions_Start(), SetCfgLibVars(), SetLeader(), CDlgCamera::setupFromCamera(), SP_worldspawn(), SpecifyLeague_GetList(), SpecifyServer_Event(), SV_BoundMaxClients(), SV_Init(), SV_MapRestart_f(), SV_SpawnServer(), SVC_Info(), Svcmd_BotList_f(), Sys_Init(), Team_Parse(), TeamplayInfoMessage(), UI_AddBotsMenu_FightEvent(), UI_BuildFindPlayerList(), UI_BuildPlayerList(), UI_BuildQ3Model_List(), UI_CinematicsMenu_Event(), UI_ClearScores(), UI_Crosshair_HandleKey(), UI_DisplayDownloadInfo(), UI_DrawClanCinematic(), UI_DrawClanLogo(), UI_DrawConnectScreen(), UI_DrawMapCinematic(), UI_DrawOpponentLogo(), UI_DrawOpponentLogoMetal(), UI_DrawOpponentLogoName(), UI_DrawPlayerLogo(), UI_DrawPlayerLogoMetal(), UI_DrawPlayerLogoName(), UI_DrawPreviewCinematic(), UI_DrawServerRefreshDate(), UI_DrawTeamMember(), UI_DrawTierMap(), UI_FeederSelection(), UI_GameType_HandleKey(), UI_GetArenaInfoByNumber(), UI_GetBestScore(), UI_GetBotInfoByNumber(), UI_Handicap_HandleKey(), UI_JoinGameType_HandleKey(), UI_LoadArenas(), UI_LoadArenasFromFile(), UI_LoadBots(), UI_LoadBotsFromFile(), UI_LoadMenus(), UI_LogAwardData(), UI_Mods_LoadMods(), UI_NetGameType_HandleKey(), UI_NetSource_HandleKey(), UI_OwnerDrawWidth(), UI_ParseInfos(), UI_Refresh(), UI_RemoveBotsMenu_DeleteEvent(), UI_RunMenuScript(), UI_SaveConfigMenu_SaveEvent(), UI_SelectedPlayer_HandleKey(), UI_SetBestScore(), UI_SetBestScores(), UI_SetCapFragLimits(), UI_SetLerpFrameAnimation(), UI_ShowTierVideo(), UI_Skill_HandleKey(), UI_SPArena_Start(), UI_SPLevelMenu_MenuDraw(), UI_SPPostgameMenu_f(), UI_SPPostgameMenu_MenuDraw(), UI_SPPostgameMenu_MenuDrawScoreLine(), UI_StartServerRefresh(), UI_StartSkirmish(), UI_TeamMember_HandleKey(), UI_TeamOrdersMenu_ListEvent(), UpdateIPBans(), Use_Target_Print(), idSplinePosition::write(), idInterpolatedPosition::write(), idFixedPosition::write(), idCameraPosition::write(), idCameraFOV::write(), idCameraEvent::write(), and idSplineList::write().

00150 {
00151     va_list     argptr;
00152     static char     string[2][32000];   // in case va is called by nested functions
00153     static int      index = 0;
00154     char    *buf;
00155 
00156     buf = string[index & 1];
00157     index++;
00158 
00159     va_start (argptr, format);
00160     vsprintf (buf, format,argptr);
00161     va_end (argptr);
00162 
00163     return buf;
00164 } //end of the function va

Here is the call graph for this function:


Generated on Thu Aug 25 14:00:19 2005 for Quake III Arena by  doxygen 1.3.9.1