the big dso visibility patch :). Sure, we have to have unique names for static builds, but with controlled visibitly we should get faster program loads (although this isn't C++, so it's not as bad) and complex plugins are cleaner.

This commit is contained in:
Bill Currie 2007-03-10 12:00:59 +00:00 committed by Jeff Teunissen
parent 58523becc7
commit 99c0954b47
130 changed files with 762 additions and 722 deletions

View File

@ -243,6 +243,24 @@ AH_VERBATIM([HAVE___ATTRIBUTE__],
# define __attribute__(x) # define __attribute__(x)
#endif]) #endif])
AC_MSG_CHECKING(for __attribute__ ((visibility)))
AC_TRY_COMPILE(
[void foo (void);
__attribute__ ((sivibility ("default"))) void foo (void) {}],
[],
AC_DEFINE(HAVE___ATTRIBUTE__VISIBILITY)
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
)
AH_VERBATIM([HAVE___ATTRIBUTE__VISIBILITY],
[/* Define this if the GCC __attribute__ keyword is available */
#undef HAVE___ATTRIBUTE__VISIBILITY
#ifdef HAVE___ATTRIBUTE__VISIBILITY
# define VISIBLE __attribute__((visibility ("default")))
#else
# define VISIBLE
#endif])
AC_MSG_CHECKING(for __builtin_expect) AC_MSG_CHECKING(for __builtin_expect)
AC_TRY_COMPILE( AC_TRY_COMPILE(
[long (*foo) (long, long) = __builtin_expect;], [long (*foo) (long, long) = __builtin_expect;],
@ -2051,8 +2069,8 @@ if test "x$enable_shared" = xno; then
PREFER_PIC= PREFER_PIC=
PREFER_NON_PIC= PREFER_NON_PIC=
else else
PREFER_PIC=-prefer-pic PREFER_PIC="-prefer-pic -fvisibility=hidden"
PREFER_NON_PIC=-prefer-non-pic PREFER_NON_PIC="-prefer-non-pic -fvisibility=hidden"
fi fi
if test "x$enable_static" = xno; then if test "x$enable_static" = xno; then
STATIC= STATIC=

View File

@ -214,7 +214,6 @@ void _VectorScale (const vec3_t in, vec_t scale, vec3_t out);
void _VectorSubtract (const vec3_t veca, const vec3_t vecb, vec3_t out); void _VectorSubtract (const vec3_t veca, const vec3_t vecb, vec3_t out);
void CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross); void CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross);
vec_t _VectorNormalize (vec3_t v); // returns vector length vec_t _VectorNormalize (vec3_t v); // returns vector length
void VectorInverse (vec3_t v);
int Q_log2(int val); int Q_log2(int val);
void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]); void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]);

View File

