diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/base64.c | 3 | ||||
-rw-r--r-- | src/compression.c | 2 | ||||
-rw-r--r-- | src/compression.h | 2 | ||||
-rw-r--r-- | src/resources/resource.c | 2 | ||||
-rw-r--r-- | src/resources/resource.h | 2 | ||||
-rw-r--r-- | src/viewport.c | 2 | ||||
-rw-r--r-- | src/viewport.h | 10 | ||||
-rw-r--r-- | src/xml.c | 6 | ||||
-rw-r--r-- | src/xml.h | 6 |
9 files changed, 18 insertions, 17 deletions
diff --git a/src/base64.c b/src/base64.c index 6a2c873..d8f5669 100644 --- a/src/base64.c +++ b/src/base64.c @@ -4,7 +4,8 @@ static void base64_decode_block(const char *src, char *dest) { int i; - char buf[4]; + /* GCC's SSP won't wrap functions with arrays smaller than 8 bytes. */ + char buf[8]; /* Convert base 64 characters into values. */ /* Supports ASCII and EBCDIC systems. */ diff --git a/src/compression.c b/src/compression.c index 5f71950..2dac4e5 100644 --- a/src/compression.c +++ b/src/compression.c @@ -36,7 +36,7 @@ zlib_err(int status) } void -decompress(const char *src, size_t src_len, char *dest, size_t dest_len) +decompress(char *src, size_t src_len, char *dest, size_t dest_len) { z_stream d_stream; diff --git a/src/compression.h b/src/compression.h index 387d634..ffa8dc0 100644 --- a/src/compression.h +++ b/src/compression.h @@ -1,6 +1,6 @@ #ifndef COMPRESSION_H #define COMPRESSION_H -void decompress(const char *src, size_t src_len, char *dest, size_t dest_len); +void decompress(char *src, size_t src_len, char *dest, size_t dest_len); #endif diff --git a/src/resources/resource.c b/src/resources/resource.c index ebfcf27..90df5c2 100644 --- a/src/resources/resource.c +++ b/src/resources/resource.c @@ -4,7 +4,7 @@ #include "../logging.h" -inline void * +void * resource_alloc(const char *path, size_t size) { void *new_res; diff --git a/src/resources/resource.h b/src/resources/resource.h index ada91fd..5bec5e8 100644 --- a/src/resources/resource.h +++ b/src/resources/resource.h @@ -12,7 +12,7 @@ struct resource { struct resource *next; }; -extern inline void *resource_alloc(const char *path, size_t size); +void *resource_alloc(const char *path, size_t size); struct resource *resource_get(struct resource_table *resources, const char *path); void resource_add(struct resource_table *resources, const char *path, diff --git a/src/viewport.c b/src/viewport.c index 05b30a6..5f7805f 100644 --- a/src/viewport.c +++ b/src/viewport.c @@ -3,7 +3,7 @@ #include "logging.h" struct viewport * -init_viewport(int width, int height, int bpp) +init_viewport(Uint16 width, Uint16 height, int bpp) { struct viewport *vp; diff --git a/src/viewport.h b/src/viewport.h index 372a285..f21c583 100644 --- a/src/viewport.h +++ b/src/viewport.h @@ -4,13 +4,13 @@ #include <SDL.h> struct viewport { - int x; - int y; - int w; - int h; + Sint16 x; + Sint16 y; + Uint16 w; + Uint16 h; SDL_Surface *screen; }; -struct viewport *init_viewport(int width, int height, int bpp); +struct viewport *init_viewport(Uint16 width, Uint16 height, int bpp); #endif @@ -14,13 +14,13 @@ struct xml_node { struct xml_node *parent; }; -inline int +int xml_check_tag(const char *found, const char *expected) { return strcmp(found, expected) == 0; } -inline void +void xml_unexpected_start_tag(XML_Parser p, const char *found, const char *expected) { warn("Found \"%s\" start tag where expected one of \"%s\" in map", @@ -28,7 +28,7 @@ xml_unexpected_start_tag(XML_Parser p, const char *found, const char *expected) XML_StopParser(p, XML_FALSE); } -inline void +void xml_unexpected_end_tag(XML_Parser p, const char *found, const char *expected) { warn("Found \"%s\" end tag where expected one of \"%s\" in map", @@ -4,10 +4,10 @@ #include <expat.h> #include <SDL_stdinc.h> -extern inline int xml_check_tag(const char *found, const char *expected); -extern inline void xml_unexpected_start_tag(XML_Parser p, const char *found, +int xml_check_tag(const char *found, const char *expected); +void xml_unexpected_start_tag(XML_Parser p, const char *found, const char *expected); -extern inline void xml_unexpected_end_tag(XML_Parser p, const char *found, +void xml_unexpected_end_tag(XML_Parser p, const char *found, const char *expected); void xml_get_int_attr(XML_Parser p, const char **attr, const char *name, int *dest, int req); |