}
}
-void SCR_CaptureVideo_Avi_EndVideo()
+void SCR_CaptureVideo_Avi_EndVideo(void)
{
LOAD_FORMATSPECIFIC_AVI();
}
}
-void SCR_CaptureVideo_Avi_BeginVideo()
+void SCR_CaptureVideo_Avi_BeginVideo(void)
{
int width = cls.capturevideo.width;
int height = cls.capturevideo.height;
-void SCR_CaptureVideo_Avi_BeginVideo();
+void SCR_CaptureVideo_Avi_BeginVideo(void);
static dllhandle_t og_dll = NULL, vo_dll = NULL, ve_dll = NULL, th_dll = NULL;
-qboolean SCR_CaptureVideo_Ogg_OpenLibrary()
+qboolean SCR_CaptureVideo_Ogg_OpenLibrary(void)
{
const char* dllnames_og [] =
{
Sys_LoadLibrary (dllnames_ve, &ve_dll, vorbisencfuncs);
}
-void SCR_CaptureVideo_Ogg_Init()
+void SCR_CaptureVideo_Ogg_Init(void)
{
SCR_CaptureVideo_Ogg_OpenLibrary();
Cvar_RegisterVariable(&cl_capturevideo_ogg_vorbis_quality);
}
-qboolean SCR_CaptureVideo_Ogg_Available()
+qboolean SCR_CaptureVideo_Ogg_Available(void)
{
return og_dll && th_dll && vo_dll && ve_dll;
}
-void SCR_CaptureVideo_Ogg_CloseDLL()
+void SCR_CaptureVideo_Ogg_CloseDLL(void)
{
Sys_UnloadLibrary (&ve_dll);
Sys_UnloadLibrary (&vo_dll);
capturevideostate_ogg_formatspecific_t;
#define LOAD_FORMATSPECIFIC_OGG() capturevideostate_ogg_formatspecific_t *format = (capturevideostate_ogg_formatspecific_t *) cls.capturevideo.formatspecific
-static void SCR_CaptureVideo_Ogg_Interleave()
+static void SCR_CaptureVideo_Ogg_Interleave(void)
{
LOAD_FORMATSPECIFIC_OGG();
ogg_page pg;
}
}
-static void SCR_CaptureVideo_Ogg_FlushInterleaving()
+static void SCR_CaptureVideo_Ogg_FlushInterleaving(void)
{
LOAD_FORMATSPECIFIC_OGG();
}
}
-static void SCR_CaptureVideo_Ogg_EndVideo()
+static void SCR_CaptureVideo_Ogg_EndVideo(void)
{
LOAD_FORMATSPECIFIC_OGG();
ogg_page pg;
cls.capturevideo.videofile = NULL;
}
-static void SCR_CaptureVideo_Ogg_ConvertFrame_BGRA_to_YUV()
+static void SCR_CaptureVideo_Ogg_ConvertFrame_BGRA_to_YUV(void)
{
LOAD_FORMATSPECIFIC_OGG();
yuv_buffer *yuv;
SCR_CaptureVideo_Ogg_Interleave();
}
-void SCR_CaptureVideo_Ogg_BeginVideo()
+void SCR_CaptureVideo_Ogg_BeginVideo(void)
{
cls.capturevideo.format = CAPTUREVIDEOFORMAT_OGG_VORBIS_THEORA;
cls.capturevideo.formatextension = "ogv";
-void SCR_CaptureVideo_Ogg_Init();
-qboolean SCR_CaptureVideo_Ogg_Available();
-void SCR_CaptureVideo_Ogg_BeginVideo();
-void SCR_CaptureVideo_Ogg_CloseDLL();
+void SCR_CaptureVideo_Ogg_Init(void);
+qboolean SCR_CaptureVideo_Ogg_Available(void);
+void SCR_CaptureVideo_Ogg_BeginVideo(void);
+void SCR_CaptureVideo_Ogg_CloseDLL(void);
CDAudio_Play_byName(buf, looping);
}
-float CDAudio_GetPosition ()
+float CDAudio_GetPosition (void)
{
if(faketrack != -1)
return S_GetChannelPosition(faketrack);
SCR_DrawInfobar
==============
*/
-static void SCR_DrawInfobar()
+static void SCR_DrawInfobar(void)
{
int offset = 0;
if(scr_infobartime_off > 0)
Con_DPrintf("broken console margin calculation: %d != %d\n", offset, scr_con_margin_bottom);
}
-static int SCR_InfobarHeight()
+static int SCR_InfobarHeight(void)
{
int offset = 0;
Curl_downloadinfo_t *downinfo;
static float loadingscreentexture_vertex3f[12];
static float loadingscreentexture_texcoord2f[8];
-static void SCR_ClearLoadingScreenTexture()
+static void SCR_ClearLoadingScreenTexture(void)
{
if(loadingscreentexture)
R_FreeTexture(loadingscreentexture);
}
extern rtexturepool_t *r_main_texturepool;
-static void SCR_SetLoadingScreenTexture()
+static void SCR_SetLoadingScreenTexture(void)
{
int w, h;
float loadingscreentexture_w;
loadingscreentexture_texcoord2f[6] = 0;loadingscreentexture_texcoord2f[7] = 0;
}
-void SCR_UpdateLoadingScreenIfShown()
+void SCR_UpdateLoadingScreenIfShown(void)
{
if(realtime == loadingscreentime)
SCR_UpdateLoadingScreen(loadingscreencleared);
return total;
}
-static void SCR_DrawLoadingStack()
+static void SCR_DrawLoadingStack(void)
{
float verts[12];
float colors[16];
qfile_t *videofile;
// always use this:
// cls.capturevideo.videofile = FS_OpenRealFile(va("%s.%s", cls.capturevideo.basename, cls.capturevideo.formatextension), "wb", false);
- void (*endvideo) ();
+ void (*endvideo) (void);
void (*videoframes) (int num);
void (*soundframe) (const portable_sampleframe_t *paintbuffer, size_t length);
Log_DestBuffer_Init
====================
*/
-static void Log_DestBuffer_Init()
+static void Log_DestBuffer_Init(void)
{
memcpy(log_dest_buffer, "\377\377\377\377n", 5); // QW rcon print
log_dest_buffer_pos = 5;
Log_DestBuffer_Flush
====================
*/
-void Log_DestBuffer_Flush()
+void Log_DestBuffer_Flush(void)
{
lhnetaddress_t log_dest_addr;
lhnetsocket_t *log_dest_socket;
rcon_redirect_bufferpos = 5;
}
-void Con_Rcon_Redirect_Flush()
+void Con_Rcon_Redirect_Flush(void)
{
rcon_redirect_buffer[rcon_redirect_bufferpos] = 0;
NetConn_WriteString(rcon_redirect_sock, rcon_redirect_buffer, rcon_redirect_dest);
rcon_redirect_bufferpos = 5;
}
-void Con_Rcon_Redirect_End()
+void Con_Rcon_Redirect_End(void)
{
Con_Rcon_Redirect_Flush();
rcon_redirect_dest = NULL;
rcon_redirect_sock = NULL;
}
-void Con_Rcon_Redirect_Abort()
+void Con_Rcon_Redirect_Abort(void)
{
rcon_redirect_dest = NULL;
rcon_redirect_sock = NULL;
extern qboolean con_initialized;
void Con_Rcon_Redirect_Init(lhnetsocket_t *sock, lhnetaddress_t *dest);
-void Con_Rcon_Redirect_End();
-void Con_Rcon_Redirect_Abort();
+void Con_Rcon_Redirect_End(void);
+void Con_Rcon_Redirect_Abort(void);
/// If the line width has changed, reformat the buffer.
void Con_CheckResize (void);
return fs_checkgamedir_missing;
}
-static void FS_ListGameDirs()
+static void FS_ListGameDirs(void)
{
stringlist_t list, list2;
int i, j;
Returns a time report string, for example for
==================
*/
-const char *Host_TimingReport()
+const char *Host_TimingReport(void)
{
return va("%.1f%% CPU, %.2f%% lost, offset avg %.1fms, max %.1fms, sdev %.1fms", svs.perf_cpuload * 100, svs.perf_lost * 100, svs.perf_offset_avg * 1000, svs.perf_offset_max * 1000, svs.perf_offset_sdev * 1000);
}
#define C_MAX_BLOCKS_IN_MCU 10
#define D_MAX_BLOCKS_IN_MCU 10
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
struct jpeg_memory_mgr
{
void* (*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject);
long max_memory_to_use;
long max_alloc_chunk;
};
+#pragma GCC diagnostic warning "-Wstrict-prototypes"
struct jpeg_error_mgr
{
extern cvar_t con_textsize;
-static void Key_History_Init()
+static void Key_History_Init(void)
{
qfile_t *historyfile;
ConBuffer_Init(&history, HIST_TEXTSIZE, HIST_MAXLINES, zonemempool);
history_line = -1;
}
-static void Key_History_Shutdown()
+static void Key_History_Shutdown(void)
{
// TODO write history to a file
ConBuffer_Shutdown(&history);
}
-static void Key_History_Push()
+static void Key_History_Push(void)
{
if(key_line[1]) // empty?
if(strcmp(key_line, "]quit")) // putting these into the history just sucks
history_line = -1;
}
-static void Key_History_Up()
+static void Key_History_Up(void)
{
if(history_line == -1) // editing the "new" line
strlcpy(history_savedline, key_line + 1, sizeof(history_savedline));
}
}
-static void Key_History_Down()
+static void Key_History_Down(void)
{
if(history_line == -1) // editing the "new" line
return;
CURLMsg;
static void (*qcurl_global_init) (long flags);
-static void (*qcurl_global_cleanup) ();
+static void (*qcurl_global_cleanup) (void);
-static CURL * (*qcurl_easy_init) ();
+static CURL * (*qcurl_easy_init) (void);
static void (*qcurl_easy_cleanup) (CURL *handle);
static CURLcode (*qcurl_easy_setopt) (CURL *handle, CURLoption option, ...);
static CURLcode (*qcurl_easy_getinfo) (CURL *handle, CURLINFO info, ...);
static const char * (*qcurl_easy_strerror) (CURLcode);
-static CURLM * (*qcurl_multi_init) ();
+static CURLM * (*qcurl_multi_init) (void);
static CURLMcode (*qcurl_multi_perform) (CURLM *multi_handle, int *running_handles);
static CURLMcode (*qcurl_multi_add_handle) (CURLM *multi_handle, CURL *easy_handle);
static CURLMcode (*qcurl_multi_remove_handle) (CURLM *multi_handle, CURL *easy_handle);
Clears the "will disconnect on failure" flags.
====================
*/
-void Curl_Clear_forthismap()
+void Curl_Clear_forthismap(void)
{
downloadinfo *di;
if(noclear)
Returns true if a download needed for the current game is running.
====================
*/
-qboolean Curl_Have_forthismap()
+qboolean Curl_Have_forthismap(void)
{
return numdownloads_added;
}
-void Curl_Register_predownload()
+void Curl_Register_predownload(void)
{
Curl_CommandWhenDone("cl_begindownloads");
Curl_CommandWhenError("cl_begindownloads");
All downloads finished, at least one success since connect, no single failure
-> execute the command.
*/
-static void Curl_CheckCommandWhenDone()
+static void Curl_CheckCommandWhenDone(void)
{
if(!curl_dll)
return;
up to a maximum number of cl_curl_maxdownloads are running.
====================
*/
-static void CheckPendingDownloads()
+static void CheckPendingDownloads(void)
{
if(!curl_dll)
return;
On Win32, this must be called AFTER WSAStartup has been done!
====================
*/
-void Curl_Init()
+void Curl_Init(void)
{
CURL_OpenLibrary();
if(!curl_dll)
Surprise... closes all the stuff. Please do this BEFORE shutting down LHNET.
====================
*/
-void Curl_ClearRequirements();
-void Curl_Shutdown()
+void Curl_ClearRequirements(void);
+void Curl_Shutdown(void)
{
if(!curl_dll)
return;
blocking.
====================
*/
-void Curl_Run()
+void Curl_Run(void)
{
noclear = FALSE;
Stops ALL downloads.
====================
*/
-void Curl_CancelAll()
+void Curl_CancelAll(void)
{
if(!curl_dll)
return;
returns true iff there is a download running.
====================
*/
-qboolean Curl_Running()
+qboolean Curl_Running(void)
{
if(!curl_dll)
return false;
====================
*/
// TODO rewrite using Curl_GetDownloadInfo?
-static void Curl_Info_f()
+static void Curl_Info_f(void)
{
downloadinfo *di;
if(!curl_dll)
This should be called at every map change.
====================
*/
-void Curl_ClearRequirements()
+void Curl_ClearRequirements(void)
{
const char *p;
while(requirements)
curl --finish_autodownload
====================
*/
-void Curl_SendRequirements()
+void Curl_SendRequirements(void)
{
// for each requirement, find the pack name
char sendbuffer[4096] = "";
typedef void (*curl_callback_t) (int status, size_t length_received, unsigned char *buffer, void *cbdata);
// code is one of the CURLCBSTATUS constants, or the HTTP error code (when > 0).
-void Curl_Run();
-qboolean Curl_Running();
+void Curl_Run(void);
+qboolean Curl_Running(void);
qboolean Curl_Begin_ToFile(const char *URL, const char *name, qboolean ispak, qboolean forthismap);
qboolean Curl_Begin_ToMemory(const char *URL, unsigned char *buf, size_t bufsize, curl_callback_t callback, void *cbdata);
// NOTE: if it returns false, the callback will NOT get called, so free your buffer then!
void Curl_Cancel_ToMemory(curl_callback_t callback, void *cbdata);
// removes all downloads with the given callback and cbdata (this does NOT call the callbacks!)
-void Curl_Init();
-void Curl_Init_Commands();
-void Curl_Shutdown();
-void Curl_CancelAll();
-void Curl_Clear_forthismap();
-qboolean Curl_Have_forthismap();
-void Curl_Register_predownload();
+void Curl_Init(void);
+void Curl_Init_Commands(void);
+void Curl_Shutdown(void);
+void Curl_CancelAll(void);
+void Curl_Clear_forthismap(void);
+qboolean Curl_Have_forthismap(void);
+void Curl_Register_predownload(void);
-void Curl_ClearRequirements();
+void Curl_ClearRequirements(void);
void Curl_RequireFile(const char *filename);
-void Curl_SendRequirements();
+void Curl_SendRequirements(void);
typedef struct Curl_downloadinfo_s
{
# Compilation
-CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) -Wall -Wsign-compare -Wdeclaration-after-statement
+CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) -Wall -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement
CFLAGS_DEBUG=-ggdb
CFLAGS_PROFILE=-g -pg -ggdb -fprofile-arcs
CFLAGS_RELEASE=
static int nFavorites = 0;
static lhnetaddress_t favorites[256];
-void NetConn_UpdateFavorites()
+void NetConn_UpdateFavorites(void)
{
const char *p;
nFavorites = 0;
void ServerList_QueryList(qboolean resetcache, qboolean querydp, qboolean queryqw, qboolean consoleoutput);
/// called whenever net_slist_favorites changes
-void NetConn_UpdateFavorites();
+void NetConn_UpdateFavorites(void);
#endif
void PRVM_CrashAll (void);
void PRVM_Crash (void);
void PRVM_ShortStackTrace(char *buf, size_t bufsize);
-const char *PRVM_AllocationOrigin();
+const char *PRVM_AllocationOrigin(void);
ddef_t *PRVM_ED_FindField(const char *name);
ddef_t *PRVM_ED_FindGlobal(const char *name);
Draw_FreePic(s);
}
-dp_font_t *getdrawfont()
+dp_font_t *getdrawfont(void)
{
if(prog->globaloffsets.drawfont >= 0)
{
PRVM_GCALL(init_edict)(e);
}
-const char *PRVM_AllocationOrigin()
+const char *PRVM_AllocationOrigin(void)
{
char *buf = NULL;
if(prog->leaktest_active)
===============
*/
-void PRVM_LeakTest();
-void PRVM_ResetProg()
+void PRVM_LeakTest(void);
+void PRVM_ResetProg(void)
{
PRVM_LeakTest();
PRVM_GCALL(reset_cmd)();
prog->leaktest_active = prvm_leaktest.integer;
}
-int PRVM_GetProgNr()
+int PRVM_GetProgNr(void)
{
return prog - prog_list;
}
return false;
}
-static void PRVM_MarkReferencedEdicts()
+static void PRVM_MarkReferencedEdicts(void)
{
int j;
qboolean found_new;
Con_DPrintf("leak check used %d stages to find all references\n", stage);
}
-void PRVM_LeakTest()
+void PRVM_LeakTest(void)
{
int i, j;
qboolean leaked = false;
}
-void PRVM_CallProfile ()
+void PRVM_CallProfile (void)
{
mfunction_t *f, *best;
int i;
PRVM_End;
}
-void PRVM_CrashAll()
+void PRVM_CrashAll(void)
{
int i;
prvm_prog_t *oldprog = prog;
//=============================================================================
-int Sbar_IsTeammatch()
+int Sbar_IsTeammatch(void)
{
// currently only nexuiz uses the team score board
return ((gamemode == GAME_NEXUIZ)
// invoke refresh of loading plaque (nothing else seen)
void SCR_UpdateLoadingScreen(qboolean clear);
-void SCR_UpdateLoadingScreenIfShown();
+void SCR_UpdateLoadingScreenIfShown(void);
// pushes an item on the loading screen
void SCR_PushLoadingScreen (qboolean redraw, const char *msg, float len_in_parent);
void SV_VM_Begin(void);
void SV_VM_End(void);
-const char *Host_TimingReport(); ///< for output in Host_Status_f
+const char *Host_TimingReport(void); ///< for output in Host_Status_f
#endif
static void SV_SaveEntFile_f(void);
static void SV_StartDownload_f(void);
static void SV_Download_f(void);
-static void SV_VM_Setup();
+static void SV_VM_Setup(void);
extern cvar_t net_connecttimeout;
void VM_CustomStats_Clear (void);
static double originalMouseSpeed = -1.0;
-io_connect_t IN_GetIOHandle()
+io_connect_t IN_GetIOHandle(void)
{
io_connect_t iohandle = MACH_PORT_NULL;
kern_return_t status;
#endif
SetClassLongPtr( info.window, GCLP_HICON, (LONG_PTR)icon );
}
-static void VID_SetIcon()
+static void VID_SetIcon(void)
{
}
#else
#include "darkplaces.xpm"
#include "nexuiz.xpm"
static SDL_Surface *icon = NULL;
-static void VID_SetIcon()
+static void VID_SetIcon(void)
{
/*
* Somewhat restricted XPM reader. Only supports XPMs saved by GIMP 2.4 at
}
-static void VID_SetCaption()
+static void VID_SetCaption(void)
{
SDL_WM_SetCaption( gamename, NULL );
}
#endif
-static void VID_OutputVersion()
+static void VID_OutputVersion(void)
{
const SDL_version *version;
version = SDL_Linked_Version();