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)
#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_TRY_COMPILE(
[long (*foo) (long, long) = __builtin_expect;],
@ -2051,8 +2069,8 @@ if test "x$enable_shared" = xno; then
PREFER_PIC=
PREFER_NON_PIC=
else
PREFER_PIC=-prefer-pic
PREFER_NON_PIC=-prefer-non-pic
PREFER_PIC="-prefer-pic -fvisibility=hidden"
PREFER_NON_PIC="-prefer-non-pic -fvisibility=hidden"
fi
if test "x$enable_static" = xno; then
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 CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross);
vec_t _VectorNormalize (vec3_t v); // returns vector length
void VectorInverse (vec3_t v);
int Q_log2(int val);
void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]);

View File

@ -47,7 +47,7 @@
#ifdef STATIC_PLUGINS
#define PLUGIN_INFO(type,name) plugin_t *type##_##name##_PluginInfo (void); plugin_t * type##_##name##_PluginInfo (void)
#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
typedef enum {

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@ @VORBIS_CFLAGS@ @OGG_CFLAGS@
CFLAGS+= @PREFER_PIC@ @VORBIS_CFLAGS@ @OGG_CFLAGS@
INCLUDES= -I$(top_srcdir)/include
plugin_version= 1:0:0
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)
{
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)
{
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");
}
void
VISIBLE void
S_AmbientOff (void)
{
if (snd_render_funcs)
snd_render_funcs->pS_AmbientOff ();
}
void
VISIBLE void
S_AmbientOn (void)
{
if (snd_render_funcs)
snd_render_funcs->pS_AmbientOn ();
}
void
VISIBLE void
S_Shutdown (void)
{
if (snd_render_module) {
@ -138,21 +138,21 @@ S_Shutdown (void)
}
}
void
VISIBLE void
S_TouchSound (const char *sample)
{
if (snd_render_funcs)
snd_render_funcs->pS_TouchSound (sample);
}
void
VISIBLE void
S_StaticSound (sfx_t *sfx, const vec3_t origin, float vol, float attenuation)
{
if (snd_render_funcs)
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,
float fvol, float attenuation)
{
@ -161,14 +161,14 @@ S_StartSound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin,
attenuation);
}
void
VISIBLE void
S_StopSound (int entnum, int entchannel)
{
if (snd_render_funcs)
snd_render_funcs->pS_StopSound (entnum, entchannel);
}
sfx_t *
VISIBLE sfx_t *
S_PrecacheSound (const char *sample)
{
if (snd_render_funcs)
@ -176,14 +176,14 @@ S_PrecacheSound (const char *sample)
return NULL;
}
void
VISIBLE void
S_ClearPrecache (void)
{
if (snd_render_funcs)
snd_render_funcs->pS_ClearPrecache ();
}
void
VISIBLE void
S_Update (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right,
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);
}
void
VISIBLE void
S_StopAllSounds (qboolean clear)
{
if (snd_render_funcs)
snd_render_funcs->pS_StopAllSounds (clear);
}
void
VISIBLE void
S_BeginPrecaching (void)
{
if (snd_render_funcs)
snd_render_funcs->pS_BeginPrecaching ();
}
void
VISIBLE void
S_EndPrecaching (void)
{
if (snd_render_funcs)
snd_render_funcs->pS_EndPrecaching ();
}
void
VISIBLE void
S_ExtraUpdate (void)
{
// if (snd_render_funcs)
// snd_render_funcs->pS_ExtraUpdate ();
}
void
VISIBLE void
S_LocalSound (const char *s)
{
if (snd_render_funcs)
snd_render_funcs->pS_LocalSound (s);
}
void
VISIBLE void
S_BlockSound (void)
{
if (snd_render_funcs)
snd_render_funcs->pS_BlockSound ();
}
void
VISIBLE void
S_UnblockSound (void)
{
if (snd_render_funcs)
snd_render_funcs->pS_UnblockSound ();
}
sfx_t *
VISIBLE sfx_t *
S_LoadSound (const char *name)
{
if (snd_render_funcs)
@ -248,7 +248,7 @@ S_LoadSound (const char *name)
return 0;
}
struct channel_s *
VISIBLE struct channel_s *
S_AllocChannel (void)
{
if (snd_render_funcs)

View File

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

View File

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

View File

@ -45,7 +45,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/console.h"
con_buffer_t *
VISIBLE con_buffer_t *
Con_CreateBuffer (size_t buffer_size, int max_lines)
{
con_buffer_t *buffer;
@ -69,7 +69,7 @@ err:
return 0;
}
void
VISIBLE void
Con_DestroyBuffer (con_buffer_t *buffer)
{
free (buffer->buffer);
@ -77,7 +77,7 @@ Con_DestroyBuffer (con_buffer_t *buffer)
free (buffer);
}
void
VISIBLE void
Con_BufferAddText (con_buffer_t *buf, const char *text)
{
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 taniwha
*/
__attribute__((visibility ("default")))
void
Con_BasicCompleteCommandLine (inputline_t *il)
{

View File

@ -43,9 +43,10 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/plugin.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))
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;
#undef U
__attribute__ ((visibility ("default")))
void
Con_Init (const char *plugin_name)
{
@ -66,11 +68,13 @@ Con_Init (const char *plugin_name)
}
}
__attribute__ ((visibility ("default")))
void
Con_Init_Cvars (void)
{
}
__attribute__ ((visibility ("default")))
void
Con_Shutdown (void)
{
@ -80,6 +84,7 @@ Con_Shutdown (void)
}
}
__attribute__ ((visibility ("default")))
void
Con_Printf (const char *fmt, ...)
{
@ -93,6 +98,7 @@ Con_Printf (const char *fmt, ...)
va_end (args);
}
__attribute__ ((visibility ("default")))
void
Con_Print (const char *fmt, va_list args)
{
@ -102,6 +108,7 @@ Con_Print (const char *fmt, va_list args)
vfprintf (stdout, fmt, args);
}
__attribute__ ((visibility ("default")))
void
Con_DPrintf (const char *fmt, ...)
{
@ -116,6 +123,7 @@ Con_DPrintf (const char *fmt, ...)
}
}
__attribute__ ((visibility ("default")))
void
Con_ProcessInput (void)
{
@ -131,6 +139,7 @@ Con_ProcessInput (void)
}
}
__attribute__ ((visibility ("default")))
void
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);
}
__attribute__ ((visibility ("default")))
void
Con_SetOrMask (int mask)
{
@ -145,6 +155,7 @@ Con_SetOrMask (int mask)
con_module->data->console->ormask = mask;
}
__attribute__ ((visibility ("default")))
void
Con_DrawConsole (void)
{
@ -152,6 +163,7 @@ Con_DrawConsole (void)
con_module->functions->console->pC_DrawConsole ();
}
__attribute__ ((visibility ("default")))
void
Con_CheckResize (void)
{
@ -159,6 +171,7 @@ Con_CheckResize (void)
con_module->functions->console->pC_CheckResize ();
}
__attribute__ ((visibility ("default")))
void
Con_NewMap (void)
{

View File

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

View File

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

View File

@ -40,7 +40,7 @@ static __attribute__ ((used)) const char rcsid[] =
#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

View File

@ -44,6 +44,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/view.h"
__attribute__ ((visibility ("default")))
view_t *
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]);
}
__attribute__ ((visibility ("default")))
void
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);
}
__attribute__ ((visibility ("default")))
void
view_add (view_t *par, view_t *view)
{
view_insert (par, view, -1);
}
__attribute__ ((visibility ("default")))
void
view_remove (view_t *par, view_t *view)
{
@ -165,6 +169,7 @@ view_remove (view_t *par, view_t *view)
}
}
__attribute__ ((visibility ("default")))
void
view_delete (view_t *view)
{
@ -175,6 +180,7 @@ view_delete (view_t *view)
free (view);
}
__attribute__ ((visibility ("default")))
void
view_draw (view_t *view)
{
@ -209,6 +215,7 @@ _resize (view_t *view, int xl, int yl)
}
}
__attribute__ ((visibility ("default")))
void
view_resize (view_t *view, int xl, int yl)
{
@ -216,6 +223,7 @@ view_resize (view_t *view, int xl, int yl)
setgeometry (view);
}
__attribute__ ((visibility ("default")))
void
view_move (view_t *view, int xp, int yp)
{

View File

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

View File

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

View File

@ -223,7 +223,7 @@ static builtin_t builtins[] = {
{0}
};
void
VISIBLE void
InputLine_Progs_Init (progs_t *pr)
{
il_resources_t *res = malloc (sizeof (il_resources_t));
@ -234,7 +234,7 @@ InputLine_Progs_Init (progs_t *pr)
PR_RegisterBuiltins (pr, builtins);
}
void
VISIBLE void
InputLine_Progs_SetDraw (progs_t *pr, void (*draw)(inputline_t *))
{
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;
#undef U
const char *pr_gametype = "";
VISIBLE const char *pr_gametype = "";
/* BUILT-IN FUNCTIONS */
char *
VISIBLE char *
PF_VarString (progs_t *pr, int first)
{
char *out;
@ -662,7 +662,7 @@ static builtin_t builtins[] = {
{0}
};
void
VISIBLE void
PR_Cmds_Init (progs_t *pr)
{
PR_RegisterBuiltins (pr, builtins);

View File

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

View File

@ -89,7 +89,7 @@ builtin_next (progs_t *pr)
return pr->bi_next++;
}
void
VISIBLE void
PR_RegisterBuiltins (progs_t *pr, builtin_t *builtins)
{
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)
{
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);
}
int
VISIBLE int
PR_RelocateBuiltins (progs_t *pr)
{
int i, ind;

View File

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

View File

@ -61,7 +61,7 @@ static __attribute__ ((used)) const char rcsid[] =
Sets everything to NULL
*/
void
VISIBLE void
ED_ClearEdict (progs_t *pr, edict_t *e, int val)
{
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
angles and bad trails.
*/
edict_t *
VISIBLE edict_t *
ED_Alloc (progs_t *pr)
{
int i;
@ -123,7 +123,7 @@ ED_Alloc (progs_t *pr)
Marks the edict as free
FIXME: walk all entities and NULL out references to this entity
*/
void
VISIBLE void
ED_Free (progs_t *pr, edict_t *ed)
{
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_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
*/
void
VISIBLE void
ED_PrintEdicts (progs_t *pr, const char *fieldval)
{
int i;
@ -187,7 +187,7 @@ ED_PrintEdicts (progs_t *pr, const char *fieldval)
For debugging
*/
void
VISIBLE void
ED_Count (progs_t *pr)
{
int i;

View File

@ -55,7 +55,7 @@ static __attribute__ ((used)) const char rcsid[] =
Aborts the currently executing function
*/
void
VISIBLE void
PR_RunError (progs_t * pr, const char *error, ...)
{
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);
}
inline void
VISIBLE inline void
PR_PushFrame (progs_t *pr)
{
prstack_t *frame;
@ -93,7 +93,7 @@ PR_PushFrame (progs_t *pr)
pr->pr_xfunction = 0;
}
inline void
VISIBLE inline void
PR_PopFrame (progs_t *pr)
{
prstack_t *frame;
@ -276,7 +276,7 @@ signal_hook (int sig, void *data)
return 0;
}
int
VISIBLE int
PR_CallFunction (progs_t *pr, func_t fnum)
{
dfunction_t *f;
@ -299,7 +299,7 @@ PR_CallFunction (progs_t *pr, func_t fnum)
The interpretation main loop
*/
void
VISIBLE void
PR_ExecuteProgram (progs_t * pr, func_t fnum)
{
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)
{
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]);
}
void
VISIBLE void
PR_AddLoadFunc (progs_t *pr, int (*func)(progs_t *))
{
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;
}
void
VISIBLE void
PR_AddLoadFinishFunc (progs_t *pr, int (*func)(progs_t *))
{
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;
}
int
VISIBLE int
PR_RunLoadFuncs (progs_t *pr)
{
int i;
@ -371,7 +371,7 @@ PR_RunLoadFuncs (progs_t *pr)
/*
PR_LoadProgs
*/
void
VISIBLE void
PR_LoadProgs (progs_t *pr, const char *progsname, int edicts, int zone)
{
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);
}
void
VISIBLE void
PR_Init_Cvars (void)
{
pr_boundscheck =
@ -405,14 +405,14 @@ PR_Init_Cvars (void)
PR_Debug_Init_Cvars ();
}
void
VISIBLE void
PR_Init (void)
{
PR_Opcode_Init ();
PR_Debug_Init ();
}
void
VISIBLE void
PR_Error (progs_t *pr, const char *error, ...)
{
va_list argptr;

View File

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

View File

@ -108,7 +108,7 @@ PR_UglyValueString (progs_t *pr, etype_t type, pr_type_t *val)
return line;
}
plitem_t *
VISIBLE plitem_t *
ED_EntityDict (progs_t *pr, edict_t *ed)
{
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
*/
plitem_t *
VISIBLE plitem_t *
ED_GlobalsDict (progs_t *pr)
{
plitem_t *globals = PL_NewDictionary ();
@ -209,7 +209,7 @@ ED_NewString (progs_t *pr, const char *string)
Can parse either fields or globals
returns false if error
*/
qboolean
VISIBLE qboolean
ED_ParseEpair (progs_t *pr, pr_type_t *base, ddef_t *key, const char *s)
{
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.
*/
plitem_t *
VISIBLE plitem_t *
ED_ConvertToPlist (progs_t *pr, script_t *script)
{
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)
{
ddef_t *global;
@ -360,7 +360,7 @@ ED_InitGlobals (progs_t *pr, plitem_t *globals)
PL_Free (keys);
}
void
VISIBLE void
ED_InitEntity (progs_t *pr, plitem_t *entity, edict_t *ent)
{
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)
{
script_t *script;
@ -471,7 +471,7 @@ ED_LoadFromFile (progs_t *pr, const char *data)
}
}
void
VISIBLE void
ED_EntityParseFunction (progs_t *pr)
{
pr->edict_parse = P_FUNCTION (pr, 0);

View File

@ -69,7 +69,7 @@ PR_GlobalAtOfs (progs_t * pr, int ofs)
return NULL;
}
ddef_t *
VISIBLE ddef_t *
PR_FieldAtOfs (progs_t * pr, int ofs)
{
ddef_t *def;
@ -83,25 +83,25 @@ PR_FieldAtOfs (progs_t * pr, int ofs)
return NULL;
}
ddef_t *
VISIBLE ddef_t *
PR_FindField (progs_t * pr, const char *name)
{
return Hash_Find (pr->field_hash, name);
}
ddef_t *
VISIBLE ddef_t *
PR_FindGlobal (progs_t * pr, const char *name)
{
return Hash_Find (pr->global_hash, name);
}
dfunction_t *
VISIBLE dfunction_t *
PR_FindFunction (progs_t * pr, const char *name)
{
return Hash_Find (pr->function_hash, name);
}
void
VISIBLE void
PR_Undefined (progs_t *pr, const char *type, const char *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;
}
void
VISIBLE void
PR_Resources_Init (progs_t *pr)
{
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,
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);
}
void *
VISIBLE void *
PR_Resources_Find (progs_t *pr, const char *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)
{
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)
{
return get_string (pr, num) != 0;
}
const char *
VISIBLE const char *
PR_GetString (progs_t *pr, int num)
{
const char *str;
@ -298,7 +298,7 @@ PR_GetString (progs_t *pr, int num)
PR_RunError (pr, "Invalid string offset %d", num);
}
dstring_t *
VISIBLE dstring_t *
PR_GetMutableString (progs_t *pr, int num)
{
strref_t *ref = get_strref (pr, num);
@ -330,7 +330,7 @@ pr_strdup (progs_t *pr, const char *s)
return new;
}
int
VISIBLE int
PR_SetString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -360,7 +360,7 @@ PR_ClearReturnStrings (progs_t *pr)
}
}
int
VISIBLE int
PR_SetReturnString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -415,7 +415,7 @@ PR_CatStrings (progs_t *pr, const char *a, const char *b)
return pr_settempstring (pr, c);
}
int
VISIBLE int
PR_SetTempString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -430,7 +430,7 @@ PR_SetTempString (progs_t *pr, const char *s)
return pr_settempstring (pr, pr_strdup (pr, s));
}
int
VISIBLE int
PR_SetDynamicString (progs_t *pr, const char *s)
{
strref_t *sr;
@ -469,7 +469,7 @@ PR_MakeTempString (progs_t *pr, int str)
pr->pr_xtstr = sr;
}
int
VISIBLE int
PR_NewMutableString (progs_t *pr)
{
strref_t *sr = new_string_ref (pr);
@ -478,7 +478,7 @@ PR_NewMutableString (progs_t *pr)
return string_index (pr, sr);
}
void
VISIBLE void
PR_FreeString (progs_t *pr, int str)
{
strref_t *sr = get_strref (pr, str);
@ -636,7 +636,7 @@ free_fmt_item (fmt_item_t *fi)
#undef P_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,
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);
}
void
VISIBLE void
PR_Zone_Free (progs_t *pr, void *ptr)
{
Z_Free (pr->zone, ptr);
}
void *
VISIBLE void *
PR_Zone_Malloc (progs_t *pr, int size)
{
return Z_Malloc (pr->zone, size);
}
void *
VISIBLE void *
PR_Zone_Realloc (progs_t *pr, void *ptr, int size)
{
return Z_Realloc (pr->zone, ptr, size);

View File

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

View File

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

View File

@ -68,7 +68,7 @@ const char rcsid[] =
#include "gib_classes.h"
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;
@ -96,7 +96,7 @@ GIB_Builtin_Free (void *ele, void *ptr)
Registers a new builtin GIB command.
*/
void
VISIBLE void
GIB_Builtin_Add (const char *name, void (*func) (void))
{
gib_builtin_t *new;
@ -111,7 +111,7 @@ GIB_Builtin_Add (const char *name, void (*func) (void))
Hash_Add (gib_builtins, new);
}
void
VISIBLE void
GIB_Builtin_Remove (const char *name)
{
gib_builtin_t *del;
@ -120,7 +120,7 @@ GIB_Builtin_Remove (const char *name)
Hash_Free (gib_builtins, del);
}
qboolean
VISIBLE qboolean
GIB_Builtin_Exists (const char *name)
{
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,
zero otherwise.
*/
gib_builtin_t *
VISIBLE gib_builtin_t *
GIB_Builtin_Find (const char *name)
{
if (!gib_builtins)
@ -141,7 +141,7 @@ GIB_Builtin_Find (const char *name)
return (gib_builtin_t *) Hash_Find (gib_builtins, name);
}
dstring_t *
VISIBLE dstring_t *
GIB_Return (const char *str)
{
dstring_t *dstr;
@ -157,7 +157,7 @@ GIB_Return (const char *str)
return 0;
}
void
VISIBLE void
GIB_Error (const char *type, const char *fmt, ...)
{
va_list args;

View File

@ -95,7 +95,7 @@ GIB_Exec_Override_f (void)
Hunk_FreeToLowMark (mark);
}
void
VISIBLE void
GIB_Init (qboolean sandbox)
{
// 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;
}
qboolean gib_parse_error;
VISIBLE qboolean gib_parse_error;
unsigned int gib_parse_error_pos;
const char *gib_parse_error_msg;

View File

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

View File

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

View File

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

View File

@ -49,7 +49,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h"
tex_t *
VISIBLE tex_t *
LoadPCX (QFile *f, int convert, byte *pal)
{
pcx_t *pcx;
@ -140,7 +140,7 @@ LoadPCX (QFile *f, int convert, byte *pal)
return tex;
}
pcx_t *
VISIBLE pcx_t *
EncodePCX (byte * data, int width, int height,
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 */
tex_t *
VISIBLE tex_t *
LoadPNG (QFile *infile)
{
double gamma;
@ -196,7 +196,7 @@ LoadPNG (QFile *infile)
#define WRITEPNG_BIT_DEPTH 8
void
VISIBLE void
WritePNG (const char *fileName, byte *data, int width, int height)
{
QFile *outfile;
@ -282,13 +282,13 @@ WritePNG (const char *fileName, byte *data, int width, int height)
#include "QF/image.h"
#include "QF/png.h"
tex_t *
VISIBLE tex_t *
LoadPNG (QFile *infile)
{
return 0;
}
void
VISIBLE void
WritePNG (const char *fileName, byte *data, int width, int height)
{
return;

View File

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

View File

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

View File

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

View File

@ -53,7 +53,7 @@ static __attribute__ ((used)) const char rcsid[] =
#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

View File

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

View File

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

View File

@ -55,9 +55,9 @@ static __attribute__ ((used)) const char rcsid[] =
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)
{
float d;
@ -117,7 +117,7 @@ Mod_DecompressVis (byte * in, model_t *model)
return decompressed;
}
byte *
VISIBLE byte *
Mod_LeafPVS (mleaf_t *leaf, model_t *model)
{
if (leaf == model->leafs)

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS= foreign
AM_CFLAGS= @PREFER_PIC@
CFLAGS+= @PREFER_PIC@
INCLUDES= -I$(top_srcdir)/include
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);
}
qboolean
VISIBLE qboolean
MOD_TraceLine (hull_t *hull, int num,
const vec3_t start_point, const vec3_t end_point,
trace_t *trace)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -112,7 +112,7 @@ RUA_Cbuf_Init (progs_t *pr, int secure)
PR_RegisterBuiltins (pr, builtins);
}
void
VISIBLE void
RUA_Cbuf_SetCbuf (progs_t *pr, cbuf_t *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,
};
void
VISIBLE void
RUA_Init (progs_t *pr, int secure)
{
size_t i;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -76,19 +76,19 @@ static unsigned short crctable[256] = {
};
void
VISIBLE void
CRC_Init (unsigned short *crcvalue)
{
*crcvalue = CRC_INIT_VALUE;
}
void
VISIBLE void
CRC_ProcessByte (unsigned short *crcvalue, byte data)
{
*crcvalue = (*crcvalue << 8) ^ crctable[(*crcvalue >> 8) ^ data];
}
void
VISIBLE void
CRC_ProcessBlock (byte *start, unsigned short *crcvalue, int count)
{
unsigned short crc = *crcvalue;
@ -103,7 +103,7 @@ CRC_Value (unsigned short crcvalue)
return crcvalue ^ CRC_XOR_VALUE;
}
unsigned short
VISIBLE unsigned short
CRC_Block (byte *start, int count)
{
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_CVAR "User-created cvar"
cvar_t *developer;
cvar_t *cvar_vars;
const char *cvar_null_string = "";
cvar_alias_t *calias_vars;
hashtab_t *cvar_hash;
hashtab_t *calias_hash;
VISIBLE cvar_t *developer;
VISIBLE cvar_t *cvar_vars;
static const char *cvar_null_string = "";
static cvar_alias_t *calias_vars;
static hashtab_t *cvar_hash;
static hashtab_t *calias_hash;
cvar_t *
VISIBLE cvar_t *
Cvar_FindVar (const char *var_name)
{
return (cvar_t*) Hash_Find (cvar_hash, var_name);
}
cvar_t *
VISIBLE cvar_t *
Cvar_FindAlias (const char *alias_name)
{
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_t *var;
@ -121,7 +121,7 @@ Cvar_VariableValue (const char *var_name)
return atof (var->string);
}
const char *
VISIBLE const char *
Cvar_VariableString (const char *var_name)
{
cvar_t *var;
@ -134,7 +134,7 @@ Cvar_VariableString (const char *var_name)
return var->string;
}
const char *
VISIBLE const char *
Cvar_CompleteVariable (const char *partial)
{
cvar_t *cvar;
@ -176,7 +176,7 @@ Cvar_CompleteVariable (const char *partial)
Added by EvilTypeGuy
Thanks to Fett erich@heintz.com
*/
int
VISIBLE int
Cvar_CompleteCountPossible (const char *partial)
{
cvar_t *cvar;
@ -205,7 +205,7 @@ Cvar_CompleteCountPossible (const char *partial)
Thanks to Fett erich@heintz.com
Thanks to taniwha
*/
const char **
VISIBLE const char **
Cvar_CompleteBuildList (const char *partial)
{
cvar_t *cvar;
@ -227,7 +227,7 @@ Cvar_CompleteBuildList (const char *partial)
return buf;
}
void
VISIBLE void
Cvar_Set (cvar_t *var, const char *value)
{
int changed;
@ -282,7 +282,7 @@ Cvar_SetROM (cvar_t *var, const char *value)
var->callback (var);
}
void
VISIBLE void
Cvar_SetValue (cvar_t *var, float 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
*/
qboolean
VISIBLE qboolean
Cvar_Command (void)
{
cvar_t *v;
@ -321,7 +321,7 @@ Cvar_Command (void)
Writes lines containing "seta variable value" for all variables
with the archive flag set to true.
*/
void
VISIBLE void
Cvar_WriteVariables (QFile *f)
{
cvar_t *var;
@ -465,14 +465,14 @@ calias_get_key (void *c, void *unused)
return calias->name;
}
void
VISIBLE void
Cvar_Init_Hash (void)
{
cvar_hash = Hash_NewTable (1021, cvar_get_key, cvar_free, 0);
calias_hash = Hash_NewTable (1021, calias_get_key, calias_free, 0);
}
void
VISIBLE void
Cvar_Init (void)
{
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,
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
*/
void
VISIBLE void
Cvar_SetFlags (cvar_t *var, int cvarflags)
{
if (var == NULL)

View File

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

View File

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

View File

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

View File

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

View File

@ -52,7 +52,7 @@ llist_newnode (llist_t *list, void *data)
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_t *new = calloc (1, sizeof (llist_t));
@ -64,7 +64,7 @@ llist_new (void (*freedata)(void *element, void *userdata), qboolean (*cmpdata)(
return new;
}
void
VISIBLE void
llist_flush (llist_t *list)
{
llist_node_t *node, *next;
@ -80,7 +80,7 @@ llist_flush (llist_t *list)
list->start = list->end = 0;
}
void
VISIBLE void
llist_delete (llist_t *list)
{
if (!list)
@ -90,7 +90,7 @@ llist_delete (llist_t *list)
free (list);
}
llist_node_t *
VISIBLE llist_node_t *
llist_append (llist_t *list, void *element)
{
llist_node_t *node = llist_newnode (list, element);
@ -107,7 +107,7 @@ llist_append (llist_t *list, void *element)
return node;
}
llist_node_t *
VISIBLE llist_node_t *
llist_prefix (llist_t *list, void *element)
{
llist_node_t *node = llist_newnode (list, element);
@ -125,7 +125,7 @@ llist_prefix (llist_t *list, void *element)
return node;
}
llist_node_t *
VISIBLE llist_node_t *
llist_getnode (llist_t *list, void *element)
{
llist_node_t *node;
@ -139,7 +139,7 @@ llist_getnode (llist_t *list, void *element)
return 0;
}
llist_node_t *
VISIBLE llist_node_t *
llist_insertafter (llist_node_t *ref, void *element)
{
llist_node_t *node = llist_newnode (ref->parent, element);
@ -158,7 +158,7 @@ llist_insertafter (llist_node_t *ref, void *element)
return node;
}
llist_node_t *
VISIBLE llist_node_t *
llist_insertbefore (llist_node_t *ref, void *element)
{
llist_node_t *node = llist_newnode (ref->parent, element);
@ -177,7 +177,7 @@ llist_insertbefore (llist_node_t *ref, void *element)
return node;
}
void *
VISIBLE void *
llist_remove (llist_node_t *ref)
{
void *element;
@ -201,7 +201,7 @@ llist_remove (llist_node_t *ref)
return element;
}
unsigned int
VISIBLE unsigned int
llist_size (llist_t *llist)
{
unsigned int i;
@ -214,7 +214,7 @@ llist_size (llist_t *llist)
return i;
}
void
VISIBLE void
llist_iterate (llist_t *list, llist_iterator_t iterate)
{
llist_node_t *node;
@ -229,7 +229,7 @@ llist_iterate (llist_t *list, llist_iterator_t iterate)
list->iter = 0;
}
void *
VISIBLE void *
llist_find (llist_t *list, void *comparison)
{
llist_node_t *node;
@ -242,7 +242,7 @@ llist_find (llist_t *list, void *comparison)
return 0;
}
llist_node_t *
VISIBLE llist_node_t *
llist_findnode (llist_t *list, void *comparison)
{
llist_node_t *node;
@ -255,7 +255,7 @@ llist_findnode (llist_t *list, void *comparison)
return 0;
}
void *
VISIBLE void *
llist_createarray (llist_t *list, size_t 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/sys.h"
int nanmask = 255 << 23;
VISIBLE int nanmask = 255 << 23;
static mplane_t _frustum[4];
mplane_t *const frustum = _frustum;
VISIBLE mplane_t *const frustum = _frustum;
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))
@ -100,7 +100,7 @@ PerpendicularVector (vec3_t dst, const vec3_t src)
# pragma optimize( "", off )
#endif
void
VISIBLE void
VectorVectors(const vec3_t forward, vec3_t right, vec3_t up)
{
float d;
@ -115,7 +115,7 @@ VectorVectors(const vec3_t forward, vec3_t right, vec3_t up)
CrossProduct(right, forward, up);
}
void
VISIBLE void
RotatePointAroundVector (vec3_t dst, const vec3_t axis, const vec3_t point,
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)
{
vec_t s;
@ -186,7 +186,7 @@ QuatMult (const quat_t v1, const quat_t v2, quat_t out)
# pragma optimize( "", on )
#endif
float
VISIBLE float
anglemod (float a)
{
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.
*/
void __attribute__ ((noreturn)) BOPS_Error (void);
void __attribute__ ((noreturn))
VISIBLE void __attribute__ ((noreturn))
BOPS_Error (void)
{
Sys_Error ("BoxOnPlaneSide: Bad signbits");
@ -212,7 +212,7 @@ BOPS_Error (void)
Returns 1, 2, or 1 + 2
*/
int
VISIBLE int
BoxOnPlaneSide (const vec3_t emins, const vec3_t emaxs, mplane_t *p)
{
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
[up]
*/
void
VISIBLE void
AngleVectors (const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
{
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;
}
int
VISIBLE int
_VectorCompare (const vec3_t v1, const vec3_t v2)
{
int i;
@ -393,7 +393,7 @@ _VectorCompare (const vec3_t v1, const vec3_t v2)
return 1;
}
void
VISIBLE void
_VectorMA (const vec3_t veca, float scale, const vec3_t vecb, vec3_t vecc)
{
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];
}
vec_t
VISIBLE vec_t
_DotProduct (const vec3_t v1, const vec3_t v2)
{
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)
{
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];
}
void
VISIBLE void
_VectorAdd (const vec3_t veca, const vec3_t vecb, vec3_t out)
{
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];
}
void
VISIBLE void
_VectorCopy (const vec3_t in, vec3_t out)
{
out[0] = in[0];
@ -431,7 +431,7 @@ _VectorCopy (const vec3_t in, vec3_t out)
out[2] = in[2];
}
void
VISIBLE void
CrossProduct (const vec3_t v1, const vec3_t v2, vec3_t cross)
{
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;
}
vec_t
VISIBLE vec_t
_VectorLength (const vec3_t v)
{
float length;
@ -455,7 +455,7 @@ _VectorLength (const vec3_t v)
return length;
}
vec_t
VISIBLE vec_t
_VectorNormalize (vec3_t v)
{
int i;
@ -474,15 +474,7 @@ _VectorNormalize (vec3_t v)
return length;
}
void
VectorInverse (vec3_t v)
{
v[0] = -v[0];
v[1] = -v[1];
v[2] = -v[2];
}
void
VISIBLE void
_VectorScale (const vec3_t in, vec_t scale, vec3_t out)
{
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;
}
int
VISIBLE int
Q_log2 (int val)
{
int answer = 0;
@ -500,7 +492,7 @@ Q_log2 (int val)
return answer;
}
void
VISIBLE void
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] +
@ -523,7 +515,7 @@ R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3])
in1[2][2] * in2[2][2];
}
void
VISIBLE void
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] +
@ -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
quotient must fit in 32 bits.
*/
void
VISIBLE void
FloorDivMod (double numer, double denom, int *quotient, int *rem)
{
double x;
@ -594,7 +586,7 @@ FloorDivMod (double numer, double denom, int *quotient, int *rem)
*rem = r;
}
int
VISIBLE int
GreatestCommonDivisor (int i1, int i2)
{
if (i1 > i2) {
@ -614,7 +606,7 @@ GreatestCommonDivisor (int i1, int i2)
Inverts an 8.24 value to a 16.16 value
*/
fixed16_t
VISIBLE fixed16_t
Invert24To16 (fixed16_t val)
{
if (val < 256)

View File

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

View File

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

View File

@ -54,7 +54,7 @@ pack_get_key (void *p, void *unused)
return ((dpackfile_t *) p)->name;
}
pack_t *
VISIBLE pack_t *
pack_new (const char *name)
{
pack_t *pack = calloc (sizeof (*pack), 1);
@ -75,7 +75,7 @@ pack_new (const char *name)
return pack;
}
void
VISIBLE void
pack_del (pack_t *pack)
{
if (pack->files)
@ -89,7 +89,7 @@ pack_del (pack_t *pack)
free (pack);
}
void
VISIBLE void
pack_rehash (pack_t *pack)
{
int i;
@ -99,7 +99,7 @@ pack_rehash (pack_t *pack)
}
}
pack_t *
VISIBLE pack_t *
pack_open (const char *name)
{
pack_t *pack = pack_new (name);
@ -148,7 +148,7 @@ error:
return 0;
}
pack_t *
VISIBLE pack_t *
pack_create (const char *name)
{
pack_t *pack = pack_new (name);
@ -168,7 +168,7 @@ pack_create (const char *name)
return pack;
}
void
VISIBLE void
pack_close (pack_t *pack)
{
int i;
@ -196,7 +196,7 @@ pack_close (pack_t *pack)
pack_del (pack);
}
int
VISIBLE int
pack_add (pack_t *pack, const char *filename)
{
dpackfile_t *pf;
@ -249,7 +249,7 @@ pack_add (pack_t *pack, const char *filename)
return 0;
}
int
VISIBLE int
pack_extract (pack_t *pack, dpackfile_t *pf)
{
const char *name = pf->name;
@ -276,7 +276,7 @@ pack_extract (pack_t *pack, dpackfile_t *pf)
return 0;
}
dpackfile_t *
VISIBLE dpackfile_t *
pack_find_file (pack_t *pack, const char *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,
since we aren't using libltdl yet.
*/
void
VISIBLE void
PI_Init (void)
{
PI_InitCvars ();
@ -262,7 +262,7 @@ PI_Shutdown (void)
}
plugin_t *
VISIBLE plugin_t *
PI_LoadPlugin (const char *type, const char *name)
{
char realname[4096];
@ -378,7 +378,7 @@ PI_LoadPlugin (const char *type, const char *name)
return plugin;
}
qboolean
VISIBLE qboolean
PI_UnloadPlugin (plugin_t *plugin)
{
if (plugin
@ -399,7 +399,7 @@ PI_UnloadPlugin (plugin_t *plugin)
return pi_close_lib (plugin->handle);
}
void
VISIBLE void
PI_RegisterPlugins (plugin_list_t *plugins)
{
while (plugins->name)

View File

@ -59,11 +59,11 @@ static const char *safeargvs[] =
#define NUM_SAFE_ARGVS ((int) (sizeof(safeargvs)/sizeof(safeargvs[0])))
int com_argc;
const char **com_argv;
VISIBLE int com_argc;
VISIBLE const char **com_argv;
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
where the given parameter apears, or 0 if not present
*/
int
VISIBLE int
COM_CheckParm (const char *parm)
{
int i;
@ -88,7 +88,7 @@ COM_CheckParm (const char *parm)
return 0;
}
void
VISIBLE void
COM_InitArgv (int argc, const char **argv)
{
qboolean safe;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -43,7 +43,7 @@ static __attribute__ ((used)) const char rcsid[] =
#include "QF/zone.h"
void
VISIBLE void
SZ_Alloc (sizebuf_t *buf, int startsize)
{
if (startsize < 256)
@ -53,14 +53,14 @@ SZ_Alloc (sizebuf_t *buf, int startsize)
buf->cursize = 0;
}
void
VISIBLE void
SZ_Clear (sizebuf_t *buf)
{
buf->cursize = 0;
buf->overflowed = false;
}
void *
VISIBLE void *
SZ_GetSpace (sizebuf_t *buf, int length)
{
void *data;
@ -85,13 +85,13 @@ getspace:
goto getspace;
}
void
VISIBLE void
SZ_Write (sizebuf_t *buf, const void *data, int length)
{
memcpy (SZ_GetSpace (buf, length), data, length);
}
void
VISIBLE void
SZ_Print (sizebuf_t *buf, const char *data)
{
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_ErrPrintf (const char *fmt, va_list args);
cvar_t *sys_nostdout;
cvar_t *sys_extrasleep;
VISIBLE cvar_t *sys_nostdout;
VISIBLE cvar_t *sys_extrasleep;
cvar_t *sys_dead_sleep;
cvar_t *sys_sleep;
@ -99,7 +99,7 @@ qboolean stdin_ready;
#endif
/* 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', '#', '#', '#', '#', '.', '#', '#',
'#', 9, 10, '#', ' ', 13, '.', '.',
'[', ']', '0', '1', '2', '3', '4', '5',
@ -169,7 +169,7 @@ Sys_mkdir (const char *path)
return 0;
}
int
VISIBLE int
Sys_FileTime (const char *path)
{
#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
actual implementation of Sys_Printf.
*/
void
VISIBLE void
Sys_SetStdPrintf (sys_printf_t func)
{
sys_std_printf_function = func;
}
void
VISIBLE void
Sys_SetErrPrintf (sys_printf_t func)
{
sys_err_printf_function = func;
@ -246,7 +246,7 @@ Sys_ErrPrintf (const char *fmt, va_list args)
Sys_Print (stderr, fmt, args);
}
void
VISIBLE void
Sys_Printf (const char *fmt, ...)
{
va_list args;
@ -255,7 +255,7 @@ Sys_Printf (const char *fmt, ...)
va_end (args);
}
void
VISIBLE void
Sys_DPrintf (const char *fmt, ...)
{
va_list args;
@ -267,7 +267,7 @@ Sys_DPrintf (const char *fmt, ...)
va_end (args);
}
double
VISIBLE double
Sys_DoubleTime (void)
{
static qboolean first = true;
@ -309,7 +309,7 @@ Sys_DoubleTime (void)
#endif
}
void
VISIBLE void
Sys_TimeOfDay (date_t *date)
{
struct tm *newtime;
@ -364,7 +364,7 @@ Sys_MakeCodeWriteable (unsigned long startaddr, unsigned long length)
#endif
}
void
VISIBLE void
Sys_Init_Cvars (void)
{
sys_nostdout = Cvar_Get ("sys_nostdout", "0", CVAR_NONE, NULL,
@ -397,7 +397,7 @@ Sys_Shutdown (void)
}
}
void
VISIBLE void
Sys_Quit (void)
{
Sys_Shutdown ();
@ -413,7 +413,7 @@ Sys_Quit (void)
# define VA_COPY(a,b) memcpy (a, b, sizeof (a))
#endif
void
VISIBLE void
Sys_Error (const char *error, ...)
{
va_list args;
@ -442,7 +442,7 @@ Sys_Error (const char *error, ...)
exit (1);
}
void
VISIBLE void
Sys_RegisterShutdown (void (*func) (void))
{
shutdown_list_t *p;
@ -456,7 +456,7 @@ Sys_RegisterShutdown (void (*func) (void))
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
{
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;
}
void
VISIBLE void
Sys_PageIn (void *ptr, int size)
{
//may or may not be useful in linux #ifdef _WIN32
@ -489,7 +489,7 @@ Sys_PageIn (void *ptr, int size)
//#endif
}
void
VISIBLE void
Sys_DebugLog (const char *file, const char *fmt, ...)
{
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)
{
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
it to the host command processor
*/
const char *
VISIBLE const char *
Sys_ConsoleInput (void)
{
static char text[256];
@ -632,7 +632,7 @@ static sh_stack_t *free_sh;
static int (*signal_hook)(int,void*);
static void *signal_hook_data;
void
VISIBLE void
Sys_PushSignalHook (int (*hook)(int, void *), void *data)
{
sh_stack_t *s;
@ -653,7 +653,7 @@ Sys_PushSignalHook (int (*hook)(int, void *), void *data)
sh_stack = s;
}
void
VISIBLE void
Sys_PopSignalHook (void)
{
if (sh_stack) {
@ -734,7 +734,7 @@ signal_handler (int sig)
}
}
void
VISIBLE void
Sys_Init (void)
{
// 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
varargs versions of all text functions.
*/
char *
VISIBLE char *
va (const char *fmt, ...)
{
va_list args;
@ -66,7 +66,7 @@ va (const char *fmt, ...)
return string->str;
}
char *
VISIBLE char *
nva (const char *fmt, ...)
{
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
they are equal, return zero.
*/
int
VISIBLE int
ver_compare (const char *value, const char *reference)
{
const char *valptr, *refptr;

View File

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

View File

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

View File

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

View File

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

View File

@ -158,7 +158,7 @@ Draw_InitText (void)
}
}
qpic_t *
VISIBLE qpic_t *
Draw_PicFromWad (const char *name)
{
glpic_t *gl;
@ -196,7 +196,7 @@ Draw_ClearCache (void)
pic->dirty = true;
}
qpic_t *
VISIBLE qpic_t *
Draw_CachePic (const char *path, qboolean alpha)
{
cachepic_t *pic;
@ -254,7 +254,7 @@ Draw_CachePic (const char *path, qboolean alpha)
return &pic->pic;
}
void
VISIBLE void
Draw_TextBox (int x, int y, int width, int lines, byte alpha)
{
int cx, cy, n;
@ -308,7 +308,7 @@ Draw_TextBox (int x, int y, int width, int lines, byte alpha)
qfglColor3ubv (color_white);
}
void
VISIBLE void
Draw_Init (void)
{
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
smoothly scrolled off.
*/
void
VISIBLE void
Draw_Character (int x, int y, unsigned int chr)
{
chr &= 255;
@ -443,7 +443,7 @@ Draw_Character (int x, int y, unsigned int chr)
tVA_increment ();
}
void
VISIBLE void
Draw_String (int x, int y, const char *str)
{
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)
{
unsigned char chr;
@ -572,7 +572,7 @@ static void (*crosshair_func[]) (int x, int y) = {
crosshair_3,
};
void
VISIBLE void
Draw_Crosshair (void)
{
int x, y;
@ -598,7 +598,7 @@ Draw_CrosshairAt (int ch, int x, int y)
crosshair_func[ch] (x, y);
}
void
VISIBLE void
Draw_Pic (int x, int y, qpic_t *pic)
{
glpic_t *gl;
@ -618,7 +618,7 @@ Draw_Pic (int x, int y, qpic_t *pic)
qfglEnd ();
}
void
VISIBLE void
Draw_SubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
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
several simple yet very cool GL effects. --KB
*/
void
VISIBLE void
Draw_ConsoleBackground (int lines, byte alpha)
{
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
refresh window.
*/
void
VISIBLE void
Draw_TileClear (int x, int y, int w, int h)
{
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
*/
void
VISIBLE void
Draw_Fill (int x, int y, int w, int h, int c)
{
qfglDisable (GL_TEXTURE_2D);
@ -769,7 +769,7 @@ Draw_Fill (int x, int y, int w, int h, int c)
qfglEnable (GL_TEXTURE_2D);
}
void
VISIBLE void
Draw_FadeScreen (void)
{
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)
{
numparticles = 0;
@ -1767,7 +1767,7 @@ R_ParticleFunctionInit (void)
r_easter_eggs_f (easter_eggs);
}
void
VISIBLE void
R_Particles_Init_Cvars (void)
{
R_ParticleFunctionInit ();

View File

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

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