porting recent change on yquake2 here for message based callbacks

This commit is contained in:
David CARLIER 2023-09-23 21:07:31 +01:00
parent 24933bce91
commit bd6e048a1e
4 changed files with 11 additions and 11 deletions

View file

@ -740,11 +740,11 @@ void FS_CreatePath(char *path);
void Com_BeginRedirect(int target, char *buffer, int buffersize, void (*flush)(int, char *));
void Com_EndRedirect(void);
void Com_Printf(char *fmt, ...) PRINTF_ATTR(1, 2);
void Com_DPrintf(char *fmt, ...) PRINTF_ATTR(1, 2);
void Com_Printf(const char *fmt, ...) PRINTF_ATTR(1, 2);
void Com_DPrintf(const char *fmt, ...) PRINTF_ATTR(1, 2);
void Com_VPrintf(int print_level, const char *fmt, va_list argptr); /* print_level is PRINT_ALL or PRINT_DEVELOPER */
void Com_MDPrintf(char *fmt, ...) PRINTF_ATTR(1, 2);
YQ2_ATTR_NORETURN_FUNCPTR void Com_Error(int code, char *fmt, ...) PRINTF_ATTR(2, 3);
void Com_MDPrintf(const char *fmt, ...) PRINTF_ATTR(1, 2);
YQ2_ATTR_NORETURN_FUNCPTR void Com_Error(int code, const char *fmt, ...) PRINTF_ATTR(2, 3);
YQ2_ATTR_NORETURN void Com_Quit(void);
/* Ugly work around for unsupported
@ -839,7 +839,7 @@ void SV_Frame(int usec);
// system.c
char *Sys_ConsoleInput(void);
void Sys_ConsoleOutput(char *string);
YQ2_ATTR_NORETURN void Sys_Error(char *error, ...);
YQ2_ATTR_NORETURN void Sys_Error(const char *error, ...);
YQ2_ATTR_NORETURN void Sys_Quit(void);
void Sys_Init(void);
char *Sys_GetHomeDir(void);

View file

@ -315,7 +315,7 @@ void COM_DefaultExtension(char *path, const char *extension);
char *COM_Parse(char **data_p);
/* data is an in/out parm, returns a parsed out token */
void Com_sprintf(char *dest, int size, char *fmt, ...);
void Com_sprintf(char *dest, int size, const char *fmt, ...);
void Com_PageInMemory(byte *buffer, int size);
@ -410,8 +410,8 @@ char *Sys_FindNext(unsigned musthave, unsigned canthave);
void Sys_FindClose(void);
/* this is only here so the functions in shared source files can link */
YQ2_ATTR_NORETURN void Sys_Error(char *error, ...);
void Com_Printf(char *msg, ...);
YQ2_ATTR_NORETURN void Sys_Error(const char *error, ...);
void Com_Printf(const char *msg, ...);
/*
* ==========================================================

View file

@ -1075,7 +1075,7 @@ Q_strcasecmp(char *s1, char *s2)
}
void
Com_sprintf(char *dest, int size, char *fmt, ...)
Com_sprintf(char *dest, int size, const char *fmt, ...)
{
int len;
va_list argptr;

View file

@ -1770,7 +1770,7 @@ void R_Printf(int level, const char* msg, ...)
}
void
Sys_Error (char *error, ...)
Sys_Error (const char *error, ...)
{
va_list argptr;
char text[4096]; // MAXPRINTMSG == 4096
@ -1783,7 +1783,7 @@ Sys_Error (char *error, ...)
}
void
Com_Printf (char *msg, ...)
Com_Printf (const char *msg, ...)
{
va_list argptr;
va_start(argptr, msg);