projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Too quick a trigger finger first time. Compile error fixed.
[wxWidgets.git]
/
src
/
mac
/
xpm
/
create.c
diff --git
a/src/mac/xpm/create.c
b/src/mac/xpm/create.c
index 5495b9692a95db1924544a6aa637d67c317e39fb..fdb8a797245346776172320f014eb54f3a3873de 100644
(file)
--- a/
src/mac/xpm/create.c
+++ b/
src/mac/xpm/create.c
@@
-412,7
+412,7
@@
CreateColors(display, attributes, colors, ncolors, image_pixels, mask_pixels,
}
else
{
}
else
{
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SET_WHITE_PIXEL( *mask_pixels ) ; // is this correct CS ????
#else
*mask_pixels = 1; // is this correct CS ????
SET_WHITE_PIXEL( *mask_pixels ) ; // is this correct CS ????
#else
*mask_pixels = 1; // is this correct CS ????
@@
-677,7
+677,7
@@
PlatformPutImagePixels(dc, image, width, height, pixelindex, pixels)
}
}
SelectObject(*dc, obm);
}
}
SelectObject(*dc, obm);
-#elif
macintosh
+#elif
defined(macintosh) || defined(__APPLE__)
GrafPtr origPort ;
GDHandle origDevice ;
GrafPtr origPort ;
GDHandle origDevice ;
@@
-1036,7
+1036,7
@@
ParseAndPutPixels(
}
obm = SelectObject(*dc, image->bitmap);
}
obm = SelectObject(*dc, image->bitmap);
- #elif
macintosh
+ #elif
defined(macintosh) || defined(__APPLE__)
GrafPtr origPort ;
GDHandle origDevice ;
GrafPtr origPort ;
GDHandle origDevice ;
@@
-1065,7
+1065,7
@@
ParseAndPutPixels(
{
SetPixel(shapedc, x, y, shape_pixels[colidx[c] - 1]);
}
{
SetPixel(shapedc, x, y, shape_pixels[colidx[c] - 1]);
}
- #elif
macintosh
+ #elif
defined(macintosh) || defined(__APPLE__)
SetCPixel( x, y, &image_pixels[colidx[c] - 1]);
if (shapeimage)
{
SetCPixel( x, y, &image_pixels[colidx[c] - 1]);
if (shapeimage)
{
@@
-1086,7
+1086,7
@@
ParseAndPutPixels(
DeleteDC(shapedc);
}
SelectObject(*dc, obm);
DeleteDC(shapedc);
}
SelectObject(*dc, obm);
- #elif
macintosh
+ #elif
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
}
SetGWorld( origPort , origDevice ) ;
#endif
}
@@
-1103,7
+1103,7
@@
if (cidx[f]) XpmFree(cidx[f]);}
/* array of pointers malloced by need */
unsigned short *cidx[256];
int char1;
/* array of pointers malloced by need */
unsigned short *cidx[256];
int char1;
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
GrafPtr origPort ;
GDHandle origDevice ;
GetGWorld( &origPort , &origDevice ) ;
GrafPtr origPort ;
GDHandle origDevice ;
GetGWorld( &origPort , &origDevice ) ;
@@
-1116,7
+1116,7
@@
if (cidx[f]) XpmFree(cidx[f]);}
cidx[char1] = (unsigned short *)
XpmCalloc(256, sizeof(unsigned short));
if (cidx[char1] == NULL) { /* new block failed */
cidx[char1] = (unsigned short *)
XpmCalloc(256, sizeof(unsigned short));
if (cidx[char1] == NULL) { /* new block failed */
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
@@
-1145,19
+1145,19
@@
if (cidx[f]) XpmFree(cidx[f]);}
SetPixel(*dc, x, y,
shape_pixels[cidx[cc1][cc2] - 1]);
}
SetPixel(*dc, x, y,
shape_pixels[cidx[cc1][cc2] - 1]);
}
- #elif
macintosh
+ #elif
defined(macintosh) || defined(__APPLE__)
SetCPixel( x, y, &image_pixels[cidx[cc1][cc2] - 1]);
#endif
} else
{
SetCPixel( x, y, &image_pixels[cidx[cc1][cc2] - 1]);
#endif
} else
{
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
return (XpmFileInvalid);
}
} else {
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
return (XpmFileInvalid);
}
} else {
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
@@
-1165,7
+1165,7
@@
if (cidx[f]) XpmFree(cidx[f]);}
}
}
}
}
}
}
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
SetGWorld( origPort , origDevice ) ;
#endif
FREE_CIDX;
@@
-1177,7
+1177,7
@@
if (cidx[f]) XpmFree(cidx[f]);}
{
char *s;
char buf[BUFSIZ];
{
char *s;
char buf[BUFSIZ];
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
GrafPtr origPort ;
GDHandle origDevice ;
GetGWorld( &origPort , &origDevice ) ;
GrafPtr origPort ;
GDHandle origDevice ;
GetGWorld( &origPort , &origDevice ) ;
@@
-1196,7
+1196,7
@@
if (cidx[f]) XpmFree(cidx[f]);}
slot = xpmHashSlot(hashtable, buf);
if (!*slot) /* no color matches */
{
slot = xpmHashSlot(hashtable, buf);
if (!*slot) /* no color matches */
{
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
return (XpmFileInvalid);
SetGWorld( origPort , origDevice ) ;
#endif
return (XpmFileInvalid);
@@
-1212,7
+1212,7
@@
if (cidx[f]) XpmFree(cidx[f]);}
SetPixel(*dc, x, y,
shape_pixels[HashColorIndex(slot)]);
}
SetPixel(*dc, x, y,
shape_pixels[HashColorIndex(slot)]);
}
- #elif
macintosh
+ #elif
defined(macintosh) || defined(__APPLE__)
SetCPixel( x, y, &image_pixels[HashColorIndex(slot)]);
#endif
}
SetCPixel( x, y, &image_pixels[HashColorIndex(slot)]);
#endif
}
@@
-1228,7
+1228,7
@@
if (cidx[f]) XpmFree(cidx[f]);}
break;
if (a == ncolors) /* no color matches */
{
break;
if (a == ncolors) /* no color matches */
{
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
return (XpmFileInvalid);
SetGWorld( origPort , origDevice ) ;
#endif
return (XpmFileInvalid);
@@
-1241,13
+1241,13
@@
if (cidx[f]) XpmFree(cidx[f]);}
SelectObject(*dc, shapeimage->bitmap);
SetPixel(*dc, x, y, shape_pixels[a]);
}
SelectObject(*dc, shapeimage->bitmap);
SetPixel(*dc, x, y, shape_pixels[a]);
}
- #elif
macintosh
+ #elif
defined(macintosh) || defined(__APPLE__)
SetCPixel( x, y, &image_pixels[a]); // data is [x+y*width]
#endif
}
}
}
SetCPixel( x, y, &image_pixels[a]); // data is [x+y*width]
#endif
}
}
}
- #if
def macintosh
+ #if
defined(macintosh) || defined(__APPLE__)
SetGWorld( origPort , origDevice ) ;
#endif
SetGWorld( origPort , origDevice ) ;
#endif