From aa653fef637484f9d7ef989541b06f0c16d6452d Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 20 Nov 2020 20:50:29 +0900 Subject: [PATCH] libs/libnx/nxglib/nxglib_splitline.c: Fix syslog formats Note: b16_t is int32_t. --- libs/libnx/nxglib/nxglib_splitline.c | 35 ++++++++++++++++++---------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/libs/libnx/nxglib/nxglib_splitline.c b/libs/libnx/nxglib/nxglib_splitline.c index 0714f31e92..7f5a1f586b 100644 --- a/libs/libnx/nxglib/nxglib_splitline.c +++ b/libs/libnx/nxglib/nxglib_splitline.c @@ -41,6 +41,7 @@ #include #include +#include #include #include @@ -220,7 +221,8 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, traps[1].bot.x2 = traps[1].bot.x1; traps[1].bot.y = line.pt2.y; - ginfo("Vertical traps[1]: (%08x,%08x,%d),(%08x,%08x, %d)\n", + ginfo("Vertical traps[1]: (%08" PRIx32 ",%08" PRIx32 ",%d)," + "(%08" PRIx32 ",%08" PRIx32 ", %d)\n", traps[1].top.x1, traps[1].top.x2, traps[1].top.y, traps[1].bot.x1, traps[1].bot.x2, traps[1].bot.y); @@ -256,7 +258,8 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, traps[1].bot.x1 = tmp; } - ginfo("Horizontal traps[1]: (%08x,%08x,%d),(%08x,%08x, %d)\n", + ginfo("Horizontal traps[1]: (%08" PRIx32 ",%08" PRIx32 ",%d)," + "(%08" PRIx32 ",%08" PRIx32 ", %d)\n", traps[1].top.x1, traps[1].top.x2, traps[1].top.y, traps[1].bot.x1, traps[1].bot.x2, traps[1].bot.y); @@ -304,8 +307,8 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, sinangle = b16sin(angle); b16xoffset = (linewidth * sinangle + 1) >> 1; - ginfo("height: %d width: %d angle: %08x " - "b16yoffset: %08x b16xoffset: %08x\n", + ginfo("height: %d width: %d angle: %08" PRIx32 " " + "b16yoffset: %08" PRIx32 " b16xoffset: %08" PRIx32 "\n", iheight, iwidth, angle, b16yoffset, b16xoffset); /* Now we know all four points of the rotated rectangle */ @@ -335,8 +338,10 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, quad[2].x = b16x + b16xoffset; quad[3].x = b16x - b16xoffset; - ginfo("Southeast: quad (%08x,%08x),(%08x,%08x)," - "(%08x,%08x),(%08x,%08x)\n", + ginfo("Southeast: quad (%08" PRIx32 ",%08" PRIx32 ")," + "(%08" PRIx32 ",%08" PRIx32 ")," + "(%08" PRIx32 ",%08" PRIx32 ")," + "(%08" PRIx32 ",%08" PRIx32 ")\n", quad[0].x, quad[0].y, quad[1].x, quad[1].y, quad[2].x, quad[2].y, quad[3].x, quad[3].y); @@ -451,8 +456,10 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, quad[2].x = b16x - b16xoffset; quad[3].x = b16x + b16xoffset; - ginfo("Southwest: quad (%08x,%08x),(%08x,%08x)," - "(%08x,%08x),(%08x,%08x)\n", + ginfo("Southwest: quad (%08" PRIx32 ",%08" PRIx32 ")," + "(%08" PRIx32 ",%08" PRIx32 ")," + "(%08" PRIx32 ",%08" PRIx32 ")," + "(%08" PRIx32 ",%08" PRIx32 ")\n", quad[0].x, quad[0].y, quad[1].x, quad[1].y, quad[2].x, quad[2].y, quad[3].x, quad[3].y); @@ -556,13 +563,16 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, traps[2].bot.y = b16toi(quad[3].y + b16HALF); } - ginfo("traps[0]: (%08x,%08x,%d),(%08x,%08x,%d)\n", + ginfo("traps[0]: (%08" PRIx32 ",%08" PRIx32 ",%d)," + "(%08" PRIx32 ",%08" PRIx32 ",%d)\n", traps[0].top.x1, traps[0].top.x2, traps[0].top.y, traps[0].bot.x1, traps[0].bot.x2, traps[0].bot.y); - ginfo("traps[1]: (%08x,%08x,%d),(%08x,%08x,%d)\n", + ginfo("traps[1]: (%08" PRIx32 ",%08" PRIx32 ",%d)," + "(%08" PRIx32 ",%08" PRIx32 ",%d)\n", traps[1].top.x1, traps[1].top.x2, traps[1].top.y, traps[1].bot.x1, traps[1].bot.x2, traps[1].bot.y); - ginfo("traps[2]: (%08x,%08x,%d),(%08x,%08x,%d)\n", + ginfo("traps[2]: (%08" PRIx32 ",%08" PRIx32 ",%d)," + "(%08" PRIx32 ",%08" PRIx32 ",%d)\n", traps[2].top.x1, traps[2].top.x2, traps[2].top.y, traps[2].bot.x1, traps[2].bot.x2, traps[2].bot.y); @@ -581,7 +591,8 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, traps[1].bot.x2 = traps[1].bot.x1 + itob16(linewidth - 1); traps[1].bot.y = line.pt2.y; - ginfo("Horizontal traps[1]: (%08x,%08x,%d),(%08x,%08x, %d)\n", + ginfo("Horizontal traps[1]: (%08" PRIx32 ",%08" PRIx32 ",%d)," + "(%08" PRIx32 ",%08" PRIx32 ", %d)\n", traps[1].top.x1, traps[1].top.x2, traps[1].top.y, traps[1].bot.x1, traps[1].bot.x2, traps[1].bot.y);