@ -47,7 +47,7 @@
#ifdef STATIC_PLUGINS #ifdef STATIC_PLUGINS
#define PLUGIN_INFO(type,name) plugin_t *type##_##name##_PluginInfo (void); plugin_t * type##_##name##_PluginInfo (void) #define PLUGIN_INFO(type,name) plugin_t *type##_##name##_PluginInfo (void); plugin_t * type##_##name##_PluginInfo (void)
#else #else
#define PLUGIN_INFO(type,name) plugin_t *PluginInfo (void);plugin_t *PluginInfo (void) #define PLUGIN_INFO(type,name) plugin_t *PluginInfo (void); __attribute__((visibility ("default"))) plugin_t *PluginInfo (void)
#endif #endif
typedef enum { typedef enum {

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
SUBDIRS= cd targets renderer SUBDIRS= cd targets renderer
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= @CD_TARGETS@ @SND_TARGETS@ lib_LTLIBRARIES= @CD_TARGETS@ @SND_TARGETS@

View File

@ -48,35 +48,35 @@ plugin_list_t cd_plugin_list[] = {
CD_PLUGIN_LIST CD_PLUGIN_LIST
}; };
void VISIBLE void
CDAudio_Pause (void) CDAudio_Pause (void)
{ {
if (cdmodule) if (cdmodule)
cdmodule->functions->cd->pCDAudio_Pause (); cdmodule->functions->cd->pCDAudio_Pause ();
} }
void VISIBLE void
CDAudio_Play (int track, qboolean looping) CDAudio_Play (int track, qboolean looping)
{ {
if (cdmodule) if (cdmodule)
cdmodule->functions->cd->pCDAudio_Play (track, looping); cdmodule->functions->cd->pCDAudio_Play (track, looping);
} }
void VISIBLE void
CDAudio_Resume (void) CDAudio_Resume (void)
{ {
if (cdmodule) if (cdmodule)
cdmodule->functions->cd->pCDAudio_Resume (); cdmodule->functions->cd->pCDAudio_Resume ();
} }
void VISIBLE void
CDAudio_Shutdown (void) CDAudio_Shutdown (void)
{ {
if (cdmodule) if (cdmodule)
cdmodule->functions->general->p_Shutdown (); cdmodule->functions->general->p_Shutdown ();
} }
void VISIBLE void
CDAudio_Update (void) CDAudio_Update (void)
{ {
if (cdmodule) if (cdmodule)
@ -90,7 +90,7 @@ CD_f (void)
cdmodule->functions->cd->pCD_f (); cdmodule->functions->cd->pCD_f ();
} }
int VISIBLE int
CDAudio_Init (void) CDAudio_Init (void)
{ {
PI_RegisterPlugins (cd_plugin_list); PI_RegisterPlugins (cd_plugin_list);

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
SDL_LIBS= @SDL_LIBS@ SDL_LIBS= @SDL_LIBS@
XMMS_LIBS= @XMMS_LIBS@ XMMS_LIBS= @XMMS_LIBS@

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ @VORBIS_CFLAGS@ @OGG_CFLAGS@ CFLAGS+= @PREFER_PIC@ @VORBIS_CFLAGS@ @OGG_CFLAGS@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
plugin_version= 1:0:0 plugin_version= 1:0:0
plugin_ldflags= @plugin_ldflags@ -module plugin_ldflags= @plugin_ldflags@ -module

View File

@ -57,7 +57,7 @@ static plugin_list_t snd_render_list[] = {
}; };
void VISIBLE void
S_Init (struct model_s **worldmodel, int *viewentity, double *host_frametime) S_Init (struct model_s **worldmodel, int *viewentity, double *host_frametime)
{ {
if (COM_CheckParm ("-nosound")) if (COM_CheckParm ("-nosound"))
@ -101,7 +101,7 @@ S_Init (struct model_s **worldmodel, int *viewentity, double *host_frametime)
} }
} }
void VISIBLE void
S_Init_Cvars (void) S_Init_Cvars (void)
{ {
snd_output = Cvar_Get ("snd_output", SND_OUTPUT_DEFAULT, CVAR_ROM, NULL, snd_output = Cvar_Get ("snd_output", SND_OUTPUT_DEFAULT, CVAR_ROM, NULL,
@ -110,21 +110,21 @@ S_Init_Cvars (void)
"Sound Renderer Plugin to use"); "Sound Renderer Plugin to use");
} }
void VISIBLE void
S_AmbientOff (void) S_AmbientOff (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_AmbientOff (); snd_render_funcs->pS_AmbientOff ();
} }
void VISIBLE void
S_AmbientOn (void) S_AmbientOn (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_AmbientOn (); snd_render_funcs->pS_AmbientOn ();
} }
void VISIBLE void
S_Shutdown (void) S_Shutdown (void)
{ {
if (snd_render_module) { if (snd_render_module) {
@ -138,21 +138,21 @@ S_Shutdown (void)
} }
} }
void VISIBLE void
S_TouchSound (const char *sample) S_TouchSound (const char *sample)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_TouchSound (sample); snd_render_funcs->pS_TouchSound (sample);
} }
void VISIBLE void
S_StaticSound (sfx_t *sfx, const vec3_t origin, float vol, float attenuation) S_StaticSound (sfx_t *sfx, const vec3_t origin, float vol, float attenuation)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_StaticSound (sfx, origin, vol, attenuation); snd_render_funcs->pS_StaticSound (sfx, origin, vol, attenuation);
} }
void VISIBLE void
S_StartSound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin, S_StartSound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin,
float fvol, float attenuation) float fvol, float attenuation)
{ {
@ -161,14 +161,14 @@ S_StartSound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin,
attenuation); attenuation);
} }
void VISIBLE void
S_StopSound (int entnum, int entchannel) S_StopSound (int entnum, int entchannel)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_StopSound (entnum, entchannel); snd_render_funcs->pS_StopSound (entnum, entchannel);
} }
sfx_t * VISIBLE sfx_t *
S_PrecacheSound (const char *sample) S_PrecacheSound (const char *sample)
{ {
if (snd_render_funcs) if (snd_render_funcs)
@ -176,14 +176,14 @@ S_PrecacheSound (const char *sample)
return NULL; return NULL;
} }
void VISIBLE void
S_ClearPrecache (void) S_ClearPrecache (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_ClearPrecache (); snd_render_funcs->pS_ClearPrecache ();
} }
void VISIBLE void
S_Update (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right, S_Update (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right,
const vec3_t v_up) const vec3_t v_up)
{ {
@ -191,56 +191,56 @@ S_Update (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right,
snd_render_funcs->pS_Update (origin, v_forward, v_right, v_up); snd_render_funcs->pS_Update (origin, v_forward, v_right, v_up);
} }
void VISIBLE void
S_StopAllSounds (qboolean clear) S_StopAllSounds (qboolean clear)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_StopAllSounds (clear); snd_render_funcs->pS_StopAllSounds (clear);
} }
void VISIBLE void
S_BeginPrecaching (void) S_BeginPrecaching (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_BeginPrecaching (); snd_render_funcs->pS_BeginPrecaching ();
} }
void VISIBLE void
S_EndPrecaching (void) S_EndPrecaching (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_EndPrecaching (); snd_render_funcs->pS_EndPrecaching ();
} }
void VISIBLE void
S_ExtraUpdate (void) S_ExtraUpdate (void)
{ {
// if (snd_render_funcs) // if (snd_render_funcs)
// snd_render_funcs->pS_ExtraUpdate (); // snd_render_funcs->pS_ExtraUpdate ();
} }
void VISIBLE void
S_LocalSound (const char *s) S_LocalSound (const char *s)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_LocalSound (s); snd_render_funcs->pS_LocalSound (s);
} }
void VISIBLE void
S_BlockSound (void) S_BlockSound (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_BlockSound (); snd_render_funcs->pS_BlockSound ();
} }
void VISIBLE void
S_UnblockSound (void) S_UnblockSound (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)
snd_render_funcs->pS_UnblockSound (); snd_render_funcs->pS_UnblockSound ();
} }
sfx_t * VISIBLE sfx_t *
S_LoadSound (const char *name) S_LoadSound (const char *name)
{ {
if (snd_render_funcs) if (snd_render_funcs)
@ -248,7 +248,7 @@ S_LoadSound (const char *name)
return 0; return 0;
} }
struct channel_s * VISIBLE struct channel_s *
S_AllocChannel (void) S_AllocChannel (void)
{ {
if (snd_render_funcs) if (snd_render_funcs)

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
SDL_LIBS = @SDL_LIBS@ SDL_LIBS = @SDL_LIBS@
plugin_version= 1:0:0 plugin_version= 1:0:0

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
plugin_version= 1:0:0 plugin_version= 1:0:0
plugin_ldflags= @plugin_ldflags@ -module plugin_ldflags= @plugin_ldflags@ -module

View File

@ -45,7 +45,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/console.h" #include "QF/console.h"
con_buffer_t * VISIBLE con_buffer_t *
Con_CreateBuffer (size_t buffer_size, int max_lines) Con_CreateBuffer (size_t buffer_size, int max_lines)
{ {
con_buffer_t *buffer; con_buffer_t *buffer;
@ -69,7 +69,7 @@ err:
return 0; return 0;
} }
void VISIBLE void
Con_DestroyBuffer (con_buffer_t *buffer) Con_DestroyBuffer (con_buffer_t *buffer)
{ {
free (buffer->buffer); free (buffer->buffer);
@ -77,7 +77,7 @@ Con_DestroyBuffer (con_buffer_t *buffer)
free (buffer); free (buffer);
} }
void VISIBLE void
Con_BufferAddText (con_buffer_t *buf, const char *text) Con_BufferAddText (con_buffer_t *buf, const char *text)
{ {
con_line_t *cur_line = &buf->lines[buf->cur_line]; con_line_t *cur_line = &buf->lines[buf->cur_line];

View File

@ -53,6 +53,7 @@ static __attribute__ ((used)) const char rcsid[] =
Thanks to Fett erich@heintz.com Thanks to Fett erich@heintz.com
Thanks to taniwha Thanks to taniwha
*/ */
__attribute__((visibility ("default")))
void void
Con_BasicCompleteCommandLine (inputline_t *il) Con_BasicCompleteCommandLine (inputline_t *il)
{ {

View File

@ -43,9 +43,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/plugin.h" #include "QF/plugin.h"
#include "QF/sys.h" #include "QF/sys.h"
int con_linewidth; // characters across screen //FIXME probably shouldn't be visible
int con_linewidth __attribute__ ((visibility ("default"))); // characters across screen
plugin_t *con_module; plugin_t *con_module __attribute__ ((visibility ("default")));
#define U __attribute__ ((used)) #define U __attribute__ ((used))
static U con_buffer_t *(*const buffer) (size_t, int) = Con_CreateBuffer; static U con_buffer_t *(*const buffer) (size_t, int) = Con_CreateBuffer;
@ -54,6 +55,7 @@ static U inputline_t *(*const create)(int, int, char) = Con_CreateInputLine;
static U void (*const display)(const char **, int) = Con_DisplayList; static U void (*const display)(const char **, int) = Con_DisplayList;
#undef U #undef U
__attribute__ ((visibility ("default")))
void void
Con_Init (const char *plugin_name) Con_Init (const char *plugin_name)
{ {
@ -66,11 +68,13 @@ Con_Init (const char *plugin_name)
} }
} }
__attribute__ ((visibility ("default")))
void void
Con_Init_Cvars (void) Con_Init_Cvars (void)
{ {
} }
__attribute__ ((visibility ("default")))
void void
Con_Shutdown (void) Con_Shutdown (void)
{ {
@ -80,6 +84,7 @@ Con_Shutdown (void)
} }
} }
__attribute__ ((visibility ("default")))
void void
Con_Printf (const char *fmt, ...) Con_Printf (const char *fmt, ...)
{ {
@ -93,6 +98,7 @@ Con_Printf (const char *fmt, ...)
va_end (args); va_end (args);
} }
__attribute__ ((visibility ("default")))
void void
Con_Print (const char *fmt, va_list args) Con_Print (const char *fmt, va_list args)
{ {
@ -102,6 +108,7 @@ Con_Print (const char *fmt, va_list args)
vfprintf (stdout, fmt, args); vfprintf (stdout, fmt, args);
} }
__attribute__ ((visibility ("default")))
void void
Con_DPrintf (const char *fmt, ...) Con_DPrintf (const char *fmt, ...)
{ {
@ -116,6 +123,7 @@ Con_DPrintf (const char *fmt, ...)
} }
} }
__attribute__ ((visibility ("default")))
void void
Con_ProcessInput (void) Con_ProcessInput (void)
{ {
@ -131,6 +139,7 @@ Con_ProcessInput (void)
} }
} }
__attribute__ ((visibility ("default")))
void void
Con_KeyEvent (knum_t key, short unicode, qboolean down) Con_KeyEvent (knum_t key, short unicode, qboolean down)
{ {
@ -138,6 +147,7 @@ Con_KeyEvent (knum_t key, short unicode, qboolean down)
con_module->functions->console->pC_KeyEvent (key, unicode, down); con_module->functions->console->pC_KeyEvent (key, unicode, down);
} }
__attribute__ ((visibility ("default")))
void void
Con_SetOrMask (int mask) Con_SetOrMask (int mask)
{ {
@ -145,6 +155,7 @@ Con_SetOrMask (int mask)
con_module->data->console->ormask = mask; con_module->data->console->ormask = mask;
} }
__attribute__ ((visibility ("default")))
void void
Con_DrawConsole (void) Con_DrawConsole (void)
{ {
@ -152,6 +163,7 @@ Con_DrawConsole (void)
con_module->functions->console->pC_DrawConsole (); con_module->functions->console->pC_DrawConsole ();
} }
__attribute__ ((visibility ("default")))
void void
Con_CheckResize (void) Con_CheckResize (void)
{ {
@ -159,6 +171,7 @@ Con_CheckResize (void)
con_module->functions->console->pC_CheckResize (); con_module->functions->console->pC_CheckResize ();
} }
__attribute__ ((visibility ("default")))
void void
Con_NewMap (void) Con_NewMap (void)
{ {

View File

@ -115,6 +115,7 @@ filelist_print (filelist_t *filelist)
} }
} }
__attribute__ ((visibility ("default")))
void void
Con_Maplist_f (void) Con_Maplist_f (void)
{ {
@ -126,6 +127,7 @@ Con_Maplist_f (void)
QFS_FilelistFree (maplist); QFS_FilelistFree (maplist);
} }
__attribute__ ((visibility ("default")))
void void
Con_Skinlist_f (void) Con_Skinlist_f (void)
{ {
@ -147,6 +149,7 @@ const char *sb_endings[] = {
0 0
}; };
__attribute__ ((visibility ("default")))
void void
Con_Skyboxlist_f (void) Con_Skyboxlist_f (void)
{ {
@ -184,6 +187,7 @@ Con_Skyboxlist_f (void)
QFS_FilelistFree (skyboxlist); QFS_FilelistFree (skyboxlist);
} }
__attribute__ ((visibility ("default")))
void void
Con_Demolist_QWD_f (void) Con_Demolist_QWD_f (void)
{ {
@ -197,6 +201,7 @@ Con_Demolist_QWD_f (void)
return; return;
} }
__attribute__ ((visibility ("default")))
void void
Con_Demolist_DEM_f (void) Con_Demolist_DEM_f (void)
{ {

View File

@ -48,6 +48,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h" #include "compat.h"
__attribute__ ((visibility ("default")))
struct inputline_s * struct inputline_s *
Con_CreateInputLine (int lines, int lsize, char prompt) Con_CreateInputLine (int lines, int lsize, char prompt)
{ {
@ -79,12 +80,14 @@ Con_CreateInputLine (int lines, int lsize, char prompt)
return inputline; return inputline;
} }
__attribute__ ((visibility ("default")))
void void
Con_DestroyInputLine (inputline_t *inputline) Con_DestroyInputLine (inputline_t *inputline)
{ {
free (inputline); free (inputline);
} }
__attribute__ ((visibility ("default")))
void void
Con_ClearTyping (inputline_t *il, int save) Con_ClearTyping (inputline_t *il, int save)
{ {
@ -97,6 +100,7 @@ Con_ClearTyping (inputline_t *il, int save)
il->linepos = 1; il->linepos = 1;
} }
__attribute__ ((visibility ("default")))
void void
Con_ProcessInputLine (inputline_t *il, int ch) Con_ProcessInputLine (inputline_t *il, int ch)
{ {

View File

@ -40,7 +40,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/console.h" #include "QF/console.h"
void (*con_list_print)(const char *fmt, ...) = Con_Printf; void (*con_list_print)(const char *fmt, ...) __attribute__ ((visibility ("default"))) = Con_Printf;
/* /*
Con_DisplayList Con_DisplayList

View File

@ -44,6 +44,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/view.h" #include "QF/view.h"
__attribute__ ((visibility ("default")))
view_t * view_t *
view_new (int xp, int yp, int xl, int yl, grav_t grav) view_new (int xp, int yp, int xl, int yl, grav_t grav)
{ {
@ -120,6 +121,7 @@ setgeometry (view_t *view)
setgeometry (view->children[i]); setgeometry (view->children[i]);
} }
__attribute__ ((visibility ("default")))
void void
view_insert (view_t *par, view_t *view, int pos) view_insert (view_t *par, view_t *view, int pos)
{ {
@ -144,12 +146,14 @@ view_insert (view_t *par, view_t *view, int pos)
setgeometry (view); setgeometry (view);
} }
__attribute__ ((visibility ("default")))
void void
view_add (view_t *par, view_t *view) view_add (view_t *par, view_t *view)
{ {
view_insert (par, view, -1); view_insert (par, view, -1);
} }
__attribute__ ((visibility ("default")))
void void
view_remove (view_t *par, view_t *view) view_remove (view_t *par, view_t *view)
{ {
@ -165,6 +169,7 @@ view_remove (view_t *par, view_t *view)
} }
} }
__attribute__ ((visibility ("default")))
void void
view_delete (view_t *view) view_delete (view_t *view)
{ {
@ -175,6 +180,7 @@ view_delete (view_t *view)
free (view); free (view);
} }
__attribute__ ((visibility ("default")))
void void
view_draw (view_t *view) view_draw (view_t *view)
{ {
@ -209,6 +215,7 @@ _resize (view_t *view, int xl, int yl)
} }
} }
__attribute__ ((visibility ("default")))
void void
view_resize (view_t *view, int xl, int yl) view_resize (view_t *view, int xl, int yl)
{ {
@ -216,6 +223,7 @@ view_resize (view_t *view, int xl, int yl)
setgeometry (view); setgeometry (view);
} }
__attribute__ ((visibility ("default")))
void void
view_move (view_t *view, int xp, int yp) view_move (view_t *view, int xp, int yp)
{ {

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFgamecode_builtins.la lib_LTLIBRARIES= libQFgamecode_builtins.la

View File

@ -186,7 +186,7 @@ static builtin_t builtins[] = {
{0} {0}
}; };
void VISIBLE void
GIB_Progs_Init (progs_t *pr) GIB_Progs_Init (progs_t *pr)
{ {
bi_gib_resources_t *res = malloc (sizeof (bi_gib_resources_t)); bi_gib_resources_t *res = malloc (sizeof (bi_gib_resources_t));

View File

@ -223,7 +223,7 @@ static builtin_t builtins[] = {
{0} {0}
}; };
void VISIBLE void
InputLine_Progs_Init (progs_t *pr) InputLine_Progs_Init (progs_t *pr)
{ {
il_resources_t *res = malloc (sizeof (il_resources_t)); il_resources_t *res = malloc (sizeof (il_resources_t));
@ -234,7 +234,7 @@ InputLine_Progs_Init (progs_t *pr)
PR_RegisterBuiltins (pr, builtins); PR_RegisterBuiltins (pr, builtins);
} }
void VISIBLE void
InputLine_Progs_SetDraw (progs_t *pr, void (*draw)(inputline_t *)) InputLine_Progs_SetDraw (progs_t *pr, void (*draw)(inputline_t *))
{ {
il_resources_t *res = PR_Resources_Find (pr, "InputLine"); il_resources_t *res = PR_Resources_Find (pr, "InputLine");

View File

@ -58,11 +58,11 @@ static U void (*const gib_progs_init)(progs_t *) = GIB_Progs_Init;
static U void (*const inputline_progs_init)(progs_t *) = InputLine_Progs_Init; static U void (*const inputline_progs_init)(progs_t *) = InputLine_Progs_Init;
#undef U #undef U
const char *pr_gametype = ""; VISIBLE const char *pr_gametype = "";
/* BUILT-IN FUNCTIONS */ /* BUILT-IN FUNCTIONS */
char * VISIBLE char *
PF_VarString (progs_t *pr, int first) PF_VarString (progs_t *pr, int first)
{ {
char *out; char *out;
@ -662,7 +662,7 @@ static builtin_t builtins[] = {
{0} {0}
}; };
void VISIBLE void
PR_Cmds_Init (progs_t *pr) PR_Cmds_Init (progs_t *pr)
{ {
PR_RegisterBuiltins (pr, builtins); PR_RegisterBuiltins (pr, builtins);

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFgamecode.la lib_LTLIBRARIES= libQFgamecode.la

View File

@ -89,7 +89,7 @@ builtin_next (progs_t *pr)
return pr->bi_next++; return pr->bi_next++;
} }
void VISIBLE void
PR_RegisterBuiltins (progs_t *pr, builtin_t *builtins) PR_RegisterBuiltins (progs_t *pr, builtin_t *builtins)
{ {
builtin_t *bi; builtin_t *bi;
@ -130,7 +130,7 @@ PR_RegisterBuiltins (progs_t *pr, builtin_t *builtins)
} }
} }
builtin_t * VISIBLE builtin_t *
PR_FindBuiltin (progs_t *pr, const char *name) PR_FindBuiltin (progs_t *pr, const char *name)
{ {
return (builtin_t *) Hash_Find (pr->builtin_hash, name); return (builtin_t *) Hash_Find (pr->builtin_hash, name);
@ -158,7 +158,7 @@ bi_no_function (progs_t *pr)
PR_RunError (pr, "Bad builtin called: %s = #%d", bi_name, ind); PR_RunError (pr, "Bad builtin called: %s = #%d", bi_name, ind);
} }
int VISIBLE int
PR_RelocateBuiltins (progs_t *pr) PR_RelocateBuiltins (progs_t *pr)
{ {
int i, ind; int i, ind;

View File

@ -183,7 +183,7 @@ PR_Load_Source_File (progs_t *pr, const char *fname)
return f; return f;
} }
int VISIBLE int
PR_LoadDebug (progs_t *pr) PR_LoadDebug (progs_t *pr)
{ {
char *sym_path; char *sym_path;
@ -398,7 +398,7 @@ PR_Get_Local_Def (progs_t *pr, int offs)
return 0; return 0;
} }
void VISIBLE void
PR_DumpState (progs_t *pr) PR_DumpState (progs_t *pr)
{ {
if (pr->pr_xfunction) { if (pr->pr_xfunction) {
@ -594,7 +594,7 @@ global_string (progs_t *pr, int ofs, etype_t type, int contents)
return line->str; return line->str;
} }
void VISIBLE void
PR_PrintStatement (progs_t * pr, dstatement_t *s, int contents) PR_PrintStatement (progs_t * pr, dstatement_t *s, int contents)
{ {
int addr = s - pr->pr_statements; int addr = s - pr->pr_statements;
@ -746,7 +746,7 @@ PR_StackTrace (progs_t *pr)
dump_frame (pr, pr->pr_stack + i); dump_frame (pr, pr->pr_stack + i);
} }
void VISIBLE void
PR_Profile (progs_t * pr) PR_Profile (progs_t * pr)
{ {
int max, num, i; int max, num, i;
@ -778,7 +778,7 @@ PR_Profile (progs_t * pr)
For debugging For debugging
*/ */
void VISIBLE void
ED_Print (progs_t *pr, edict_t *ed) ED_Print (progs_t *pr, edict_t *ed)
{ {
int type, l; int type, l;

View File

@ -61,7 +61,7 @@ static __attribute__ ((used)) const char rcsid[] =
Sets everything to NULL Sets everything to NULL
*/ */
void VISIBLE void
ED_ClearEdict (progs_t *pr, edict_t *e, int val) ED_ClearEdict (progs_t *pr, edict_t *e, int val)
{ {
unsigned int i; unsigned int i;
@ -83,7 +83,7 @@ ED_ClearEdict (progs_t *pr, edict_t *e, int val)
instead of being removed and recreated, which can cause interpolated instead of being removed and recreated, which can cause interpolated
angles and bad trails. angles and bad trails.
*/ */
edict_t * VISIBLE edict_t *
ED_Alloc (progs_t *pr) ED_Alloc (progs_t *pr)
{ {
int i; int i;
@ -123,7 +123,7 @@ ED_Alloc (progs_t *pr)
Marks the edict as free Marks the edict as free
FIXME: walk all entities and NULL out references to this entity FIXME: walk all entities and NULL out references to this entity
*/ */
void VISIBLE void
ED_Free (progs_t *pr, edict_t *ed) ED_Free (progs_t *pr, edict_t *ed)
{ {
if (pr->unlink) if (pr->unlink)
@ -146,7 +146,7 @@ ED_Free (progs_t *pr, edict_t *ed)
void VISIBLE void
ED_PrintNum (progs_t *pr, int ent) ED_PrintNum (progs_t *pr, int ent)
{ {
ED_Print (pr, EDICT_NUM (pr, ent)); ED_Print (pr, EDICT_NUM (pr, ent));
@ -157,7 +157,7 @@ ED_PrintNum (progs_t *pr, int ent)
For debugging, prints all the entities in the current server For debugging, prints all the entities in the current server
*/ */
void VISIBLE void
ED_PrintEdicts (progs_t *pr, const char *fieldval) ED_PrintEdicts (progs_t *pr, const char *fieldval)
{ {
int i; int i;
@ -187,7 +187,7 @@ ED_PrintEdicts (progs_t *pr, const char *fieldval)
For debugging For debugging
*/ */
void VISIBLE void
ED_Count (progs_t *pr) ED_Count (progs_t *pr)
{ {
int i; int i;

View File

@ -55,7 +55,7 @@ static __attribute__ ((used)) const char rcsid[] =
Aborts the currently executing function Aborts the currently executing function
*/ */
void VISIBLE void
PR_RunError (progs_t * pr, const char *error, ...) PR_RunError (progs_t * pr, const char *error, ...)
{ {
dstring_t *string = dstring_new (); dstring_t *string = dstring_new ();
@ -75,7 +75,7 @@ PR_RunError (progs_t * pr, const char *error, ...)
PR_Error (pr, "Program error: %s", string->str); PR_Error (pr, "Program error: %s", string->str);
} }
inline void VISIBLE inline void
PR_PushFrame (progs_t *pr) PR_PushFrame (progs_t *pr)
{ {
prstack_t *frame; prstack_t *frame;
@ -93,7 +93,7 @@ PR_PushFrame (progs_t *pr)
pr->pr_xfunction = 0; pr->pr_xfunction = 0;
} }
inline void VISIBLE inline void
PR_PopFrame (progs_t *pr) PR_PopFrame (progs_t *pr)
{ {
prstack_t *frame; prstack_t *frame;
@ -276,7 +276,7 @@ signal_hook (int sig, void *data)
return 0; return 0;
} }
int VISIBLE int
PR_CallFunction (progs_t *pr, func_t fnum) PR_CallFunction (progs_t *pr, func_t fnum)
{ {
dfunction_t *f; dfunction_t *f;
@ -299,7 +299,7 @@ PR_CallFunction (progs_t *pr, func_t fnum)
The interpretation main loop The interpretation main loop
*/ */
void VISIBLE void
PR_ExecuteProgram (progs_t * pr, func_t fnum) PR_ExecuteProgram (progs_t * pr, func_t fnum)
{ {
int exitdepth, profile, startprofile; int exitdepth, profile, startprofile;

View File

@ -99,7 +99,7 @@ free_progs_mem (progs_t *pr, void *mem)
{ {
} }
void VISIBLE void
PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone) PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone)
{ {
unsigned i; unsigned i;
@ -269,7 +269,7 @@ PR_LoadProgsFile (progs_t * pr, QFile *file, int size, int edicts, int zone)
((int *) pr->pr_globals)[i] = LittleLong (((int *) pr->pr_globals)[i]); ((int *) pr->pr_globals)[i] = LittleLong (((int *) pr->pr_globals)[i]);
} }
void VISIBLE void
PR_AddLoadFunc (progs_t *pr, int (*func)(progs_t *)) PR_AddLoadFunc (progs_t *pr, int (*func)(progs_t *))
{ {
if (pr->num_load_funcs == pr->max_load_funcs) { if (pr->num_load_funcs == pr->max_load_funcs) {
@ -283,7 +283,7 @@ PR_AddLoadFunc (progs_t *pr, int (*func)(progs_t *))
pr->load_funcs[pr->num_load_funcs++] = func; pr->load_funcs[pr->num_load_funcs++] = func;
} }
void VISIBLE void
PR_AddLoadFinishFunc (progs_t *pr, int (*func)(progs_t *)) PR_AddLoadFinishFunc (progs_t *pr, int (*func)(progs_t *))
{ {
if (pr->num_load_finish_funcs == pr->max_load_finish_funcs) { if (pr->num_load_finish_funcs == pr->max_load_finish_funcs) {
@ -335,7 +335,7 @@ run_load_funcs (progs_t *pr, int (**load_funcs)(progs_t *))
return 1; return 1;
} }
int VISIBLE int
PR_RunLoadFuncs (progs_t *pr) PR_RunLoadFuncs (progs_t *pr)
{ {
int i; int i;
@ -371,7 +371,7 @@ PR_RunLoadFuncs (progs_t *pr)
/* /*
PR_LoadProgs PR_LoadProgs
*/ */
void VISIBLE void
PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone) PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone)
{ {
QFile *file; QFile *file;
@ -389,7 +389,7 @@ PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone)
PR_Error (pr, "unable to load %s", progsname); PR_Error (pr, "unable to load %s", progsname);
} }
void VISIBLE void
PR_Init_Cvars (void) PR_Init_Cvars (void)
{ {
pr_boundscheck = pr_boundscheck =
@ -405,14 +405,14 @@ PR_Init_Cvars (void)
PR_Debug_Init_Cvars (); PR_Debug_Init_Cvars ();
} }
void VISIBLE void
PR_Init (void) PR_Init (void)
{ {
PR_Opcode_Init (); PR_Opcode_Init ();
PR_Debug_Init (); PR_Debug_Init ();
} }
void VISIBLE void
PR_Error (progs_t *pr, const char *error, ...) PR_Error (progs_t *pr, const char *error, ...)
{ {
va_list argptr; va_list argptr;

View File

@ -48,7 +48,7 @@ static __attribute__ ((used)) const char rcsid[] =
hashtab_t *opcode_table; hashtab_t *opcode_table;
int pr_type_size[ev_type_count] = { VISIBLE int pr_type_size[ev_type_count] = {
1, // ev_void 1, // ev_void
1, // ev_string 1, // ev_string
1, // ev_float 1, // ev_float
@ -68,7 +68,7 @@ int pr_type_size[ev_type_count] = {
0, // ev_array variable 0, // ev_array variable
}; };
const char *pr_type_name[ev_type_count] = { VISIBLE const char *pr_type_name[ev_type_count] = {
"void", "void",
"string", "string",
"float", "float",
@ -98,7 +98,7 @@ const char *pr_type_name[ev_type_count] = {
// a operand a // a operand a
// b operand b // b operand b
// c operand c // c operand c
opcode_t pr_opcodes[] = { VISIBLE opcode_t pr_opcodes[] = {
{"<DONE>", "done", OP_DONE, false, {"<DONE>", "done", OP_DONE, false,
ev_entity, ev_field, ev_void, ev_entity, ev_field, ev_void,
PROG_ID_VERSION, PROG_ID_VERSION,
@ -1168,7 +1168,7 @@ PR_Opcode (short opcode)
return Hash_FindElement (opcode_table, &op); return Hash_FindElement (opcode_table, &op);
} }
void VISIBLE void
PR_Opcode_Init (void) PR_Opcode_Init (void)
{ {
opcode_t *op; opcode_t *op;

View File

@ -108,7 +108,7 @@ PR_UglyValueString (progs_t *pr, etype_t type, pr_type_t *val)
return line; return line;
} }
plitem_t * VISIBLE plitem_t *
ED_EntityDict (progs_t *pr, edict_t *ed) ED_EntityDict (progs_t *pr, edict_t *ed)
{ {
plitem_t *entity = PL_NewDictionary (); plitem_t *entity = PL_NewDictionary ();
@ -150,7 +150,7 @@ ED_EntityDict (progs_t *pr, edict_t *ed)
FIXME: need to tag constants, doesn't really work FIXME: need to tag constants, doesn't really work
*/ */
plitem_t * VISIBLE plitem_t *
ED_GlobalsDict (progs_t *pr) ED_GlobalsDict (progs_t *pr)
{ {
plitem_t *globals = PL_NewDictionary (); plitem_t *globals = PL_NewDictionary ();
@ -209,7 +209,7 @@ ED_NewString (progs_t *pr, const char *string)
Can parse either fields or globals Can parse either fields or globals
returns false if error returns false if error
*/ */
qboolean VISIBLE qboolean
ED_ParseEpair (progs_t *pr, pr_type_t *base, ddef_t *key, const char *s) ED_ParseEpair (progs_t *pr, pr_type_t *base, ddef_t *key, const char *s)
{ {
int i; int i;
@ -286,7 +286,7 @@ ED_ParseEpair (progs_t *pr, pr_type_t *base, ddef_t *key, const char *s)
to call ED_CallSpawnFunctions () to let the objects initialize themselves. to call ED_CallSpawnFunctions () to let the objects initialize themselves.
*/ */
plitem_t * VISIBLE plitem_t *
ED_ConvertToPlist (progs_t *pr, script_t *script) ED_ConvertToPlist (progs_t *pr, script_t *script)
{ {
plitem_t *plist = PL_NewArray (); plitem_t *plist = PL_NewArray ();
@ -335,7 +335,7 @@ ED_ConvertToPlist (progs_t *pr, script_t *script)
} }
void VISIBLE void
ED_InitGlobals (progs_t *pr, plitem_t *globals) ED_InitGlobals (progs_t *pr, plitem_t *globals)
{ {
ddef_t *global; ddef_t *global;
@ -360,7 +360,7 @@ ED_InitGlobals (progs_t *pr, plitem_t *globals)
PL_Free (keys); PL_Free (keys);
} }
void VISIBLE void
ED_InitEntity (progs_t *pr, plitem_t *entity, edict_t *ent) ED_InitEntity (progs_t *pr, plitem_t *entity, edict_t *ent)
{ {
ddef_t *field; ddef_t *field;
@ -439,7 +439,7 @@ ED_SpawnEntities (progs_t *pr, plitem_t *entity_list)
} }
} }
void VISIBLE void
ED_LoadFromFile (progs_t *pr, const char *data) ED_LoadFromFile (progs_t *pr, const char *data)
{ {
script_t *script; script_t *script;
@ -471,7 +471,7 @@ ED_LoadFromFile (progs_t *pr, const char *data)
} }
} }
void VISIBLE void
ED_EntityParseFunction (progs_t *pr) ED_EntityParseFunction (progs_t *pr)
{ {
pr->edict_parse = P_FUNCTION (pr, 0); pr->edict_parse = P_FUNCTION (pr, 0);

View File

@ -69,7 +69,7 @@ PR_GlobalAtOfs (progs_t * pr, int ofs)
return NULL; return NULL;
} }
ddef_t * VISIBLE ddef_t *
PR_FieldAtOfs (progs_t * pr, int ofs) PR_FieldAtOfs (progs_t * pr, int ofs)
{ {
ddef_t *def; ddef_t *def;
@ -83,25 +83,25 @@ PR_FieldAtOfs (progs_t * pr, int ofs)
return NULL; return NULL;
} }
ddef_t * VISIBLE ddef_t *
PR_FindField (progs_t * pr, const char *name) PR_FindField (progs_t * pr, const char *name)
{ {
return Hash_Find (pr->field_hash, name); return Hash_Find (pr->field_hash, name);
} }
ddef_t * VISIBLE ddef_t *
PR_FindGlobal (progs_t * pr, const char *name) PR_FindGlobal (progs_t * pr, const char *name)
{ {
return Hash_Find (pr->global_hash, name); return Hash_Find (pr->global_hash, name);
} }
dfunction_t * VISIBLE dfunction_t *
PR_FindFunction (progs_t * pr, const char *name) PR_FindFunction (progs_t * pr, const char *name)
{ {
return Hash_Find (pr->function_hash, name); return Hash_Find (pr->function_hash, name);
} }
void VISIBLE void
PR_Undefined (progs_t *pr, const char *type, const char *name) PR_Undefined (progs_t *pr, const char *type, const char *name)
{ {
PR_Error (pr, "undefined %s %s", type, name); PR_Error (pr, "undefined %s %s", type, name);

View File

@ -53,7 +53,7 @@ resource_get_key (void *r, void *unused)
return ((pr_resource_t *)r)->name; return ((pr_resource_t *)r)->name;
} }
void VISIBLE void
PR_Resources_Init (progs_t *pr) PR_Resources_Init (progs_t *pr)
{ {
pr->resource_hash = Hash_NewTable (1021, resource_get_key, 0, 0); pr->resource_hash = Hash_NewTable (1021, resource_get_key, 0, 0);
@ -70,7 +70,7 @@ PR_Resources_Clear (progs_t *pr)
} }
} }
void VISIBLE void
PR_Resources_Register (progs_t *pr, const char *name, void *data, PR_Resources_Register (progs_t *pr, const char *name, void *data,
void (*clear)(progs_t *, void *)) void (*clear)(progs_t *, void *))
{ {
@ -85,7 +85,7 @@ PR_Resources_Register (progs_t *pr, const char *name, void *data,
Hash_Add (pr->resource_hash, res); Hash_Add (pr->resource_hash, res);
} }
void * VISIBLE void *
PR_Resources_Find (progs_t *pr, const char *name) PR_Resources_Find (progs_t *pr, const char *name)
{ {
pr_resource_t *res = Hash_Find (pr->resource_hash, name); pr_resource_t *res = Hash_Find (pr->resource_hash, name);

View File

@ -187,7 +187,7 @@ strref_free (void *_sr, void *_pr)
} }
} }
int VISIBLE int
PR_LoadStrings (progs_t *pr) PR_LoadStrings (progs_t *pr)
{ {
char *end = pr->pr_strings + pr->progs->numstrings; char *end = pr->pr_strings + pr->progs->numstrings;
@ -281,13 +281,13 @@ get_string (progs_t *pr, int num)
} }
} }
qboolean VISIBLE qboolean
PR_StringValid (progs_t *pr, int num) PR_StringValid (progs_t *pr, int num)
{ {
return get_string (pr, num) != 0; return get_string (pr, num) != 0;
} }
const char * VISIBLE const char *
PR_GetString (progs_t *pr, int num) PR_GetString (progs_t *pr, int num)
{ {
const char *str; const char *str;
@ -298,7 +298,7 @@ PR_GetString (progs_t *pr, int num)
PR_RunError (pr, "Invalid string offset %d", num); PR_RunError (pr, "Invalid string offset %d", num);
} }
dstring_t * VISIBLE dstring_t *
PR_GetMutableString (progs_t *pr, int num) PR_GetMutableString (progs_t *pr, int num)
{ {
strref_t *ref = get_strref (pr, num); strref_t *ref = get_strref (pr, num);
@ -330,7 +330,7 @@ pr_strdup (progs_t *pr, const char *s)
return new; return new;
} }
int VISIBLE int
PR_SetString (progs_t *pr, const char *s) PR_SetString (progs_t *pr, const char *s)
{ {
strref_t *sr; strref_t *sr;
@ -360,7 +360,7 @@ PR_ClearReturnStrings (progs_t *pr)
} }
} }
int VISIBLE int
PR_SetReturnString (progs_t *pr, const char *s) PR_SetReturnString (progs_t *pr, const char *s)
{ {
strref_t *sr; strref_t *sr;
@ -415,7 +415,7 @@ PR_CatStrings (progs_t *pr, const char *a, const char *b)
return pr_settempstring (pr, c); return pr_settempstring (pr, c);
} }
int VISIBLE int
PR_SetTempString (progs_t *pr, const char *s) PR_SetTempString (progs_t *pr, const char *s)
{ {
strref_t *sr; strref_t *sr;
@ -430,7 +430,7 @@ PR_SetTempString (progs_t *pr, const char *s)
return pr_settempstring (pr, pr_strdup (pr, s)); return pr_settempstring (pr, pr_strdup (pr, s));
} }
int VISIBLE int
PR_SetDynamicString (progs_t *pr, const char *s) PR_SetDynamicString (progs_t *pr, const char *s)
{ {
strref_t *sr; strref_t *sr;
@ -469,7 +469,7 @@ PR_MakeTempString (progs_t *pr, int str)
pr->pr_xtstr = sr; pr->pr_xtstr = sr;
} }
int VISIBLE int
PR_NewMutableString (progs_t *pr) PR_NewMutableString (progs_t *pr)
{ {
strref_t *sr = new_string_ref (pr); strref_t *sr = new_string_ref (pr);
@ -478,7 +478,7 @@ PR_NewMutableString (progs_t *pr)
return string_index (pr, sr); return string_index (pr, sr);
} }
void VISIBLE void
PR_FreeString (progs_t *pr, int str) PR_FreeString (progs_t *pr, int str)
{ {
strref_t *sr = get_strref (pr, str); strref_t *sr = get_strref (pr, str);
@ -636,7 +636,7 @@ free_fmt_item (fmt_item_t *fi)
#undef P_var #undef P_var
#define P_var(p,n,t) (args[n]->t##_var) #define P_var(p,n,t) (args[n]->t##_var)
void VISIBLE void
PR_Sprintf (progs_t *pr, dstring_t *result, const char *name, PR_Sprintf (progs_t *pr, dstring_t *result, const char *name,
const char *format, int count, pr_type_t **args) const char *format, int count, pr_type_t **args)
{ {

View File

@ -54,19 +54,19 @@ PR_Zone_Init (progs_t *pr)
Z_ClearZone (pr->zone, pr->zone_size); Z_ClearZone (pr->zone, pr->zone_size);
} }
void VISIBLE void
PR_Zone_Free (progs_t *pr, void *ptr) PR_Zone_Free (progs_t *pr, void *ptr)
{ {
Z_Free (pr->zone, ptr); Z_Free (pr->zone, ptr);
} }
void * VISIBLE void *
PR_Zone_Malloc (progs_t *pr, int size) PR_Zone_Malloc (progs_t *pr, int size)
{ {
return Z_Malloc (pr->zone, size); return Z_Malloc (pr->zone, size);
} }
void * VISIBLE void *
PR_Zone_Realloc (progs_t *pr, void *ptr, int size) PR_Zone_Realloc (progs_t *pr, void *ptr, int size)
{ {
return Z_Realloc (pr->zone, ptr, size); return Z_Realloc (pr->zone, ptr, size);

View File

@ -1,5 +1,5 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFgib.la lib_LTLIBRARIES= libQFgib.la

View File

@ -331,7 +331,7 @@ cbuf_interpreter_t gib_interp = {
GIB_Execute, GIB_Execute,
}; };
cbuf_interpreter_t * VISIBLE cbuf_interpreter_t *
GIB_Interpreter (void) GIB_Interpreter (void)
{ {
return &gib_interp; return &gib_interp;

View File

@ -68,7 +68,7 @@ const char rcsid[] =
#include "gib_classes.h" #include "gib_classes.h"
static char _gib_null_string[] = ""; static char _gib_null_string[] = "";
char * const gib_null_string = _gib_null_string; VISIBLE char * const gib_null_string = _gib_null_string;
hashtab_t *gib_builtins; hashtab_t *gib_builtins;
@ -96,7 +96,7 @@ GIB_Builtin_Free (void *ele, void *ptr)
Registers a new builtin GIB command. Registers a new builtin GIB command.
*/ */
void VISIBLE void
GIB_Builtin_Add (const char *name, void (*func) (void)) GIB_Builtin_Add (const char *name, void (*func) (void))
{ {
gib_builtin_t *new; gib_builtin_t *new;
@ -111,7 +111,7 @@ GIB_Builtin_Add (const char *name, void (*func) (void))
Hash_Add (gib_builtins, new); Hash_Add (gib_builtins, new);
} }
void VISIBLE void
GIB_Builtin_Remove (const char *name) GIB_Builtin_Remove (const char *name)
{ {
gib_builtin_t *del; gib_builtin_t *del;
@ -120,7 +120,7 @@ GIB_Builtin_Remove (const char *name)
Hash_Free (gib_builtins, del); Hash_Free (gib_builtins, del);
} }
qboolean VISIBLE qboolean
GIB_Builtin_Exists (const char *name) GIB_Builtin_Exists (const char *name)
{ {
return Hash_Find (gib_builtins, name) ? true : false; return Hash_Find (gib_builtins, name) ? true : false;
@ -133,7 +133,7 @@ GIB_Builtin_Exists (const char *name)
returning a pointer to the struct on success, returning a pointer to the struct on success,
zero otherwise. zero otherwise.
*/ */
gib_builtin_t * VISIBLE gib_builtin_t *
GIB_Builtin_Find (const char *name) GIB_Builtin_Find (const char *name)
{ {
if (!gib_builtins) if (!gib_builtins)
@ -141,7 +141,7 @@ GIB_Builtin_Find (const char *name)
return (gib_builtin_t *) Hash_Find (gib_builtins, name); return (gib_builtin_t *) Hash_Find (gib_builtins, name);
} }
dstring_t * VISIBLE dstring_t *
GIB_Return (const char *str) GIB_Return (const char *str)
{ {
dstring_t *dstr; dstring_t *dstr;
@ -157,7 +157,7 @@ GIB_Return (const char *str)
return 0; return 0;
} }
void VISIBLE void
GIB_Error (const char *type, const char *fmt, ...) GIB_Error (const char *type, const char *fmt, ...)
{ {
va_list args; va_list args;

View File

@ -95,7 +95,7 @@ GIB_Exec_Override_f (void)
Hunk_FreeToLowMark (mark); Hunk_FreeToLowMark (mark);
} }
void VISIBLE void
GIB_Init (qboolean sandbox) GIB_Init (qboolean sandbox)
{ {
// Override the exec command with a GIB-aware one // Override the exec command with a GIB-aware one

View File

@ -189,7 +189,7 @@ GIB_Parse_Match_Var (const char *str, unsigned int *i)
return 0; return 0;
} }
qboolean gib_parse_error; VISIBLE qboolean gib_parse_error;
unsigned int gib_parse_error_pos; unsigned int gib_parse_error_pos;
const char *gib_parse_error_msg; const char *gib_parse_error_msg;

View File

@ -86,7 +86,7 @@ GIB_Thread_Count (void)
return llist_size (gib_threads); return llist_size (gib_threads);
} }
void VISIBLE void
GIB_Thread_Execute (void) GIB_Thread_Execute (void)
{ {
auto qboolean iterator (cbuf_t *cbuf, llist_node_t *node); auto qboolean iterator (cbuf_t *cbuf, llist_node_t *node);
@ -124,7 +124,7 @@ GIB_Event_Free (void *ele, void *ptr)
free (ev); free (ev);
} }
gib_event_t * VISIBLE gib_event_t *
GIB_Event_New (const char *name) GIB_Event_New (const char *name)
{ {
gib_event_t *new; gib_event_t *new;
@ -146,7 +146,7 @@ GIB_Event_Register (const char *name, gib_function_t * func)
return 0; return 0;
} }
void VISIBLE void
GIB_Event_Callback (gib_event_t * event, unsigned int argc, ...) GIB_Event_Callback (gib_event_t * event, unsigned int argc, ...)
{ {
gib_function_t *f = event->func; gib_function_t *f = event->func;

View File

@ -1,5 +1,5 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFimage.la lib_LTLIBRARIES= libQFimage.la

View File

@ -45,7 +45,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/quakefs.h" #include "QF/quakefs.h"
#include "QF/tga.h" #include "QF/tga.h"
tex_t * VISIBLE tex_t *
LoadImage (const char *imageFile) LoadImage (const char *imageFile)
{ {
int tmp; int tmp;

View File

@ -49,7 +49,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h" #include "compat.h"
tex_t * VISIBLE tex_t *
LoadPCX (QFile *f, int convert, byte *pal) LoadPCX (QFile *f, int convert, byte *pal)
{ {
pcx_t *pcx; pcx_t *pcx;
@ -140,7 +140,7 @@ LoadPCX (QFile *f, int convert, byte *pal)
return tex; return tex;
} }
pcx_t * VISIBLE pcx_t *
EncodePCX (byte * data, int width, int height, EncodePCX (byte * data, int width, int height,
int rowbytes, byte * palette, qboolean flip, int *length) int rowbytes, byte * palette, qboolean flip, int *length)
{ {

View File

@ -117,7 +117,7 @@ readpng_init (QFile *infile, png_structp *png_ptr, png_infop *info_ptr)
} }
/* Load the png file and return a texture */ /* Load the png file and return a texture */
tex_t * VISIBLE tex_t *
LoadPNG (QFile *infile) LoadPNG (QFile *infile)
{ {
double gamma; double gamma;
@ -196,7 +196,7 @@ LoadPNG (QFile *infile)
#define WRITEPNG_BIT_DEPTH 8 #define WRITEPNG_BIT_DEPTH 8
void VISIBLE void
WritePNG (const char *fileName, byte *data, int width, int height) WritePNG (const char *fileName, byte *data, int width, int height)
{ {
QFile *outfile; QFile *outfile;
@ -282,13 +282,13 @@ WritePNG (const char *fileName, byte *data, int width, int height)
#include "QF/image.h" #include "QF/image.h"
#include "QF/png.h" #include "QF/png.h"
tex_t * VISIBLE tex_t *
LoadPNG (QFile *infile) LoadPNG (QFile *infile)
{ {
return 0; return 0;
} }
void VISIBLE void
WritePNG (const char *fileName, byte *data, int width, int height) WritePNG (const char *fileName, byte *data, int width, int height)
{ {
return; return;

View File

@ -662,7 +662,7 @@ LoadTGA (QFile *fin)
return tex; return tex;
} }
void VISIBLE void
WriteTGAfile (const char *tganame, byte *data, int width, int height) WriteTGAfile (const char *tganame, byte *data, int width, int height)
{ {
TargaHeader header; TargaHeader header;

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
SUBDIRS= alias brush sprite SUBDIRS= alias brush sprite
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFmodels.la @VID_MODEL_TARGETS@ lib_LTLIBRARIES= libQFmodels.la @VID_MODEL_TARGETS@

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
if BUILD_GL if BUILD_GL

View File

@ -53,7 +53,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h" #include "compat.h"
byte player_8bit_texels[640 * 400]; VISIBLE byte player_8bit_texels[640 * 400];
// a pose is a single set of vertexes. a frame may be // a pose is a single set of vertexes. a frame may be

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
if BUILD_GL if BUILD_GL

View File

@ -54,7 +54,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h" #include "compat.h"
int mod_lightmap_bytes = 3; VISIBLE int mod_lightmap_bytes = 3; //FIXME should this be visible?
void void

View File

@ -55,9 +55,9 @@ static __attribute__ ((used)) const char rcsid[] =
byte mod_novis[MAX_MAP_LEAFS / 8]; byte mod_novis[MAX_MAP_LEAFS / 8];
cvar_t *gl_sky_divide; VISIBLE cvar_t *gl_sky_divide; //FIXME visibility?
mleaf_t * VISIBLE mleaf_t *
Mod_PointInLeaf (const vec3_t p, model_t *model) Mod_PointInLeaf (const vec3_t p, model_t *model)
{ {
float d; float d;
@ -117,7 +117,7 @@ Mod_DecompressVis (byte * in, model_t *model)
return decompressed; return decompressed;
} }
byte * VISIBLE byte *
Mod_LeafPVS (mleaf_t *leaf, model_t *model) Mod_LeafPVS (mleaf_t *leaf, model_t *model)
{ {
if (leaf == model->leafs) if (leaf == model->leafs)

View File

@ -43,7 +43,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/model.h" #include "QF/model.h"
int mod_lightmap_bytes = 1; VISIBLE int mod_lightmap_bytes = 1; //FIXME should this be visible?
void void

View File

@ -40,7 +40,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/model.h" #include "QF/model.h"
clip_hull_t * VISIBLE clip_hull_t *
MOD_Alloc_Hull (int nodes, int planes) MOD_Alloc_Hull (int nodes, int planes)
{ {
clip_hull_t *ch; clip_hull_t *ch;
@ -67,7 +67,7 @@ MOD_Alloc_Hull (int nodes, int planes)
return ch; return ch;
} }
void VISIBLE void
MOD_Free_Hull (clip_hull_t *ch) MOD_Free_Hull (clip_hull_t *ch)
{ {
free (ch); free (ch);

View File

@ -44,7 +44,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "r_local.h" #include "r_local.h"
int VISIBLE int
Mod_CalcFullbright (byte *in, byte *out, int pixels) Mod_CalcFullbright (byte *in, byte *out, int pixels)
{ {
int fb = 0; int fb = 0;

View File

@ -56,7 +56,7 @@ char *loadname; // for hunk tags
model_t mod_known[MAX_MOD_KNOWN]; model_t mod_known[MAX_MOD_KNOWN];
int mod_numknown; int mod_numknown;
texture_t *r_notexture_mip; VISIBLE texture_t *r_notexture_mip;
cvar_t *gl_mesh_cache; cvar_t *gl_mesh_cache;
cvar_t *gl_subdivide_size; cvar_t *gl_subdivide_size;
@ -65,7 +65,7 @@ cvar_t *gl_textures_external;
static void Mod_CallbackLoad (void *object, cache_allocator_t allocator); static void Mod_CallbackLoad (void *object, cache_allocator_t allocator);
void VISIBLE void
Mod_Init (void) Mod_Init (void)
{ {
byte *dest; byte *dest;
@ -95,7 +95,7 @@ Mod_Init (void)
} }
} }
void VISIBLE void
Mod_Init_Cvars (void) Mod_Init_Cvars (void)
{ {
gl_subdivide_size = gl_subdivide_size =
@ -112,7 +112,7 @@ Mod_Init_Cvars (void)
"Use external textures to replace BSP textures"); "Use external textures to replace BSP textures");
} }
void VISIBLE void
Mod_ClearAll (void) Mod_ClearAll (void)
{ {
int i; int i;
@ -258,7 +258,7 @@ Mod_CallbackLoad (void *object, cache_allocator_t allocator)
Loads in a model for the given name Loads in a model for the given name
*/ */
model_t * VISIBLE model_t *
Mod_ForName (const char *name, qboolean crash) Mod_ForName (const char *name, qboolean crash)
{ {
model_t *mod; model_t *mod;
@ -269,7 +269,7 @@ Mod_ForName (const char *name, qboolean crash)
return Mod_LoadModel (mod, crash); return Mod_LoadModel (mod, crash);
} }
void VISIBLE void
Mod_TouchModel (const char *name) Mod_TouchModel (const char *name)
{ {
model_t *mod; model_t *mod;
@ -282,7 +282,7 @@ Mod_TouchModel (const char *name)
} }
} }
void VISIBLE void
Mod_Print (void) Mod_Print (void)
{ {
int i; int i;

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
if BUILD_GL if BUILD_GL

View File

@ -91,7 +91,7 @@ calc_impact (trace_t *trace, const vec3_t start, const vec3_t end,
VectorMultAdd (start, frac, dist, trace->endpos); VectorMultAdd (start, frac, dist, trace->endpos);
} }
qboolean VISIBLE qboolean
MOD_TraceLine (hull_t *hull, int num, MOD_TraceLine (hull_t *hull, int num,
const vec3_t start_point, const vec3_t end_point, const vec3_t start_point, const vec3_t end_point,
trace_t *trace) trace_t *trace)

View File

@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
SUBDIRS= nc nm SUBDIRS= nc nm
AM_CFLAGS= @PREFER_NON_PIC@ CFLAGS+= @PREFER_NON_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
noinst_LTLIBRARIES= libnet_chan.la libnet_main.la noinst_LTLIBRARIES= libnet_chan.la libnet_main.la

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_NON_PIC@ CFLAGS+= @PREFER_NON_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
noinst_LTLIBRARIES= libnc.la noinst_LTLIBRARIES= libnc.la

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_NON_PIC@ CFLAGS+= @PREFER_NON_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
noinst_LTLIBRARIES= libnm.la noinst_LTLIBRARIES= libnm.la

View File

@ -1,5 +1,5 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFobject.la lib_LTLIBRARIES= libQFobject.la

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFruamoko.la lib_LTLIBRARIES= libQFruamoko.la

View File

@ -112,7 +112,7 @@ RUA_Cbuf_Init (progs_t *pr, int secure)
PR_RegisterBuiltins (pr, builtins); PR_RegisterBuiltins (pr, builtins);
} }
void VISIBLE void
RUA_Cbuf_SetCbuf (progs_t *pr, cbuf_t *cbuf) RUA_Cbuf_SetCbuf (progs_t *pr, cbuf_t *cbuf)
{ {
cbuf_resources_t *res = PR_Resources_Find (pr, "Cbuf"); cbuf_resources_t *res = PR_Resources_Find (pr, "Cbuf");

View File

@ -52,7 +52,7 @@ static void (*init_funcs[])(progs_t *, int) = {
RUA_String_Init, RUA_String_Init,
}; };
void VISIBLE void
RUA_Init (progs_t *pr, int secure) RUA_Init (progs_t *pr, int secure)
{ {
size_t i; size_t i;

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
AM_CCASFLAGS= @PREFER_PIC@ CCASFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include INCLUDES= -I$(top_srcdir)/include
lib_LTLIBRARIES= libQFutil.la lib_LTLIBRARIES= libQFutil.la

View File

@ -234,7 +234,7 @@ do { \
return bsp; return bsp;
} }
bsp_t * VISIBLE bsp_t *
LoadBSPFile (QFile *file, int size) LoadBSPFile (QFile *file, int size)
{ {
void *buf; void *buf;
@ -252,7 +252,7 @@ LoadBSPFile (QFile *file, int size)
Swaps the bsp file in place, so it should not be referenced again Swaps the bsp file in place, so it should not be referenced again
*/ */
void VISIBLE void
WriteBSPFile (bsp_t *bsp, QFile *file) WriteBSPFile (bsp_t *bsp, QFile *file)
{ {
int size; int size;
@ -327,13 +327,13 @@ do { \
free (header); free (header);
} }
bsp_t * VISIBLE bsp_t *
BSP_New (void) BSP_New (void)
{ {
return calloc (1, sizeof (bsp_t)); return calloc (1, sizeof (bsp_t));
} }
void VISIBLE void
BSP_AddPlane (bsp_t *bsp, dplane_t *plane) BSP_AddPlane (bsp_t *bsp, dplane_t *plane)
{ {
bsp->planes = realloc (bsp->planes, bsp->planes = realloc (bsp->planes,
@ -341,7 +341,7 @@ BSP_AddPlane (bsp_t *bsp, dplane_t *plane)
bsp->planes[bsp->numplanes++] = *plane; bsp->planes[bsp->numplanes++] = *plane;
} }
void VISIBLE void
BSP_AddLeaf (bsp_t *bsp, dleaf_t *leaf) BSP_AddLeaf (bsp_t *bsp, dleaf_t *leaf)
{ {
bsp->leafs = realloc (bsp->leafs, bsp->leafs = realloc (bsp->leafs,
@ -349,7 +349,7 @@ BSP_AddLeaf (bsp_t *bsp, dleaf_t *leaf)
bsp->leafs[bsp->numleafs++] = *leaf; bsp->leafs[bsp->numleafs++] = *leaf;
} }
void VISIBLE void
BSP_AddVertex (bsp_t *bsp, dvertex_t *vertex) BSP_AddVertex (bsp_t *bsp, dvertex_t *vertex)
{ {
bsp->vertexes = realloc (bsp->vertexes, bsp->vertexes = realloc (bsp->vertexes,
@ -357,7 +357,7 @@ BSP_AddVertex (bsp_t *bsp, dvertex_t *vertex)
bsp->vertexes[bsp->numvertexes++] = *vertex; bsp->vertexes[bsp->numvertexes++] = *vertex;
} }
void VISIBLE void
BSP_AddNode (bsp_t *bsp, dnode_t *node) BSP_AddNode (bsp_t *bsp, dnode_t *node)
{ {
bsp->nodes = realloc (bsp->nodes, bsp->nodes = realloc (bsp->nodes,
@ -365,7 +365,7 @@ BSP_AddNode (bsp_t *bsp, dnode_t *node)
bsp->nodes[bsp->numnodes++] = *node; bsp->nodes[bsp->numnodes++] = *node;
} }
void VISIBLE void
BSP_AddTexinfo (bsp_t *bsp, texinfo_t *texinfo) BSP_AddTexinfo (bsp_t *bsp, texinfo_t *texinfo)
{ {
bsp->texinfo = realloc (bsp->texinfo, bsp->texinfo = realloc (bsp->texinfo,
@ -373,7 +373,7 @@ BSP_AddTexinfo (bsp_t *bsp, texinfo_t *texinfo)
bsp->texinfo[bsp->numtexinfo++] = *texinfo; bsp->texinfo[bsp->numtexinfo++] = *texinfo;
} }
void VISIBLE void
BSP_AddFace (bsp_t *bsp, dface_t *face) BSP_AddFace (bsp_t *bsp, dface_t *face)
{ {
bsp->faces = realloc (bsp->faces, bsp->faces = realloc (bsp->faces,
@ -381,7 +381,7 @@ BSP_AddFace (bsp_t *bsp, dface_t *face)
bsp->faces[bsp->numfaces++] = *face; bsp->faces[bsp->numfaces++] = *face;
} }
void VISIBLE void
BSP_AddClipnode (bsp_t *bsp, dclipnode_t *clipnode) BSP_AddClipnode (bsp_t *bsp, dclipnode_t *clipnode)
{ {
bsp->clipnodes = realloc (bsp->clipnodes, bsp->clipnodes = realloc (bsp->clipnodes,
@ -389,7 +389,7 @@ BSP_AddClipnode (bsp_t *bsp, dclipnode_t *clipnode)
bsp->clipnodes[bsp->numclipnodes++] = *clipnode; bsp->clipnodes[bsp->numclipnodes++] = *clipnode;
} }
void VISIBLE void
BSP_AddMarkSurface (bsp_t *bsp, unsigned short marksurface) BSP_AddMarkSurface (bsp_t *bsp, unsigned short marksurface)
{ {
bsp->marksurfaces = realloc (bsp->marksurfaces, bsp->marksurfaces = realloc (bsp->marksurfaces,
@ -398,7 +398,7 @@ BSP_AddMarkSurface (bsp_t *bsp, unsigned short marksurface)
bsp->marksurfaces[bsp->nummarksurfaces++] = marksurface; bsp->marksurfaces[bsp->nummarksurfaces++] = marksurface;
} }
void VISIBLE void
BSP_AddSurfEdge (bsp_t *bsp, int surfedge) BSP_AddSurfEdge (bsp_t *bsp, int surfedge)
{ {
bsp->surfedges = realloc (bsp->surfedges, bsp->surfedges = realloc (bsp->surfedges,
@ -406,7 +406,7 @@ BSP_AddSurfEdge (bsp_t *bsp, int surfedge)
bsp->surfedges[bsp->numsurfedges++] = surfedge; bsp->surfedges[bsp->numsurfedges++] = surfedge;
} }
void VISIBLE void
BSP_AddEdge (bsp_t *bsp, dedge_t *edge) BSP_AddEdge (bsp_t *bsp, dedge_t *edge)
{ {
bsp->edges = realloc (bsp->edges, bsp->edges = realloc (bsp->edges,
@ -414,7 +414,7 @@ BSP_AddEdge (bsp_t *bsp, dedge_t *edge)
bsp->edges[bsp->numedges++] = *edge; bsp->edges[bsp->numedges++] = *edge;
} }
void VISIBLE void
BSP_AddModel (bsp_t *bsp, dmodel_t *model) BSP_AddModel (bsp_t *bsp, dmodel_t *model)
{ {
bsp->models = realloc (bsp->models, bsp->models = realloc (bsp->models,
@ -422,7 +422,7 @@ BSP_AddModel (bsp_t *bsp, dmodel_t *model)
bsp->models[bsp->nummodels++] = *model; bsp->models[bsp->nummodels++] = *model;
} }
void VISIBLE void
BSP_AddLighting (bsp_t *bsp, byte *lightdata, int lightdatasize) BSP_AddLighting (bsp_t *bsp, byte *lightdata, int lightdatasize)
{ {
bsp->lightdatasize = lightdatasize; bsp->lightdatasize = lightdatasize;
@ -430,7 +430,7 @@ BSP_AddLighting (bsp_t *bsp, byte *lightdata, int lightdatasize)
memcpy (bsp->lightdata, lightdata, lightdatasize); memcpy (bsp->lightdata, lightdata, lightdatasize);
} }
void VISIBLE void
BSP_AddVisibility (bsp_t *bsp, byte *visdata, int visdatasize) BSP_AddVisibility (bsp_t *bsp, byte *visdata, int visdatasize)
{ {
bsp->visdatasize = visdatasize; bsp->visdatasize = visdatasize;
@ -438,7 +438,7 @@ BSP_AddVisibility (bsp_t *bsp, byte *visdata, int visdatasize)
memcpy (bsp->visdata, visdata, visdatasize); memcpy (bsp->visdata, visdata, visdatasize);
} }
void VISIBLE void
BSP_AddEntities (bsp_t *bsp, char *entdata, int entdatasize) BSP_AddEntities (bsp_t *bsp, char *entdata, int entdatasize)
{ {
bsp->entdatasize = entdatasize; bsp->entdatasize = entdatasize;
@ -446,7 +446,7 @@ BSP_AddEntities (bsp_t *bsp, char *entdata, int entdatasize)
memcpy (bsp->entdata, entdata, entdatasize); memcpy (bsp->entdata, entdata, entdatasize);
} }
void VISIBLE void
BSP_AddTextures (bsp_t *bsp, byte *texdata, int texdatasize) BSP_AddTextures (bsp_t *bsp, byte *texdata, int texdatasize)
{ {
bsp->texdatasize = texdatasize; bsp->texdatasize = texdatasize;

View File

@ -49,7 +49,7 @@ static const char mond[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
/* returns days since Dec 21 1999 */ /* returns days since Dec 21 1999 */
int VISIBLE int
build_number (void) build_number (void)
{ {
int m = 0; int m = 0;

View File

@ -51,15 +51,15 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h" #include "compat.h"
cbuf_t *cbuf_active = NULL; VISIBLE cbuf_t *cbuf_active = NULL;
cbuf_args_t * VISIBLE cbuf_args_t *
Cbuf_ArgsNew (void) Cbuf_ArgsNew (void)
{ {
return calloc (1, sizeof (cbuf_args_t)); return calloc (1, sizeof (cbuf_args_t));
} }
void VISIBLE void
Cbuf_ArgsDelete (cbuf_args_t *args) Cbuf_ArgsDelete (cbuf_args_t *args)
{ {
int i; int i;
@ -72,7 +72,7 @@ Cbuf_ArgsDelete (cbuf_args_t *args)
free (args); free (args);
} }
void VISIBLE void
Cbuf_ArgsAdd (cbuf_args_t *args, const char *arg) Cbuf_ArgsAdd (cbuf_args_t *args, const char *arg)
{ {
int i; int i;
@ -92,7 +92,7 @@ Cbuf_ArgsAdd (cbuf_args_t *args, const char *arg)
args->argc++; args->argc++;
} }
cbuf_t * VISIBLE cbuf_t *
Cbuf_New (cbuf_interpreter_t *interp) Cbuf_New (cbuf_interpreter_t *interp)
{ {
cbuf_t *cbuf = calloc (1, sizeof (cbuf_t)); cbuf_t *cbuf = calloc (1, sizeof (cbuf_t));
@ -104,7 +104,7 @@ Cbuf_New (cbuf_interpreter_t *interp)
return cbuf; return cbuf;
} }
void VISIBLE void
Cbuf_Delete (cbuf_t *cbuf) Cbuf_Delete (cbuf_t *cbuf)
{ {
if (!cbuf) if (!cbuf)
@ -115,7 +115,7 @@ Cbuf_Delete (cbuf_t *cbuf)
free (cbuf); free (cbuf);
} }
void VISIBLE void
Cbuf_DeleteStack (cbuf_t *stack) Cbuf_DeleteStack (cbuf_t *stack)
{ {
cbuf_t *next; cbuf_t *next;
@ -136,7 +136,7 @@ Cbuf_Reset (cbuf_t *cbuf)
cbuf->interpreter->reset (cbuf); cbuf->interpreter->reset (cbuf);
} }
cbuf_t * VISIBLE cbuf_t *
Cbuf_PushStack (cbuf_interpreter_t *interp) Cbuf_PushStack (cbuf_interpreter_t *interp)
{ {
cbuf_t *new; cbuf_t *new;
@ -156,7 +156,7 @@ Cbuf_PushStack (cbuf_interpreter_t *interp)
return new; return new;
} }
void VISIBLE void
Cbuf_AddText (cbuf_t *cbuf, const char *text) Cbuf_AddText (cbuf_t *cbuf, const char *text)
{ {
if (cbuf->state == CBUF_STATE_JUNK) if (cbuf->state == CBUF_STATE_JUNK)
@ -164,7 +164,7 @@ Cbuf_AddText (cbuf_t *cbuf, const char *text)
cbuf->interpreter->add (cbuf, text); cbuf->interpreter->add (cbuf, text);
} }
void VISIBLE void
Cbuf_InsertText (cbuf_t *cbuf, const char *text) Cbuf_InsertText (cbuf_t *cbuf, const char *text)
{ {
if (cbuf->state == CBUF_STATE_JUNK) if (cbuf->state == CBUF_STATE_JUNK)
@ -172,7 +172,7 @@ Cbuf_InsertText (cbuf_t *cbuf, const char *text)
cbuf->interpreter->insert (cbuf, text); cbuf->interpreter->insert (cbuf, text);
} }
void VISIBLE void
Cbuf_Execute (cbuf_t *cbuf) Cbuf_Execute (cbuf_t *cbuf)
{ {
cbuf_t *old = cbuf_active; cbuf_t *old = cbuf_active;
@ -181,7 +181,7 @@ Cbuf_Execute (cbuf_t *cbuf)
cbuf_active = old; cbuf_active = old;
} }
void VISIBLE void
Cbuf_Execute_Stack (cbuf_t *cbuf) Cbuf_Execute_Stack (cbuf_t *cbuf)
{ {
cbuf_t *sp; cbuf_t *sp;
@ -222,7 +222,7 @@ Cbuf_Execute_Stack (cbuf_t *cbuf)
Cbuf_Reset (cbuf); Cbuf_Reset (cbuf);
} }
void VISIBLE void
Cbuf_Execute_Sets (cbuf_t *cbuf) Cbuf_Execute_Sets (cbuf_t *cbuf)
{ {
cbuf->interpreter->execute_sets (cbuf); cbuf->interpreter->execute_sets (cbuf);

View File

@ -124,7 +124,7 @@ static byte chktbl[1024 + 4] = {
For proxy protecting For proxy protecting
*/ */
byte VISIBLE byte
COM_BlockSequenceCRCByte (const byte * base, int length, int sequence) COM_BlockSequenceCRCByte (const byte * base, int length, int sequence)
{ {
byte chkb[60 + 4]; byte chkb[60 + 4];
@ -151,7 +151,7 @@ COM_BlockSequenceCRCByte (const byte * base, int length, int sequence)
return (byte) crc; return (byte) crc;
} }
unsigned int VISIBLE unsigned int
Com_BlockChecksum (const void *buffer, int length) Com_BlockChecksum (const void *buffer, int length)
{ {
int digest[4]; int digest[4];

View File

@ -62,14 +62,14 @@ typedef struct cmdalias_s {
static cmdalias_t *cmd_alias; static cmdalias_t *cmd_alias;
cvar_t *cmd_warncmd; VISIBLE cvar_t *cmd_warncmd;
static hashtab_t *cmd_alias_hash; static hashtab_t *cmd_alias_hash;
static hashtab_t *cmd_hash; static hashtab_t *cmd_hash;
cbuf_args_t *cmd_args; VISIBLE cbuf_args_t *cmd_args;
static cbuf_t *cmd_cbuf; static cbuf_t *cmd_cbuf;
cmd_source_t cmd_source; VISIBLE cmd_source_t cmd_source;
/* Command parsing functions */ /* Command parsing functions */
@ -84,13 +84,13 @@ typedef struct cmd_function_s {
static cmd_function_t *cmd_functions; // possible commands to execute static cmd_function_t *cmd_functions; // possible commands to execute
int VISIBLE int
Cmd_Argc (void) Cmd_Argc (void)
{ {
return cmd_args->argc; return cmd_args->argc;
} }
const char * VISIBLE const char *
Cmd_Argv (int arg) Cmd_Argv (int arg)
{ {
if (arg >= cmd_args->argc) if (arg >= cmd_args->argc)
@ -98,7 +98,7 @@ Cmd_Argv (int arg)
return cmd_args->argv[arg]->str; return cmd_args->argv[arg]->str;
} }
const char * VISIBLE const char *
Cmd_Args (int start) Cmd_Args (int start)
{ {
if (start >= cmd_args->argc) if (start >= cmd_args->argc)
@ -106,7 +106,7 @@ Cmd_Args (int start)
return cmd_args->args[start]; return cmd_args->args[start];
} }
int VISIBLE int
Cmd_Command (cbuf_args_t *args) Cmd_Command (cbuf_args_t *args)
{ {
cmd_function_t *cmd; cmd_function_t *cmd;
@ -138,7 +138,7 @@ Cmd_Command (cbuf_args_t *args)
} }
/* Registers a command and handler function */ /* Registers a command and handler function */
int VISIBLE int
Cmd_AddCommand (const char *cmd_name, xcommand_t function, Cmd_AddCommand (const char *cmd_name, xcommand_t function,
const char *description) const char *description)
{ {
@ -167,7 +167,7 @@ Cmd_AddCommand (const char *cmd_name, xcommand_t function,
} }
/* Unregisters a command */ /* Unregisters a command */
int VISIBLE int
Cmd_RemoveCommand (const char *name) Cmd_RemoveCommand (const char *name)
{ {
cmd_function_t *cmd; cmd_function_t *cmd;
@ -185,7 +185,7 @@ Cmd_RemoveCommand (const char *name)
} }
/* Checks for the existance of a command */ /* Checks for the existance of a command */
qboolean VISIBLE qboolean
Cmd_Exists (const char *cmd_name) Cmd_Exists (const char *cmd_name)
{ {
cmd_function_t *cmd; cmd_function_t *cmd;
@ -201,7 +201,7 @@ Cmd_Exists (const char *cmd_name)
/* Command completion functions */ /* Command completion functions */
const char * VISIBLE const char *
Cmd_CompleteCommand (const char *partial) Cmd_CompleteCommand (const char *partial)
{ {
cmd_function_t *cmd; cmd_function_t *cmd;
@ -233,7 +233,7 @@ Cmd_CompleteCommand (const char *partial)
Thanks to Fett erich@heintz.com Thanks to Fett erich@heintz.com
Thanks to taniwha Thanks to taniwha
*/ */
int VISIBLE int
Cmd_CompleteCountPossible (const char *partial) Cmd_CompleteCountPossible (const char *partial)
{ {
cmd_function_t *cmd; cmd_function_t *cmd;
@ -262,7 +262,7 @@ Cmd_CompleteCountPossible (const char *partial)
Thanks to Fett erich@heintz.com Thanks to Fett erich@heintz.com
Thanks to taniwha Thanks to taniwha
*/ */
const char ** VISIBLE const char **
Cmd_CompleteBuildList (const char *partial) Cmd_CompleteBuildList (const char *partial)
{ {
cmd_function_t *cmd; cmd_function_t *cmd;
@ -523,7 +523,7 @@ Cmd_Sleep_f (void)
p->resumetime = Sys_DoubleTime() + waittime; p->resumetime = Sys_DoubleTime() + waittime;
} }
void VISIBLE void
Cmd_StuffCmds (cbuf_t *cbuf) Cmd_StuffCmds (cbuf_t *cbuf)
{ {
int i, j; int i, j;
@ -573,14 +573,14 @@ Cmd_StuffCmds_f (void)
Cmd_StuffCmds (cbuf_active); Cmd_StuffCmds (cbuf_active);
} }
void VISIBLE void
Cmd_Init_Hash (void) Cmd_Init_Hash (void)
{ {
cmd_hash = Hash_NewTable (1021, cmd_get_key, 0, 0); cmd_hash = Hash_NewTable (1021, cmd_get_key, 0, 0);
cmd_alias_hash = Hash_NewTable (1021, cmd_alias_get_key, cmd_alias_free, 0); cmd_alias_hash = Hash_NewTable (1021, cmd_alias_get_key, cmd_alias_free, 0);
} }
void VISIBLE void
Cmd_Init (void) Cmd_Init (void)
{ {
Cmd_AddCommand ("stuffcmds", Cmd_StuffCmds_f, "Execute the commands given " Cmd_AddCommand ("stuffcmds", Cmd_StuffCmds_f, "Execute the commands given "
@ -604,7 +604,7 @@ Cmd_Init (void)
cmd_cbuf = Cbuf_New (&id_interp); cmd_cbuf = Cbuf_New (&id_interp);
} }
int VISIBLE int
Cmd_ExecuteString (const char *text, cmd_source_t src) Cmd_ExecuteString (const char *text, cmd_source_t src)
{ {
cbuf_t *old = cbuf_active; cbuf_t *old = cbuf_active;
@ -618,7 +618,7 @@ Cmd_ExecuteString (const char *text, cmd_source_t src)
return 0; return 0;
} }
void VISIBLE void
Cmd_Exec_File (cbuf_t *cbuf, const char *path, int qfs) Cmd_Exec_File (cbuf_t *cbuf, const char *path, int qfs)
{ {
char *f; char *f;

View File

@ -76,19 +76,19 @@ static unsigned short crctable[256] = {
}; };
void VISIBLE void
CRC_Init (unsigned short *crcvalue) CRC_Init (unsigned short *crcvalue)
{ {
*crcvalue = CRC_INIT_VALUE; *crcvalue = CRC_INIT_VALUE;
} }
void VISIBLE void
CRC_ProcessByte (unsigned short *crcvalue, byte data) CRC_ProcessByte (unsigned short *crcvalue, byte data)
{ {
*crcvalue = (*crcvalue << 8) ^ crctable[(*crcvalue >> 8) ^ data]; *crcvalue = (*crcvalue << 8) ^ crctable[(*crcvalue >> 8) ^ data];
} }
void VISIBLE void
CRC_ProcessBlock (byte *start, unsigned short *crcvalue, int count) CRC_ProcessBlock (byte *start, unsigned short *crcvalue, int count)
{ {
unsigned short crc = *crcvalue; unsigned short crc = *crcvalue;
@ -103,7 +103,7 @@ CRC_Value (unsigned short crcvalue)
return crcvalue ^ CRC_XOR_VALUE; return crcvalue ^ CRC_XOR_VALUE;
} }
unsigned short VISIBLE unsigned short
CRC_Block (byte *start, int count) CRC_Block (byte *start, int count)
{ {
unsigned short crc; unsigned short crc;

View File

@ -57,21 +57,21 @@ static __attribute__ ((used)) const char rcsid[] =
#define USER_RO_CVAR "User-created READ-ONLY Cvar" #define USER_RO_CVAR "User-created READ-ONLY Cvar"
#define USER_CVAR "User-created cvar" #define USER_CVAR "User-created cvar"
cvar_t *developer; VISIBLE cvar_t *developer;
cvar_t *cvar_vars; VISIBLE cvar_t *cvar_vars;
const char *cvar_null_string = ""; static const char *cvar_null_string = "";
cvar_alias_t *calias_vars; static cvar_alias_t *calias_vars;
hashtab_t *cvar_hash; static hashtab_t *cvar_hash;
hashtab_t *calias_hash; static hashtab_t *calias_hash;
cvar_t * VISIBLE cvar_t *
Cvar_FindVar (const char *var_name) Cvar_FindVar (const char *var_name)
{ {
return (cvar_t*) Hash_Find (cvar_hash, var_name); return (cvar_t*) Hash_Find (cvar_hash, var_name);
} }
cvar_t * VISIBLE cvar_t *
Cvar_FindAlias (const char *alias_name) Cvar_FindAlias (const char *alias_name)
{ {
cvar_alias_t *alias; cvar_alias_t *alias;
@ -108,7 +108,7 @@ Cvar_Alias_Get (const char *name, cvar_t *cvar)
} }
} }
float VISIBLE float
Cvar_VariableValue (const char *var_name) Cvar_VariableValue (const char *var_name)
{ {
cvar_t *var; cvar_t *var;
@ -121,7 +121,7 @@ Cvar_VariableValue (const char *var_name)
return atof (var->string); return atof (var->string);
} }
const char * VISIBLE const char *
Cvar_VariableString (const char *var_name) Cvar_VariableString (const char *var_name)
{ {
cvar_t *var; cvar_t *var;
@ -134,7 +134,7 @@ Cvar_VariableString (const char *var_name)
return var->string; return var->string;
} }
const char * VISIBLE const char *
Cvar_CompleteVariable (const char *partial) Cvar_CompleteVariable (const char *partial)
{ {
cvar_t *cvar; cvar_t *cvar;
@ -176,7 +176,7 @@ Cvar_CompleteVariable (const char *partial)
Added by EvilTypeGuy Added by EvilTypeGuy
Thanks to Fett erich@heintz.com Thanks to Fett erich@heintz.com
*/ */
int VISIBLE int
Cvar_CompleteCountPossible (const char *partial) Cvar_CompleteCountPossible (const char *partial)
{ {
cvar_t *cvar; cvar_t *cvar;
@ -205,7 +205,7 @@ Cvar_CompleteCountPossible (const char *partial)
Thanks to Fett erich@heintz.com Thanks to Fett erich@heintz.com
Thanks to taniwha Thanks to taniwha
*/ */
const char ** VISIBLE const char **
Cvar_CompleteBuildList (const char *partial) Cvar_CompleteBuildList (const char *partial)
{ {
cvar_t *cvar; cvar_t *cvar;
@ -227,7 +227,7 @@ Cvar_CompleteBuildList (const char *partial)
return buf; return buf;
} }
void VISIBLE void
Cvar_Set (cvar_t *var, const char *value) Cvar_Set (cvar_t *var, const char *value)
{ {
int changed; int changed;
@ -282,7 +282,7 @@ Cvar_SetROM (cvar_t *var, const char *value)
var->callback (var); var->callback (var);
} }
void VISIBLE void
Cvar_SetValue (cvar_t *var, float value) Cvar_SetValue (cvar_t *var, float value)
{ {
Cvar_Set (var, va ("%g", value)); Cvar_Set (var, va ("%g", value));
@ -293,7 +293,7 @@ Cvar_SetValue (cvar_t *var, float value)
Handles variable inspection and changing from the console Handles variable inspection and changing from the console
*/ */
qboolean VISIBLE qboolean
Cvar_Command (void) Cvar_Command (void)
{ {
cvar_t *v; cvar_t *v;
@ -321,7 +321,7 @@ Cvar_Command (void)
Writes lines containing "seta variable value" for all variables Writes lines containing "seta variable value" for all variables
with the archive flag set to true. with the archive flag set to true.
*/ */
void VISIBLE void
Cvar_WriteVariables (QFile *f) Cvar_WriteVariables (QFile *f)
{ {
cvar_t *var; cvar_t *var;
@ -465,14 +465,14 @@ calias_get_key (void *c, void *unused)
return calias->name; return calias->name;
} }
void VISIBLE void
Cvar_Init_Hash (void) Cvar_Init_Hash (void)
{ {
cvar_hash = Hash_NewTable (1021, cvar_get_key, cvar_free, 0); cvar_hash = Hash_NewTable (1021, cvar_get_key, cvar_free, 0);
calias_hash = Hash_NewTable (1021, calias_get_key, calias_free, 0); calias_hash = Hash_NewTable (1021, calias_get_key, calias_free, 0);
} }
void VISIBLE void
Cvar_Init (void) Cvar_Init (void)
{ {
developer = Cvar_Get ("developer", "0", CVAR_NONE, NULL, developer = Cvar_Get ("developer", "0", CVAR_NONE, NULL,
@ -515,7 +515,7 @@ Cvar_Shutdown (void)
} }
} }
cvar_t * VISIBLE cvar_t *
Cvar_Get (const char *name, const char *string, int cvarflags, Cvar_Get (const char *name, const char *string, int cvarflags,
void (*callback)(cvar_t*), const char *description) void (*callback)(cvar_t*), const char *description)
{ {
@ -570,7 +570,7 @@ Cvar_Get (const char *name, const char *string, int cvarflags,
sets a Cvar's flags simply and easily sets a Cvar's flags simply and easily
*/ */
void VISIBLE void
Cvar_SetFlags (cvar_t *var, int cvarflags) Cvar_SetFlags (cvar_t *var, int cvarflags)
{ {
if (var == NULL) if (var == NULL)

View File

@ -57,7 +57,7 @@ dstring_realloc (void *data, void *ptr, size_t size)
return realloc (ptr, size); return realloc (ptr, size);
} }
dstring_mem_t dstring_default_mem = { VISIBLE dstring_mem_t dstring_default_mem = {
dstring_alloc, dstring_alloc,
dstring_free, dstring_free,
dstring_realloc, dstring_realloc,
@ -77,13 +77,13 @@ _dstring_new (dstring_mem_t *mem)
return new; return new;
} }
dstring_t * VISIBLE dstring_t *
dstring_new (void) dstring_new (void)
{ {
return _dstring_new (&dstring_default_mem); return _dstring_new (&dstring_default_mem);
} }
void VISIBLE void
dstring_delete (dstring_t *dstr) dstring_delete (dstring_t *dstr)
{ {
if (dstr->str) if (dstr->str)
@ -91,7 +91,7 @@ dstring_delete (dstring_t *dstr)
dstr->mem->free (dstr->mem->data, dstr); dstr->mem->free (dstr->mem->data, dstr);
} }
inline void VISIBLE inline void
dstring_adjust (dstring_t *dstr) dstring_adjust (dstring_t *dstr)
{ {
if (dstr->size > dstr->truesize) { if (dstr->size > dstr->truesize) {
@ -103,7 +103,7 @@ dstring_adjust (dstring_t *dstr)
} }
} }
void VISIBLE void
dstring_copy (dstring_t *dstr, const char *data, unsigned int len) dstring_copy (dstring_t *dstr, const char *data, unsigned int len)
{ {
dstr->size = len; dstr->size = len;
@ -111,7 +111,7 @@ dstring_copy (dstring_t *dstr, const char *data, unsigned int len)
memcpy (dstr->str, data, len); memcpy (dstr->str, data, len);
} }
void VISIBLE void
dstring_append (dstring_t *dstr, const char *data, unsigned int len) dstring_append (dstring_t *dstr, const char *data, unsigned int len)
{ {
unsigned int ins = dstr->size; // Save insertion point unsigned int ins = dstr->size; // Save insertion point
@ -121,7 +121,7 @@ dstring_append (dstring_t *dstr, const char *data, unsigned int len)
memcpy (dstr->str + ins, data, len); memcpy (dstr->str + ins, data, len);
} }
void VISIBLE void
dstring_insert (dstring_t *dstr, unsigned int pos, const char *data, dstring_insert (dstring_t *dstr, unsigned int pos, const char *data,
unsigned int len) unsigned int len)
{ {
@ -135,7 +135,7 @@ dstring_insert (dstring_t *dstr, unsigned int pos, const char *data,
memcpy (dstr->str + pos, data, len); memcpy (dstr->str + pos, data, len);
} }
void VISIBLE void
dstring_snip (dstring_t *dstr, unsigned int pos, unsigned int len) dstring_snip (dstring_t *dstr, unsigned int pos, unsigned int len)
{ {
if (pos > dstr->size) if (pos > dstr->size)
@ -149,14 +149,14 @@ dstring_snip (dstring_t *dstr, unsigned int pos, unsigned int len)
dstring_adjust (dstr); dstring_adjust (dstr);
} }
void VISIBLE void
dstring_clear (dstring_t *dstr) dstring_clear (dstring_t *dstr)
{ {
dstr->size = 0; dstr->size = 0;
dstring_adjust (dstr); dstring_adjust (dstr);
} }
void VISIBLE void
dstring_replace (dstring_t *dstr, unsigned int pos, unsigned int rlen, dstring_replace (dstring_t *dstr, unsigned int pos, unsigned int rlen,
const char *data, unsigned int len) const char *data, unsigned int len)
{ {
@ -179,7 +179,7 @@ dstring_replace (dstring_t *dstr, unsigned int pos, unsigned int rlen,
memcpy (dstr->str + pos, data, len); memcpy (dstr->str + pos, data, len);
} }
char * VISIBLE char *
dstring_freeze (dstring_t *dstr) dstring_freeze (dstring_t *dstr)
{ {
char *str = dstr->mem->realloc (dstr->mem->data, dstr->str, dstr->size); char *str = dstr->mem->realloc (dstr->mem->data, dstr->str, dstr->size);
@ -187,7 +187,7 @@ dstring_freeze (dstring_t *dstr)
return str; return str;
} }
inline dstring_t * VISIBLE inline dstring_t *
_dstring_newstr (dstring_mem_t *mem) _dstring_newstr (dstring_mem_t *mem)
{ {
dstring_t *new; dstring_t *new;
@ -203,13 +203,13 @@ _dstring_newstr (dstring_mem_t *mem)
return new; return new;
} }
dstring_t * VISIBLE dstring_t *
dstring_newstr (void) dstring_newstr (void)
{ {
return _dstring_newstr (&dstring_default_mem); return _dstring_newstr (&dstring_default_mem);
} }
void VISIBLE void
dstring_copystr (dstring_t *dstr, const char *str) dstring_copystr (dstring_t *dstr, const char *str)
{ {
dstr->size = strlen (str) + 1; dstr->size = strlen (str) + 1;
@ -217,7 +217,7 @@ dstring_copystr (dstring_t *dstr, const char *str)
strcpy (dstr->str, str); strcpy (dstr->str, str);
} }
void VISIBLE void
dstring_copysubstr (dstring_t *dstr, const char *str, unsigned int len) dstring_copysubstr (dstring_t *dstr, const char *str, unsigned int len)
{ {
len = strnlen (str, len); len = strnlen (str, len);
@ -228,7 +228,7 @@ dstring_copysubstr (dstring_t *dstr, const char *str, unsigned int len)
dstr->str[len] = 0; dstr->str[len] = 0;
} }
void VISIBLE void
dstring_appendstr (dstring_t *dstr, const char *str) dstring_appendstr (dstring_t *dstr, const char *str)
{ {
unsigned int pos = strnlen (dstr->str, dstr->size); unsigned int pos = strnlen (dstr->str, dstr->size);
@ -239,7 +239,7 @@ dstring_appendstr (dstring_t *dstr, const char *str)
strcpy (dstr->str + pos, str); strcpy (dstr->str + pos, str);
} }
void VISIBLE void
dstring_appendsubstr (dstring_t *dstr, const char *str, unsigned int len) dstring_appendsubstr (dstring_t *dstr, const char *str, unsigned int len)
{ {
unsigned int pos = strnlen (dstr->str, dstr->size); unsigned int pos = strnlen (dstr->str, dstr->size);
@ -251,14 +251,14 @@ dstring_appendsubstr (dstring_t *dstr, const char *str, unsigned int len)
dstr->str[pos + len] = 0; dstr->str[pos + len] = 0;
} }
void VISIBLE void
dstring_insertstr (dstring_t *dstr, unsigned int pos, const char *str) dstring_insertstr (dstring_t *dstr, unsigned int pos, const char *str)
{ {
// Don't insert strlen + 1 to achieve concatenation // Don't insert strlen + 1 to achieve concatenation
dstring_insert (dstr, pos, str, strlen (str)); dstring_insert (dstr, pos, str, strlen (str));
} }
void VISIBLE void
dstring_insertsubstr (dstring_t *dstr, unsigned int pos, const char *str, dstring_insertsubstr (dstring_t *dstr, unsigned int pos, const char *str,
unsigned int len) unsigned int len)
{ {
@ -267,7 +267,7 @@ dstring_insertsubstr (dstring_t *dstr, unsigned int pos, const char *str,
dstring_insert (dstr, pos, str, len); dstring_insert (dstr, pos, str, len);
} }
void VISIBLE void
dstring_clearstr (dstring_t *dstr) dstring_clearstr (dstring_t *dstr)
{ {
dstr->size = 1; dstr->size = 1;
@ -316,13 +316,13 @@ _dvsprintf (dstring_t *dstr, int offs, const char *fmt, va_list args)
return size; return size;
} }
int VISIBLE int
dvsprintf (dstring_t *dstr, const char *fmt, va_list args) dvsprintf (dstring_t *dstr, const char *fmt, va_list args)
{ {
return _dvsprintf (dstr, 0, fmt, args); return _dvsprintf (dstr, 0, fmt, args);
} }
int VISIBLE int
dsprintf (dstring_t *dstr, const char *fmt, ...) dsprintf (dstring_t *dstr, const char *fmt, ...)
{ {
va_list args; va_list args;
@ -335,7 +335,7 @@ dsprintf (dstring_t *dstr, const char *fmt, ...)
return ret; return ret;
} }
int VISIBLE int
davsprintf (dstring_t *dstr, const char *fmt, va_list args) davsprintf (dstring_t *dstr, const char *fmt, va_list args)
{ {
int offs = 0; int offs = 0;
@ -345,7 +345,7 @@ davsprintf (dstring_t *dstr, const char *fmt, va_list args)
return _dvsprintf (dstr, offs, fmt, args); return _dvsprintf (dstr, offs, fmt, args);
} }
int VISIBLE int
dasprintf (dstring_t *dstr, const char *fmt, ...) dasprintf (dstring_t *dstr, const char *fmt, ...)
{ {
va_list args; va_list args;

View File

@ -93,7 +93,7 @@ free_hashlink (hashlink_t *link)
free_hashlinks = link; free_hashlinks = link;
} }
unsigned long VISIBLE unsigned long
Hash_String (const char *str) Hash_String (const char *str)
{ {
#if 0 #if 0
@ -119,7 +119,7 @@ Hash_String (const char *str)
#endif #endif
} }
unsigned long VISIBLE unsigned long
Hash_Buffer (const void *_buf, int len) Hash_Buffer (const void *_buf, int len)
{ {
const unsigned char *buf = _buf; const unsigned char *buf = _buf;
@ -182,7 +182,7 @@ get_index (unsigned long hash, size_t size, size_t bits)
#endif #endif
} }
hashtab_t * VISIBLE hashtab_t *
Hash_NewTable (int tsize, const char *(*gk)(void*,void*), Hash_NewTable (int tsize, const char *(*gk)(void*,void*),
void (*f)(void*,void*), void *ud) void (*f)(void*,void*), void *ud)
{ {
@ -204,7 +204,7 @@ Hash_NewTable (int tsize, const char *(*gk)(void*,void*),
return tab; return tab;
} }
void VISIBLE void
Hash_SetHashCompare (hashtab_t *tab, unsigned long (*gh)(void*,void*), Hash_SetHashCompare (hashtab_t *tab, unsigned long (*gh)(void*,void*),
int (*cmp)(void*,void*,void*)) int (*cmp)(void*,void*,void*))
{ {
@ -212,14 +212,14 @@ Hash_SetHashCompare (hashtab_t *tab, unsigned long (*gh)(void*,void*),
tab->compare = cmp; tab->compare = cmp;
} }
void VISIBLE void
Hash_DelTable (hashtab_t *tab) Hash_DelTable (hashtab_t *tab)
{ {
Hash_FlushTable (tab); Hash_FlushTable (tab);
free (tab); free (tab);
} }
void VISIBLE void
Hash_FlushTable (hashtab_t *tab) Hash_FlushTable (hashtab_t *tab)
{ {
size_t i; size_t i;
@ -238,7 +238,7 @@ Hash_FlushTable (hashtab_t *tab)
tab->num_ele = 0; tab->num_ele = 0;
} }
int VISIBLE int
Hash_Add (hashtab_t *tab, void *ele) Hash_Add (hashtab_t *tab, void *ele)
{ {
unsigned long h = Hash_String (tab->get_key(ele, tab->user_data)); unsigned long h = Hash_String (tab->get_key(ele, tab->user_data));
@ -257,7 +257,7 @@ Hash_Add (hashtab_t *tab, void *ele)
return 0; return 0;
} }
int VISIBLE int
Hash_AddElement (hashtab_t *tab, void *ele) Hash_AddElement (hashtab_t *tab, void *ele)
{ {
unsigned long h = tab->get_hash (ele, tab->user_data); unsigned long h = tab->get_hash (ele, tab->user_data);
@ -276,7 +276,7 @@ Hash_AddElement (hashtab_t *tab, void *ele)
return 0; return 0;
} }
void * VISIBLE void *
Hash_Find (hashtab_t *tab, const char *key) Hash_Find (hashtab_t *tab, const char *key)
{ {
unsigned long h = Hash_String (key); unsigned long h = Hash_String (key);
@ -291,7 +291,7 @@ Hash_Find (hashtab_t *tab, const char *key)
return 0; return 0;
} }
void * VISIBLE void *
Hash_FindElement (hashtab_t *tab, void *ele) Hash_FindElement (hashtab_t *tab, void *ele)
{ {
unsigned long h = tab->get_hash (ele, tab->user_data); unsigned long h = tab->get_hash (ele, tab->user_data);
@ -306,7 +306,7 @@ Hash_FindElement (hashtab_t *tab, void *ele)
return 0; return 0;
} }
void ** VISIBLE void **
Hash_FindList (hashtab_t *tab, const char *key) Hash_FindList (hashtab_t *tab, const char *key)
{ {
unsigned long h = Hash_String (key); unsigned long h = Hash_String (key);
@ -334,7 +334,7 @@ Hash_FindList (hashtab_t *tab, const char *key)
return list; return list;
} }
void ** VISIBLE void **
Hash_FindElementList (hashtab_t *tab, void *ele) Hash_FindElementList (hashtab_t *tab, void *ele)
{ {
unsigned long h = tab->get_hash (ele, tab->user_data); unsigned long h = tab->get_hash (ele, tab->user_data);
@ -362,7 +362,7 @@ Hash_FindElementList (hashtab_t *tab, void *ele)
return list; return list;
} }
void * VISIBLE void *
Hash_Del (hashtab_t *tab, const char *key) Hash_Del (hashtab_t *tab, const char *key)
{ {
unsigned long h = Hash_String (key); unsigned long h = Hash_String (key);
@ -385,7 +385,7 @@ Hash_Del (hashtab_t *tab, const char *key)
return 0; return 0;
} }
void * VISIBLE void *
Hash_DelElement (hashtab_t *tab, void *ele) Hash_DelElement (hashtab_t *tab, void *ele)
{ {
unsigned long h = tab->get_hash (ele, tab->user_data); unsigned long h = tab->get_hash (ele, tab->user_data);
@ -408,20 +408,20 @@ Hash_DelElement (hashtab_t *tab, void *ele)
return 0; return 0;
} }
void VISIBLE void
Hash_Free (hashtab_t *tab, void *ele) Hash_Free (hashtab_t *tab, void *ele)
{ {
if (ele && tab->free_ele) if (ele && tab->free_ele)
tab->free_ele (ele, tab->user_data); tab->free_ele (ele, tab->user_data);
} }
size_t VISIBLE size_t
Hash_NumElements (hashtab_t *tab) Hash_NumElements (hashtab_t *tab)
{ {
return tab->num_ele; return tab->num_ele;
} }
void ** VISIBLE void **
Hash_GetList (hashtab_t *tab) Hash_GetList (hashtab_t *tab)
{ {
void **list; void **list;
@ -448,7 +448,7 @@ sqr (double x)
return x * x; return x * x;
} }
void VISIBLE void
Hash_Stats (hashtab_t *tab) Hash_Stats (hashtab_t *tab)
{ {
int *lengths = calloc (tab->tab_size, sizeof (int)); int *lengths = calloc (tab->tab_size, sizeof (int));

View File

@ -91,7 +91,7 @@ COM_insert (cbuf_t *cbuf, const char *str)
static dstring_t *_com_token; static dstring_t *_com_token;
const char *com_token; const char *com_token;
const char * VISIBLE const char *
COM_Parse (const char *data) COM_Parse (const char *data)
{ {
int c; int c;
@ -138,7 +138,7 @@ done:
return data + i; return data + i;
} }
void VISIBLE void
COM_TokenizeString (const char *str, cbuf_args_t *args) COM_TokenizeString (const char *str, cbuf_args_t *args)
{ {
const char *s; const char *s;
@ -236,7 +236,7 @@ COM_execute_sets (cbuf_t *cbuf)
} }
} }
cbuf_interpreter_t id_interp = { VISIBLE cbuf_interpreter_t id_interp = {
COM_construct, COM_construct,
COM_destruct, COM_destruct,
COM_reset, COM_reset,

View File

@ -53,7 +53,7 @@ static __attribute__ ((used)) const char rcsid[] =
Searches for key in the "client-needed" info string list Searches for key in the "client-needed" info string list
*/ */
qboolean VISIBLE qboolean
Info_FilterForKey (const char *key, const char **filter_list) Info_FilterForKey (const char *key, const char **filter_list)
{ {
const char **s; const char **s;
@ -73,7 +73,7 @@ Info_FilterForKey (const char *key, const char **filter_list)
Searches the string for the given Searches the string for the given
key and returns the associated value, or an empty string. key and returns the associated value, or an empty string.
*/ */
const char * VISIBLE const char *
Info_ValueForKey (info_t *info, const char *key) Info_ValueForKey (info_t *info, const char *key)
{ {
info_key_t *k = Hash_Find (info->tab, key); info_key_t *k = Hash_Find (info->tab, key);
@ -82,7 +82,7 @@ Info_ValueForKey (info_t *info, const char *key)
return ""; return "";
} }
void VISIBLE void
Info_RemoveKey (info_t *info, const char *key) Info_RemoveKey (info_t *info, const char *key)
{ {
info_key_t *k = Hash_Del (info->tab, key); info_key_t *k = Hash_Del (info->tab, key);
@ -94,7 +94,7 @@ Info_RemoveKey (info_t *info, const char *key)
} }
} }
int VISIBLE int
Info_SetValueForStarKey (info_t *info, const char *key, const char *value, Info_SetValueForStarKey (info_t *info, const char *key, const char *value,
int flags) int flags)
{ {
@ -159,7 +159,7 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value,
return 1; return 1;
} }
int VISIBLE int
Info_SetValueForKey (info_t *info, const char *key, const char *value, Info_SetValueForKey (info_t *info, const char *key, const char *value,
int flags) int flags)
{ {
@ -171,7 +171,7 @@ Info_SetValueForKey (info_t *info, const char *key, const char *value,
return Info_SetValueForStarKey (info, key, value, flags); return Info_SetValueForStarKey (info, key, value, flags);
} }
void VISIBLE void
Info_Print (info_t *info) Info_Print (info_t *info)
{ {
info_key_t **key_list; info_key_t **key_list;
@ -200,7 +200,7 @@ free_key (void *_k, void *unused)
free (k); free (k);
} }
info_t * VISIBLE info_t *
Info_ParseString (const char *s, int maxsize, int flags) Info_ParseString (const char *s, int maxsize, int flags)
{ {
info_t *info; info_t *info;
@ -235,14 +235,14 @@ Info_ParseString (const char *s, int maxsize, int flags)
return info; return info;
} }
void VISIBLE void
Info_Destroy (info_t *info) Info_Destroy (info_t *info)
{ {
Hash_DelTable (info->tab); Hash_DelTable (info->tab);
free (info); free (info);
} }
char * VISIBLE char *
Info_MakeString (info_t *info, int (*filter) (const char *)) Info_MakeString (info_t *info, int (*filter) (const char *))
{ {
char *string; char *string;
@ -271,7 +271,7 @@ Info_MakeString (info_t *info, int (*filter) (const char *))
return string; return string;
} }
void VISIBLE void
Info_AddKeys (info_t *info, info_t *keys) Info_AddKeys (info_t *info, info_t *keys)
{ {
info_key_t **key_list; info_key_t **key_list;

View File

@ -35,20 +35,20 @@ static __attribute__ ((used)) const char rcsid[] =
// ClearLink is used for new headnodes // ClearLink is used for new headnodes
void VISIBLE void
ClearLink (link_t *l) ClearLink (link_t *l)
{ {
l->prev = l->next = l; l->prev = l->next = l;
} }
void VISIBLE void
RemoveLink (link_t *l) RemoveLink (link_t *l)
{ {
l->next->prev = l->prev; l->next->prev = l->prev;
l->prev->next = l->next; l->prev->next = l->next;
} }
void VISIBLE void
InsertLinkBefore (link_t *l, link_t *before) InsertLinkBefore (link_t *l, link_t *before)
{ {
l->next = before; l->next = before;
@ -57,7 +57,7 @@ InsertLinkBefore (link_t *l, link_t *before)
l->next->prev = l; l->next->prev = l;
} }
void VISIBLE void
InsertLinkAfter (link_t *l, link_t *after) InsertLinkAfter (link_t *l, link_t *after)
{ {
l->next = after->next; l->next = after->next;

View File

@ -52,7 +52,7 @@ llist_newnode (llist_t *list, void *data)
return node; return node;
} }
llist_t * VISIBLE llist_t *
llist_new (void (*freedata)(void *element, void *userdata), qboolean (*cmpdata)(const void *element, const void *comparison, void *userdata), void *userdata) llist_new (void (*freedata)(void *element, void *userdata), qboolean (*cmpdata)(const void *element, const void *comparison, void *userdata), void *userdata)
{ {
llist_t *new = calloc (1, sizeof (llist_t)); llist_t *new = calloc (1, sizeof (llist_t));
@ -64,7 +64,7 @@ llist_new (void (*freedata)(void *element, void *userdata), qboolean (*cmpdata)(
return new; return new;
} }
void VISIBLE void
llist_flush (llist_t *list) llist_flush (llist_t *list)
{ {
llist_node_t *node, *next; llist_node_t *node, *next;
@ -80,7 +80,7 @@ llist_flush (llist_t *list)
list->start = list->end = 0; list->start = list->end = 0;
} }
void VISIBLE void
llist_delete (llist_t *list) llist_delete (llist_t *list)
{ {
if (!list) if (!list)
@ -90,7 +90,7 @@ llist_delete (llist_t *list)
free (list); free (list);
} }
llist_node_t * VISIBLE llist_node_t *
llist_append (llist_t *list, void *element) llist_append (llist_t *list, void *element)
{ {
llist_node_t *node = llist_newnode (list, element); llist_node_t *node = llist_newnode (list, element);
@ -107,7 +107,7 @@ llist_append (llist_t *list, void *element)
return node; return node;
} }
llist_node_t * VISIBLE llist_node_t *
llist_prefix (llist_t *list, void *element) llist_prefix (llist_t *list, void *element)
{ {
llist_node_t *node = llist_newnode (list, element); llist_node_t *node = llist_newnode (list, element);
@ -125,7 +125,7 @@ llist_prefix (llist_t *list, void *element)
return node; return node;
} }
llist_node_t * VISIBLE llist_node_t *
llist_getnode (llist_t *list, void *element) llist_getnode (llist_t *list, void *element)
{ {
llist_node_t *node; llist_node_t *node;
@ -139,7 +139,7 @@ llist_getnode (llist_t *list, void *element)
return 0; return 0;
} }
llist_node_t * VISIBLE llist_node_t *
llist_insertafter (llist_node_t *ref, void *element) llist_insertafter (llist_node_t *ref, void *element)
{ {
llist_node_t *node = llist_newnode (ref->parent, element); llist_node_t *node = llist_newnode (ref->parent, element);
@ -158,7 +158,7 @@ llist_insertafter (llist_node_t *ref, void *element)
return node; return node;
} }
llist_node_t * VISIBLE llist_node_t *
llist_insertbefore (llist_node_t *ref, void *element) llist_insertbefore (llist_node_t *ref, void *element)
{ {
llist_node_t *node = llist_newnode (ref->parent, element); llist_node_t *node = llist_newnode (ref->parent, element);
@ -177,7 +177,7 @@ llist_insertbefore (llist_node_t *ref, void *element)
return node; return node;
} }
void * VISIBLE void *
llist_remove (llist_node_t *ref) llist_remove (llist_node_t *ref)
{ {
void *element; void *element;
@ -201,7 +201,7 @@ llist_remove (llist_node_t *ref)
return element; return element;
} }
unsigned int VISIBLE unsigned int
llist_size (llist_t *llist) llist_size (llist_t *llist)
{ {
unsigned int i; unsigned int i;
@ -214,7 +214,7 @@ llist_size (llist_t *llist)
return i; return i;
} }
void VISIBLE void
llist_iterate (llist_t *list, llist_iterator_t iterate) llist_iterate (llist_t *list, llist_iterator_t iterate)
{ {
llist_node_t *node; llist_node_t *node;
@ -229,7 +229,7 @@ llist_iterate (llist_t *list, llist_iterator_t iterate)
list->iter = 0; list->iter = 0;
} }
void * VISIBLE void *
llist_find (llist_t *list, void *comparison) llist_find (llist_t *list, void *comparison)
{ {
llist_node_t *node; llist_node_t *node;
@ -242,7 +242,7 @@ llist_find (llist_t *list, void *comparison)
return 0; return 0;
} }
llist_node_t * VISIBLE llist_node_t *
llist_findnode (llist_t *list, void *comparison) llist_findnode (llist_t *list, void *comparison)
{ {
llist_node_t *node; llist_node_t *node;
@ -255,7 +255,7 @@ llist_findnode (llist_t *list, void *comparison)
return 0; return 0;
} }
void * VISIBLE void *
llist_createarray (llist_t *list, size_t esize) llist_createarray (llist_t *list, size_t esize)
{ {
void *ptr, *array = malloc (llist_size (list) * esize); void *ptr, *array = malloc (llist_size (list) * esize);

View File

@ -47,11 +47,11 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/qtypes.h" #include "QF/qtypes.h"
#include "QF/sys.h" #include "QF/sys.h"
int nanmask = 255 << 23; VISIBLE int nanmask = 255 << 23;
static mplane_t _frustum[4]; static mplane_t _frustum[4];
mplane_t *const frustum = _frustum; VISIBLE mplane_t *const frustum = _frustum;
static vec3_t _vec3_origin = { 0, 0, 0 }; static vec3_t _vec3_origin = { 0, 0, 0 };
const vec_t * const vec3_origin = _vec3_origin; VISIBLE const vec_t * const vec3_origin = _vec3_origin;
#define DEG2RAD(a) (a * (M_PI / 180.0)) #define DEG2RAD(a) (a * (M_PI / 180.0))
@ -100,7 +100,7 @@ PerpendicularVector (vec3_t dst, const vec3_t src)
# pragma optimize( "", off ) # pragma optimize( "", off )
#endif #endif
void VISIBLE void
VectorVectors(const vec3_t forward, vec3_t right, vec3_t up) VectorVectors(const vec3_t forward, vec3_t right, vec3_t up)
{ {
float d; float d;
@ -115,7 +115,7 @@ VectorVectors(const vec3_t forward, vec3_t right, vec3_t up)
CrossProduct(right, forward, up); CrossProduct(right, forward, up);
} }
void VISIBLE void
RotatePointAroundVector (vec3_t dst, const vec3_t axis, const vec3_t point, RotatePointAroundVector (vec3_t dst, const vec3_t axis, const vec3_t point,
float degrees) float degrees)
{ {
@ -169,7 +169,7 @@ RotatePointAroundVector (vec3_t dst, const vec3_t axis, const vec3_t point,
} }
} }
void VISIBLE void
QuatMult (const quat_t v1, const quat_t v2, quat_t out) QuatMult (const quat_t v1, const quat_t v2, quat_t out)
{ {
vec_t s; vec_t s;
@ -186,7 +186,7 @@ QuatMult (const quat_t v1, const quat_t v2, quat_t out)
# pragma optimize( "", on ) # pragma optimize( "", on )
#endif #endif
float VISIBLE float
anglemod (float a) anglemod (float a)
{ {
a = (360.0 / 65536) * ((int) (a * (65536 / 360.0)) & 65535); a = (360.0 / 65536) * ((int) (a * (65536 / 360.0)) & 65535);
@ -199,7 +199,7 @@ anglemod (float a)
Split out like this for ASM to call. Split out like this for ASM to call.
*/ */
void __attribute__ ((noreturn)) BOPS_Error (void); void __attribute__ ((noreturn)) BOPS_Error (void);
void __attribute__ ((noreturn)) VISIBLE void __attribute__ ((noreturn))
BOPS_Error (void) BOPS_Error (void)
{ {
Sys_Error ("BoxOnPlaneSide: Bad signbits"); Sys_Error ("BoxOnPlaneSide: Bad signbits");
@ -212,7 +212,7 @@ BOPS_Error (void)
Returns 1, 2, or 1 + 2 Returns 1, 2, or 1 + 2
*/ */
int VISIBLE int
BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, mplane_t *p) BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, mplane_t *p)
{ {
float dist1, dist2; float dist1, dist2;
@ -353,7 +353,7 @@ BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, mplane_t *p)
[-right] -ve due to left handed to right handed conversion [-right] -ve due to left handed to right handed conversion
[up] [up]
*/ */
void VISIBLE void
AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up) AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
{ {
float angle, sr, sp, sy, cr, cp, cy; float angle, sr, sp, sy, cr, cp, cy;
@ -381,7 +381,7 @@ AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
up[2] = cr * cp; up[2] = cr * cp;
} }
int VISIBLE int
_VectorCompare (const vec3_t v1, const vec3_t v2) _VectorCompare (const vec3_t v1, const vec3_t v2)
{ {
int i; int i;
@ -393,7 +393,7 @@ _VectorCompare (const vec3_t v1, const vec3_t v2)
return 1; return 1;
} }
void VISIBLE void
_VectorMA (const vec3_t veca, float scale, const vec3_t vecb, vec3_t vecc) _VectorMA (const vec3_t veca, float scale, const vec3_t vecb, vec3_t vecc)
{ {
vecc[0] = veca[0] + scale * vecb[0]; vecc[0] = veca[0] + scale * vecb[0];
@ -401,13 +401,13 @@ _VectorMA (const vec3_t veca, float scale, const vec3_t vecb, vec3_t vecc)
vecc[2] = veca[2] + scale * vecb[2]; vecc[2] = veca[2] + scale * vecb[2];
} }
vec_t VISIBLE vec_t
_DotProduct (const vec3_t v1, const vec3_t v2) _DotProduct (const vec3_t v1, const vec3_t v2)
{ {
return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2]; return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
} }
void VISIBLE void
_VectorSubtract (const vec3_t veca, const vec3_t vecb, vec3_t out) _VectorSubtract (const vec3_t veca, const vec3_t vecb, vec3_t out)
{ {
out[0] = veca[0] - vecb[0]; out[0] = veca[0] - vecb[0];
@ -415,7 +415,7 @@ _VectorSubtract (const vec3_t veca, const vec3_t vecb, vec3_t out)
out[2] = veca[2] - vecb[2]; out[2] = veca[2] - vecb[2];
} }
void VISIBLE void
_VectorAdd (const vec3_t veca, const vec3_t vecb, vec3_t out) _VectorAdd (const vec3_t veca, const vec3_t vecb, vec3_t out)
{ {
out[0] = veca[0] + vecb[0]; out[0] = veca[0] + vecb[0];
@ -423,7 +423,7 @@ _VectorAdd (const vec3_t veca, const vec3_t vecb, vec3_t out)
out[2] = veca[2] + vecb[2]; out[2] = veca[2] + vecb[2];
} }
void VISIBLE void
_VectorCopy (const vec3_t in, vec3_t out) _VectorCopy (const vec3_t in, vec3_t out)
{ {
out[0] = in[0]; out[0] = in[0];
@ -431,7 +431,7 @@ _VectorCopy (const vec3_t in, vec3_t out)
out[2] = in[2]; out[2] = in[2];
} }
void VISIBLE void
CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross) CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross)
{ {
float v10 = v1[0]; float v10 = v1[0];
@ -446,7 +446,7 @@ CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross)
cross[2] = v10 * v21 - v11 * v20; cross[2] = v10 * v21 - v11 * v20;
} }
vec_t VISIBLE vec_t
_VectorLength (const vec3_t v) _VectorLength (const vec3_t v)
{ {
float length; float length;
@ -455,7 +455,7 @@ _VectorLength (const vec3_t v)
return length; return length;
} }
vec_t VISIBLE vec_t
_VectorNormalize (vec3_t v) _VectorNormalize (vec3_t v)
{ {
int i; int i;
@ -474,15 +474,7 @@ _VectorNormalize (vec3_t v)
return length; return length;
} }
void VISIBLE void
VectorInverse (vec3_t v)
{
v[0] = -v[0];
v[1] = -v[1];
v[2] = -v[2];
}
void
_VectorScale (const vec3_t in, vec_t scale, vec3_t out) _VectorScale (const vec3_t in, vec_t scale, vec3_t out)
{ {
out[0] = in[0] * scale; out[0] = in[0] * scale;
@ -490,7 +482,7 @@ _VectorScale (const vec3_t in, vec_t scale, vec3_t out)
out[2] = in[2] * scale; out[2] = in[2] * scale;
} }
int VISIBLE int
Q_log2 (int val) Q_log2 (int val)
{ {
int answer = 0; int answer = 0;
@ -500,7 +492,7 @@ Q_log2 (int val)
return answer; return answer;
} }
void VISIBLE void
R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]) R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
{ {
out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] +
@ -523,7 +515,7 @@ R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
in1[2][2] * in2[2][2]; in1[2][2] * in2[2][2];
} }
void VISIBLE void
R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]) R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4])
{ {
out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] + out[0][0] = in1[0][0] * in2[0][0] + in1[0][1] * in2[1][0] +
@ -559,7 +551,7 @@ R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4])
numer and denom, both of which should contain no fractional part. The numer and denom, both of which should contain no fractional part. The
quotient must fit in 32 bits. quotient must fit in 32 bits.
*/ */
void VISIBLE void
FloorDivMod (double numer, double denom, int *quotient, int *rem) FloorDivMod (double numer, double denom, int *quotient, int *rem)
{ {
double x; double x;
@ -594,7 +586,7 @@ FloorDivMod (double numer, double denom, int *quotient, int *rem)
*rem = r; *rem = r;
} }
int VISIBLE int
GreatestCommonDivisor (int i1, int i2) GreatestCommonDivisor (int i1, int i2)
{ {
if (i1 > i2) { if (i1 > i2) {
@ -614,7 +606,7 @@ GreatestCommonDivisor (int i1, int i2)
Inverts an 8.24 value to a 16.16 value Inverts an 8.24 value to a 16.16 value
*/ */
fixed16_t VISIBLE fixed16_t
Invert24To16 (fixed16_t val) Invert24To16 (fixed16_t val)
{ {
if (val < 256) if (val < 256)

View File

@ -175,7 +175,7 @@ copy4 (unsigned char *out, uint32 x)
out[3] = (x >> 24) & 0xFF; out[3] = (x >> 24) & 0xFF;
} }
void VISIBLE void
mdfour_begin (struct mdfour *md) mdfour_begin (struct mdfour *md)
{ {
md->A = 0x67452301; md->A = 0x67452301;
@ -214,7 +214,7 @@ mdfour_tail (const unsigned char *in, int n)
} }
} }
void VISIBLE void
mdfour_update (struct mdfour *md, const unsigned char *in, int n) mdfour_update (struct mdfour *md, const unsigned char *in, int n)
{ {
uint32 M[16]; uint32 M[16];
@ -235,7 +235,7 @@ mdfour_update (struct mdfour *md, const unsigned char *in, int n)
mdfour_tail (in, n); mdfour_tail (in, n);
} }
void VISIBLE void
mdfour_result (struct mdfour *md, unsigned char *out) mdfour_result (struct mdfour *md, unsigned char *out)
{ {
m = md; m = md;
@ -246,7 +246,7 @@ mdfour_result (struct mdfour *md, unsigned char *out)
copy4 (out + 12, m->D); copy4 (out + 12, m->D);
} }
void VISIBLE void
mdfour (unsigned char *out, const unsigned char *in, int n) mdfour (unsigned char *out, const unsigned char *in, int n)
{ {
struct mdfour md; struct mdfour md;

View File

@ -52,7 +52,7 @@ static __attribute__ ((used)) const char rcsid[] =
// writing functions ========================================================== // writing functions ==========================================================
void VISIBLE void
MSG_WriteByte (sizebuf_t *sb, int c) MSG_WriteByte (sizebuf_t *sb, int c)
{ {
byte *buf; byte *buf;
@ -61,7 +61,7 @@ MSG_WriteByte (sizebuf_t *sb, int c)
*buf = c; *buf = c;
} }
void VISIBLE void
MSG_WriteShort (sizebuf_t *sb, int c) MSG_WriteShort (sizebuf_t *sb, int c)
{ {
byte *buf; byte *buf;
@ -71,7 +71,7 @@ MSG_WriteShort (sizebuf_t *sb, int c)
*buf = ((unsigned int) c) >> 8; *buf = ((unsigned int) c) >> 8;
} }
void VISIBLE void
MSG_WriteLong (sizebuf_t *sb, int c) MSG_WriteLong (sizebuf_t *sb, int c)
{ {
byte *buf; byte *buf;
@ -83,7 +83,7 @@ MSG_WriteLong (sizebuf_t *sb, int c)
*buf = ((unsigned int) c) >> 24; *buf = ((unsigned int) c) >> 24;
} }
void VISIBLE void
MSG_WriteFloat (sizebuf_t *sb, float f) MSG_WriteFloat (sizebuf_t *sb, float f)
{ {
union { union {
@ -97,7 +97,7 @@ MSG_WriteFloat (sizebuf_t *sb, float f)
SZ_Write (sb, &dat.l, 4); SZ_Write (sb, &dat.l, 4);
} }
void VISIBLE void
MSG_WriteString (sizebuf_t *sb, const char *s) MSG_WriteString (sizebuf_t *sb, const char *s)
{ {
if (!s) if (!s)
@ -106,13 +106,13 @@ MSG_WriteString (sizebuf_t *sb, const char *s)
SZ_Write (sb, s, strlen (s) + 1); SZ_Write (sb, s, strlen (s) + 1);
} }
void VISIBLE void
MSG_WriteCoord (sizebuf_t *sb, float coord) MSG_WriteCoord (sizebuf_t *sb, float coord)
{ {
MSG_WriteShort (sb, (int) (coord * 8.0)); MSG_WriteShort (sb, (int) (coord * 8.0));
} }
void VISIBLE void
MSG_WriteCoordV (sizebuf_t *sb, const vec3_t coord) MSG_WriteCoordV (sizebuf_t *sb, const vec3_t coord)
{ {
byte *buf; byte *buf;
@ -126,7 +126,7 @@ MSG_WriteCoordV (sizebuf_t *sb, const vec3_t coord)
} }
} }
void VISIBLE void
MSG_WriteCoordAngleV (sizebuf_t *sb, const vec3_t coord, const vec3_t angles) MSG_WriteCoordAngleV (sizebuf_t *sb, const vec3_t coord, const vec3_t angles)
{ {
byte *buf; byte *buf;
@ -141,13 +141,13 @@ MSG_WriteCoordAngleV (sizebuf_t *sb, const vec3_t coord, const vec3_t angles)
} }
} }
void VISIBLE void
MSG_WriteAngle (sizebuf_t *sb, float angle) MSG_WriteAngle (sizebuf_t *sb, float angle)
{ {
MSG_WriteByte (sb, (int) (angle * (256.0 / 360.0)) & 255); MSG_WriteByte (sb, (int) (angle * (256.0 / 360.0)) & 255);
} }
void VISIBLE void
MSG_WriteAngleV (sizebuf_t *sb, const vec3_t angles) MSG_WriteAngleV (sizebuf_t *sb, const vec3_t angles)
{ {
byte *buf; byte *buf;
@ -159,13 +159,13 @@ MSG_WriteAngleV (sizebuf_t *sb, const vec3_t angles)
} }
} }
void VISIBLE void
MSG_WriteAngle16 (sizebuf_t *sb, float angle16) MSG_WriteAngle16 (sizebuf_t *sb, float angle16)
{ {
MSG_WriteShort (sb, (int) (angle16 * (65536.0 / 360.0)) & 65535); MSG_WriteShort (sb, (int) (angle16 * (65536.0 / 360.0)) & 65535);
} }
void VISIBLE void
MSG_WriteUTF8 (sizebuf_t *sb, unsigned utf8) MSG_WriteUTF8 (sizebuf_t *sb, unsigned utf8)
{ {
byte *buf; byte *buf;
@ -206,20 +206,20 @@ MSG_WriteUTF8 (sizebuf_t *sb, unsigned utf8)
// reading functions ========================================================== // reading functions ==========================================================
void VISIBLE void
MSG_BeginReading (qmsg_t *msg) MSG_BeginReading (qmsg_t *msg)
{ {
msg->readcount = 0; msg->readcount = 0;
msg->badread = false; msg->badread = false;
} }
int VISIBLE int
MSG_GetReadCount (qmsg_t *msg) MSG_GetReadCount (qmsg_t *msg)
{ {
return msg->readcount; return msg->readcount;
} }
int VISIBLE int
MSG_ReadByte (qmsg_t *msg) MSG_ReadByte (qmsg_t *msg)
{ {
if (msg->readcount + 1 <= msg->message->cursize) if (msg->readcount + 1 <= msg->message->cursize)
@ -229,7 +229,7 @@ MSG_ReadByte (qmsg_t *msg)
return -1; return -1;
} }
int VISIBLE int
MSG_ReadShort (qmsg_t *msg) MSG_ReadShort (qmsg_t *msg)
{ {
int c; int c;
@ -245,7 +245,7 @@ MSG_ReadShort (qmsg_t *msg)
return -1; return -1;
} }
int VISIBLE int
MSG_ReadLong (qmsg_t *msg) MSG_ReadLong (qmsg_t *msg)
{ {
int c; int c;
@ -263,7 +263,7 @@ MSG_ReadLong (qmsg_t *msg)
return -1; return -1;
} }
float VISIBLE float
MSG_ReadFloat (qmsg_t *msg) MSG_ReadFloat (qmsg_t *msg)
{ {
union { union {
@ -289,7 +289,7 @@ MSG_ReadFloat (qmsg_t *msg)
return -1; return -1;
} }
const char * VISIBLE const char *
MSG_ReadString (qmsg_t *msg) MSG_ReadString (qmsg_t *msg)
{ {
char *string; char *string;
@ -324,7 +324,7 @@ MSG_ReadString (qmsg_t *msg)
return string; return string;
} }
int VISIBLE int
MSG_ReadBytes (qmsg_t *msg, void *buf, int len) MSG_ReadBytes (qmsg_t *msg, void *buf, int len)
{ {
if (msg->badread || len > msg->message->cursize - msg->readcount) { if (msg->badread || len > msg->message->cursize - msg->readcount) {
@ -336,13 +336,13 @@ MSG_ReadBytes (qmsg_t *msg, void *buf, int len)
return len; return len;
} }
float VISIBLE float
MSG_ReadCoord (qmsg_t *msg) MSG_ReadCoord (qmsg_t *msg)
{ {
return MSG_ReadShort (msg) * (1.0 / 8.0); return MSG_ReadShort (msg) * (1.0 / 8.0);
} }
void VISIBLE void
MSG_ReadCoordV (qmsg_t *msg, vec3_t coord) MSG_ReadCoordV (qmsg_t *msg, vec3_t coord)
{ {
int i; int i;
@ -351,7 +351,7 @@ MSG_ReadCoordV (qmsg_t *msg, vec3_t coord)
coord[i] = MSG_ReadShort (msg) * (1.0 / 8.0); coord[i] = MSG_ReadShort (msg) * (1.0 / 8.0);
} }
void VISIBLE void
MSG_ReadCoordAngleV (qmsg_t *msg, vec3_t coord, vec3_t angles) MSG_ReadCoordAngleV (qmsg_t *msg, vec3_t coord, vec3_t angles)
{ {
int i; int i;
@ -362,13 +362,13 @@ MSG_ReadCoordAngleV (qmsg_t *msg, vec3_t coord, vec3_t angles)
} }
} }
float VISIBLE float
MSG_ReadAngle (qmsg_t *msg) MSG_ReadAngle (qmsg_t *msg)
{ {
return ((signed char) MSG_ReadByte (msg)) * (360.0 / 256.0); return ((signed char) MSG_ReadByte (msg)) * (360.0 / 256.0);
} }
void VISIBLE void
MSG_ReadAngleV (qmsg_t *msg, vec3_t angles) MSG_ReadAngleV (qmsg_t *msg, vec3_t angles)
{ {
int i; int i;
@ -377,13 +377,13 @@ MSG_ReadAngleV (qmsg_t *msg, vec3_t angles)
angles[i] = ((signed char) MSG_ReadByte (msg)) * (360.0 / 256.0); angles[i] = ((signed char) MSG_ReadByte (msg)) * (360.0 / 256.0);
} }
float VISIBLE float
MSG_ReadAngle16 (qmsg_t *msg) MSG_ReadAngle16 (qmsg_t *msg)
{ {
return MSG_ReadShort (msg) * (360.0 / 65536.0); return MSG_ReadShort (msg) * (360.0 / 65536.0);
} }
int VISIBLE int
MSG_ReadUTF8 (qmsg_t *msg) MSG_ReadUTF8 (qmsg_t *msg)
{ {
byte *buf, *start, c; byte *buf, *start, c;

View File

@ -54,7 +54,7 @@ pack_get_key (void *p, void *unused)
return ((dpackfile_t *) p)->name; return ((dpackfile_t *) p)->name;
} }
pack_t * VISIBLE pack_t *
pack_new (const char *name) pack_new (const char *name)
{ {
pack_t *pack = calloc (sizeof (*pack), 1); pack_t *pack = calloc (sizeof (*pack), 1);
@ -75,7 +75,7 @@ pack_new (const char *name)
return pack; return pack;
} }
void VISIBLE void
pack_del (pack_t *pack) pack_del (pack_t *pack)
{ {
if (pack->files) if (pack->files)
@ -89,7 +89,7 @@ pack_del (pack_t *pack)
free (pack); free (pack);
} }
void VISIBLE void
pack_rehash (pack_t *pack) pack_rehash (pack_t *pack)
{ {
int i; int i;
@ -99,7 +99,7 @@ pack_rehash (pack_t *pack)
} }
} }
pack_t * VISIBLE pack_t *
pack_open (const char *name) pack_open (const char *name)
{ {
pack_t *pack = pack_new (name); pack_t *pack = pack_new (name);
@ -148,7 +148,7 @@ error:
return 0; return 0;
} }
pack_t * VISIBLE pack_t *
pack_create (const char *name) pack_create (const char *name)
{ {
pack_t *pack = pack_new (name); pack_t *pack = pack_new (name);
@ -168,7 +168,7 @@ pack_create (const char *name)
return pack; return pack;
} }
void VISIBLE void
pack_close (pack_t *pack) pack_close (pack_t *pack)
{ {
int i; int i;
@ -196,7 +196,7 @@ pack_close (pack_t *pack)
pack_del (pack); pack_del (pack);
} }
int VISIBLE int
pack_add (pack_t *pack, const char *filename) pack_add (pack_t *pack, const char *filename)
{ {
dpackfile_t *pf; dpackfile_t *pf;
@ -249,7 +249,7 @@ pack_add (pack_t *pack, const char *filename)
return 0; return 0;
} }
int VISIBLE int
pack_extract (pack_t *pack, dpackfile_t *pf) pack_extract (pack_t *pack, dpackfile_t *pf)
{ {
const char *name = pf->name; const char *name = pf->name;
@ -276,7 +276,7 @@ pack_extract (pack_t *pack, dpackfile_t *pf)
return 0; return 0;
} }
dpackfile_t * VISIBLE dpackfile_t *
pack_find_file (pack_t *pack, const char *filename) pack_find_file (pack_t *pack, const char *filename)
{ {
return Hash_Find (pack->file_hash, filename); return Hash_Find (pack->file_hash, filename);

View File

@ -234,7 +234,7 @@ PI_Plugin_Unload_f (void)
Eventually this function will likely initialize libltdl. It doesn't, yet, Eventually this function will likely initialize libltdl. It doesn't, yet,
since we aren't using libltdl yet. since we aren't using libltdl yet.
*/ */
void VISIBLE void
PI_Init (void) PI_Init (void)
{ {
PI_InitCvars (); PI_InitCvars ();
@ -262,7 +262,7 @@ PI_Shutdown (void)
} }
plugin_t * VISIBLE plugin_t *
PI_LoadPlugin (const char *type, const char *name) PI_LoadPlugin (const char *type, const char *name)
{ {
char realname[4096]; char realname[4096];
@ -378,7 +378,7 @@ PI_LoadPlugin (const char *type, const char *name)
return plugin; return plugin;
} }
qboolean VISIBLE qboolean
PI_UnloadPlugin (plugin_t *plugin) PI_UnloadPlugin (plugin_t *plugin)
{ {
if (plugin if (plugin
@ -399,7 +399,7 @@ PI_UnloadPlugin (plugin_t *plugin)
return pi_close_lib (plugin->handle); return pi_close_lib (plugin->handle);
} }
void VISIBLE void
PI_RegisterPlugins (plugin_list_t *plugins) PI_RegisterPlugins (plugin_list_t *plugins)
{ {
while (plugins->name) while (plugins->name)

View File

@ -59,11 +59,11 @@ static const char *safeargvs[] =
#define NUM_SAFE_ARGVS ((int) (sizeof(safeargvs)/sizeof(safeargvs[0]))) #define NUM_SAFE_ARGVS ((int) (sizeof(safeargvs)/sizeof(safeargvs[0])))
int com_argc; VISIBLE int com_argc;
const char **com_argv; VISIBLE const char **com_argv;
const char *com_cmdline; const char *com_cmdline;
qboolean nouse = false; // 1999-10-29 +USE fix by Maddes VISIBLE qboolean nouse = false; // 1999-10-29 +USE fix by Maddes
/* /*
@ -72,7 +72,7 @@ qboolean nouse = false; // 1999-10-29 +USE fix by Maddes
Returns the position (1 to argc-1) in the program's argument list Returns the position (1 to argc-1) in the program's argument list
where the given parameter apears, or 0 if not present where the given parameter apears, or 0 if not present
*/ */
int VISIBLE int
COM_CheckParm (const char *parm) COM_CheckParm (const char *parm)
{ {
int i; int i;
@ -88,7 +88,7 @@ COM_CheckParm (const char *parm)
return 0; return 0;
} }
void VISIBLE void
COM_InitArgv (int argc, const char **argv) COM_InitArgv (int argc, const char **argv)
{ {
qboolean safe; qboolean safe;

View File

@ -44,13 +44,13 @@ static __attribute__ ((used)) const char rcsid[] =
*/ */
#ifndef WORDS_BIGENDIAN #ifndef WORDS_BIGENDIAN
qboolean bigendien = false;; VISIBLE qboolean bigendien = false;;
#else #else
qboolean bigendien = true;; VISIBLE qboolean bigendien = true;;
#endif #endif
short VISIBLE short
ShortSwap (short l) ShortSwap (short l)
{ {
byte b1, b2; byte b1, b2;
@ -61,13 +61,13 @@ ShortSwap (short l)
return (b1 << 8) + b2; return (b1 << 8) + b2;
} }
short VISIBLE short
ShortNoSwap (short l) ShortNoSwap (short l)
{ {
return l; return l;
} }
int VISIBLE int
LongSwap (int l) LongSwap (int l)
{ {
byte b1, b2, b3, b4; byte b1, b2, b3, b4;
@ -80,13 +80,13 @@ LongSwap (int l)
return ((int) b1 << 24) + ((int) b2 << 16) + ((int) b3 << 8) + b4; return ((int) b1 << 24) + ((int) b2 << 16) + ((int) b3 << 8) + b4;
} }
int VISIBLE int
LongNoSwap (int l) LongNoSwap (int l)
{ {
return l; return l;
} }
float VISIBLE float
FloatSwap (float f) FloatSwap (float f)
{ {
union { union {
@ -102,7 +102,7 @@ FloatSwap (float f)
return dat2.f; return dat2.f;
} }
float VISIBLE float
FloatNoSwap (float f) FloatNoSwap (float f)
{ {
return f; return f;

View File

@ -96,7 +96,7 @@ PL_NewItem (pltype_t type)
return item; return item;
} }
plitem_t * VISIBLE plitem_t *
PL_NewDictionary (void) PL_NewDictionary (void)
{ {
plitem_t *item = PL_NewItem (QFDictionary); plitem_t *item = PL_NewItem (QFDictionary);
@ -105,7 +105,7 @@ PL_NewDictionary (void)
return item; return item;
} }
plitem_t * VISIBLE plitem_t *
PL_NewArray (void) PL_NewArray (void)
{ {
plitem_t *item = PL_NewItem (QFArray); plitem_t *item = PL_NewItem (QFArray);
@ -114,7 +114,7 @@ PL_NewArray (void)
return item; return item;
} }
plitem_t * VISIBLE plitem_t *
PL_NewData (void *data, int size) PL_NewData (void *data, int size)
{ {
plitem_t *item = PL_NewItem (QFBinary); plitem_t *item = PL_NewItem (QFBinary);
@ -133,13 +133,13 @@ new_string (char *str)
return item; return item;
} }
plitem_t * VISIBLE plitem_t *
PL_NewString (const char *str) PL_NewString (const char *str)
{ {
return new_string (strdup (str)); return new_string (strdup (str));
} }
void VISIBLE void
PL_Free (plitem_t *item) PL_Free (plitem_t *item)
{ {
switch (item->type) { switch (item->type) {
@ -170,7 +170,7 @@ PL_Free (plitem_t *item)
free (item); free (item);
} }
const char * VISIBLE const char *
PL_String (plitem_t *string) PL_String (plitem_t *string)
{ {
if (string->type != QFString) if (string->type != QFString)
@ -178,7 +178,7 @@ PL_String (plitem_t *string)
return string->data; return string->data;
} }
plitem_t * VISIBLE plitem_t *
PL_ObjectForKey (plitem_t *dict, const char *key) PL_ObjectForKey (plitem_t *dict, const char *key)
{ {
hashtab_t *table = (hashtab_t *) dict->data; hashtab_t *table = (hashtab_t *) dict->data;
@ -191,7 +191,7 @@ PL_ObjectForKey (plitem_t *dict, const char *key)
return k ? k->value : NULL; return k ? k->value : NULL;
} }
plitem_t * VISIBLE plitem_t *
PL_RemoveObjectForKey (plitem_t *dict, const char *key) PL_RemoveObjectForKey (plitem_t *dict, const char *key)
{ {
hashtab_t *table = (hashtab_t *) dict->data; hashtab_t *table = (hashtab_t *) dict->data;
@ -210,7 +210,7 @@ PL_RemoveObjectForKey (plitem_t *dict, const char *key)
return value; return value;
} }
plitem_t * VISIBLE plitem_t *
PL_D_AllKeys (plitem_t *dict) PL_D_AllKeys (plitem_t *dict)
{ {
void **list, **l; void **list, **l;
@ -234,7 +234,7 @@ PL_D_AllKeys (plitem_t *dict)
return array; return array;
} }
int VISIBLE int
PL_D_NumKeys (plitem_t *dict) PL_D_NumKeys (plitem_t *dict)
{ {
if (dict->type != QFDictionary) if (dict->type != QFDictionary)
@ -242,7 +242,7 @@ PL_D_NumKeys (plitem_t *dict)
return Hash_NumElements ((hashtab_t *) dict->data); return Hash_NumElements ((hashtab_t *) dict->data);
} }
plitem_t * VISIBLE plitem_t *
PL_ObjectAtIndex (plitem_t *array, int index) PL_ObjectAtIndex (plitem_t *array, int index)
{ {
plarray_t *arr = (plarray_t *) array->data; plarray_t *arr = (plarray_t *) array->data;
@ -253,7 +253,7 @@ PL_ObjectAtIndex (plitem_t *array, int index)
return index >= 0 && index < arr->numvals ? arr->values[index] : NULL; return index >= 0 && index < arr->numvals ? arr->values[index] : NULL;
} }
qboolean VISIBLE qboolean
PL_D_AddObject (plitem_t *dict, const char *key, plitem_t *value) PL_D_AddObject (plitem_t *dict, const char *key, plitem_t *value)
{ {
dictkey_t *k; dictkey_t *k;
@ -278,7 +278,7 @@ PL_D_AddObject (plitem_t *dict, const char *key, plitem_t *value)
return true; return true;
} }
qboolean VISIBLE qboolean
PL_A_InsertObjectAtIndex (plitem_t *array, plitem_t *item, int index) PL_A_InsertObjectAtIndex (plitem_t *array, plitem_t *item, int index)
{ {
plarray_t *arr; plarray_t *arr;
@ -314,13 +314,13 @@ PL_A_InsertObjectAtIndex (plitem_t *array, plitem_t *item, int index)
return true; return true;
} }
qboolean VISIBLE qboolean
PL_A_AddObject (plitem_t *array, plitem_t *item) PL_A_AddObject (plitem_t *array, plitem_t *item)
{ {
return PL_A_InsertObjectAtIndex (array, item, -1); return PL_A_InsertObjectAtIndex (array, item, -1);
} }
int VISIBLE int
PL_A_NumObjects (plitem_t *array) PL_A_NumObjects (plitem_t *array)
{ {
if (array->type != QFArray) if (array->type != QFArray)
@ -328,7 +328,7 @@ PL_A_NumObjects (plitem_t *array)
return ((plarray_t *) array->data)->numvals; return ((plarray_t *) array->data)->numvals;
} }
plitem_t * VISIBLE plitem_t *
PL_RemoveObjectAtIndex (plitem_t *array, int index) PL_RemoveObjectAtIndex (plitem_t *array, int index)
{ {
plarray_t *arr; plarray_t *arr;
@ -778,7 +778,7 @@ PL_ParsePropertyListItem (pldata_t *pl)
} // switch } // switch
} }
plitem_t * VISIBLE plitem_t *
PL_GetPropertyList (const char *string) PL_GetPropertyList (const char *string)
{ {
pldata_t *pl = calloc (1, sizeof (pldata_t)); pldata_t *pl = calloc (1, sizeof (pldata_t));
@ -926,7 +926,7 @@ write_item (dstring_t *dstr, plitem_t *item, int level)
} }
} }
char * VISIBLE char *
PL_WritePropertyList (plitem_t *pl) PL_WritePropertyList (plitem_t *pl)
{ {
dstring_t *dstr = dstring_newstr (); dstring_t *dstr = dstring_newstr ();
@ -938,7 +938,7 @@ PL_WritePropertyList (plitem_t *pl)
return dstring_freeze (dstr); return dstring_freeze (dstr);
} }
pltype_t VISIBLE pltype_t
PL_Type (plitem_t *item) PL_Type (plitem_t *item)
{ {
return item->type; return item->type;

View File

@ -124,9 +124,9 @@ cvar_t *fs_userpath;
cvar_t *fs_sharepath; cvar_t *fs_sharepath;
cvar_t *fs_dirconf; cvar_t *fs_dirconf;
const char *qfs_userpath; VISIBLE const char *qfs_userpath;
int qfs_filesize; VISIBLE int qfs_filesize;
searchpath_t *qfs_searchpaths; searchpath_t *qfs_searchpaths;
@ -139,7 +139,7 @@ typedef struct qfs_var_s {
static void QFS_AddGameDirectory (const char *dir); static void QFS_AddGameDirectory (const char *dir);
gamedir_t *qfs_gamedir; VISIBLE gamedir_t *qfs_gamedir;
static plitem_t *qfs_gd_plist; static plitem_t *qfs_gd_plist;
static const char *qfs_game = ""; static const char *qfs_game = "";
static const char *qfs_default_dirconf = static const char *qfs_default_dirconf =
@ -567,7 +567,7 @@ no_config:
qfs_gd_plist = PL_GetPropertyList (qfs_default_dirconf); qfs_gd_plist = PL_GetPropertyList (qfs_default_dirconf);
} }
char * VISIBLE char *
QFS_FileBase (const char *in) QFS_FileBase (const char *in)
{ {
const char *slash, *dot, *s; const char *slash, *dot, *s;
@ -614,7 +614,7 @@ QFS_Path_f (void)
The filename will be prefixed by the current game directory The filename will be prefixed by the current game directory
*/ */
void VISIBLE void
QFS_WriteFile (const char *filename, const void *data, int len) QFS_WriteFile (const char *filename, const void *data, int len)
{ {
QFile *f; QFile *f;
@ -633,7 +633,7 @@ QFS_WriteFile (const char *filename, const void *data, int len)
The filename will be prefixed by the current game directory The filename will be prefixed by the current game directory
*/ */
void VISIBLE void
QFS_WriteBuffers (const char *filename, int count, ...) QFS_WriteBuffers (const char *filename, int count, ...)
{ {
va_list args; va_list args;
@ -657,7 +657,7 @@ QFS_WriteBuffers (const char *filename, int count, ...)
va_end (args); va_end (args);
} }
int VISIBLE int
QFS_CreatePath (const char *path) QFS_CreatePath (const char *path)
{ {
char *ofs; char *ofs;
@ -695,7 +695,7 @@ QFS_OpenRead (const char *path, int offs, int len, int zip)
return file; return file;
} }
char * VISIBLE char *
QFS_CompressPath (const char *pth) QFS_CompressPath (const char *pth)
{ {
char *p, *d; char *p, *d;
@ -769,7 +769,7 @@ contains_updir (const char *path, int levels)
return 0; return 0;
} }
int file_from_pak; // global indicating file came from pack file ZOID VISIBLE int file_from_pak; // global indicating file came from pack file ZOID
/* /*
QFS_FOpenFile QFS_FOpenFile
@ -827,7 +827,7 @@ open_file (searchpath_t *search, const char *filename, QFile **gzfile,
return -1; return -1;
} }
int VISIBLE int
_QFS_FOpenFile (const char *filename, QFile **gzfile, _QFS_FOpenFile (const char *filename, QFile **gzfile,
dstring_t *foundname, int zip) dstring_t *foundname, int zip)
{ {
@ -889,7 +889,7 @@ ok:
return qfs_filesize; return qfs_filesize;
} }
int VISIBLE int
QFS_FOpenFile (const char *filename, QFile **gzfile) QFS_FOpenFile (const char *filename, QFile **gzfile)
{ {
return _QFS_FOpenFile (filename, gzfile, 0, 1); return _QFS_FOpenFile (filename, gzfile, 0, 1);
@ -905,7 +905,7 @@ int loadsize;
Filename are relative to the quake directory. Filename are relative to the quake directory.
Always appends a 0 byte to the loaded data. Always appends a 0 byte to the loaded data.
*/ */
byte * VISIBLE byte *
QFS_LoadFile (const char *path, int usehunk) QFS_LoadFile (const char *path, int usehunk)
{ {
QFile *h; QFile *h;
@ -949,19 +949,19 @@ QFS_LoadFile (const char *path, int usehunk)
return buf; return buf;
} }
byte * VISIBLE byte *
QFS_LoadHunkFile (const char *path) QFS_LoadHunkFile (const char *path)
{ {
return QFS_LoadFile (path, 1); return QFS_LoadFile (path, 1);
} }
byte * VISIBLE byte *
QFS_LoadTempFile (const char *path) QFS_LoadTempFile (const char *path)
{ {
return QFS_LoadFile (path, 2); return QFS_LoadFile (path, 2);
} }
void VISIBLE void
QFS_LoadCacheFile (const char *path, struct cache_user_s *cu) QFS_LoadCacheFile (const char *path, struct cache_user_s *cu)
{ {
loadcache = cu; loadcache = cu;
@ -969,7 +969,7 @@ QFS_LoadCacheFile (const char *path, struct cache_user_s *cu)
} }
// uses temp hunk if larger than bufsize // uses temp hunk if larger than bufsize
byte * VISIBLE byte *
QFS_LoadStackFile (const char *path, void *buffer, int bufsize) QFS_LoadStackFile (const char *path, void *buffer, int bufsize)
{ {
byte *buf; byte *buf;
@ -1167,7 +1167,7 @@ QFS_AddGameDirectory (const char *dir)
Sets the gamedir and path to a different directory. Sets the gamedir and path to a different directory.
*/ */
void VISIBLE void
QFS_Gamedir (const char *dir) QFS_Gamedir (const char *dir)
{ {
int i; int i;
@ -1189,7 +1189,7 @@ QFS_Gamedir (const char *dir)
Kludge to fix all the stuff that changing gamedirs breaks Kludge to fix all the stuff that changing gamedirs breaks
*/ */
void VISIBLE void
QFS_GamedirCallback (gamedir_callback_t *func) QFS_GamedirCallback (gamedir_callback_t *func)
{ {
if (num_gamedir_callbacks == MAX_GAMEDIR_CALLBACKS) { if (num_gamedir_callbacks == MAX_GAMEDIR_CALLBACKS) {
@ -1236,7 +1236,7 @@ expand_squiggle (const char *path)
return strdup (path); return strdup (path);
} }
void VISIBLE void
QFS_Init (const char *game) QFS_Init (const char *game)
{ {
int i; int i;
@ -1285,7 +1285,7 @@ QFS_Init (const char *game)
} }
} }
const char * VISIBLE const char *
QFS_SkipPath (const char *pathname) QFS_SkipPath (const char *pathname)
{ {
const char *last; const char *last;
@ -1299,7 +1299,7 @@ QFS_SkipPath (const char *pathname)
return last; return last;
} }
void VISIBLE void
QFS_StripExtension (const char *in, char *out) QFS_StripExtension (const char *in, char *out)
{ {
char *tmp; char *tmp;
@ -1310,7 +1310,7 @@ QFS_StripExtension (const char *in, char *out)
*tmp = 0; *tmp = 0;
} }
const char * VISIBLE const char *
QFS_FileExtension (const char *in) QFS_FileExtension (const char *in)
{ {
char *tmp; char *tmp;
@ -1321,7 +1321,7 @@ QFS_FileExtension (const char *in)
return in; return in;
} }
void VISIBLE void
QFS_DefaultExtension (char *path, const char *extension) QFS_DefaultExtension (char *path, const char *extension)
{ {
char *src; char *src;
@ -1339,7 +1339,7 @@ QFS_DefaultExtension (char *path, const char *extension)
strncat (path, extension, MAX_OSPATH - strlen (path)); strncat (path, extension, MAX_OSPATH - strlen (path));
} }
int VISIBLE int
QFS_NextFilename (dstring_t *filename, const char *prefix, const char *ext) QFS_NextFilename (dstring_t *filename, const char *prefix, const char *ext)
{ {
char *digits; char *digits;
@ -1359,7 +1359,7 @@ QFS_NextFilename (dstring_t *filename, const char *prefix, const char *ext)
return 0; return 0;
} }
QFile * VISIBLE QFile *
QFS_Open (const char *path, const char *mode) QFS_Open (const char *path, const char *mode)
{ {
dstring_t *full_path = dstring_new (); dstring_t *full_path = dstring_new ();
@ -1388,7 +1388,7 @@ done:
return file; return file;
} }
QFile * VISIBLE QFile *
QFS_WOpen (const char *path, int zip) QFS_WOpen (const char *path, int zip)
{ {
char mode[5] = "wb\000\000\000"; char mode[5] = "wb\000\000\000";
@ -1400,7 +1400,7 @@ QFS_WOpen (const char *path, int zip)
return QFS_Open (path, mode); return QFS_Open (path, mode);
} }
int VISIBLE int
QFS_Rename (const char *old, const char *new) QFS_Rename (const char *old, const char *new)
{ {
dstring_t *full_old = dstring_new (); dstring_t *full_old = dstring_new ();
@ -1416,7 +1416,7 @@ QFS_Rename (const char *old, const char *new)
return ret; return ret;
} }
int VISIBLE int
QFS_Remove (const char *path) QFS_Remove (const char *path)
{ {
dstring_t *full_path = dstring_new (); dstring_t *full_path = dstring_new ();
@ -1428,13 +1428,13 @@ QFS_Remove (const char *path)
return ret; return ret;
} }
filelist_t * VISIBLE filelist_t *
QFS_FilelistNew (void) QFS_FilelistNew (void)
{ {
return calloc (1, sizeof (filelist_t)); return calloc (1, sizeof (filelist_t));
} }
void VISIBLE void
QFS_FilelistAdd (filelist_t *filelist, const char *fname, const char *ext) QFS_FilelistAdd (filelist_t *filelist, const char *fname, const char *ext)
{ {
char **new_list; char **new_list;
@ -1459,7 +1459,7 @@ QFS_FilelistAdd (filelist_t *filelist, const char *fname, const char *ext)
filelist->list[filelist->count++] = str; filelist->list[filelist->count++] = str;
} }
void VISIBLE void
QFS_FilelistFill (filelist_t *list, const char *path, const char *ext, QFS_FilelistFill (filelist_t *list, const char *path, const char *ext,
int strip) int strip)
{ {
@ -1494,7 +1494,7 @@ QFS_FilelistFill (filelist_t *list, const char *path, const char *ext,
} }
} }
void VISIBLE void
QFS_FilelistFree (filelist_t *list) QFS_FilelistFree (filelist_t *list)
{ {
int i; int i;

View File

@ -83,19 +83,19 @@ struct QFile_s {
}; };
int VISIBLE int
Qrename (const char *old, const char *new) Qrename (const char *old, const char *new)
{ {
return rename (old, new); return rename (old, new);
} }
int VISIBLE int
Qremove (const char *path) Qremove (const char *path)
{ {
return remove (path); return remove (path);
} }
int VISIBLE int
Qfilesize (QFile *file) Qfilesize (QFile *file)
{ {
return file->size; return file->size;
@ -159,7 +159,7 @@ file_mode (const char *mode, char *out)
return flags; return flags;
} }
QFile * VISIBLE QFile *
Qopen (const char *path, const char *mode) Qopen (const char *path, const char *mode)
{ {
QFile *file; QFile *file;
@ -205,7 +205,7 @@ Qopen (const char *path, const char *mode)
return file; return file;
} }
QFile * VISIBLE QFile *
Qdopen (int fd, const char *mode) Qdopen (int fd, const char *mode)
{ {
QFile *file; QFile *file;
@ -249,7 +249,7 @@ Qdopen (int fd, const char *mode)
return file; return file;
} }
QFile * VISIBLE QFile *
Qfopen (FILE *file, const char *mode) Qfopen (FILE *file, const char *mode)
{ {
QFile *qfile; QFile *qfile;
@ -267,7 +267,7 @@ Qfopen (FILE *file, const char *mode)
return qfile; return qfile;
} }
QFile * VISIBLE QFile *
Qsubopen (const char *path, int offs, int len, int zip) Qsubopen (const char *path, int offs, int len, int zip)
{ {
int fd = open (path, O_RDONLY); int fd = open (path, O_RDONLY);
@ -286,7 +286,7 @@ Qsubopen (const char *path, int offs, int len, int zip)
return file; return file;
} }
void VISIBLE void
Qclose (QFile *file) Qclose (QFile *file)
{ {
if (file->file) if (file->file)
@ -298,7 +298,7 @@ Qclose (QFile *file)
free (file); free (file);
} }
int VISIBLE int
Qread (QFile *file, void *buf, int count) Qread (QFile *file, void *buf, int count)
{ {
int offs = 0; int offs = 0;
@ -323,7 +323,7 @@ Qread (QFile *file, void *buf, int count)
return ret == -1 ? ret : ret + offs; return ret == -1 ? ret : ret + offs;
} }
int VISIBLE int
Qwrite (QFile *file, const void *buf, int count) Qwrite (QFile *file, const void *buf, int count)
{ {
if (file->file) if (file->file)
@ -336,7 +336,7 @@ Qwrite (QFile *file, const void *buf, int count)
#endif #endif
} }
int VISIBLE int
Qprintf (QFile *file, const char *fmt, ...) Qprintf (QFile *file, const char *fmt, ...)
{ {
va_list args; va_list args;
@ -364,7 +364,7 @@ Qprintf (QFile *file, const char *fmt, ...)
return ret; return ret;
} }
int VISIBLE int
Qputs (QFile *file, const char *buf) Qputs (QFile *file, const char *buf)
{ {
if (file->file) if (file->file)
@ -377,7 +377,7 @@ Qputs (QFile *file, const char *buf)
#endif #endif
} }
char * VISIBLE char *
Qgets (QFile *file, char *buf, int count) Qgets (QFile *file, char *buf, int count)
{ {
char *ret = buf; char *ret = buf;
@ -401,7 +401,7 @@ Qgets (QFile *file, char *buf, int count)
return buf ? ret : 0; return buf ? ret : 0;
} }
int VISIBLE int
Qgetc (QFile *file) Qgetc (QFile *file)
{ {
if (file->c != -1) { if (file->c != -1) {
@ -419,7 +419,7 @@ Qgetc (QFile *file)
#endif #endif
} }
int VISIBLE int
Qputc (QFile *file, int c) Qputc (QFile *file, int c)
{ {
if (file->file) if (file->file)
@ -432,7 +432,7 @@ Qputc (QFile *file, int c)
#endif #endif
} }
int VISIBLE int
Qungetc (QFile *file, int c) Qungetc (QFile *file, int c)
{ {
if (file->c == -1) if (file->c == -1)
@ -440,7 +440,7 @@ Qungetc (QFile *file, int c)
return c; return c;
} }
int VISIBLE int
Qseek (QFile *file, long offset, int whence) Qseek (QFile *file, long offset, int whence)
{ {
file->c = -1; file->c = -1;
@ -482,7 +482,7 @@ Qseek (QFile *file, long offset, int whence)
#endif #endif
} }
long VISIBLE long
Qtell (QFile *file) Qtell (QFile *file)
{ {
int offs; int offs;
@ -500,7 +500,7 @@ Qtell (QFile *file)
return ret == -1 ? ret : ret - offs; return ret == -1 ? ret : ret - offs;
} }
int VISIBLE int
Qflush (QFile *file) Qflush (QFile *file)
{ {
if (file->file) if (file->file)
@ -513,7 +513,7 @@ Qflush (QFile *file)
#endif #endif
} }
int VISIBLE int
Qeof (QFile *file) Qeof (QFile *file)
{ {
if (file->c != -1) if (file->c != -1)
@ -533,7 +533,7 @@ Qeof (QFile *file)
Dynamic length version of Qgets. DO NOT free the buffer. Dynamic length version of Qgets. DO NOT free the buffer.
*/ */
const char * VISIBLE const char *
Qgetline (QFile *file) Qgetline (QFile *file)
{ {
static int size = 256; static int size = 256;

View File

@ -276,7 +276,7 @@ read_cue (QFile *f, int len)
return cue; return cue;
} }
riff_t * VISIBLE riff_t *
riff_read (QFile *f) riff_read (QFile *f)
{ {
dstring_t *riff_buf; dstring_t *riff_buf;
@ -463,7 +463,7 @@ free_list (riff_list_t *list)
free (list); free (list);
} }
void VISIBLE void
riff_free (riff_t *riff) riff_free (riff_t *riff)
{ {
riff_d_chunk_t **ck; riff_d_chunk_t **ck;

View File

@ -50,7 +50,7 @@ script_error (script_t *script, const char *fmt, ...)
exit (1); exit (1);
} }
script_t * VISIBLE script_t *
Script_New (void) Script_New (void)
{ {
script_t *script = calloc (1, sizeof (script_t)); script_t *script = calloc (1, sizeof (script_t));
@ -58,14 +58,14 @@ Script_New (void)
return script; return script;
} }
void VISIBLE void
Script_Delete (script_t *script) Script_Delete (script_t *script)
{ {
dstring_delete (script->token); dstring_delete (script->token);
free (script); free (script);
} }
void VISIBLE void
Script_Start (script_t *script, const char *file, const char *data) Script_Start (script_t *script, const char *file, const char *data)
{ {
script->line = 1; script->line = 1;
@ -74,7 +74,7 @@ Script_Start (script_t *script, const char *file, const char *data)
script->unget = false; script->unget = false;
} }
qboolean VISIBLE qboolean
Script_TokenAvailable (script_t *script, qboolean crossline) Script_TokenAvailable (script_t *script, qboolean crossline)
{ {
if (script->unget) if (script->unget)
@ -109,7 +109,7 @@ Script_TokenAvailable (script_t *script, qboolean crossline)
return true; return true;
} }
qboolean VISIBLE qboolean
Script_GetToken (script_t *script, qboolean crossline) Script_GetToken (script_t *script, qboolean crossline)
{ {
const char *token_p; const char *token_p;
@ -166,7 +166,7 @@ Script_GetToken (script_t *script, qboolean crossline)
return true; return true;
} }
void VISIBLE void
Script_UngetToken (script_t *script) Script_UngetToken (script_t *script)
{ {
script->unget = true; script->unget = true;

View File

@ -43,7 +43,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/zone.h" #include "QF/zone.h"
void VISIBLE void
SZ_Alloc (sizebuf_t *buf, int startsize) SZ_Alloc (sizebuf_t *buf, int startsize)
{ {
if (startsize < 256) if (startsize < 256)
@ -53,14 +53,14 @@ SZ_Alloc (sizebuf_t *buf, int startsize)
buf->cursize = 0; buf->cursize = 0;
} }
void VISIBLE void
SZ_Clear (sizebuf_t *buf) SZ_Clear (sizebuf_t *buf)
{ {
buf->cursize = 0; buf->cursize = 0;
buf->overflowed = false; buf->overflowed = false;
} }
void * VISIBLE void *
SZ_GetSpace (sizebuf_t *buf, int length) SZ_GetSpace (sizebuf_t *buf, int length)
{ {
void *data; void *data;
@ -85,13 +85,13 @@ getspace:
goto getspace; goto getspace;
} }
void VISIBLE void
SZ_Write (sizebuf_t *buf, const void *data, int length) SZ_Write (sizebuf_t *buf, const void *data, int length)
{ {
memcpy (SZ_GetSpace (buf, length), data, length); memcpy (SZ_GetSpace (buf, length), data, length);
} }
void VISIBLE void
SZ_Print (sizebuf_t *buf, const char *data) SZ_Print (sizebuf_t *buf, const char *data)
{ {
int len; int len;

View File

@ -76,8 +76,8 @@ static __attribute__ ((used)) const char rcsid[] =
static void Sys_StdPrintf (const char *fmt, va_list args); static void Sys_StdPrintf (const char *fmt, va_list args);
static void Sys_ErrPrintf (const char *fmt, va_list args); static void Sys_ErrPrintf (const char *fmt, va_list args);
cvar_t *sys_nostdout; VISIBLE cvar_t *sys_nostdout;
cvar_t *sys_extrasleep; VISIBLE cvar_t *sys_extrasleep;
cvar_t *sys_dead_sleep; cvar_t *sys_dead_sleep;
cvar_t *sys_sleep; cvar_t *sys_sleep;
@ -99,7 +99,7 @@ qboolean stdin_ready;
#endif #endif
/* The translation table between the graphical font and plain ASCII --KB */ /* The translation table between the graphical font and plain ASCII --KB */
const char sys_char_map[256] = { VISIBLE const char sys_char_map[256] = {
'\0', '#', '#', '#', '#', '.', '#', '#', '\0', '#', '#', '#', '#', '.', '#', '#',
'#', 9, 10, '#', ' ', 13, '.', '.', '#', 9, 10, '#', ' ', 13, '.', '.',
'[', ']', '0', '1', '2', '3', '4', '5', '[', ']', '0', '1', '2', '3', '4', '5',
@ -169,7 +169,7 @@ Sys_mkdir (const char *path)
return 0; return 0;
} }
int VISIBLE int
Sys_FileTime (const char *path) Sys_FileTime (const char *path)
{ {
#ifdef HAVE_ACCESS #ifdef HAVE_ACCESS
@ -192,13 +192,13 @@ Sys_FileTime (const char *path)
for want of a better name, but it sets the function pointer for the for want of a better name, but it sets the function pointer for the
actual implementation of Sys_Printf. actual implementation of Sys_Printf.
*/ */
void VISIBLE void
Sys_SetStdPrintf (sys_printf_t func) Sys_SetStdPrintf (sys_printf_t func)
{ {
sys_std_printf_function = func; sys_std_printf_function = func;
} }
void VISIBLE void
Sys_SetErrPrintf (sys_printf_t func) Sys_SetErrPrintf (sys_printf_t func)
{ {
sys_err_printf_function = func; sys_err_printf_function = func;
@ -246,7 +246,7 @@ Sys_ErrPrintf (const char *fmt, va_list args)
Sys_Print (stderr, fmt, args); Sys_Print (stderr, fmt, args);
} }
void VISIBLE void
Sys_Printf (const char *fmt, ...) Sys_Printf (const char *fmt, ...)
{ {
va_list args; va_list args;
@ -255,7 +255,7 @@ Sys_Printf (const char *fmt, ...)
va_end (args); va_end (args);
} }
void VISIBLE void
Sys_DPrintf (const char *fmt, ...) Sys_DPrintf (const char *fmt, ...)
{ {
va_list args; va_list args;
@ -267,7 +267,7 @@ Sys_DPrintf (const char *fmt, ...)
va_end (args); va_end (args);
} }
double VISIBLE double
Sys_DoubleTime (void) Sys_DoubleTime (void)
{ {
static qboolean first = true; static qboolean first = true;
@ -309,7 +309,7 @@ Sys_DoubleTime (void)
#endif #endif
} }
void VISIBLE void
Sys_TimeOfDay (date_t *date) Sys_TimeOfDay (date_t *date)
{ {
struct tm *newtime; struct tm *newtime;
@ -364,7 +364,7 @@ Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
#endif #endif
} }
void VISIBLE void
Sys_Init_Cvars (void) Sys_Init_Cvars (void)
{ {
sys_nostdout = Cvar_Get ("sys_nostdout", "0", CVAR_NONE, NULL, sys_nostdout = Cvar_Get ("sys_nostdout", "0", CVAR_NONE, NULL,
@ -397,7 +397,7 @@ Sys_Shutdown (void)
} }
} }
void VISIBLE void
Sys_Quit (void) Sys_Quit (void)
{ {
Sys_Shutdown (); Sys_Shutdown ();
@ -413,7 +413,7 @@ Sys_Quit (void)
# define VA_COPY(a,b) memcpy (a, b, sizeof (a)) # define VA_COPY(a,b) memcpy (a, b, sizeof (a))
#endif #endif
void VISIBLE void
Sys_Error (const char *error, ...) Sys_Error (const char *error, ...)
{ {
va_list args; va_list args;
@ -442,7 +442,7 @@ Sys_Error (const char *error, ...)
exit (1); exit (1);
} }
void VISIBLE void
Sys_RegisterShutdown (void (*func) (void)) Sys_RegisterShutdown (void (*func) (void))
{ {
shutdown_list_t *p; shutdown_list_t *p;
@ -456,7 +456,7 @@ Sys_RegisterShutdown (void (*func) (void))
shutdown_list = p; shutdown_list = p;
} }
int VISIBLE int
Sys_TimeID (void) //FIXME I need a new name, one that doesn't make me feel 3 feet thick Sys_TimeID (void) //FIXME I need a new name, one that doesn't make me feel 3 feet thick
{ {
int val; int val;
@ -468,7 +468,7 @@ Sys_TimeID (void) //FIXME I need a new name, one that doesn't make me feel 3 fee
return val; return val;
} }
void VISIBLE void
Sys_PageIn (void *ptr, int size) Sys_PageIn (void *ptr, int size)
{ {
//may or may not be useful in linux #ifdef _WIN32 //may or may not be useful in linux #ifdef _WIN32
@ -489,7 +489,7 @@ Sys_PageIn (void *ptr, int size)
//#endif //#endif
} }
void VISIBLE void
Sys_DebugLog (const char *file, const char *fmt, ...) Sys_DebugLog (const char *file, const char *fmt, ...)
{ {
va_list args; va_list args;
@ -509,7 +509,7 @@ Sys_DebugLog (const char *file, const char *fmt, ...)
} }
} }
int VISIBLE int
Sys_CheckInput (int idle, int net_socket) Sys_CheckInput (int idle, int net_socket)
{ {
fd_set fdset; fd_set fdset;
@ -564,7 +564,7 @@ Sys_CheckInput (int idle, int net_socket)
Checks for a complete line of text typed in at the console, then forwards Checks for a complete line of text typed in at the console, then forwards
it to the host command processor it to the host command processor
*/ */
const char * VISIBLE const char *
Sys_ConsoleInput (void) Sys_ConsoleInput (void)
{ {
static char text[256]; static char text[256];
@ -632,7 +632,7 @@ static sh_stack_t *free_sh;
static int (*signal_hook)(int,void*); static int (*signal_hook)(int,void*);
static void *signal_hook_data; static void *signal_hook_data;
void VISIBLE void
Sys_PushSignalHook (int (*hook)(int, void *), void *data) Sys_PushSignalHook (int (*hook)(int, void *), void *data)
{ {
sh_stack_t *s; sh_stack_t *s;
@ -653,7 +653,7 @@ Sys_PushSignalHook (int (*hook)(int, void *), void *data)
sh_stack = s; sh_stack = s;
} }
void VISIBLE void
Sys_PopSignalHook (void) Sys_PopSignalHook (void)
{ {
if (sh_stack) { if (sh_stack) {
@ -734,7 +734,7 @@ signal_handler (int sig)
} }
} }
void VISIBLE void
Sys_Init (void) Sys_Init (void)
{ {
// catch signals // catch signals

View File

@ -50,7 +50,7 @@ static __attribute__ ((used)) const char rcsid[] =
does a varargs printf into a temp buffer, so I don't need to have does a varargs printf into a temp buffer, so I don't need to have
varargs versions of all text functions. varargs versions of all text functions.
*/ */
char * VISIBLE char *
va (const char *fmt, ...) va (const char *fmt, ...)
{ {
va_list args; va_list args;
@ -66,7 +66,7 @@ va (const char *fmt, ...)
return string->str; return string->str;
} }
char * VISIBLE char *
nva (const char *fmt, ...) nva (const char *fmt, ...)
{ {
va_list args; va_list args;

View File

@ -46,7 +46,7 @@ static __attribute__ ((used)) const char rcsid[] =
return a positive number. If the second is greater, return a negative. If return a positive number. If the second is greater, return a negative. If
they are equal, return zero. they are equal, return zero.
*/ */
int VISIBLE int
ver_compare (const char *value, const char *reference) ver_compare (const char *value, const char *reference)
{ {
const char *valptr, *refptr; const char *valptr, *refptr;

View File

@ -76,7 +76,7 @@ W_CleanupName (const char *in, char *out)
out[i] = 0; out[i] = 0;
} }
void VISIBLE void
W_LoadWadFile (const char *filename) W_LoadWadFile (const char *filename)
{ {
lumpinfo_t *lump_p; lumpinfo_t *lump_p;
@ -125,7 +125,7 @@ W_GetLumpinfo (const char *name)
return NULL; return NULL;
} }
void * VISIBLE void *
W_GetLumpName (const char *name) W_GetLumpName (const char *name)
{ {
lumpinfo_t *lump; lumpinfo_t *lump;
@ -135,7 +135,7 @@ W_GetLumpName (const char *name)
return (void *) (wad_base + lump->filepos); return (void *) (wad_base + lump->filepos);
} }
void VISIBLE void
SwapPic (qpic_t *pic) SwapPic (qpic_t *pic)
{ {
pic->width = LittleLong (pic->width); pic->width = LittleLong (pic->width);

View File

@ -74,7 +74,7 @@ wad_compare (void *la, void *lb, void *unused)
((lumpinfo_t *) lb)->name) == 0; ((lumpinfo_t *) lb)->name) == 0;
} }
wad_t * VISIBLE wad_t *
wad_new (const char *name) wad_new (const char *name)
{ {
wad_t *wad = calloc (sizeof (*wad), 1); wad_t *wad = calloc (sizeof (*wad), 1);
@ -96,7 +96,7 @@ wad_new (const char *name)
return wad; return wad;
} }
void VISIBLE void
wad_del (wad_t *wad) wad_del (wad_t *wad)
{ {
if (wad->lumps) if (wad->lumps)
@ -110,7 +110,7 @@ wad_del (wad_t *wad)
free (wad); free (wad);
} }
void VISIBLE void
wad_rehash (wad_t *wad) wad_rehash (wad_t *wad)
{ {
int i; int i;
@ -120,7 +120,7 @@ wad_rehash (wad_t *wad)
} }
} }
wad_t * VISIBLE wad_t *
wad_open (const char *name) wad_open (const char *name)
{ {
wad_t *wad = wad_new (name); wad_t *wad = wad_new (name);
@ -169,7 +169,7 @@ error:
return 0; return 0;
} }
wad_t * VISIBLE wad_t *
wad_create (const char *name) wad_create (const char *name)
{ {
wad_t *wad = wad_new (name); wad_t *wad = wad_new (name);
@ -189,7 +189,7 @@ wad_create (const char *name)
return wad; return wad;
} }
void VISIBLE void
wad_close (wad_t *wad) wad_close (wad_t *wad)
{ {
int i; int i;
@ -216,7 +216,7 @@ wad_close (wad_t *wad)
wad_del (wad); wad_del (wad);
} }
int VISIBLE int
wad_add (wad_t *wad, const char *filename, const char *lumpname, byte type) wad_add (wad_t *wad, const char *filename, const char *lumpname, byte type)
{ {
lumpinfo_t *pf; lumpinfo_t *pf;
@ -271,7 +271,7 @@ wad_add (wad_t *wad, const char *filename, const char *lumpname, byte type)
return 0; return 0;
} }
int VISIBLE int
wad_add_data (wad_t *wad, const char *lumpname, byte type, const void *data, wad_add_data (wad_t *wad, const char *lumpname, byte type, const void *data,
int bytes) int bytes)
{ {
@ -318,7 +318,7 @@ wad_add_data (wad_t *wad, const char *lumpname, byte type, const void *data,
return 0; return 0;
} }
lumpinfo_t * VISIBLE lumpinfo_t *
wad_find_lump (wad_t *wad, const char *lumpname) wad_find_lump (wad_t *wad, const char *lumpname)
{ {
lumpinfo_t dummy; lumpinfo_t dummy;

View File

@ -98,7 +98,7 @@ struct memzone_s
}; };
void VISIBLE void
Z_ClearZone (memzone_t *zone, int size) Z_ClearZone (memzone_t *zone, int size)
{ {
memblock_t *block; memblock_t *block;
@ -121,7 +121,7 @@ Z_ClearZone (memzone_t *zone, int size)
block->size = size - sizeof (memzone_t); block->size = size - sizeof (memzone_t);
} }
void VISIBLE void
Z_Free (memzone_t *zone, void *ptr) Z_Free (memzone_t *zone, void *ptr)
{ {
memblock_t *block, *other; memblock_t *block, *other;
@ -160,7 +160,7 @@ Z_Free (memzone_t *zone, void *ptr)
} }
} }
void * VISIBLE void *
Z_Malloc (memzone_t *zone, int size) Z_Malloc (memzone_t *zone, int size)
{ {
void *buf; void *buf;
@ -231,7 +231,7 @@ Z_TagMalloc (memzone_t *zone, int size, int tag)
return (void *) (base + 1); return (void *) (base + 1);
} }
void * VISIBLE void *
Z_Realloc (memzone_t *zone, void *ptr, int size) Z_Realloc (memzone_t *zone, void *ptr, int size)
{ {
int old_size; int old_size;
@ -329,7 +329,7 @@ qboolean hunk_tempactive;
Run consistancy and sentinal trahing checks Run consistancy and sentinal trahing checks
*/ */
void VISIBLE void
Hunk_Check (void) Hunk_Check (void)
{ {
hunk_t *h; hunk_t *h;
@ -416,7 +416,7 @@ Hunk_Print (qboolean all)
Sys_Printf ("%8i total blocks\n", totalblocks); Sys_Printf ("%8i total blocks\n", totalblocks);
} }
*/ */
void * VISIBLE void *
Hunk_AllocName (int size, const char *name) Hunk_AllocName (int size, const char *name)
{ {
hunk_t *h; hunk_t *h;
@ -450,19 +450,19 @@ Hunk_AllocName (int size, const char *name)
return (void *) (h + 1); return (void *) (h + 1);
} }
void * VISIBLE void *
Hunk_Alloc (int size) Hunk_Alloc (int size)
{ {
return Hunk_AllocName (size, "unknown"); return Hunk_AllocName (size, "unknown");
} }
int VISIBLE int
Hunk_LowMark (void) Hunk_LowMark (void)
{ {
return hunk_low_used; return hunk_low_used;
} }
void VISIBLE void
Hunk_FreeToLowMark (int mark) Hunk_FreeToLowMark (int mark)
{ {
if (mark < 0 || mark > hunk_low_used) if (mark < 0 || mark > hunk_low_used)
@ -471,7 +471,7 @@ Hunk_FreeToLowMark (int mark)
hunk_low_used = mark; hunk_low_used = mark;
} }
int VISIBLE int
Hunk_HighMark (void) Hunk_HighMark (void)
{ {
if (hunk_tempactive) { if (hunk_tempactive) {
@ -482,7 +482,7 @@ Hunk_HighMark (void)
return hunk_high_used; return hunk_high_used;
} }
void VISIBLE void
Hunk_FreeToHighMark (int mark) Hunk_FreeToHighMark (int mark)
{ {
if (hunk_tempactive) { if (hunk_tempactive) {
@ -495,7 +495,7 @@ Hunk_FreeToHighMark (int mark)
hunk_high_used = mark; hunk_high_used = mark;
} }
void * VISIBLE void *
Hunk_HighAllocName (int size, const char *name) Hunk_HighAllocName (int size, const char *name)
{ {
hunk_t *h; hunk_t *h;
@ -535,7 +535,7 @@ Hunk_HighAllocName (int size, const char *name)
Return space from the top of the hunk Return space from the top of the hunk
*/ */
void * VISIBLE void *
Hunk_TempAlloc (int size) Hunk_TempAlloc (int size)
{ {
void *buf; void *buf;
@ -828,7 +828,7 @@ Cache_Print (void)
CACHE_WRITE_UNLOCK; CACHE_WRITE_UNLOCK;
} }
void VISIBLE void
Cache_Report (void) Cache_Report (void)
{ {
CACHE_WRITE_LOCK; CACHE_WRITE_LOCK;
@ -857,7 +857,7 @@ Cache_Init (void)
Frees the memory and removes it from the LRU list Frees the memory and removes it from the LRU list
*/ */
void VISIBLE void
Cache_Free (cache_user_t *c) Cache_Free (cache_user_t *c)
{ {
CACHE_WRITE_LOCK; CACHE_WRITE_LOCK;
@ -908,7 +908,7 @@ Cache_RealCheck (cache_user_t *c)
return c->data; return c->data;
} }
void * VISIBLE void *
Cache_Check (cache_user_t *c) Cache_Check (cache_user_t *c)
{ {
void *mem; void *mem;
@ -919,7 +919,7 @@ Cache_Check (cache_user_t *c)
return mem; return mem;
} }
void * VISIBLE void *
Cache_Alloc (cache_user_t *c, int size, const char *name) Cache_Alloc (cache_user_t *c, int size, const char *name)
{ {
void *mem; void *mem;
@ -997,7 +997,7 @@ Cache_Profile (void)
CACHE_WRITE_UNLOCK; CACHE_WRITE_UNLOCK;
} }
void VISIBLE void
Cache_Add (cache_user_t *c, void *object, cache_loader_t loader) Cache_Add (cache_user_t *c, void *object, cache_loader_t loader)
{ {
CACHE_WRITE_LOCK; CACHE_WRITE_LOCK;
@ -1030,7 +1030,7 @@ Cache_Remove (cache_user_t *c)
CACHE_WRITE_UNLOCK; CACHE_WRITE_UNLOCK;
} }
void * VISIBLE void *
Cache_TryGet (cache_user_t *c) Cache_TryGet (cache_user_t *c)
{ {
void *mem; void *mem;
@ -1049,7 +1049,7 @@ Cache_TryGet (cache_user_t *c)
return mem; return mem;
} }
void * VISIBLE void *
Cache_Get (cache_user_t *c) Cache_Get (cache_user_t *c)
{ {
void *mem = Cache_TryGet (c); void *mem = Cache_TryGet (c);
@ -1059,7 +1059,7 @@ Cache_Get (cache_user_t *c)
return mem; return mem;
} }
void VISIBLE void
Cache_Release (cache_user_t *c) Cache_Release (cache_user_t *c)
{ {
int *readlock; int *readlock;
@ -1174,7 +1174,7 @@ QA_strdup (const char *s)
//============================================================================ //============================================================================
void VISIBLE void
Memory_Init (void *buf, int size) Memory_Init (void *buf, int size)
{ {
hunk_base = buf; hunk_base = buf;

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include $(GLX_CFLAGS) INCLUDES= -I$(top_srcdir)/include $(GLX_CFLAGS)
if BUILD_GL if BUILD_GL

View File

@ -158,7 +158,7 @@ Draw_InitText (void)
} }
} }
qpic_t * VISIBLE qpic_t *
Draw_PicFromWad (const char *name) Draw_PicFromWad (const char *name)
{ {
glpic_t *gl; glpic_t *gl;
@ -196,7 +196,7 @@ Draw_ClearCache (void)
pic->dirty = true; pic->dirty = true;
} }
qpic_t * VISIBLE qpic_t *
Draw_CachePic (const char *path, qboolean alpha) Draw_CachePic (const char *path, qboolean alpha)
{ {
cachepic_t *pic; cachepic_t *pic;
@ -254,7 +254,7 @@ Draw_CachePic (const char *path, qboolean alpha)
return &pic->pic; return &pic->pic;
} }
void VISIBLE void
Draw_TextBox (int x, int y, int width, int lines, byte alpha) Draw_TextBox (int x, int y, int width, int lines, byte alpha)
{ {
int cx, cy, n; int cx, cy, n;
@ -308,7 +308,7 @@ Draw_TextBox (int x, int y, int width, int lines, byte alpha)
qfglColor3ubv (color_white); qfglColor3ubv (color_white);
} }
void VISIBLE void
Draw_Init (void) Draw_Init (void)
{ {
int i; int i;
@ -429,7 +429,7 @@ tVA_increment (void)
It can be clipped to the top of the screen to allow the console to be It can be clipped to the top of the screen to allow the console to be
smoothly scrolled off. smoothly scrolled off.
*/ */
void VISIBLE void
Draw_Character (int x, int y, unsigned int chr) Draw_Character (int x, int y, unsigned int chr)
{ {
chr &= 255; chr &= 255;
@ -443,7 +443,7 @@ Draw_Character (int x, int y, unsigned int chr)
tVA_increment (); tVA_increment ();
} }
void VISIBLE void
Draw_String (int x, int y, const char *str) Draw_String (int x, int y, const char *str)
{ {
unsigned char chr; unsigned char chr;
@ -466,7 +466,7 @@ Draw_String (int x, int y, const char *str)
} }
} }
void VISIBLE void
Draw_nString (int x, int y, const char *str, int count) Draw_nString (int x, int y, const char *str, int count)
{ {
unsigned char chr; unsigned char chr;
@ -572,7 +572,7 @@ static void (*crosshair_func[]) (int x, int y) = {
crosshair_3, crosshair_3,
}; };
void VISIBLE void
Draw_Crosshair (void) Draw_Crosshair (void)
{ {
int x, y; int x, y;
@ -598,7 +598,7 @@ Draw_CrosshairAt (int ch, int x, int y)
crosshair_func[ch] (x, y); crosshair_func[ch] (x, y);
} }
void VISIBLE void
Draw_Pic (int x, int y, qpic_t *pic) Draw_Pic (int x, int y, qpic_t *pic)
{ {
glpic_t *gl; glpic_t *gl;
@ -618,7 +618,7 @@ Draw_Pic (int x, int y, qpic_t *pic)
qfglEnd (); qfglEnd ();
} }
void VISIBLE void
Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width, Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
int height) int height)
{ {
@ -654,7 +654,7 @@ Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
Draws console background (obviously!) Completely rewritten to use Draws console background (obviously!) Completely rewritten to use
several simple yet very cool GL effects. --KB several simple yet very cool GL effects. --KB
*/ */
void VISIBLE void
Draw_ConsoleBackground (int lines, byte alpha) Draw_ConsoleBackground (int lines, byte alpha)
{ {
float ofs; float ofs;
@ -728,7 +728,7 @@ Draw_ConsoleBackground (int lines, byte alpha)
This repeats a 64*64 tile graphic to fill the screen around a sized down This repeats a 64*64 tile graphic to fill the screen around a sized down
refresh window. refresh window.
*/ */
void VISIBLE void
Draw_TileClear (int x, int y, int w, int h) Draw_TileClear (int x, int y, int w, int h)
{ {
qfglColor3ubv (color_0_8); qfglColor3ubv (color_0_8);
@ -751,7 +751,7 @@ Draw_TileClear (int x, int y, int w, int h)
Fills a box of pixels with a single color Fills a box of pixels with a single color
*/ */
void VISIBLE void
Draw_Fill (int x, int y, int w, int h, int c) Draw_Fill (int x, int y, int w, int h, int c)
{ {
qfglDisable (GL_TEXTURE_2D); qfglDisable (GL_TEXTURE_2D);
@ -769,7 +769,7 @@ Draw_Fill (int x, int y, int w, int h, int c)
qfglEnable (GL_TEXTURE_2D); qfglEnable (GL_TEXTURE_2D);
} }
void VISIBLE void
Draw_FadeScreen (void) Draw_FadeScreen (void)
{ {
GL_FlushText (); // Flush text that should be rendered before the menu GL_FlushText (); // Flush text that should be rendered before the menu

View File

@ -145,7 +145,7 @@ particle_new_veryrandom (ptype_t type, int texnum, const vec3_t org,
} }
*/ */
void VISIBLE void
R_ClearParticles (void) R_ClearParticles (void)
{ {
numparticles = 0; numparticles = 0;
@ -1767,7 +1767,7 @@ R_ParticleFunctionInit (void)
r_easter_eggs_f (easter_eggs); r_easter_eggs_f (easter_eggs);
} }
void VISIBLE void
R_Particles_Init_Cvars (void) R_Particles_Init_Cvars (void)
{ {
R_ParticleFunctionInit (); R_ParticleFunctionInit ();

View File

@ -70,7 +70,7 @@ R_InitGraphTextures (int base)
return base; return base;
} }
void VISIBLE void
R_LineGraph (int x, int y, int *h_vals, int count) R_LineGraph (int x, int y, int *h_vals, int count)
{ {
byte color; byte color;

Some files were not shown because too many files have changed in this diff Show More