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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
|
--- baycomusb-0.10.orig/diag/adapttests.c
+++ baycomusb-0.10/diag/adapttests.c
@@ -337,7 +345,7 @@ static const u_int16_t crc_ccitt_table[0
/* --------------------------------------------------------------------- */
-extern inline u_int16_t calc_crc_ccitt(const u_int8_t *buffer, int len)
+inline u_int16_t calc_crc_ccitt(const u_int8_t *buffer, int len)
{
u_int16_t crc = 0xffff;
@@ -347,14 +355,14 @@ extern inline u_int16_t calc_crc_ccitt(c
return crc;
}
-extern inline void append_crc_ccitt(u_int8_t *buffer, int len)
+inline void append_crc_ccitt(u_int8_t *buffer, int len)
{
u_int16_t crc = calc_crc_ccitt(buffer, len);
*buffer++ = crc;
*buffer++ = crc >> 8;
}
-extern inline int check_crc_ccitt(const u_int8_t *buffer, int len)
+inline int check_crc_ccitt(const u_int8_t *buffer, int len)
{
u_int16_t crc = calc_crc_ccitt(buffer, len);
return (crc & 0xffff) == 0x0f47;
@@ -372,7 +380,7 @@ struct hdlc_receiver {
unsigned char buf[RXBUFFER_SIZE];
};
-extern inline void hdlc_initrx(struct hdlc_receiver *h)
+inline void hdlc_initrx(struct hdlc_receiver *h)
{
memset(h, 0, sizeof(struct hdlc_receiver));
h->bufptr = h->buf;
@@ -389,16 +397,16 @@ static void do_rxpacket(struct hdlc_rece
}
#define DECODEITERA(j) \
-({ \
+{ \
if (!(notbitstream & (0x0fc << j))) /* flag or abort */ \
goto flgabrt##j; \
if ((bitstream & (0x1f8 << j)) == (0xf8 << j)) /* stuffed bit */ \
goto stuff##j; \
- enditer##j: \
-})
+} \
+ enditer##j:
#define DECODEITERB(j) \
-({ \
+{ \
flgabrt##j: \
if (!(notbitstream & (0x1fc << j))) { /* abort received */ \
state = 0; \
@@ -417,7 +425,7 @@ static void do_rxpacket(struct hdlc_rece
numbits--; \
bitbuf = (bitbuf & ((~0xff) << j)) | ((bitbuf & ~((~0xff) << j)) << 1); \
goto enditer##j; \
-})
+}
/* ---------------------------------------------------------------------- */
@@ -562,12 +570,12 @@ static int boundary(struct usbdevice *de
/* ---------------------------------------------------------------------- */
-extern inline unsigned readboundary(const unsigned char *b, unsigned x)
+inline unsigned readboundary(const unsigned char *b, unsigned x)
{
return (b[x >> 3] >> (x & 7)) & 1;
}
-extern inline void writeboundary(unsigned char *b, unsigned x, int v)
+inline void writeboundary(unsigned char *b, unsigned x, int v)
{
b[x >> 3] &= ~(1 << (x & 7));
b[x >> 3] |= (v & 1) << (x & 7);
--- baycomusb-0.10.orig/diag/configadapt.c
+++ baycomusb-0.10/diag/configadapt.c
@@ -130,12 +138,12 @@ static const float filt_comp[32] = {
#define HAMMING(x) (0.54-0.46*cos(2*M_PI*(x)));
-extern inline float hamming(float x)
+inline float hamming(float x)
{
return 0.54-0.46*cos(2*M_PI*x);
}
-extern inline float sinc(float x)
+inline float sinc(float x)
{
if (x == 0)
return 1;
--- baycomusb-0.10.orig/misc/sysdeps.h
+++ baycomusb-0.10/misc/sysdeps.h
@@ -110,9 +118,9 @@ typedef unsigned long long /* deduced */
#define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */
#define LOG_FTP (11<<3) /* ftp daemon */
-extern inline void closelog(void) {}
-extern inline void openlog(__const char *__ident, int __option, int __facility) {}
-extern inline void vsyslog(int __pri, __const char *__fmt, va_list __ap) {}
+inline void closelog(void) {}
+inline void openlog(__const char *__ident, int __option, int __facility) {}
+inline void vsyslog(int __pri, __const char *__fmt, va_list __ap) {}
#endif
@@ -120,7 +128,7 @@ extern inline void vsyslog(int __pri, __
#ifdef __MINGW32__
#include <windows.h>
-extern inline void usleep(unsigned long x)
+inline void usleep(unsigned long x)
{
Sleep(x / 1000);
}
@@ -133,12 +141,12 @@ extern inline void usleep(unsigned long
#include <sys/time.h>
#include <unistd.h>
-extern inline int gettime(struct timeval *tv)
+inline int gettime(struct timeval *tv)
{
return gettimeofday(tv, NULL);
}
-extern inline unsigned int gettimems(void)
+inline unsigned int gettimems(void)
{
struct timeval tv;
@@ -159,7 +167,7 @@ struct timeval {
};
#endif
-extern inline int gettime(struct timeval *tv)
+inline int gettime(struct timeval *tv)
{
SYSTEMTIME tm;
FILETIME ft;
@@ -175,7 +183,7 @@ extern inline int gettime(struct timeval
return 0;
}
-extern inline unsigned int gettimems(void)
+inline unsigned int gettimems(void)
{
SYSTEMTIME tm;
FILETIME ft;
@@ -199,7 +207,7 @@ extern inline unsigned int gettimems(voi
#ifndef HAVE_RANDOM
-extern inline long int random(void)
+inline long int random(void)
{
return rand();
}
--- baycomusb-0.10.orig/trxctrl/cfgadapt.c
+++ baycomusb-0.10/trxctrl/cfgadapt.c
@@ -154,12 +162,12 @@ static const float filt_comp[32] = {
#define HAMMING(x) (0.54-0.46*cos(2*M_PI*(x)));
-extern inline float hamming(float x)
+inline float hamming(float x)
{
return 0.54-0.46*cos(2*M_PI*x);
}
-extern inline float sinc(float x)
+inline float sinc(float x)
{
if (x == 0)
return 1;
--- baycomusb-0.10.orig/trxctrl/simd.h
+++ baycomusb-0.10/trxctrl/simd.h
@@ -54,16 +62,16 @@
#if !defined(USEMMX) && !defined(USEVIS)
-extern inline void initsimd(int enable)
+inline void initsimd(int enable)
{
}
-extern inline int checksimd(void)
+inline int checksimd(void)
{
return 0;
}
-extern inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
+inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
{
int s = 0;
@@ -72,7 +80,7 @@ extern inline int simdfir16(const int16_
return s;
}
-extern inline void simdpreparefpu(void)
+inline void simdpreparefpu(void)
{
}
@@ -82,7 +90,7 @@ extern unsigned int simd_enabled;
extern void initsimd(int enable);
-extern inline int checksimd(void)
+inline int checksimd(void)
{
return simd_enabled;
}
@@ -91,7 +99,7 @@ extern inline int checksimd(void)
#define MMXCLOBBER "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)"
-extern inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
+inline int simdfir16(const int16_t *p1, const int16_t *p2, unsigned int nr)
{
unsigned int i, j;
int s = 0;
@@ -114,7 +122,7 @@ extern inline int simdfir16(const int16_
return s;
}
-extern inline void simdpreparefpu(void)
+inline void simdpreparefpu(void)
{
if (checksimd())
asm volatile("emms");
@@ -157,7 +165,7 @@ extern inline void simdpreparefpu(void)
return s;
}
-extern inline void simdpreparefpu(void)
+inline void simdpreparefpu(void)
{
}
--- baycomusb-0.10.orig/trxctrl/trx.h
+++ baycomusb-0.10/trxctrl/trx.h
@@ -397,8 +405,8 @@ extern int polldevice(struct trx_thread_
extern void init_shmem_object(struct trx_thread_state *state);
extern void destroy_shmem_object(struct trx_thread_state *state);
#else
-extern inline void init_shmem_object(struct trx_thread_state *state) {}
-extern inline void destroy_shmem_object(struct trx_thread_state *state) {}
+inline void init_shmem_object(struct trx_thread_state *state) {}
+inline void destroy_shmem_object(struct trx_thread_state *state) {}
#endif
#if defined(ORBITIPC)
@@ -410,10 +418,10 @@ extern void destroy_object(struct trx_th
extern int server_init1(int *argc, char **argv);
extern int server_init2(void);
#else
-extern inline void init_object(struct trx_thread_state *state) {}
-extern inline void destroy_object(struct trx_thread_state *state) {}
-extern inline int server_init1(int *argc, char **argv) { return 0; }
-extern inline int server_init2(void) { return 0; }
+inline void init_object(struct trx_thread_state *state) {}
+inline void destroy_object(struct trx_thread_state *state) {}
+inline int server_init1(int *argc, char **argv) { return 0; }
+inline int server_init2(void) { return 0; }
#endif
/*
|