# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1318795416 0 # Node ID 365f92e85771065c1e099a7eebd129e2f1d8daf5 # Parent db21c0081387963a4f7572527c93c0d37183e5de Fix for dw_font_text_extents_get() on OS/2 not honoring the font set with dw_pixmap_set_font(). Also cleaned up a number of warnings generated by VisualAge. Informationals won't be fixed. diff -r db21c0081387 -r 365f92e85771 os2/dw.c --- a/os2/dw.c Sun Oct 16 19:40:27 2011 +0000 +++ b/os2/dw.c Sun Oct 16 20:03:36 2011 +0000 @@ -3028,7 +3028,7 @@ case WM_BUTTON2UP | 0x2000: case WM_BUTTON3UP | 0x2000: if(hwndTaskBar) - result = _run_event(hwndTaskBar, msg & ~0x2000, mp1, mp2); + result = (int)_run_event(hwndTaskBar, msg & ~0x2000, mp1, mp2); break; case WM_USER+2: _clear_emphasis(); @@ -4120,7 +4120,7 @@ /* Fill in the family name if possible */ if(currfont) { - char *name = strchr(currfont, "."); + char *name = strchr(currfont, '.'); if(name) { int newsize = atoi(currfont); @@ -4517,7 +4517,7 @@ dw_window_set_color(newbox->hwnd, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); dw_window_set_color(newbox->grouphwnd, DW_CLR_BLACK, DW_CLR_PALEGRAY); dw_window_set_font(newbox->grouphwnd, DefaultFont); - dw_window_set_data(newbox->hwnd, "_dw_buddy", newbox->grouphwnd); + dw_window_set_data(newbox->hwnd, "_dw_buddy", (void *)newbox->grouphwnd); return newbox->hwnd; } @@ -5003,7 +5003,7 @@ id, NULL, NULL); - WinSendMsg(tmp, MLM_FORMAT, MLFIE_NOTRANS, 0); + WinSendMsg(tmp, MLM_FORMAT, (MPARAM)MLFIE_NOTRANS, 0); blah->oldproc = WinSubclassWindow(tmp, _mleproc); WinSetWindowPtr(tmp, QWP_USER, blah); dw_window_set_font(tmp, DefaultFont); @@ -8531,7 +8531,7 @@ } else if(pixmap) { - HPS pixmaphps = WinGetPS(pixmap->handle); + HPS pixmaphps = WinGetPS(pixmap->font ? pixmap->font : pixmap->handle); hps = _set_hps(pixmap->hps); _CopyFontSettings(pixmaphps, hps); @@ -10053,7 +10053,7 @@ int API dw_exec(char *program, int type, char **params) { type = type; /* keep compiler happy */ - return spawnvp(P_NOWAIT, program, (const char **)params); + return spawnvp(P_NOWAIT, program, params); } /* @@ -10298,7 +10298,7 @@ print->flags = flags; /* Check to see how much space we need for the printer list */ - splerr = SplEnumPrinter(NULL, 0, fsType, NULL, NULL, &cRes, &cTotal, &cbNeeded ,NULL); + splerr = SplEnumPrinter(NULL, 0, fsType, NULL, 0, &cRes, &cTotal, &cbNeeded ,NULL); if(splerr == ERROR_MORE_DATA || splerr == NERR_BufTooSmall) {