diff options
| author | Juanma Barranquero | 2010-07-07 11:45:28 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-07-07 11:45:28 +0200 |
| commit | ed3751c8245cbf523caf4975f654d459f070ea9a (patch) | |
| tree | 1bc6a7e69181867c76389dbaca292f8d29af351a /src/image.c | |
| parent | cf84bb53567cf64b3dade9e9abeaef289371f0cc (diff) | |
| download | emacs-ed3751c8245cbf523caf4975f654d459f070ea9a.tar.gz emacs-ed3751c8245cbf523caf4975f654d459f070ea9a.zip | |
Fix whitespace to follow coding guidelines.
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/image.c b/src/image.c index adc28ba8d38..be40d1c7b4b 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -157,7 +157,7 @@ XGetImage (Display *display, Pixmap pixmap, int x, int y, | |||
| 157 | unsigned long plane_mask, int format) | 157 | unsigned long plane_mask, int format) |
| 158 | { | 158 | { |
| 159 | /* TODO: not sure what this function is supposed to do.. */ | 159 | /* TODO: not sure what this function is supposed to do.. */ |
| 160 | ns_retain_object(pixmap); | 160 | ns_retain_object (pixmap); |
| 161 | return pixmap; | 161 | return pixmap; |
| 162 | } | 162 | } |
| 163 | 163 | ||
| @@ -165,7 +165,7 @@ XGetImage (Display *display, Pixmap pixmap, int x, int y, | |||
| 165 | unsigned long | 165 | unsigned long |
| 166 | XGetPixel (XImagePtr ximage, int x, int y) | 166 | XGetPixel (XImagePtr ximage, int x, int y) |
| 167 | { | 167 | { |
| 168 | return ns_get_pixel(ximage, x, y); | 168 | return ns_get_pixel (ximage, x, y); |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | /* use with imgs created by ns_image_for_XPM; alpha set to 1; | 171 | /* use with imgs created by ns_image_for_XPM; alpha set to 1; |
| @@ -173,7 +173,7 @@ XGetPixel (XImagePtr ximage, int x, int y) | |||
| 173 | void | 173 | void |
| 174 | XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) | 174 | XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) |
| 175 | { | 175 | { |
| 176 | ns_put_pixel(ximage, x, y, pixel); | 176 | ns_put_pixel (ximage, x, y, pixel); |
| 177 | } | 177 | } |
| 178 | #endif /* HAVE_NS */ | 178 | #endif /* HAVE_NS */ |
| 179 | 179 | ||
| @@ -274,7 +274,7 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi | |||
| 274 | #endif /* HAVE_NTGUI */ | 274 | #endif /* HAVE_NTGUI */ |
| 275 | 275 | ||
| 276 | #ifdef HAVE_NS | 276 | #ifdef HAVE_NS |
| 277 | void *bitmap = ns_image_from_XBM(bits, width, height); | 277 | void *bitmap = ns_image_from_XBM (bits, width, height); |
| 278 | if (!bitmap) | 278 | if (!bitmap) |
| 279 | return -1; | 279 | return -1; |
| 280 | #endif | 280 | #endif |
| @@ -319,7 +319,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 319 | 319 | ||
| 320 | #ifdef HAVE_NS | 320 | #ifdef HAVE_NS |
| 321 | int id; | 321 | int id; |
| 322 | void *bitmap = ns_image_from_file(file); | 322 | void *bitmap = ns_image_from_file (file); |
| 323 | 323 | ||
| 324 | if (!bitmap) | 324 | if (!bitmap) |
| 325 | return -1; | 325 | return -1; |
| @@ -330,8 +330,8 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file) | |||
| 330 | dpyinfo->bitmaps[id - 1].refcount = 1; | 330 | dpyinfo->bitmaps[id - 1].refcount = 1; |
| 331 | dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1); | 331 | dpyinfo->bitmaps[id - 1].file = (char *) xmalloc (SBYTES (file) + 1); |
| 332 | dpyinfo->bitmaps[id - 1].depth = 1; | 332 | dpyinfo->bitmaps[id - 1].depth = 1; |
| 333 | dpyinfo->bitmaps[id - 1].height = ns_image_width(bitmap); | 333 | dpyinfo->bitmaps[id - 1].height = ns_image_width (bitmap); |
| 334 | dpyinfo->bitmaps[id - 1].width = ns_image_height(bitmap); | 334 | dpyinfo->bitmaps[id - 1].width = ns_image_height (bitmap); |
| 335 | strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); | 335 | strcpy (dpyinfo->bitmaps[id - 1].file, SDATA (file)); |
| 336 | return id; | 336 | return id; |
| 337 | #endif | 337 | #endif |
| @@ -399,7 +399,7 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm) | |||
| 399 | #endif /* HAVE_NTGUI */ | 399 | #endif /* HAVE_NTGUI */ |
| 400 | 400 | ||
| 401 | #ifdef HAVE_NS | 401 | #ifdef HAVE_NS |
| 402 | ns_release_object(bm->img); | 402 | ns_release_object (bm->img); |
| 403 | #endif | 403 | #endif |
| 404 | 404 | ||
| 405 | if (bm->file) | 405 | if (bm->file) |
| @@ -1211,10 +1211,10 @@ four_corners_best (XImagePtr_or_DC ximg, int *corners, | |||
| 1211 | #elif defined (HAVE_NS) | 1211 | #elif defined (HAVE_NS) |
| 1212 | 1212 | ||
| 1213 | #define Destroy_Image(ximg, dummy) \ | 1213 | #define Destroy_Image(ximg, dummy) \ |
| 1214 | ns_release_object(ximg) | 1214 | ns_release_object (ximg) |
| 1215 | 1215 | ||
| 1216 | #define Free_Pixmap(display, pixmap) \ | 1216 | #define Free_Pixmap(display, pixmap) \ |
| 1217 | ns_release_object(pixmap) | 1217 | ns_release_object (pixmap) |
| 1218 | 1218 | ||
| 1219 | #else | 1219 | #else |
| 1220 | 1220 | ||
| @@ -2099,7 +2099,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, | |||
| 2099 | #endif /* HAVE_NTGUI */ | 2099 | #endif /* HAVE_NTGUI */ |
| 2100 | 2100 | ||
| 2101 | #ifdef HAVE_NS | 2101 | #ifdef HAVE_NS |
| 2102 | *pixmap = ns_image_for_XPM(width, height, depth); | 2102 | *pixmap = ns_image_for_XPM (width, height, depth); |
| 2103 | if (*pixmap == 0) | 2103 | if (*pixmap == 0) |
| 2104 | { | 2104 | { |
| 2105 | *ximg = NULL; | 2105 | *ximg = NULL; |
| @@ -2131,7 +2131,7 @@ x_destroy_x_image (XImagePtr ximg) | |||
| 2131 | xfree (ximg); | 2131 | xfree (ximg); |
| 2132 | #endif /* HAVE_NTGUI */ | 2132 | #endif /* HAVE_NTGUI */ |
| 2133 | #ifdef HAVE_NS | 2133 | #ifdef HAVE_NS |
| 2134 | ns_release_object(ximg); | 2134 | ns_release_object (ximg); |
| 2135 | #endif /* HAVE_NS */ | 2135 | #endif /* HAVE_NS */ |
| 2136 | } | 2136 | } |
| 2137 | } | 2137 | } |
| @@ -2162,7 +2162,7 @@ x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int he | |||
| 2162 | 2162 | ||
| 2163 | #ifdef HAVE_NS | 2163 | #ifdef HAVE_NS |
| 2164 | xassert (ximg == pixmap); | 2164 | xassert (ximg == pixmap); |
| 2165 | ns_retain_object(ximg); | 2165 | ns_retain_object (ximg); |
| 2166 | #endif | 2166 | #endif |
| 2167 | } | 2167 | } |
| 2168 | 2168 | ||
| @@ -2619,7 +2619,7 @@ Create_Pixmap_From_Bitmap_Data (struct frame *f, struct image *img, char *data, | |||
| 2619 | convert_mono_to_color_image (f, img, fg, bg); | 2619 | convert_mono_to_color_image (f, img, fg, bg); |
| 2620 | 2620 | ||
| 2621 | #elif defined (HAVE_NS) | 2621 | #elif defined (HAVE_NS) |
| 2622 | img->pixmap = ns_image_from_XBM(data, img->width, img->height); | 2622 | img->pixmap = ns_image_from_XBM (data, img->width, img->height); |
| 2623 | 2623 | ||
| 2624 | #else | 2624 | #else |
| 2625 | img->pixmap | 2625 | img->pixmap |
| @@ -2982,7 +2982,7 @@ xbm_load (struct frame *f, struct image *img) | |||
| 2982 | invertedBits = bits; | 2982 | invertedBits = bits; |
| 2983 | nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR | 2983 | nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR |
| 2984 | * img->height; | 2984 | * img->height; |
| 2985 | bits = (char *) alloca(nbytes); | 2985 | bits = (char *) alloca (nbytes); |
| 2986 | for (i = 0; i < nbytes; i++) | 2986 | for (i = 0; i < nbytes; i++) |
| 2987 | bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); | 2987 | bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); |
| 2988 | } | 2988 | } |
| @@ -3859,7 +3859,7 @@ xpm_load_image (f, img, contents, end) | |||
| 3859 | if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0)) | 3859 | if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0)) |
| 3860 | goto failure; | 3860 | goto failure; |
| 3861 | s += 9; | 3861 | s += 9; |
| 3862 | match(); | 3862 | match (); |
| 3863 | expect_ident ("static"); | 3863 | expect_ident ("static"); |
| 3864 | expect_ident ("char"); | 3864 | expect_ident ("char"); |
| 3865 | expect ('*'); | 3865 | expect ('*'); |
| @@ -4009,8 +4009,8 @@ xpm_load_image (f, img, contents, end) | |||
| 4009 | (!EQ (color_val, Qt) ? PIX_MASK_DRAW | 4009 | (!EQ (color_val, Qt) ? PIX_MASK_DRAW |
| 4010 | : (have_mask = 1, PIX_MASK_RETAIN))); | 4010 | : (have_mask = 1, PIX_MASK_RETAIN))); |
| 4011 | #else | 4011 | #else |
| 4012 | if (EQ(color_val, Qt)) | 4012 | if (EQ (color_val, Qt)) |
| 4013 | ns_set_alpha(ximg, x, y, 0); | 4013 | ns_set_alpha (ximg, x, y, 0); |
| 4014 | #endif | 4014 | #endif |
| 4015 | } | 4015 | } |
| 4016 | if (y + 1 < height) | 4016 | if (y + 1 < height) |
| @@ -4897,7 +4897,7 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how) | |||
| 4897 | ? PIX_MASK_DRAW : PIX_MASK_RETAIN)); | 4897 | ? PIX_MASK_DRAW : PIX_MASK_RETAIN)); |
| 4898 | #else | 4898 | #else |
| 4899 | if (XGetPixel (ximg, x, y) == bg) | 4899 | if (XGetPixel (ximg, x, y) == bg) |
| 4900 | ns_set_alpha(ximg, x, y, 0); | 4900 | ns_set_alpha (ximg, x, y, 0); |
| 4901 | #endif /* HAVE_NS */ | 4901 | #endif /* HAVE_NS */ |
| 4902 | #ifndef HAVE_NS | 4902 | #ifndef HAVE_NS |
| 4903 | /* Fill in the background_transparent field while we have the mask handy. */ | 4903 | /* Fill in the background_transparent field while we have the mask handy. */ |
| @@ -6485,9 +6485,9 @@ jpeg_load (struct frame *f, struct image *img) | |||
| 6485 | static int | 6485 | static int |
| 6486 | jpeg_load (struct frame *f, struct image *img) | 6486 | jpeg_load (struct frame *f, struct image *img) |
| 6487 | { | 6487 | { |
| 6488 | return ns_load_image(f, img, | 6488 | return ns_load_image (f, img, |
| 6489 | image_spec_value (img->spec, QCfile, NULL), | 6489 | image_spec_value (img->spec, QCfile, NULL), |
| 6490 | image_spec_value (img->spec, QCdata, NULL)); | 6490 | image_spec_value (img->spec, QCdata, NULL)); |
| 6491 | } | 6491 | } |
| 6492 | #endif /* HAVE_NS */ | 6492 | #endif /* HAVE_NS */ |
| 6493 | 6493 | ||
| @@ -6912,9 +6912,9 @@ tiff_load (struct frame *f, struct image *img) | |||
| 6912 | static int | 6912 | static int |
| 6913 | tiff_load (struct frame *f, struct image *img) | 6913 | tiff_load (struct frame *f, struct image *img) |
| 6914 | { | 6914 | { |
| 6915 | return ns_load_image(f, img, | 6915 | return ns_load_image (f, img, |
| 6916 | image_spec_value (img->spec, QCfile, NULL), | 6916 | image_spec_value (img->spec, QCfile, NULL), |
| 6917 | image_spec_value (img->spec, QCdata, NULL)); | 6917 | image_spec_value (img->spec, QCdata, NULL)); |
| 6918 | } | 6918 | } |
| 6919 | #endif /* HAVE_NS */ | 6919 | #endif /* HAVE_NS */ |
| 6920 | 6920 | ||
| @@ -7342,9 +7342,9 @@ gif_load (struct frame *f, struct image *img) | |||
| 7342 | static int | 7342 | static int |
| 7343 | gif_load (struct frame *f, struct image *img) | 7343 | gif_load (struct frame *f, struct image *img) |
| 7344 | { | 7344 | { |
| 7345 | return ns_load_image(f, img, | 7345 | return ns_load_image (f, img, |
| 7346 | image_spec_value (img->spec, QCfile, NULL), | 7346 | image_spec_value (img->spec, QCfile, NULL), |
| 7347 | image_spec_value (img->spec, QCdata, NULL)); | 7347 | image_spec_value (img->spec, QCdata, NULL)); |
| 7348 | } | 7348 | } |
| 7349 | #endif /* HAVE_NS */ | 7349 | #endif /* HAVE_NS */ |
| 7350 | 7350 | ||
| @@ -7666,7 +7666,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. * | |||
| 7666 | background.pixel = FRAME_BACKGROUND_PIXEL (f); | 7666 | background.pixel = FRAME_BACKGROUND_PIXEL (f); |
| 7667 | x_query_color (f, &background); | 7667 | x_query_color (f, &background); |
| 7668 | #else | 7668 | #else |
| 7669 | ns_query_color(FRAME_BACKGROUND_COLOR (f), &background, 1); | 7669 | ns_query_color (FRAME_BACKGROUND_COLOR (f), &background, 1); |
| 7670 | #endif | 7670 | #endif |
| 7671 | } | 7671 | } |
| 7672 | 7672 | ||