From d9ebf14d24ffcab0c8a75337ac8f297858333966 Mon Sep 17 00:00:00 2001 From: VincentWei Date: Mon, 30 Oct 2017 18:00:05 +0800 Subject: [PATCH] Incorrect elif condition usage; incore rbf defonts are not --- ChangeLog | 6 ++++++ src/font/devfont.c | 8 ++++---- src/font/logfont.c | 4 ++-- src/gui/lf_common.c | 2 +- src/newgal/fbcon/pcivideo.c | 1 - src/newgdi/drawtext.c | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74d2b337..b3b650c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ ******************************************************************************* What's new (trunk): +10/30 BUGFIXING: Bad MG_PRINTF usage. + +10/30 BUGFIXING: Incorrect elif condition usage; incore rbf defonts are not +included correctly. + * src/font/devfont.c + 10/30 CLEANUP: Merge differences from rel-3-0 mannually! 10/26 CLEANUP: svn merge -r 13673:13828 ^/branches/rel-3-0 diff --git a/src/font/devfont.c b/src/font/devfont.c index fb4dbc84..8d570919 100644 --- a/src/font/devfont.c +++ b/src/font/devfont.c @@ -479,12 +479,12 @@ extern INCORE_RBFINFO __mgif_rbf_fixedsys_8x15; static INCORE_RBFINFO* incore_rbfonts [] = { #ifdef _MGINCORERBF_LATIN1_VGAOEM &__mgif_rbf_vgaoem_8x8, -#elif defined _MGINCORERBF_LATIN1_TERMINAL +#endif +#ifdef _MGINCORERBF_LATIN1_TERMINAL &__mgif_rbf_terminal_8x12, -#elif defined _MGINCORERBF_LATIN1_FIXEDSYS +#endif +#ifdef _MGINCORERBF_LATIN1_FIXEDSYS &__mgif_rbf_fixedsys_8x15, -#else - NULL #endif }; diff --git a/src/font/logfont.c b/src/font/logfont.c index e9f0a27a..60364bb7 100644 --- a/src/font/logfont.c +++ b/src/font/logfont.c @@ -102,7 +102,7 @@ static PLOGFONT gdiCreateLogFont (const char* type, const char* family, log_font->sbc_scale = 1; log_font->mbc_scale = 1; - _MG_PRINTF ("FONT>LogFont: requested info: type: %s, family: %s, style: %x, charset: %s, size: %d.\n", + _MG_PRINTF ("FONT>LogFont: requested info: type: %s, family: %s, style: %lx, charset: %s, size: %d.\n", log_font->type, log_font->family, log_font->style, log_font->charset, log_font->size); @@ -223,7 +223,7 @@ static PLOGFONT gdiCreateLogFont (const char* type, const char* family, log_font->style &= ~FS_FLIP_HORZVERT; } - _MG_PRINTF ("FONT>LogFont: created info: type: %s, family: %s, style: %x, charset: %s, size: %d.\n", + _MG_PRINTF ("FONT>LogFont: created info: type: %s, family: %s, style: %lx, charset: %s, size: %d.\n", log_font->type, log_font->family, log_font->style, log_font->charset, log_font->size); diff --git a/src/gui/lf_common.c b/src/gui/lf_common.c index a0e96da1..9a3c0473 100644 --- a/src/gui/lf_common.c +++ b/src/gui/lf_common.c @@ -49,7 +49,7 @@ BOOL gui_LoadIconRes(HDC hdc, const char* rdr_name, char* file) if (LoadResource(szValue, RES_TYPE_ICON, (DWORD)hdc) != NULL) return TRUE; - _MG_PRINTF(stderr, "SYSRES: can't get %s's value from section %s in etc.\n", + _MG_PRINTF ("SYSRES: can't get %s's value from section %s in etc.\n", file, rdr_name); return FALSE; diff --git a/src/newgal/fbcon/pcivideo.c b/src/newgal/fbcon/pcivideo.c index 0f989651..16965f82 100644 --- a/src/newgal/fbcon/pcivideo.c +++ b/src/newgal/fbcon/pcivideo.c @@ -12,7 +12,6 @@ #include #include -#define _DEBUG #include "common.h" #ifdef _MGHAVE_PCIACCESS diff --git a/src/newgdi/drawtext.c b/src/newgdi/drawtext.c index 5f680cd5..10da0120 100644 --- a/src/newgdi/drawtext.c +++ b/src/newgdi/drawtext.c @@ -421,7 +421,7 @@ int DrawTextEx2 (HDC hdc, const char* pText, int nCount, /* If output rect is too small, we shouldn't output any text.*/ if (RECTW(rcDraw) < pdc->pLogFont->size && RECTH(rcDraw) < pdc->pLogFont->size) { - _MG_PRINTF ("NEWGDI", + _MG_PRINTF ("NEWGDI: " "Output rect is too small, we won't output any text. \n"); return -1; }