From: quzar <qu...@us...> - 2025-05-20 19:00:45
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "UNNAMED PROJECT". The branch, master has been updated via a8fdcfb92c1eb840da3569a1642621f48e259dbf (commit) via 4deffc189b3aa9fe30d6f314245b5751f6fdef12 (commit) via b115268896278cc44162114cd5bbed8aac1bf031 (commit) via fec75522499217277cdac76bbac80f73cc5913b2 (commit) from 1d75c9e421f3453cdbe16bf91a39366d5f0be972 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a8fdcfb92c1eb840da3569a1642621f48e259dbf Merge: 1d75c9e 4deffc1 Author: Donald Haase <qu...@ya...> Date: Tue May 20 14:27:21 2025 -0400 Merge pull request #3 from KallistiOS/missing_dbglog_fixes Missing dbglog fixes commit 4deffc189b3aa9fe30d6f314245b5751f6fdef12 Author: QuzarDC <qu...@co...> Date: Sun May 11 23:57:19 2025 -0400 Fix some minor type warnings. commit b115268896278cc44162114cd5bbed8aac1bf031 Author: QuzarDC <qu...@co...> Date: Sun May 11 23:45:53 2025 -0400 Correct usage of packed attribute. commit fec75522499217277cdac76bbac80f73cc5913b2 Author: QuzarDC <qu...@co...> Date: Sun May 11 23:44:53 2025 -0400 Fix missing dbglog include. It was previously being exported via stdio, now have to include it explicitly. ----------------------------------------------------------------------- Summary of changes: src/font.c | 44 +++++++++++++++++++++++--------------------- src/texture.c | 2 ++ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/font.c b/src/font.c index 8cdde08..ccd8470 100644 --- a/src/font.c +++ b/src/font.c @@ -11,6 +11,8 @@ #include <string.h> #include <stdlib.h> #include <kos/fs.h> +#include <kos/dbglog.h> + #include "font.h" #include "prim.h" @@ -56,27 +58,27 @@ */ #define PACKED __attribute__((packed)) -typedef struct { - uint8 magic[4] PACKED; - uint32 endian PACKED; - uint32 format PACKED; - uint32 txr_width PACKED; - uint32 txr_height PACKED; - int32 max_ascent PACKED; - int32 max_descent PACKED; - uint32 glyph_cnt PACKED; +typedef struct PACKED { + char magic[4]; + uint32 endian; + uint32 format; + uint32 txr_width; + uint32 txr_height; + int32 max_ascent; + int32 max_descent; + uint32 glyph_cnt; } txfhdr_t; -typedef struct { - int16 idx PACKED; - int8 w PACKED; - int8 h PACKED; - int8 x_offset PACKED; - int8 y_offset PACKED; - int8 advance PACKED; - char padding PACKED; - uint16 x PACKED; - uint16 y PACKED; +typedef struct PACKED { + int16 idx; + int8 w; + int8 h; + int8 x_offset; + int8 y_offset; + int8 advance; + char padding; + uint16 x; + uint16 y; } txfglyph_t; /* This function DEFINITELY has function growth hormone inbalance syndrome, @@ -89,7 +91,7 @@ plx_font_t * plx_font_load(const char * fn) { int i, x, y; float xstep, ystep, w, h; uint8 * bmtmp = NULL; - uint32 bmsize; + ssize_t bmsize; uint16 * txrtmp = NULL; int stride; @@ -114,7 +116,7 @@ plx_font_t * plx_font_load(const char * fn) { goto fail_2; /* bail */ } - if (hdr.magic[0] != 0xff || strncmp("txf", hdr.magic+1, 3)) { + if ((uint8)hdr.magic[0] != 0xff || strncmp("txf", hdr.magic+1, 3)) { dbglog(DBG_WARNING, "plx_font_load: invalid font file '%s'\n", fn); goto fail_2; /* bail */ } diff --git a/src/texture.c b/src/texture.c index 59be19e..033c42a 100644 --- a/src/texture.c +++ b/src/texture.c @@ -10,6 +10,8 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <kos/dbglog.h> + #include "texture.h" #include <png/png.h> #include <jpeg/jpeg.h> hooks/post-receive -- UNNAMED PROJECT |