Skip to content

Commit

Permalink
Merge pull request #48 from devnexen/yquake2_constify_port
Browse files Browse the repository at this point in the history
porting recent change on yquake2 here for message based callbacks
  • Loading branch information
0lvin authored Sep 23, 2023
2 parents 24933bc + bd6e048 commit f360fa7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/common/header/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/common/header/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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, ...);

/*
* ==========================================================
Expand Down
2 changes: 1 addition & 1 deletion src/common/shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/vk/vk_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit f360fa7

Please sign in to comment.