]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xpm/create.c
added common regex
[wxWidgets.git] / src / xpm / create.c
index cf198e1d2c5cedcb150ebc4e19a9e2f7889801ee..a667eb8f7525023ce5c259812eb6b49478878af2 100644 (file)
@@ -221,20 +221,15 @@ typedef struct {
     long closeness;
 }      CloseColor;
 
-#ifdef __OS2__
-/* Visual Age cannot deal with old, non-ansi, code */
+#ifndef FOR_MSW
 static int closeness_cmp(Const void* a, Const void* b)
-#else
-static int
-closeness_cmp(a, b)
-    Const void *a, *b;
-#endif
 {
     CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b;
 
     /* cast to int as qsort requires */
     return (int) (x->closeness - y->closeness);
 }
+#endif
 
 
 /* default AllocColor function:
@@ -865,7 +860,7 @@ XpmCreateImageFromXpmImage(display, image,
 #endif
 {
 #ifdef __OS2__
-     HAB          hab;
+     HAB          hab = WinQueryAnchorBlock(HWND_DESKTOP);
      HPS          hps;
      SIZEL        sizl = {0, 0};
 #endif
@@ -2578,7 +2573,7 @@ ParseAndPutPixels(
 {
     unsigned int a, x, y;
 #ifdef __OS2__
-     HAB          hab;
+     HAB          hab = WinQueryAnchorBlock(HWND_DESKTOP);
      DEVOPENSTRUC dop = {NULL, "DISPLAY", NULL, NULL, NULL, NULL, NULL, NULL, NULL};
      SIZEL        sizl = {0, 0};
      POINTL       point;