aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2010-08-19 09:23:06 +0200
committerJoakim Verona2010-08-19 09:23:06 +0200
commitb0c396f73b2320e664e6bc620c12d0d6ac6ded51 (patch)
treeb72aff4bc90ceace665829949783d7e2936a9d95 /src
parent432c97542003050bab643a8f901feaa326f8369f (diff)
downloademacs-b0c396f73b2320e664e6bc620c12d0d6ac6ded51.tar.gz
emacs-b0c396f73b2320e664e6bc620c12d0d6ac6ded51.zip
fix some accidental whitespace changes
Diffstat (limited to 'src')
-rw-r--r--src/image.c905
1 files changed, 450 insertions, 455 deletions
diff --git a/src/image.c b/src/image.c
index b198e6aab00..176d3b41d09 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1,22 +1,22 @@
1/* Functions for image support on window system. 1/* Functions for image support on window system.
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6 This file is part of GNU Emacs. 6This file is part of GNU Emacs.
7 7
8 GNU Emacs is free software: you can redistribute it and/or modify 8GNU Emacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or 10the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version. 11(at your option) any later version.
12 12
13 GNU Emacs is distributed in the hope that it will be useful, 13GNU Emacs is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 16GNU General Public License for more details.
17 17
18 You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <config.h> 21#include <config.h>
22#include <stdio.h> 22#include <stdio.h>
@@ -115,7 +115,7 @@ typedef struct ns_bitmap_record Bitmap_Record;
115#define PIX_MASK_DRAW 1 115#define PIX_MASK_DRAW 1
116 116
117#define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO(f)->visual 117#define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO(f)->visual
118#define x_defined_color(f, name, color_def, alloc) \ 118#define x_defined_color(f, name, color_def, alloc) \
119 ns_defined_color (f, name, color_def, alloc, 0) 119 ns_defined_color (f, name, color_def, alloc, 0)
120#define FRAME_X_SCREEN(f) 0 120#define FRAME_X_SCREEN(f) 0
121#define DefaultDepthOfScreen(screen) x_display_list->n_planes 121#define DefaultDepthOfScreen(screen) x_display_list->n_planes
@@ -279,7 +279,7 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi
279#ifdef HAVE_NS 279#ifdef HAVE_NS
280 void *bitmap = ns_image_from_XBM (bits, width, height); 280 void *bitmap = ns_image_from_XBM (bits, width, height);
281 if (!bitmap) 281 if (!bitmap)
282 return -1; 282 return -1;
283#endif 283#endif
284 284
285 id = x_allocate_bitmap_record (f); 285 id = x_allocate_bitmap_record (f);
@@ -325,7 +325,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
325 void *bitmap = ns_image_from_file (file); 325 void *bitmap = ns_image_from_file (file);
326 326
327 if (!bitmap) 327 if (!bitmap)
328 return -1; 328 return -1;
329 329
330 330
331 id = x_allocate_bitmap_record (f); 331 id = x_allocate_bitmap_record (f);
@@ -552,7 +552,7 @@ x_create_bitmap_mask (struct frame *f, int id)
552 552
553/*********************************************************************** 553/***********************************************************************
554 Image types 554 Image types
555***********************************************************************/ 555 ***********************************************************************/
556 556
557/* Value is the number of elements of vector VECTOR. */ 557/* Value is the number of elements of vector VECTOR. */
558 558
@@ -604,10 +604,10 @@ static void x_emboss (struct frame *, struct image *);
604static int x_build_heuristic_mask (struct frame *, struct image *, 604static int x_build_heuristic_mask (struct frame *, struct image *,
605 Lisp_Object); 605 Lisp_Object);
606 606
607#define CACHE_IMAGE_TYPE(type, status) \ 607#define CACHE_IMAGE_TYPE(type, status) \
608 do { Vimage_type_cache = Fcons (Fcons (type, status), Vimage_type_cache); } while (0) 608 do { Vimage_type_cache = Fcons (Fcons (type, status), Vimage_type_cache); } while (0)
609 609
610#define ADD_IMAGE_TYPE(type) \ 610#define ADD_IMAGE_TYPE(type) \
611 do { Vimage_types = Fcons (type, Vimage_types); } while (0) 611 do { Vimage_types = Fcons (type, Vimage_types); } while (0)
612 612
613/* Define a new image type from TYPE. This adds a copy of TYPE to 613/* Define a new image type from TYPE. This adds a copy of TYPE to
@@ -708,23 +708,23 @@ image_error (const char *format, Lisp_Object arg1, Lisp_Object arg2)
708 708
709/*********************************************************************** 709/***********************************************************************
710 Image specifications 710 Image specifications
711***********************************************************************/ 711 ***********************************************************************/
712 712
713enum image_value_type 713enum image_value_type
714 { 714{
715 IMAGE_DONT_CHECK_VALUE_TYPE, 715 IMAGE_DONT_CHECK_VALUE_TYPE,
716 IMAGE_STRING_VALUE, 716 IMAGE_STRING_VALUE,
717 IMAGE_STRING_OR_NIL_VALUE, 717 IMAGE_STRING_OR_NIL_VALUE,
718 IMAGE_SYMBOL_VALUE, 718 IMAGE_SYMBOL_VALUE,
719 IMAGE_POSITIVE_INTEGER_VALUE, 719 IMAGE_POSITIVE_INTEGER_VALUE,
720 IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 720 IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
721 IMAGE_NON_NEGATIVE_INTEGER_VALUE, 721 IMAGE_NON_NEGATIVE_INTEGER_VALUE,
722 IMAGE_ASCENT_VALUE, 722 IMAGE_ASCENT_VALUE,
723 IMAGE_INTEGER_VALUE, 723 IMAGE_INTEGER_VALUE,
724 IMAGE_FUNCTION_VALUE, 724 IMAGE_FUNCTION_VALUE,
725 IMAGE_NUMBER_VALUE, 725 IMAGE_NUMBER_VALUE,
726 IMAGE_BOOL_VALUE 726 IMAGE_BOOL_VALUE
727 }; 727};
728 728
729/* Structure used when parsing image specifications. */ 729/* Structure used when parsing image specifications. */
730 730
@@ -998,7 +998,7 @@ or omitted means use the selected frame. */)
998 998
999/*********************************************************************** 999/***********************************************************************
1000 Image type independent image structures 1000 Image type independent image structures
1001***********************************************************************/ 1001 ***********************************************************************/
1002 1002
1003static struct image *make_image (Lisp_Object spec, unsigned hash); 1003static struct image *make_image (Lisp_Object spec, unsigned hash);
1004static void free_image (struct frame *f, struct image *img); 1004static void free_image (struct frame *f, struct image *img);
@@ -1203,10 +1203,10 @@ four_corners_best (XImagePtr_or_DC ximg, int *corners,
1203 1203
1204#ifdef HAVE_NTGUI 1204#ifdef HAVE_NTGUI
1205 1205
1206#define Destroy_Image(img_dc, prev) \ 1206#define Destroy_Image(img_dc, prev) \
1207 do { SelectObject (img_dc, prev); DeleteDC (img_dc); } while (0) 1207 do { SelectObject (img_dc, prev); DeleteDC (img_dc); } while (0)
1208 1208
1209#define Free_Pixmap(display, pixmap) \ 1209#define Free_Pixmap(display, pixmap) \
1210 DeleteObject (pixmap) 1210 DeleteObject (pixmap)
1211 1211
1212#elif defined (HAVE_NS) 1212#elif defined (HAVE_NS)
@@ -1219,10 +1219,10 @@ four_corners_best (XImagePtr_or_DC ximg, int *corners,
1219 1219
1220#else 1220#else
1221 1221
1222#define Destroy_Image(ximg, dummy) \ 1222#define Destroy_Image(ximg, dummy) \
1223 XDestroyImage (ximg) 1223 XDestroyImage (ximg)
1224 1224
1225#define Free_Pixmap(display, pixmap) \ 1225#define Free_Pixmap(display, pixmap) \
1226 XFreePixmap (display, pixmap) 1226 XFreePixmap (display, pixmap)
1227 1227
1228#endif /* !HAVE_NTGUI && !HAVE_NS */ 1228#endif /* !HAVE_NTGUI && !HAVE_NS */
@@ -1316,7 +1316,7 @@ image_background_transparent (struct image *img, struct frame *f, XImagePtr_or_D
1316 1316
1317/*********************************************************************** 1317/***********************************************************************
1318 Helper functions for X image types 1318 Helper functions for X image types
1319***********************************************************************/ 1319 ***********************************************************************/
1320 1320
1321static void x_clear_image_1 (struct frame *, struct image *, int, 1321static void x_clear_image_1 (struct frame *, struct image *, int,
1322 int, int); 1322 int, int);
@@ -1410,7 +1410,7 @@ x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
1410 1410
1411/*********************************************************************** 1411/***********************************************************************
1412 Image Cache 1412 Image Cache
1413***********************************************************************/ 1413 ***********************************************************************/
1414 1414
1415static struct image *search_image_cache (struct frame *, Lisp_Object, unsigned); 1415static struct image *search_image_cache (struct frame *, Lisp_Object, unsigned);
1416static void cache_image (struct frame *f, struct image *img); 1416static void cache_image (struct frame *f, struct image *img);
@@ -1625,9 +1625,9 @@ which is then usually a filename. */)
1625DEFUN ("image-flush", Fimage_flush, Simage_flush, 1625DEFUN ("image-flush", Fimage_flush, Simage_flush,
1626 1, 2, 0, 1626 1, 2, 0,
1627 doc: /* Fush the image with specification SPEC on frame FRAME. 1627 doc: /* Fush the image with specification SPEC on frame FRAME.
1628 This removes the image from the Emacs image cache. If SPEC specifies 1628This removes the image from the Emacs image cache. If SPEC specifies
1629 an image file, the next redisplay of this image will read from the 1629an image file, the next redisplay of this image will read from the
1630 current contents of that file. 1630current contents of that file.
1631 1631
1632FRAME nil or omitted means use the selected frame. 1632FRAME nil or omitted means use the selected frame.
1633FRAME t means refresh the image on all frames. */) 1633FRAME t means refresh the image on all frames. */)
@@ -1914,7 +1914,7 @@ mark_image_cache (struct image_cache *c)
1914 1914
1915/*********************************************************************** 1915/***********************************************************************
1916 X / NS / W32 support code 1916 X / NS / W32 support code
1917***********************************************************************/ 1917 ***********************************************************************/
1918 1918
1919#ifdef HAVE_NTGUI 1919#ifdef HAVE_NTGUI
1920 1920
@@ -1922,9 +1922,9 @@ mark_image_cache (struct image_cache *c)
1922#define DEF_IMGLIB_FN(func) int (FAR CDECL *fn_##func)() 1922#define DEF_IMGLIB_FN(func) int (FAR CDECL *fn_##func)()
1923 1923
1924/* Macro for loading those image functions from the library. */ 1924/* Macro for loading those image functions from the library. */
1925#define LOAD_IMGLIB_FN(lib,func) { \ 1925#define LOAD_IMGLIB_FN(lib,func) { \
1926 fn_##func = (void *) GetProcAddress (lib, #func); \ 1926 fn_##func = (void *) GetProcAddress (lib, #func); \
1927 if (!fn_##func) return 0; \ 1927 if (!fn_##func) return 0; \
1928 } 1928 }
1929 1929
1930/* Load a DLL implementing an image type. 1930/* Load a DLL implementing an image type.
@@ -2166,7 +2166,7 @@ x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int he
2166 2166
2167/*********************************************************************** 2167/***********************************************************************
2168 File Handling 2168 File Handling
2169***********************************************************************/ 2169 ***********************************************************************/
2170 2170
2171static unsigned char *slurp_file (char *, int *); 2171static unsigned char *slurp_file (char *, int *);
2172 2172
@@ -2243,7 +2243,7 @@ slurp_file (char *file, int *size)
2243 2243
2244/*********************************************************************** 2244/***********************************************************************
2245 XBM images 2245 XBM images
2246***********************************************************************/ 2246 ***********************************************************************/
2247 2247
2248static int xbm_scan (unsigned char **, unsigned char *, char *, int *); 2248static int xbm_scan (unsigned char **, unsigned char *, char *, int *);
2249static int xbm_load (struct frame *f, struct image *img); 2249static int xbm_load (struct frame *f, struct image *img);
@@ -2259,61 +2259,61 @@ static int xbm_file_p (Lisp_Object);
2259/* Indices of image specification fields in xbm_format, below. */ 2259/* Indices of image specification fields in xbm_format, below. */
2260 2260
2261enum xbm_keyword_index 2261enum xbm_keyword_index
2262 { 2262{
2263 XBM_TYPE, 2263 XBM_TYPE,
2264 XBM_FILE, 2264 XBM_FILE,
2265 XBM_WIDTH, 2265 XBM_WIDTH,
2266 XBM_HEIGHT, 2266 XBM_HEIGHT,
2267 XBM_DATA, 2267 XBM_DATA,
2268 XBM_FOREGROUND, 2268 XBM_FOREGROUND,
2269 XBM_BACKGROUND, 2269 XBM_BACKGROUND,
2270 XBM_ASCENT, 2270 XBM_ASCENT,
2271 XBM_MARGIN, 2271 XBM_MARGIN,
2272 XBM_RELIEF, 2272 XBM_RELIEF,
2273 XBM_ALGORITHM, 2273 XBM_ALGORITHM,
2274 XBM_HEURISTIC_MASK, 2274 XBM_HEURISTIC_MASK,
2275 XBM_MASK, 2275 XBM_MASK,
2276 XBM_LAST 2276 XBM_LAST
2277 }; 2277};
2278 2278
2279/* Vector of image_keyword structures describing the format 2279/* Vector of image_keyword structures describing the format
2280 of valid XBM image specifications. */ 2280 of valid XBM image specifications. */
2281 2281
2282static const struct image_keyword xbm_format[XBM_LAST] = 2282static const struct image_keyword xbm_format[XBM_LAST] =
2283 { 2283{
2284 {":type", IMAGE_SYMBOL_VALUE, 1}, 2284 {":type", IMAGE_SYMBOL_VALUE, 1},
2285 {":file", IMAGE_STRING_VALUE, 0}, 2285 {":file", IMAGE_STRING_VALUE, 0},
2286 {":width", IMAGE_POSITIVE_INTEGER_VALUE, 0}, 2286 {":width", IMAGE_POSITIVE_INTEGER_VALUE, 0},
2287 {":height", IMAGE_POSITIVE_INTEGER_VALUE, 0}, 2287 {":height", IMAGE_POSITIVE_INTEGER_VALUE, 0},
2288 {":data", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 2288 {":data", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
2289 {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, 2289 {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0},
2290 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}, 2290 {":background", IMAGE_STRING_OR_NIL_VALUE, 0},
2291 {":ascent", IMAGE_ASCENT_VALUE, 0}, 2291 {":ascent", IMAGE_ASCENT_VALUE, 0},
2292 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 2292 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
2293 {":relief", IMAGE_INTEGER_VALUE, 0}, 2293 {":relief", IMAGE_INTEGER_VALUE, 0},
2294 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 2294 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
2295 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 2295 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
2296 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0} 2296 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}
2297 }; 2297};
2298 2298
2299/* Structure describing the image type XBM. */ 2299/* Structure describing the image type XBM. */
2300 2300
2301static struct image_type xbm_type = 2301static struct image_type xbm_type =
2302 { 2302{
2303 &Qxbm, 2303 &Qxbm,
2304 xbm_image_p, 2304 xbm_image_p,
2305 xbm_load, 2305 xbm_load,
2306 x_clear_image, 2306 x_clear_image,
2307 NULL 2307 NULL
2308 }; 2308};
2309 2309
2310/* Tokens returned from xbm_scan. */ 2310/* Tokens returned from xbm_scan. */
2311 2311
2312enum xbm_token 2312enum xbm_token
2313 { 2313{
2314 XBM_TK_IDENT = 256, 2314 XBM_TK_IDENT = 256,
2315 XBM_TK_NUMBER 2315 XBM_TK_NUMBER
2316 }; 2316};
2317 2317
2318 2318
2319/* Return non-zero if OBJECT is a valid XBM-type image specification. 2319/* Return non-zero if OBJECT is a valid XBM-type image specification.
@@ -2652,20 +2652,20 @@ xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *e
2652 int value; 2652 int value;
2653 int LA1; 2653 int LA1;
2654 2654
2655#define match() \ 2655#define match() \
2656 LA1 = xbm_scan (&s, end, buffer, &value) 2656 LA1 = xbm_scan (&s, end, buffer, &value)
2657 2657
2658#define expect(TOKEN) \ 2658#define expect(TOKEN) \
2659 if (LA1 != (TOKEN)) \ 2659 if (LA1 != (TOKEN)) \
2660 goto failure; \ 2660 goto failure; \
2661 else \ 2661 else \
2662 match () 2662 match ()
2663 2663
2664#define expect_ident(IDENT) \ 2664#define expect_ident(IDENT) \
2665 if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \ 2665 if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \
2666 match (); \ 2666 match (); \
2667 else \ 2667 else \
2668 goto failure 2668 goto failure
2669 2669
2670 *width = *height = -1; 2670 *width = *height = -1;
2671 if (data) 2671 if (data)
@@ -3005,7 +3005,7 @@ xbm_load (struct frame *f, struct image *img)
3005 3005
3006/*********************************************************************** 3006/***********************************************************************
3007 XPM images 3007 XPM images
3008***********************************************************************/ 3008 ***********************************************************************/
3009 3009
3010#if defined (HAVE_XPM) || defined (HAVE_NS) 3010#if defined (HAVE_XPM) || defined (HAVE_NS)
3011 3011
@@ -3044,49 +3044,49 @@ Lisp_Object Qxpm;
3044/* Indices of image specification fields in xpm_format, below. */ 3044/* Indices of image specification fields in xpm_format, below. */
3045 3045
3046enum xpm_keyword_index 3046enum xpm_keyword_index
3047 { 3047{
3048 XPM_TYPE, 3048 XPM_TYPE,
3049 XPM_FILE, 3049 XPM_FILE,
3050 XPM_DATA, 3050 XPM_DATA,
3051 XPM_ASCENT, 3051 XPM_ASCENT,
3052 XPM_MARGIN, 3052 XPM_MARGIN,
3053 XPM_RELIEF, 3053 XPM_RELIEF,
3054 XPM_ALGORITHM, 3054 XPM_ALGORITHM,
3055 XPM_HEURISTIC_MASK, 3055 XPM_HEURISTIC_MASK,
3056 XPM_MASK, 3056 XPM_MASK,
3057 XPM_COLOR_SYMBOLS, 3057 XPM_COLOR_SYMBOLS,
3058 XPM_BACKGROUND, 3058 XPM_BACKGROUND,
3059 XPM_LAST 3059 XPM_LAST
3060 }; 3060};
3061 3061
3062/* Vector of image_keyword structures describing the format 3062/* Vector of image_keyword structures describing the format
3063 of valid XPM image specifications. */ 3063 of valid XPM image specifications. */
3064 3064
3065static const struct image_keyword xpm_format[XPM_LAST] = 3065static const struct image_keyword xpm_format[XPM_LAST] =
3066 { 3066{
3067 {":type", IMAGE_SYMBOL_VALUE, 1}, 3067 {":type", IMAGE_SYMBOL_VALUE, 1},
3068 {":file", IMAGE_STRING_VALUE, 0}, 3068 {":file", IMAGE_STRING_VALUE, 0},
3069 {":data", IMAGE_STRING_VALUE, 0}, 3069 {":data", IMAGE_STRING_VALUE, 0},
3070 {":ascent", IMAGE_ASCENT_VALUE, 0}, 3070 {":ascent", IMAGE_ASCENT_VALUE, 0},
3071 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 3071 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
3072 {":relief", IMAGE_INTEGER_VALUE, 0}, 3072 {":relief", IMAGE_INTEGER_VALUE, 0},
3073 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 3073 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
3074 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 3074 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
3075 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 3075 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
3076 {":color-symbols", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 3076 {":color-symbols", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
3077 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 3077 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
3078 }; 3078};
3079 3079
3080/* Structure describing the image type XPM. */ 3080/* Structure describing the image type XPM. */
3081 3081
3082static struct image_type xpm_type = 3082static struct image_type xpm_type =
3083 { 3083{
3084 &Qxpm, 3084 &Qxpm,
3085 xpm_image_p, 3085 xpm_image_p,
3086 xpm_load, 3086 xpm_load,
3087 x_clear_image, 3087 x_clear_image,
3088 NULL 3088 NULL
3089 }; 3089};
3090 3090
3091#ifdef HAVE_X_WINDOWS 3091#ifdef HAVE_X_WINDOWS
3092 3092
@@ -3645,11 +3645,11 @@ static int xpm_load_image (struct frame *, struct image *,
3645/* Tokens returned from xpm_scan. */ 3645/* Tokens returned from xpm_scan. */
3646 3646
3647enum xpm_token 3647enum xpm_token
3648 { 3648{
3649 XPM_TK_IDENT = 256, 3649 XPM_TK_IDENT = 256,
3650 XPM_TK_STRING, 3650 XPM_TK_STRING,
3651 XPM_TK_EOF 3651 XPM_TK_EOF
3652 }; 3652};
3653 3653
3654/* Scan an XPM data and return a character (< 256) or a token defined 3654/* Scan an XPM data and return a character (< 256) or a token defined
3655 by enum xpm_token above. *S and END are the start (inclusive) and 3655 by enum xpm_token above. *S and END are the start (inclusive) and
@@ -3679,7 +3679,7 @@ xpm_scan (const unsigned char **s,
3679 *beg = *s - 1; 3679 *beg = *s - 1;
3680 while (*s < end 3680 while (*s < end
3681 && (c = **s, isalnum (c) || c == '_' || c == '-' || c == '+')) 3681 && (c = **s, isalnum (c) || c == '_' || c == '-' || c == '+'))
3682 ++*s; 3682 ++*s;
3683 *len = *s - *beg; 3683 *len = *s - *beg;
3684 return XPM_TK_IDENT; 3684 return XPM_TK_IDENT;
3685 } 3685 }
@@ -3839,21 +3839,21 @@ xpm_load_image (struct frame *f,
3839 int best_key, have_mask = 0; 3839 int best_key, have_mask = 0;
3840 XImagePtr ximg = NULL, mask_img = NULL; 3840 XImagePtr ximg = NULL, mask_img = NULL;
3841 3841
3842#define match() \ 3842#define match() \
3843 LA1 = xpm_scan (&s, end, &beg, &len) 3843 LA1 = xpm_scan (&s, end, &beg, &len)
3844 3844
3845#define expect(TOKEN) \ 3845#define expect(TOKEN) \
3846 if (LA1 != (TOKEN)) \ 3846 if (LA1 != (TOKEN)) \
3847 goto failure; \ 3847 goto failure; \
3848 else \ 3848 else \
3849 match () 3849 match ()
3850 3850
3851#define expect_ident(IDENT) \ 3851#define expect_ident(IDENT) \
3852 if (LA1 == XPM_TK_IDENT \ 3852 if (LA1 == XPM_TK_IDENT \
3853 && strlen ((IDENT)) == len && memcmp ((IDENT), beg, len) == 0) \ 3853 && strlen ((IDENT)) == len && memcmp ((IDENT), beg, len) == 0) \
3854 match (); \ 3854 match (); \
3855 else \ 3855 else \
3856 goto failure 3856 goto failure
3857 3857
3858 if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0)) 3858 if (!(end - s >= 9 && memcmp (s, "/* XPM */", 9) == 0))
3859 goto failure; 3859 goto failure;
@@ -4112,7 +4112,7 @@ xpm_load (struct frame *f,
4112 4112
4113/*********************************************************************** 4113/***********************************************************************
4114 Color table 4114 Color table
4115***********************************************************************/ 4115 ***********************************************************************/
4116 4116
4117#ifdef COLOR_TABLE_SUPPORT 4117#ifdef COLOR_TABLE_SUPPORT
4118 4118
@@ -4379,7 +4379,7 @@ init_color_table (void)
4379 4379
4380/*********************************************************************** 4380/***********************************************************************
4381 Algorithms 4381 Algorithms
4382***********************************************************************/ 4382 ***********************************************************************/
4383 4383
4384static XColor *x_to_xcolors (struct frame *, struct image *, int); 4384static XColor *x_to_xcolors (struct frame *, struct image *, int);
4385static void x_from_xcolors (struct frame *, struct image *, XColor *); 4385static void x_from_xcolors (struct frame *, struct image *, XColor *);
@@ -4398,17 +4398,17 @@ int cross_disabled_images;
4398 strategies. */ 4398 strategies. */
4399 4399
4400static int emboss_matrix[9] = { 4400static int emboss_matrix[9] = {
4401 /* x - 1 x x + 1 */ 4401 /* x - 1 x x + 1 */
4402 2, -1, 0, /* y - 1 */ 4402 2, -1, 0, /* y - 1 */
4403 -1, 0, 1, /* y */ 4403 -1, 0, 1, /* y */
4404 0, 1, -2 /* y + 1 */ 4404 0, 1, -2 /* y + 1 */
4405}; 4405};
4406 4406
4407static int laplace_matrix[9] = { 4407static int laplace_matrix[9] = {
4408 /* x - 1 x x + 1 */ 4408 /* x - 1 x x + 1 */
4409 1, 0, 0, /* y - 1 */ 4409 1, 0, 0, /* y - 1 */
4410 0, 0, 0, /* y */ 4410 0, 0, 0, /* y */
4411 0, 0, -1 /* y + 1 */ 4411 0, 0, -1 /* y + 1 */
4412}; 4412};
4413 4413
4414/* Value is the intensity of the color whose red/green/blue values 4414/* Value is the intensity of the color whose red/green/blue values
@@ -4928,7 +4928,7 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
4928 4928
4929/*********************************************************************** 4929/***********************************************************************
4930 PBM (mono, gray, color) 4930 PBM (mono, gray, color)
4931***********************************************************************/ 4931 ***********************************************************************/
4932 4932
4933static int pbm_image_p (Lisp_Object object); 4933static int pbm_image_p (Lisp_Object object);
4934static int pbm_load (struct frame *f, struct image *img); 4934static int pbm_load (struct frame *f, struct image *img);
@@ -4941,49 +4941,49 @@ Lisp_Object Qpbm;
4941/* Indices of image specification fields in gs_format, below. */ 4941/* Indices of image specification fields in gs_format, below. */
4942 4942
4943enum pbm_keyword_index 4943enum pbm_keyword_index
4944 { 4944{
4945 PBM_TYPE, 4945 PBM_TYPE,
4946 PBM_FILE, 4946 PBM_FILE,
4947 PBM_DATA, 4947 PBM_DATA,
4948 PBM_ASCENT, 4948 PBM_ASCENT,
4949 PBM_MARGIN, 4949 PBM_MARGIN,
4950 PBM_RELIEF, 4950 PBM_RELIEF,
4951 PBM_ALGORITHM, 4951 PBM_ALGORITHM,
4952 PBM_HEURISTIC_MASK, 4952 PBM_HEURISTIC_MASK,
4953 PBM_MASK, 4953 PBM_MASK,
4954 PBM_FOREGROUND, 4954 PBM_FOREGROUND,
4955 PBM_BACKGROUND, 4955 PBM_BACKGROUND,
4956 PBM_LAST 4956 PBM_LAST
4957 }; 4957};
4958 4958
4959/* Vector of image_keyword structures describing the format 4959/* Vector of image_keyword structures describing the format
4960 of valid user-defined image specifications. */ 4960 of valid user-defined image specifications. */
4961 4961
4962static const struct image_keyword pbm_format[PBM_LAST] = 4962static const struct image_keyword pbm_format[PBM_LAST] =
4963 { 4963{
4964 {":type", IMAGE_SYMBOL_VALUE, 1}, 4964 {":type", IMAGE_SYMBOL_VALUE, 1},
4965 {":file", IMAGE_STRING_VALUE, 0}, 4965 {":file", IMAGE_STRING_VALUE, 0},
4966 {":data", IMAGE_STRING_VALUE, 0}, 4966 {":data", IMAGE_STRING_VALUE, 0},
4967 {":ascent", IMAGE_ASCENT_VALUE, 0}, 4967 {":ascent", IMAGE_ASCENT_VALUE, 0},
4968 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 4968 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
4969 {":relief", IMAGE_INTEGER_VALUE, 0}, 4969 {":relief", IMAGE_INTEGER_VALUE, 0},
4970 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 4970 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
4971 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 4971 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
4972 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 4972 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
4973 {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0}, 4973 {":foreground", IMAGE_STRING_OR_NIL_VALUE, 0},
4974 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 4974 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
4975 }; 4975};
4976 4976
4977/* Structure describing the image type `pbm'. */ 4977/* Structure describing the image type `pbm'. */
4978 4978
4979static struct image_type pbm_type = 4979static struct image_type pbm_type =
4980 { 4980{
4981 &Qpbm, 4981 &Qpbm,
4982 pbm_image_p, 4982 pbm_image_p,
4983 pbm_load, 4983 pbm_load,
4984 x_clear_image, 4984 x_clear_image,
4985 NULL 4985 NULL
4986 }; 4986};
4987 4987
4988 4988
4989/* Return non-zero if OBJECT is a valid PBM image specification. */ 4989/* Return non-zero if OBJECT is a valid PBM image specification. */
@@ -5344,7 +5344,7 @@ pbm_load (struct frame *f, struct image *img)
5344 5344
5345/*********************************************************************** 5345/***********************************************************************
5346 PNG 5346 PNG
5347***********************************************************************/ 5347 ***********************************************************************/
5348 5348
5349#if defined (HAVE_PNG) || defined (HAVE_NS) 5349#if defined (HAVE_PNG) || defined (HAVE_NS)
5350 5350
@@ -5360,47 +5360,47 @@ Lisp_Object Qpng;
5360/* Indices of image specification fields in png_format, below. */ 5360/* Indices of image specification fields in png_format, below. */
5361 5361
5362enum png_keyword_index 5362enum png_keyword_index
5363 { 5363{
5364 PNG_TYPE, 5364 PNG_TYPE,
5365 PNG_DATA, 5365 PNG_DATA,
5366 PNG_FILE, 5366 PNG_FILE,
5367 PNG_ASCENT, 5367 PNG_ASCENT,
5368 PNG_MARGIN, 5368 PNG_MARGIN,
5369 PNG_RELIEF, 5369 PNG_RELIEF,
5370 PNG_ALGORITHM, 5370 PNG_ALGORITHM,
5371 PNG_HEURISTIC_MASK, 5371 PNG_HEURISTIC_MASK,
5372 PNG_MASK, 5372 PNG_MASK,
5373 PNG_BACKGROUND, 5373 PNG_BACKGROUND,
5374 PNG_LAST 5374 PNG_LAST
5375 }; 5375};
5376 5376
5377/* Vector of image_keyword structures describing the format 5377/* Vector of image_keyword structures describing the format
5378 of valid user-defined image specifications. */ 5378 of valid user-defined image specifications. */
5379 5379
5380static const struct image_keyword png_format[PNG_LAST] = 5380static const struct image_keyword png_format[PNG_LAST] =
5381 { 5381{
5382 {":type", IMAGE_SYMBOL_VALUE, 1}, 5382 {":type", IMAGE_SYMBOL_VALUE, 1},
5383 {":data", IMAGE_STRING_VALUE, 0}, 5383 {":data", IMAGE_STRING_VALUE, 0},
5384 {":file", IMAGE_STRING_VALUE, 0}, 5384 {":file", IMAGE_STRING_VALUE, 0},
5385 {":ascent", IMAGE_ASCENT_VALUE, 0}, 5385 {":ascent", IMAGE_ASCENT_VALUE, 0},
5386 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 5386 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
5387 {":relief", IMAGE_INTEGER_VALUE, 0}, 5387 {":relief", IMAGE_INTEGER_VALUE, 0},
5388 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 5388 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
5389 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 5389 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
5390 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 5390 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
5391 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 5391 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
5392 }; 5392};
5393 5393
5394/* Structure describing the image type `png'. */ 5394/* Structure describing the image type `png'. */
5395 5395
5396static struct image_type png_type = 5396static struct image_type png_type =
5397 { 5397{
5398 &Qpng, 5398 &Qpng,
5399 png_image_p, 5399 png_image_p,
5400 png_load, 5400 png_load,
5401 x_clear_image, 5401 x_clear_image,
5402 NULL 5402 NULL
5403 }; 5403};
5404 5404
5405/* Return non-zero if OBJECT is a valid PNG image specification. */ 5405/* Return non-zero if OBJECT is a valid PNG image specification. */
5406 5406
@@ -5935,7 +5935,7 @@ png_load (struct frame *f, struct image *img)
5935 5935
5936/*********************************************************************** 5936/***********************************************************************
5937 JPEG 5937 JPEG
5938***********************************************************************/ 5938 ***********************************************************************/
5939 5939
5940#if defined (HAVE_JPEG) || defined (HAVE_NS) 5940#if defined (HAVE_JPEG) || defined (HAVE_NS)
5941 5941
@@ -5949,47 +5949,47 @@ Lisp_Object Qjpeg;
5949/* Indices of image specification fields in gs_format, below. */ 5949/* Indices of image specification fields in gs_format, below. */
5950 5950
5951enum jpeg_keyword_index 5951enum jpeg_keyword_index
5952 { 5952{
5953 JPEG_TYPE, 5953 JPEG_TYPE,
5954 JPEG_DATA, 5954 JPEG_DATA,
5955 JPEG_FILE, 5955 JPEG_FILE,
5956 JPEG_ASCENT, 5956 JPEG_ASCENT,
5957 JPEG_MARGIN, 5957 JPEG_MARGIN,
5958 JPEG_RELIEF, 5958 JPEG_RELIEF,
5959 JPEG_ALGORITHM, 5959 JPEG_ALGORITHM,
5960 JPEG_HEURISTIC_MASK, 5960 JPEG_HEURISTIC_MASK,
5961 JPEG_MASK, 5961 JPEG_MASK,
5962 JPEG_BACKGROUND, 5962 JPEG_BACKGROUND,
5963 JPEG_LAST 5963 JPEG_LAST
5964 }; 5964};
5965 5965
5966/* Vector of image_keyword structures describing the format 5966/* Vector of image_keyword structures describing the format
5967 of valid user-defined image specifications. */ 5967 of valid user-defined image specifications. */
5968 5968
5969static const struct image_keyword jpeg_format[JPEG_LAST] = 5969static const struct image_keyword jpeg_format[JPEG_LAST] =
5970 { 5970{
5971 {":type", IMAGE_SYMBOL_VALUE, 1}, 5971 {":type", IMAGE_SYMBOL_VALUE, 1},
5972 {":data", IMAGE_STRING_VALUE, 0}, 5972 {":data", IMAGE_STRING_VALUE, 0},
5973 {":file", IMAGE_STRING_VALUE, 0}, 5973 {":file", IMAGE_STRING_VALUE, 0},
5974 {":ascent", IMAGE_ASCENT_VALUE, 0}, 5974 {":ascent", IMAGE_ASCENT_VALUE, 0},
5975 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 5975 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
5976 {":relief", IMAGE_INTEGER_VALUE, 0}, 5976 {":relief", IMAGE_INTEGER_VALUE, 0},
5977 {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 5977 {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
5978 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 5978 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
5979 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 5979 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
5980 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 5980 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
5981 }; 5981};
5982 5982
5983/* Structure describing the image type `jpeg'. */ 5983/* Structure describing the image type `jpeg'. */
5984 5984
5985static struct image_type jpeg_type = 5985static struct image_type jpeg_type =
5986 { 5986{
5987 &Qjpeg, 5987 &Qjpeg,
5988 jpeg_image_p, 5988 jpeg_image_p,
5989 jpeg_load, 5989 jpeg_load,
5990 x_clear_image, 5990 x_clear_image,
5991 NULL 5991 NULL
5992 }; 5992};
5993 5993
5994/* Return non-zero if OBJECT is a valid JPEG image specification. */ 5994/* Return non-zero if OBJECT is a valid JPEG image specification. */
5995 5995
@@ -6271,7 +6271,7 @@ jpeg_file_src (j_decompress_ptr cinfo, FILE *fp)
6271 struct jpeg_stdio_mgr *src; 6271 struct jpeg_stdio_mgr *src;
6272 6272
6273 if (cinfo->src != NULL) 6273 if (cinfo->src != NULL)
6274 src = (struct jpeg_stdio_mgr *) cinfo->src; 6274 src = (struct jpeg_stdio_mgr *) cinfo->src;
6275 else 6275 else
6276 { 6276 {
6277 /* First time for this JPEG object? */ 6277 /* First time for this JPEG object? */
@@ -6280,8 +6280,8 @@ jpeg_file_src (j_decompress_ptr cinfo, FILE *fp)
6280 sizeof (struct jpeg_stdio_mgr)); 6280 sizeof (struct jpeg_stdio_mgr));
6281 src = (struct jpeg_stdio_mgr *) cinfo->src; 6281 src = (struct jpeg_stdio_mgr *) cinfo->src;
6282 src->buffer = (JOCTET *) 6282 src->buffer = (JOCTET *)
6283 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, 6283 (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
6284 JPEG_STDIO_BUFFER_SIZE); 6284 JPEG_STDIO_BUFFER_SIZE);
6285 } 6285 }
6286 6286
6287 src->file = fp; 6287 src->file = fp;
@@ -6373,7 +6373,7 @@ jpeg_load (struct frame *f, struct image *img)
6373 } 6373 }
6374 6374
6375 /* Create the JPEG decompression object. Let it read from fp. 6375 /* Create the JPEG decompression object. Let it read from fp.
6376 Read the JPEG image header. */ 6376 Read the JPEG image header. */
6377 fn_jpeg_CreateDecompress (&cinfo, JPEG_LIB_VERSION, sizeof (cinfo)); 6377 fn_jpeg_CreateDecompress (&cinfo, JPEG_LIB_VERSION, sizeof (cinfo));
6378 6378
6379 if (NILP (specified_data)) 6379 if (NILP (specified_data))
@@ -6385,7 +6385,7 @@ jpeg_load (struct frame *f, struct image *img)
6385 fn_jpeg_read_header (&cinfo, 1); 6385 fn_jpeg_read_header (&cinfo, 1);
6386 6386
6387 /* Customize decompression so that color quantization will be used. 6387 /* Customize decompression so that color quantization will be used.
6388 Start decompression. */ 6388 Start decompression. */
6389 cinfo.quantize_colors = 1; 6389 cinfo.quantize_colors = 1;
6390 fn_jpeg_start_decompress (&cinfo); 6390 fn_jpeg_start_decompress (&cinfo);
6391 width = img->width = cinfo.output_width; 6391 width = img->width = cinfo.output_width;
@@ -6488,7 +6488,7 @@ jpeg_load (struct frame *f, struct image *img)
6488 6488
6489/*********************************************************************** 6489/***********************************************************************
6490 TIFF 6490 TIFF
6491***********************************************************************/ 6491 ***********************************************************************/
6492 6492
6493#if defined (HAVE_TIFF) || defined (HAVE_NS) 6493#if defined (HAVE_TIFF) || defined (HAVE_NS)
6494 6494
@@ -6502,49 +6502,49 @@ Lisp_Object Qtiff;
6502/* Indices of image specification fields in tiff_format, below. */ 6502/* Indices of image specification fields in tiff_format, below. */
6503 6503
6504enum tiff_keyword_index 6504enum tiff_keyword_index
6505 { 6505{
6506 TIFF_TYPE, 6506 TIFF_TYPE,
6507 TIFF_DATA, 6507 TIFF_DATA,
6508 TIFF_FILE, 6508 TIFF_FILE,
6509 TIFF_ASCENT, 6509 TIFF_ASCENT,
6510 TIFF_MARGIN, 6510 TIFF_MARGIN,
6511 TIFF_RELIEF, 6511 TIFF_RELIEF,
6512 TIFF_ALGORITHM, 6512 TIFF_ALGORITHM,
6513 TIFF_HEURISTIC_MASK, 6513 TIFF_HEURISTIC_MASK,
6514 TIFF_MASK, 6514 TIFF_MASK,
6515 TIFF_BACKGROUND, 6515 TIFF_BACKGROUND,
6516 TIFF_INDEX, 6516 TIFF_INDEX,
6517 TIFF_LAST 6517 TIFF_LAST
6518 }; 6518};
6519 6519
6520/* Vector of image_keyword structures describing the format 6520/* Vector of image_keyword structures describing the format
6521 of valid user-defined image specifications. */ 6521 of valid user-defined image specifications. */
6522 6522
6523static const struct image_keyword tiff_format[TIFF_LAST] = 6523static const struct image_keyword tiff_format[TIFF_LAST] =
6524 { 6524{
6525 {":type", IMAGE_SYMBOL_VALUE, 1}, 6525 {":type", IMAGE_SYMBOL_VALUE, 1},
6526 {":data", IMAGE_STRING_VALUE, 0}, 6526 {":data", IMAGE_STRING_VALUE, 0},
6527 {":file", IMAGE_STRING_VALUE, 0}, 6527 {":file", IMAGE_STRING_VALUE, 0},
6528 {":ascent", IMAGE_ASCENT_VALUE, 0}, 6528 {":ascent", IMAGE_ASCENT_VALUE, 0},
6529 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 6529 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
6530 {":relief", IMAGE_INTEGER_VALUE, 0}, 6530 {":relief", IMAGE_INTEGER_VALUE, 0},
6531 {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 6531 {":conversions", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
6532 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 6532 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
6533 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 6533 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
6534 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}, 6534 {":background", IMAGE_STRING_OR_NIL_VALUE, 0},
6535 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0} 6535 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}
6536 }; 6536};
6537 6537
6538/* Structure describing the image type `tiff'. */ 6538/* Structure describing the image type `tiff'. */
6539 6539
6540static struct image_type tiff_type = 6540static struct image_type tiff_type =
6541 { 6541{
6542 &Qtiff, 6542 &Qtiff,
6543 tiff_image_p, 6543 tiff_image_p,
6544 tiff_load, 6544 tiff_load,
6545 x_clear_image, 6545 x_clear_image,
6546 NULL 6546 NULL
6547 }; 6547};
6548 6548
6549/* Return non-zero if OBJECT is a valid TIFF image specification. */ 6549/* Return non-zero if OBJECT is a valid TIFF image specification. */
6550 6550
@@ -6626,7 +6626,7 @@ typedef struct
6626 size_t len; 6626 size_t len;
6627 int index; 6627 int index;
6628} 6628}
6629 tiff_memory_source; 6629tiff_memory_source;
6630 6630
6631static size_t 6631static size_t
6632tiff_read_from_memory (thandle_t data, tdata_t buf, tsize_t size) 6632tiff_read_from_memory (thandle_t data, tdata_t buf, tsize_t size)
@@ -6915,7 +6915,7 @@ tiff_load (struct frame *f, struct image *img)
6915 6915
6916/*********************************************************************** 6916/***********************************************************************
6917 GIF 6917 GIF
6918***********************************************************************/ 6918 ***********************************************************************/
6919 6919
6920#if defined (HAVE_GIF) || defined (HAVE_NS) 6920#if defined (HAVE_GIF) || defined (HAVE_NS)
6921 6921
@@ -6930,49 +6930,49 @@ Lisp_Object Qgif;
6930/* Indices of image specification fields in gif_format, below. */ 6930/* Indices of image specification fields in gif_format, below. */
6931 6931
6932enum gif_keyword_index 6932enum gif_keyword_index
6933 { 6933{
6934 GIF_TYPE, 6934 GIF_TYPE,
6935 GIF_DATA, 6935 GIF_DATA,
6936 GIF_FILE, 6936 GIF_FILE,
6937 GIF_ASCENT, 6937 GIF_ASCENT,
6938 GIF_MARGIN, 6938 GIF_MARGIN,
6939 GIF_RELIEF, 6939 GIF_RELIEF,
6940 GIF_ALGORITHM, 6940 GIF_ALGORITHM,
6941 GIF_HEURISTIC_MASK, 6941 GIF_HEURISTIC_MASK,
6942 GIF_MASK, 6942 GIF_MASK,
6943 GIF_IMAGE, 6943 GIF_IMAGE,
6944 GIF_BACKGROUND, 6944 GIF_BACKGROUND,
6945 GIF_LAST 6945 GIF_LAST
6946 }; 6946};
6947 6947
6948/* Vector of image_keyword structures describing the format 6948/* Vector of image_keyword structures describing the format
6949 of valid user-defined image specifications. */ 6949 of valid user-defined image specifications. */
6950 6950
6951static const struct image_keyword gif_format[GIF_LAST] = 6951static const struct image_keyword gif_format[GIF_LAST] =
6952 { 6952{
6953 {":type", IMAGE_SYMBOL_VALUE, 1}, 6953 {":type", IMAGE_SYMBOL_VALUE, 1},
6954 {":data", IMAGE_STRING_VALUE, 0}, 6954 {":data", IMAGE_STRING_VALUE, 0},
6955 {":file", IMAGE_STRING_VALUE, 0}, 6955 {":file", IMAGE_STRING_VALUE, 0},
6956 {":ascent", IMAGE_ASCENT_VALUE, 0}, 6956 {":ascent", IMAGE_ASCENT_VALUE, 0},
6957 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 6957 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
6958 {":relief", IMAGE_INTEGER_VALUE, 0}, 6958 {":relief", IMAGE_INTEGER_VALUE, 0},
6959 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 6959 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
6960 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 6960 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
6961 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 6961 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
6962 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0}, 6962 {":index", IMAGE_NON_NEGATIVE_INTEGER_VALUE, 0},
6963 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 6963 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
6964 }; 6964};
6965 6965
6966/* Structure describing the image type `gif'. */ 6966/* Structure describing the image type `gif'. */
6967 6967
6968static struct image_type gif_type = 6968static struct image_type gif_type =
6969 { 6969{
6970 &Qgif, 6970 &Qgif,
6971 gif_image_p, 6971 gif_image_p,
6972 gif_load, 6972 gif_load,
6973 gif_clear_image, 6973 gif_clear_image,
6974 NULL 6974 NULL
6975 }; 6975};
6976 6976
6977/* Free X resources of GIF image IMG which is used on frame F. */ 6977/* Free X resources of GIF image IMG which is used on frame F. */
6978 6978
@@ -7062,7 +7062,7 @@ typedef struct
7062 size_t len; 7062 size_t len;
7063 int index; 7063 int index;
7064} 7064}
7065 gif_memory_source; 7065gif_memory_source;
7066 7066
7067/* Make the current memory source available to gif_read_from_memory. 7067/* Make the current memory source available to gif_read_from_memory.
7068 It's done this way because not all versions of libungif support 7068 It's done this way because not all versions of libungif support
@@ -7865,7 +7865,7 @@ DEFUN ("imagemagick-types", Fimagemagick_types, Simagemagick_types, 0, 0, 0,
7865 7865
7866/*********************************************************************** 7866/***********************************************************************
7867 SVG 7867 SVG
7868***********************************************************************/ 7868 ***********************************************************************/
7869 7869
7870#if defined (HAVE_RSVG) 7870#if defined (HAVE_RSVG)
7871 7871
@@ -7884,55 +7884,55 @@ Lisp_Object Qsvg;
7884/* Indices of image specification fields in svg_format, below. */ 7884/* Indices of image specification fields in svg_format, below. */
7885 7885
7886enum svg_keyword_index 7886enum svg_keyword_index
7887 { 7887{
7888 SVG_TYPE, 7888 SVG_TYPE,
7889 SVG_DATA, 7889 SVG_DATA,
7890 SVG_FILE, 7890 SVG_FILE,
7891 SVG_ASCENT, 7891 SVG_ASCENT,
7892 SVG_MARGIN, 7892 SVG_MARGIN,
7893 SVG_RELIEF, 7893 SVG_RELIEF,
7894 SVG_ALGORITHM, 7894 SVG_ALGORITHM,
7895 SVG_HEURISTIC_MASK, 7895 SVG_HEURISTIC_MASK,
7896 SVG_MASK, 7896 SVG_MASK,
7897 SVG_BACKGROUND, 7897 SVG_BACKGROUND,
7898 SVG_LAST 7898 SVG_LAST
7899 }; 7899};
7900 7900
7901/* Vector of image_keyword structures describing the format 7901/* Vector of image_keyword structures describing the format
7902 of valid user-defined image specifications. */ 7902 of valid user-defined image specifications. */
7903 7903
7904static const struct image_keyword svg_format[SVG_LAST] = 7904static const struct image_keyword svg_format[SVG_LAST] =
7905 { 7905{
7906 {":type", IMAGE_SYMBOL_VALUE, 1}, 7906 {":type", IMAGE_SYMBOL_VALUE, 1},
7907 {":data", IMAGE_STRING_VALUE, 0}, 7907 {":data", IMAGE_STRING_VALUE, 0},
7908 {":file", IMAGE_STRING_VALUE, 0}, 7908 {":file", IMAGE_STRING_VALUE, 0},
7909 {":ascent", IMAGE_ASCENT_VALUE, 0}, 7909 {":ascent", IMAGE_ASCENT_VALUE, 0},
7910 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 7910 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
7911 {":relief", IMAGE_INTEGER_VALUE, 0}, 7911 {":relief", IMAGE_INTEGER_VALUE, 0},
7912 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 7912 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
7913 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 7913 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
7914 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 7914 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
7915 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 7915 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
7916 }; 7916};
7917 7917
7918/* Structure describing the image type `svg'. Its the same type of 7918/* Structure describing the image type `svg'. Its the same type of
7919 structure defined for all image formats, handled by emacs image 7919 structure defined for all image formats, handled by emacs image
7920 functions. See struct image_type in dispextern.h. */ 7920 functions. See struct image_type in dispextern.h. */
7921 7921
7922static struct image_type svg_type = 7922static struct image_type svg_type =
7923 { 7923{
7924 /* An identifier showing that this is an image structure for the SVG format. */ 7924 /* An identifier showing that this is an image structure for the SVG format. */
7925 &Qsvg, 7925 &Qsvg,
7926 /* Handle to a function that can be used to identify a SVG file. */ 7926 /* Handle to a function that can be used to identify a SVG file. */
7927 svg_image_p, 7927 svg_image_p,
7928 /* Handle to function used to load a SVG file. */ 7928 /* Handle to function used to load a SVG file. */
7929 svg_load, 7929 svg_load,
7930 /* Handle to function to free sresources for SVG. */ 7930 /* Handle to function to free sresources for SVG. */
7931 x_clear_image, 7931 x_clear_image,
7932 /* An internal field to link to the next image type in a list of 7932 /* An internal field to link to the next image type in a list of
7933 image types, will be filled in when registering the format. */ 7933 image types, will be filled in when registering the format. */
7934 NULL 7934 NULL
7935 }; 7935};
7936 7936
7937 7937
7938/* Return non-zero if OBJECT is a valid SVG image specification. Do 7938/* Return non-zero if OBJECT is a valid SVG image specification. Do
@@ -8257,7 +8257,7 @@ svg_load_image (struct frame *f, /* Pointer to emacs frame structure. *
8257 8257
8258/*********************************************************************** 8258/***********************************************************************
8259 Ghostscript 8259 Ghostscript
8260***********************************************************************/ 8260 ***********************************************************************/
8261 8261
8262#ifdef HAVE_X_WINDOWS 8262#ifdef HAVE_X_WINDOWS
8263#define HAVE_GHOSTSCRIPT 1 8263#define HAVE_GHOSTSCRIPT 1
@@ -8276,53 +8276,53 @@ Lisp_Object QCloader, QCbounding_box, QCpt_width, QCpt_height;
8276/* Indices of image specification fields in gs_format, below. */ 8276/* Indices of image specification fields in gs_format, below. */
8277 8277
8278enum gs_keyword_index 8278enum gs_keyword_index
8279 { 8279{
8280 GS_TYPE, 8280 GS_TYPE,
8281 GS_PT_WIDTH, 8281 GS_PT_WIDTH,
8282 GS_PT_HEIGHT, 8282 GS_PT_HEIGHT,
8283 GS_FILE, 8283 GS_FILE,
8284 GS_LOADER, 8284 GS_LOADER,
8285 GS_BOUNDING_BOX, 8285 GS_BOUNDING_BOX,
8286 GS_ASCENT, 8286 GS_ASCENT,
8287 GS_MARGIN, 8287 GS_MARGIN,
8288 GS_RELIEF, 8288 GS_RELIEF,
8289 GS_ALGORITHM, 8289 GS_ALGORITHM,
8290 GS_HEURISTIC_MASK, 8290 GS_HEURISTIC_MASK,
8291 GS_MASK, 8291 GS_MASK,
8292 GS_BACKGROUND, 8292 GS_BACKGROUND,
8293 GS_LAST 8293 GS_LAST
8294 }; 8294};
8295 8295
8296/* Vector of image_keyword structures describing the format 8296/* Vector of image_keyword structures describing the format
8297 of valid user-defined image specifications. */ 8297 of valid user-defined image specifications. */
8298 8298
8299static const struct image_keyword gs_format[GS_LAST] = 8299static const struct image_keyword gs_format[GS_LAST] =
8300 { 8300{
8301 {":type", IMAGE_SYMBOL_VALUE, 1}, 8301 {":type", IMAGE_SYMBOL_VALUE, 1},
8302 {":pt-width", IMAGE_POSITIVE_INTEGER_VALUE, 1}, 8302 {":pt-width", IMAGE_POSITIVE_INTEGER_VALUE, 1},
8303 {":pt-height", IMAGE_POSITIVE_INTEGER_VALUE, 1}, 8303 {":pt-height", IMAGE_POSITIVE_INTEGER_VALUE, 1},
8304 {":file", IMAGE_STRING_VALUE, 1}, 8304 {":file", IMAGE_STRING_VALUE, 1},
8305 {":loader", IMAGE_FUNCTION_VALUE, 0}, 8305 {":loader", IMAGE_FUNCTION_VALUE, 0},
8306 {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1}, 8306 {":bounding-box", IMAGE_DONT_CHECK_VALUE_TYPE, 1},
8307 {":ascent", IMAGE_ASCENT_VALUE, 0}, 8307 {":ascent", IMAGE_ASCENT_VALUE, 0},
8308 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0}, 8308 {":margin", IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR, 0},
8309 {":relief", IMAGE_INTEGER_VALUE, 0}, 8309 {":relief", IMAGE_INTEGER_VALUE, 0},
8310 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 8310 {":conversion", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
8311 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 8311 {":heuristic-mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
8312 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0}, 8312 {":mask", IMAGE_DONT_CHECK_VALUE_TYPE, 0},
8313 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 8313 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
8314 }; 8314};
8315 8315
8316/* Structure describing the image type `ghostscript'. */ 8316/* Structure describing the image type `ghostscript'. */
8317 8317
8318static struct image_type gs_type = 8318static struct image_type gs_type =
8319 { 8319{
8320 &Qpostscript, 8320 &Qpostscript,
8321 gs_image_p, 8321 gs_image_p,
8322 gs_load, 8322 gs_load,
8323 gs_clear_image, 8323 gs_clear_image,
8324 NULL 8324 NULL
8325 }; 8325};
8326 8326
8327 8327
8328/* Free X resources of Ghostscript image IMG which is used on frame F. */ 8328/* Free X resources of Ghostscript image IMG which is used on frame F. */
@@ -8550,7 +8550,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f)
8550 8550
8551/*********************************************************************** 8551/***********************************************************************
8552 Tests 8552 Tests
8553***********************************************************************/ 8553 ***********************************************************************/
8554 8554
8555#if GLYPH_DEBUG 8555#if GLYPH_DEBUG
8556 8556
@@ -8579,7 +8579,7 @@ DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "")
8579 8579
8580/*********************************************************************** 8580/***********************************************************************
8581 Initialization 8581 Initialization
8582***********************************************************************/ 8582 ***********************************************************************/
8583 8583
8584#ifdef HAVE_NTGUI 8584#ifdef HAVE_NTGUI
8585/* Image types that rely on external libraries are loaded dynamically 8585/* Image types that rely on external libraries are loaded dynamically
@@ -8593,7 +8593,7 @@ DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "")
8593 8593
8594DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0, 8594DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0,
8595 doc: /* Initialize image library implementing image type TYPE. 8595 doc: /* Initialize image library implementing image type TYPE.
8596 Return non-nil if TYPE is a supported image type. 8596Return non-nil if TYPE is a supported image type.
8597 8597
8598Image types pbm and xbm are prebuilt; other types are loaded here. 8598Image types pbm and xbm are prebuilt; other types are loaded here.
8599Libraries to load are specified in alist LIBRARIES (usually, the value 8599Libraries to load are specified in alist LIBRARIES (usually, the value
@@ -8656,7 +8656,6 @@ of `image-library-alist', which see). */)
8656 return Qnil; 8656 return Qnil;
8657} 8657}
8658 8658
8659
8660void 8659void
8661syms_of_image (void) 8660syms_of_image (void)
8662{ 8661{
@@ -8668,13 +8667,13 @@ syms_of_image (void)
8668 /* Must be defined now becase we're going to update it below, while 8667 /* Must be defined now becase we're going to update it below, while
8669 defining the supported image types. */ 8668 defining the supported image types. */
8670 DEFVAR_LISP ("image-types", &Vimage_types, 8669 DEFVAR_LISP ("image-types", &Vimage_types,
8671 doc: /* List of potentially supported image types. 8670 doc: /* List of potentially supported image types.
8672 Each element of the list is a symbol for an image type, like 'jpeg or 'png. 8671Each element of the list is a symbol for an image type, like 'jpeg or 'png.
8673 To check whether it is really supported, use `image-type-available-p'. */); 8672To check whether it is really supported, use `image-type-available-p'. */);
8674 Vimage_types = Qnil; 8673 Vimage_types = Qnil;
8675 8674
8676 DEFVAR_LISP ("image-library-alist", &Vimage_library_alist, 8675 DEFVAR_LISP ("image-library-alist", &Vimage_library_alist,
8677 doc: /* Alist of image types vs external libraries needed to display them. 8676 doc: /* Alist of image types vs external libraries needed to display them.
8678 8677
8679Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol 8678Each element is a list (IMAGE-TYPE LIBRARY...), where the car is a symbol
8680representing a supported image type, and the rest are strings giving 8679representing a supported image type, and the rest are strings giving
@@ -8688,15 +8687,15 @@ listed; they are always supported. */);
8688 Fput (intern_c_string ("image-library-alist"), Qrisky_local_variable, Qt); 8687 Fput (intern_c_string ("image-library-alist"), Qrisky_local_variable, Qt);
8689 8688
8690 DEFVAR_LISP ("max-image-size", &Vmax_image_size, 8689 DEFVAR_LISP ("max-image-size", &Vmax_image_size,
8691 doc: /* Maximum size of images. 8690 doc: /* Maximum size of images.
8692 Emacs will not load an image into memory if its pixel width or 8691Emacs will not load an image into memory if its pixel width or
8693 pixel height exceeds this limit. 8692pixel height exceeds this limit.
8694 8693
8695 If the value is an integer, it directly specifies the maximum 8694If the value is an integer, it directly specifies the maximum
8696 image height and width, measured in pixels. If it is a floating 8695image height and width, measured in pixels. If it is a floating
8697 point number, it specifies the maximum image height and width 8696point number, it specifies the maximum image height and width
8698 as a ratio to the frame height and width. If the value is 8697as a ratio to the frame height and width. If the value is
8699 non-numeric, there is no explicit limit on the size of images. */); 8698non-numeric, there is no explicit limit on the size of images. */);
8700 Vmax_image_size = make_float (MAX_IMAGE_SIZE); 8699 Vmax_image_size = make_float (MAX_IMAGE_SIZE);
8701 8700
8702 Vimage_type_cache = Qnil; 8701 Vimage_type_cache = Qnil;
@@ -8739,7 +8738,6 @@ listed; they are always supported. */);
8739 QCrotation = intern (":rotation"); 8738 QCrotation = intern (":rotation");
8740 staticpro (&QCrotation); 8739 staticpro (&QCrotation);
8741 QCmatrix = intern_c_string (":matrix"); 8740 QCmatrix = intern_c_string (":matrix");
8742
8743 staticpro (&QCmatrix); 8741 staticpro (&QCmatrix);
8744 QCcolor_adjustment = intern_c_string (":color-adjustment"); 8742 QCcolor_adjustment = intern_c_string (":color-adjustment");
8745 staticpro (&QCcolor_adjustment); 8743 staticpro (&QCcolor_adjustment);
@@ -8836,22 +8834,23 @@ listed; they are always supported. */);
8836#endif 8834#endif
8837 8835
8838 DEFVAR_BOOL ("cross-disabled-images", &cross_disabled_images, 8836 DEFVAR_BOOL ("cross-disabled-images", &cross_disabled_images,
8839 doc: /* Non-nil means always draw a cross over disabled images. 8837 doc: /* Non-nil means always draw a cross over disabled images.
8840 Disabled images are those having a `:conversion disabled' property. 8838Disabled images are those having a `:conversion disabled' property.
8841 A cross is always drawn on black & white displays. */); 8839A cross is always drawn on black & white displays. */);
8842 cross_disabled_images = 0; 8840 cross_disabled_images = 0;
8843 8841
8844 DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path, 8842 DEFVAR_LISP ("x-bitmap-file-path", &Vx_bitmap_file_path,
8845 doc: /* List of directories to search for window system bitmap files. */); 8843 doc: /* List of directories to search for window system bitmap files. */);
8846 Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); 8844 Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS);
8847 8845
8848 DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay, 8846 DEFVAR_LISP ("image-cache-eviction-delay", &Vimage_cache_eviction_delay,
8849 doc: /* Maximum time after which images are removed from the cache. 8847 doc: /* Maximum time after which images are removed from the cache.
8850 When an image has not been displayed this many seconds, Emacs 8848When an image has not been displayed this many seconds, Emacs
8851 automatically removes it from the image cache. If the cache contains 8849automatically removes it from the image cache. If the cache contains
8852 a large number of images, the actual eviction time may be shorter. 8850a large number of images, the actual eviction time may be shorter.
8853 The value can also be nil, meaning the cache is never cleared. 8851The value can also be nil, meaning the cache is never cleared.
8854 The function `clear-image-cache' disregards this variable. */); 8852
8853The function `clear-image-cache' disregards this variable. */);
8855 Vimage_cache_eviction_delay = make_number (300); 8854 Vimage_cache_eviction_delay = make_number (300);
8856#ifdef HAVE_IMAGEMAGICK 8855#ifdef HAVE_IMAGEMAGICK
8857 DEFVAR_LISP ("imagemagick-render-type", &Vimagemagick_render_type, 8856 DEFVAR_LISP ("imagemagick-render-type", &Vimagemagick_render_type,
@@ -8860,14 +8859,10 @@ listed; they are always supported. */);
8860 8859
8861} 8860}
8862 8861
8863
8864void 8862void
8865init_image (void) 8863init_image (void)
8866{ 8864{
8867
8868} 8865}
8869 8866
8870
8871
8872/* arch-tag: 123c2a5e-14a8-4c53-ab95-af47d7db49b9 8867/* arch-tag: 123c2a5e-14a8-4c53-ab95-af47d7db49b9
8873 (do not change this comment) */ 8868 (do not change this comment) */