changeset 1233:365f92e85771

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.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 16 Oct 2011 20:03:36 +0000
parents db21c0081387
children bee6fc8119ec
files os2/dw.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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)
     {