Skip to content

Commit

Permalink
added some missing c++ guards.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Aug 18, 2023
1 parent adc627a commit 48f94dd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
8 changes: 8 additions & 0 deletions Quake/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _QUAKE_PLATFORM_H
#define _QUAKE_PLATFORM_H

#ifdef __cplusplus
extern "C" {
#endif

/* platform dependent way to set the window icon */
void PL_SetWindowIcon(void);

Expand All @@ -36,5 +40,9 @@ char *PL_GetClipboardData (void);
/* show an error dialog */
void PL_ErrorDialog(const char *text);

#ifdef __cplusplus
}
#endif

#endif /* _QUAKE_PLATFORM_H */

9 changes: 7 additions & 2 deletions Quake/strl_fn.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
/* header file for BSD strlcat and strlcpy */
/* strl_fn.h - header file for BSD strlcat and strlcpy */

#ifndef __STRLFUNCS_H
#define __STRLFUNCS_H

/* use our own copies of strlcpy and strlcat taken from OpenBSD */
#ifdef __cplusplus
extern "C" {
#endif
extern size_t q_strlcpy (char *dst, const char *src, size_t size);
extern size_t q_strlcat (char *dst, const char *src, size_t size);
#ifdef __cplusplus
}
#endif

#endif /* __STRLFUNCS_H */

6 changes: 6 additions & 0 deletions Quake/zone.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ Zone block

void Memory_Init (void *buf, int size);

#ifdef __cplusplus
extern "C" {
#endif
void Z_Free (void *ptr);
void *Z_Malloc (int size); // returns 0 filled memory
void *Z_Realloc (void *ptr, int size);
char *Z_Strdup (const char *s);
#ifdef __cplusplus
}
#endif

void *Hunk_Alloc (int size); // returns 0 filled memory
void *Hunk_AllocName (int size, const char *name);
Expand Down

0 comments on commit 48f94dd

Please sign in to comment.