1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
--- ./code/game/q_shared.h.orig Wed May 31 20:52:06 2006
+++ ./code/game/q_shared.h Wed May 31 20:54:33 2006
@@ -126,12 +126,14 @@
#define ID_INLINE __inline
+#if 0
static ID_INLINE short BigShort( short l) { return ShortSwap(l); }
#define LittleShort
static ID_INLINE int BigLong(int l) { LongSwap(l); }
#define LittleLong
static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); }
#define LittleFloat
+#endif
#define PATH_SEP '\\'
@@ -182,12 +184,14 @@
return fi;
}
+#if 0
#define BigShort
static inline short LittleShort(short l) { return ShortSwap(l); }
#define BigLong
static inline int LittleLong (int l) { return LongSwap(l); }
#define BigFloat
static inline float LittleFloat (const float l) { return FloatSwap(&l); }
+#endif
#endif
@@ -205,12 +209,14 @@
void Sys_PumpEvents( void );
+#if 0
#define BigShort
static inline short LittleShort(short l) { return ShortSwap(l); }
#define BigLong
static inline int LittleLong (int l) { return LongSwap(l); }
#define BigFloat
static inline float LittleFloat (const float l) { return FloatSwap(&l); }
+#endif
#endif
@@ -244,6 +250,7 @@
#define BOTLIB_HARD_LINKED
#endif
+#if 0
#if !idppc
inline static short BigShort( short l) { return ShortSwap(l); }
#define LittleShort
@@ -259,6 +266,7 @@
#define BigFloat
inline static float LittleFloat (const float *l) { return FloatSwap(l); }
#endif
+#endif
#endif
@@ -280,8 +288,16 @@
#define PATH_SEP '/'
+#include <machine/param.h>
+#if __FreeBSD_version < 500000
+#include <inttypes.h>
+#else
+#include <stdint.h>
+#endif
+
// bk010116 - omitted Q3STATIC (see Linux above), broken target
+#if 0
#if !idppc
static short BigShort( short l) { return ShortSwap(l); }
#define LittleShort
@@ -297,6 +313,7 @@
#define BigFloat
static float LittleFloat (const float *l) { return FloatSwap(l); }
#endif
+#endif
#endif
@@ -428,13 +445,9 @@
void *Hunk_Alloc( int size, ha_pref preference );
#endif
-#ifdef __linux__
// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371
// custom Snd_Memset implementation for glibc memset bug workaround
void Snd_Memset (void* dest, const int val, const size_t count);
-#else
-#define Snd_Memset Com_Memset
-#endif
#if !( defined __VECTORC )
void Com_Memset (void* dest, const int val, const size_t count);
@@ -763,7 +776,7 @@
float Com_Clamp( float min, float max, float value );
char *COM_SkipPath( char *pathname );
-void COM_StripExtension( const char *in, char *out );
+void COM_StripExtension( const char *in, char *out, int destsize );
void COM_DefaultExtension( char *path, int maxSize, const char *extension );
void COM_BeginParseSession( const char *name );
@@ -864,18 +877,18 @@
} qint64;
//=============================================
-/*
-short BigShort(short l);
-short LittleShort(short l);
-int BigLong (int l);
-int LittleLong (int l);
-qint64 BigLong64 (qint64 l);
-qint64 LittleLong64 (qint64 l);
-float BigFloat (const float *l);
-float LittleFloat (const float *l);
+
+int16_t BigShort(int16_t l);
+int16_t LittleShort(int16_t l);
+int32_t BigLong (int32_t l);
+int32_t LittleLong (int32_t l);
+qint64 BigLong64 (qint64 l);
+qint64 LittleLong64 (qint64 l);
+float BigFloat (float l);
+float LittleFloat (float l);
void Swap_Init (void);
-*/
+
char * QDECL va(char *format, ...);
//=============================================
|