From ce78eb67db5e1da02ed47bfdab92224d2350fe83 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Sun, 4 Sep 2022 18:04:15 +0300 Subject: [PATCH] removed the warn() function, not necessary --- miniglut.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/miniglut.c b/miniglut.c index 0f34782..54838ae 100644 --- a/miniglut.c +++ b/miniglut.c @@ -88,7 +88,6 @@ static void get_screen_size(int *scrw, int *scrh); static long get_msec(void); static void panic(const char *msg); -static void warn(const char *msg); static void sys_exit(int status); static int sys_write(int fd, const void *buf, int count); @@ -1682,13 +1681,11 @@ ctxdone: logpal->palPalEntry[i].peFlags = PC_NOCOLLAPSE; } - if(!(cmap = CreatePalette(logpal))) { - warn("Failed to create RGB 332 palette on palettized mode. Colors will be wrong\n"); - } else { + if((cmap = CreatePalette(logpal))) { SelectPalette(dc, cmap, 0); RealizePalette(dc); + cmap_size = 256; } - cmap_size = 256; } } @@ -1949,13 +1946,6 @@ static void panic(const char *msg) sys_exit(1); } -static void warn(const char *msg) -{ - const char *end = msg; - while(*end) end++; - sys_write(2, msg, end - msg); -} - #ifdef MINIGLUT_USE_LIBC #include -- 1.7.10.4