aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorJan D2010-07-02 14:19:53 +0200
committerJan D2010-07-02 14:19:53 +0200
commitf57e2426f0e8a6b251be71b6f62237fd286998ea (patch)
treea8db36e415ea69b4196881b44122454317510f46 /src/image.c
parent383e09700c9b3d175c506301d363be4597827db7 (diff)
downloademacs-f57e2426f0e8a6b251be71b6f62237fd286998ea.tar.gz
emacs-f57e2426f0e8a6b251be71b6f62237fd286998ea.zip
Remove __P and P_ from .c and .m files and definition of P_
* lisp.h: * atimer.h: Remove define for P_. * alloc.c: Remove __P and P_ from .c and .m files. * atimer.c: * buffer.c: * callint.c: * category.c: * charset.c: * chartab.c: * cm.c: * coding.c: * composite.c: * data.c: * dired.c: * dispnew.c: * doc.c: * editfns.c: * emacs.c: * eval.c: * fileio.c: * filelock.c: * fns.c: * font.c: * fontset.c: * frame.c: * ftfont.c: * ftxfont.c: * gmalloc.c: * gtkutil.c: * image.c: * indent.c: * intervals.c: * keyboard.c: * keymap.c: * lread.c: * marker.c: * menu.c: * minibuf.c: * print.c: * process.c: * scroll.c: * search.c: * sound.c: * strftime.c: * syntax.c: * sysdep.c: * term.c: * terminal.c: * textprop.c: * unexalpha.c: * w32console.c: * w32fns.c: * w32font.c: * w32menu.c: * w32term.c: * w32uniscribe.c: * window.c: * xdisp.c: * xfaces.c: * xfns.c: * xfont.c: * xftfont.c: * xmenu.c: * xselect.c: * xterm.c: Likewise. * ebrowse.c: Remove P_ and __P. * etags.c: * movemail.c: * pop.c: * update-game-score.c: Likewise.
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c202
1 files changed, 101 insertions, 101 deletions
diff --git a/src/image.c b/src/image.c
index b9620e10948..821246eac03 100644
--- a/src/image.c
+++ b/src/image.c
@@ -127,16 +127,16 @@ typedef struct ns_bitmap_record Bitmap_Record;
127Lisp_Object Vx_bitmap_file_path; 127Lisp_Object Vx_bitmap_file_path;
128 128
129 129
130static void x_disable_image P_ ((struct frame *, struct image *)); 130static void x_disable_image (struct frame *, struct image *);
131static void x_edge_detection P_ ((struct frame *, struct image *, Lisp_Object, 131static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
132 Lisp_Object)); 132 Lisp_Object);
133 133
134static void init_color_table P_ ((void)); 134static void init_color_table (void);
135static unsigned long lookup_rgb_color P_ ((struct frame *f, int r, int g, int b)); 135static unsigned long lookup_rgb_color (struct frame *f, int r, int g, int b);
136#ifdef COLOR_TABLE_SUPPORT 136#ifdef COLOR_TABLE_SUPPORT
137static void free_color_table P_ ((void)); 137static void free_color_table (void);
138static unsigned long *colors_in_color_table P_ ((int *n)); 138static unsigned long *colors_in_color_table (int *n);
139static unsigned long lookup_pixel_color P_ ((struct frame *f, unsigned long p)); 139static unsigned long lookup_pixel_color (struct frame *f, unsigned long p);
140#endif 140#endif
141 141
142/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap 142/* Code to deal with bitmaps. Bitmaps are referenced by their bitmap
@@ -471,16 +471,16 @@ x_destroy_all_bitmaps (dpyinfo)
471/* Useful functions defined in the section 471/* Useful functions defined in the section
472 `Image type independent image structures' below. */ 472 `Image type independent image structures' below. */
473 473
474static unsigned long four_corners_best P_ ((XImagePtr ximg, 474static unsigned long four_corners_best (XImagePtr ximg,
475 int *corners, 475 int *corners,
476 unsigned long width, 476 unsigned long width,
477 unsigned long height)); 477 unsigned long height);
478 478
479static int x_create_x_image_and_pixmap P_ ((struct frame *f, int width, int height, 479static int x_create_x_image_and_pixmap (struct frame *f, int width, int height,
480 int depth, XImagePtr *ximg, 480 int depth, XImagePtr *ximg,
481 Pixmap *pixmap)); 481 Pixmap *pixmap);
482 482
483static void x_destroy_x_image P_ ((XImagePtr ximg)); 483static void x_destroy_x_image (XImagePtr ximg);
484 484
485 485
486/* Create a mask of a bitmap. Note is this not a perfect mask. 486/* Create a mask of a bitmap. Note is this not a perfect mask.
@@ -619,13 +619,13 @@ Lisp_Object Vimage_cache_eviction_delay;
619 619
620/* Function prototypes. */ 620/* Function prototypes. */
621 621
622static Lisp_Object define_image_type P_ ((struct image_type *type, int loaded)); 622static Lisp_Object define_image_type (struct image_type *type, int loaded);
623static struct image_type *lookup_image_type P_ ((Lisp_Object symbol)); 623static struct image_type *lookup_image_type (Lisp_Object symbol);
624static void image_error P_ ((char *format, Lisp_Object, Lisp_Object)); 624static void image_error (char *format, Lisp_Object, Lisp_Object);
625static void x_laplace P_ ((struct frame *, struct image *)); 625static void x_laplace (struct frame *, struct image *);
626static void x_emboss P_ ((struct frame *, struct image *)); 626static void x_emboss (struct frame *, struct image *);
627static int x_build_heuristic_mask P_ ((struct frame *, struct image *, 627static int x_build_heuristic_mask (struct frame *, struct image *,
628 Lisp_Object)); 628 Lisp_Object);
629 629
630#define CACHE_IMAGE_TYPE(type, status) \ 630#define CACHE_IMAGE_TYPE(type, status) \
631 do { Vimage_type_cache = Fcons (Fcons (type, status), Vimage_type_cache); } while (0) 631 do { Vimage_type_cache = Fcons (Fcons (type, status), Vimage_type_cache); } while (0)
@@ -776,9 +776,9 @@ struct image_keyword
776}; 776};
777 777
778 778
779static int parse_image_spec P_ ((Lisp_Object, struct image_keyword *, 779static int parse_image_spec (Lisp_Object, struct image_keyword *,
780 int, Lisp_Object)); 780 int, Lisp_Object);
781static Lisp_Object image_spec_value P_ ((Lisp_Object, Lisp_Object, int *)); 781static Lisp_Object image_spec_value (Lisp_Object, Lisp_Object, int *);
782 782
783 783
784/* Parse image spec SPEC according to KEYWORDS. A valid image spec 784/* Parse image spec SPEC according to KEYWORDS. A valid image spec
@@ -1037,9 +1037,9 @@ or omitted means use the selected frame. */)
1037 Image type independent image structures 1037 Image type independent image structures
1038 ***********************************************************************/ 1038 ***********************************************************************/
1039 1039
1040static struct image *make_image P_ ((Lisp_Object spec, unsigned hash)); 1040static struct image *make_image (Lisp_Object spec, unsigned hash);
1041static void free_image P_ ((struct frame *f, struct image *img)); 1041static void free_image (struct frame *f, struct image *img);
1042static int check_image_size P_ ((struct frame *f, int width, int height)); 1042static int check_image_size (struct frame *f, int width, int height);
1043 1043
1044#define MAX_IMAGE_SIZE 6.0 1044#define MAX_IMAGE_SIZE 6.0
1045Lisp_Object Vmax_image_size; 1045Lisp_Object Vmax_image_size;
@@ -1371,13 +1371,13 @@ image_background_transparent (img, f, mask)
1371 Helper functions for X image types 1371 Helper functions for X image types
1372 ***********************************************************************/ 1372 ***********************************************************************/
1373 1373
1374static void x_clear_image_1 P_ ((struct frame *, struct image *, int, 1374static void x_clear_image_1 (struct frame *, struct image *, int,
1375 int, int)); 1375 int, int);
1376static void x_clear_image P_ ((struct frame *f, struct image *img)); 1376static void x_clear_image (struct frame *f, struct image *img);
1377static unsigned long x_alloc_image_color P_ ((struct frame *f, 1377static unsigned long x_alloc_image_color (struct frame *f,
1378 struct image *img, 1378 struct image *img,
1379 Lisp_Object color_name, 1379 Lisp_Object color_name,
1380 unsigned long dflt)); 1380 unsigned long dflt);
1381 1381
1382 1382
1383/* Clear X resources of image IMG on frame F. PIXMAP_P non-zero means 1383/* Clear X resources of image IMG on frame F. PIXMAP_P non-zero means
@@ -1472,9 +1472,9 @@ x_alloc_image_color (f, img, color_name, dflt)
1472 Image Cache 1472 Image Cache
1473 ***********************************************************************/ 1473 ***********************************************************************/
1474 1474
1475static struct image *search_image_cache P_ ((struct frame *, Lisp_Object, unsigned)); 1475static struct image *search_image_cache (struct frame *, Lisp_Object, unsigned);
1476static void cache_image P_ ((struct frame *f, struct image *img)); 1476static void cache_image (struct frame *f, struct image *img);
1477static void postprocess_image P_ ((struct frame *, struct image *)); 1477static void postprocess_image (struct frame *, struct image *);
1478 1478
1479/* Return a new, initialized image cache that is allocated from the 1479/* Return a new, initialized image cache that is allocated from the
1480 heap. Call free_image_cache to free an image cache. */ 1480 heap. Call free_image_cache to free an image cache. */
@@ -2033,10 +2033,10 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object type)
2033 2033
2034#endif /* HAVE_NTGUI */ 2034#endif /* HAVE_NTGUI */
2035 2035
2036static int x_create_x_image_and_pixmap P_ ((struct frame *, int, int, int, 2036static int x_create_x_image_and_pixmap (struct frame *, int, int, int,
2037 XImagePtr *, Pixmap *)); 2037 XImagePtr *, Pixmap *);
2038static void x_destroy_x_image P_ ((XImagePtr)); 2038static void x_destroy_x_image (XImagePtr);
2039static void x_put_x_image P_ ((struct frame *, XImagePtr, Pixmap, int, int)); 2039static void x_put_x_image (struct frame *, XImagePtr, Pixmap, int, int);
2040 2040
2041 2041
2042/* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on 2042/* Create an XImage and a pixmap of size WIDTH x HEIGHT for use on
@@ -2253,7 +2253,7 @@ x_put_x_image (f, ximg, pixmap, width, height)
2253 File Handling 2253 File Handling
2254 ***********************************************************************/ 2254 ***********************************************************************/
2255 2255
2256static unsigned char *slurp_file P_ ((char *, int *)); 2256static unsigned char *slurp_file (char *, int *);
2257 2257
2258 2258
2259/* Find image file FILE. Look in data-directory/images, then 2259/* Find image file FILE. Look in data-directory/images, then
@@ -2333,15 +2333,15 @@ slurp_file (file, size)
2333 XBM images 2333 XBM images
2334 ***********************************************************************/ 2334 ***********************************************************************/
2335 2335
2336static int xbm_scan P_ ((unsigned char **, unsigned char *, char *, int *)); 2336static int xbm_scan (unsigned char **, unsigned char *, char *, int *);
2337static int xbm_load P_ ((struct frame *f, struct image *img)); 2337static int xbm_load (struct frame *f, struct image *img);
2338static int xbm_load_image P_ ((struct frame *f, struct image *img, 2338static int xbm_load_image (struct frame *f, struct image *img,
2339 unsigned char *, unsigned char *)); 2339 unsigned char *, unsigned char *);
2340static int xbm_image_p P_ ((Lisp_Object object)); 2340static int xbm_image_p (Lisp_Object object);
2341static int xbm_read_bitmap_data P_ ((struct frame *f, 2341static int xbm_read_bitmap_data (struct frame *f,
2342 unsigned char *, unsigned char *, 2342 unsigned char *, unsigned char *,
2343 int *, int *, unsigned char **, int)); 2343 int *, int *, unsigned char **, int);
2344static int xbm_file_p P_ ((Lisp_Object)); 2344static int xbm_file_p (Lisp_Object);
2345 2345
2346 2346
2347/* Indices of image specification fields in xbm_format, below. */ 2347/* Indices of image specification fields in xbm_format, below. */
@@ -3114,9 +3114,9 @@ xbm_load (f, img)
3114 3114
3115#if defined (HAVE_XPM) || defined (HAVE_NS) 3115#if defined (HAVE_XPM) || defined (HAVE_NS)
3116 3116
3117static int xpm_image_p P_ ((Lisp_Object object)); 3117static int xpm_image_p (Lisp_Object object);
3118static int xpm_load P_ ((struct frame *f, struct image *img)); 3118static int xpm_load (struct frame *f, struct image *img);
3119static int xpm_valid_color_symbols_p P_ ((Lisp_Object)); 3119static int xpm_valid_color_symbols_p (Lisp_Object);
3120 3120
3121#endif /* HAVE_XPM || HAVE_NS */ 3121#endif /* HAVE_XPM || HAVE_NS */
3122 3122
@@ -3207,12 +3207,12 @@ static struct image_type xpm_type =
3207 3207
3208#ifdef ALLOC_XPM_COLORS 3208#ifdef ALLOC_XPM_COLORS
3209 3209
3210static void xpm_init_color_cache P_ ((struct frame *, XpmAttributes *)); 3210static void xpm_init_color_cache (struct frame *, XpmAttributes *);
3211static void xpm_free_color_cache P_ ((void)); 3211static void xpm_free_color_cache (void);
3212static int xpm_lookup_color P_ ((struct frame *, char *, XColor *)); 3212static int xpm_lookup_color (struct frame *, char *, XColor *);
3213static int xpm_color_bucket P_ ((char *)); 3213static int xpm_color_bucket (char *);
3214static struct xpm_cached_color *xpm_cache_color P_ ((struct frame *, char *, 3214static struct xpm_cached_color *xpm_cache_color (struct frame *, char *,
3215 XColor *, int)); 3215 XColor *, int);
3216 3216
3217/* An entry in a hash table used to cache color definitions of named 3217/* An entry in a hash table used to cache color definitions of named
3218 colors. This cache is necessary to speed up XPM image loading in 3218 colors. This cache is necessary to speed up XPM image loading in
@@ -3752,25 +3752,25 @@ xpm_load (f, img)
3752/* XPM support functions for NS where libxpm is not available. 3752/* XPM support functions for NS where libxpm is not available.
3753 Only XPM version 3 (without any extensions) is supported. */ 3753 Only XPM version 3 (without any extensions) is supported. */
3754 3754
3755static int xpm_scan P_ ((const unsigned char **, const unsigned char *, 3755static int xpm_scan (const unsigned char **, const unsigned char *,
3756 const unsigned char **, int *)); 3756 const unsigned char **, int *);
3757static Lisp_Object xpm_make_color_table_v 3757static Lisp_Object xpm_make_color_table_v
3758 P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object), 3758 (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
3759 Lisp_Object (**) (Lisp_Object, const unsigned char *, int))); 3759 Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
3760static void xpm_put_color_table_v P_ ((Lisp_Object, const unsigned char *, 3760static void xpm_put_color_table_v (Lisp_Object, const unsigned char *,
3761 int, Lisp_Object)); 3761 int, Lisp_Object);
3762static Lisp_Object xpm_get_color_table_v P_ ((Lisp_Object, 3762static Lisp_Object xpm_get_color_table_v (Lisp_Object,
3763 const unsigned char *, int)); 3763 const unsigned char *, int);
3764static Lisp_Object xpm_make_color_table_h 3764static Lisp_Object xpm_make_color_table_h
3765 P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object), 3765 (void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
3766 Lisp_Object (**) (Lisp_Object, const unsigned char *, int))); 3766 Lisp_Object (**) (Lisp_Object, const unsigned char *, int));
3767static void xpm_put_color_table_h P_ ((Lisp_Object, const unsigned char *, 3767static void xpm_put_color_table_h (Lisp_Object, const unsigned char *,
3768 int, Lisp_Object)); 3768 int, Lisp_Object);
3769static Lisp_Object xpm_get_color_table_h P_ ((Lisp_Object, 3769static Lisp_Object xpm_get_color_table_h (Lisp_Object,
3770 const unsigned char *, int)); 3770 const unsigned char *, int);
3771static int xpm_str_to_color_key P_ ((const char *)); 3771static int xpm_str_to_color_key (const char *);
3772static int xpm_load_image P_ ((struct frame *, struct image *, 3772static int xpm_load_image (struct frame *, struct image *,
3773 const unsigned char *, const unsigned char *)); 3773 const unsigned char *, const unsigned char *);
3774 3774
3775/* Tokens returned from xpm_scan. */ 3775/* Tokens returned from xpm_scan. */
3776 3776
@@ -4515,9 +4515,9 @@ init_color_table ()
4515 Algorithms 4515 Algorithms
4516 ***********************************************************************/ 4516 ***********************************************************************/
4517 4517
4518static XColor *x_to_xcolors P_ ((struct frame *, struct image *, int)); 4518static XColor *x_to_xcolors (struct frame *, struct image *, int);
4519static void x_from_xcolors P_ ((struct frame *, struct image *, XColor *)); 4519static void x_from_xcolors (struct frame *, struct image *, XColor *);
4520static void x_detect_edges P_ ((struct frame *, struct image *, int[9], int)); 4520static void x_detect_edges (struct frame *, struct image *, int[9], int);
4521 4521
4522#ifdef HAVE_NTGUI 4522#ifdef HAVE_NTGUI
4523static void XPutPixel (XImagePtr , int, int, COLORREF); 4523static void XPutPixel (XImagePtr , int, int, COLORREF);
@@ -5087,9 +5087,9 @@ x_build_heuristic_mask (f, img, how)
5087 PBM (mono, gray, color) 5087 PBM (mono, gray, color)
5088 ***********************************************************************/ 5088 ***********************************************************************/
5089 5089
5090static int pbm_image_p P_ ((Lisp_Object object)); 5090static int pbm_image_p (Lisp_Object object);
5091static int pbm_load P_ ((struct frame *f, struct image *img)); 5091static int pbm_load (struct frame *f, struct image *img);
5092static int pbm_scan_number P_ ((unsigned char **, unsigned char *)); 5092static int pbm_scan_number (unsigned char **, unsigned char *);
5093 5093
5094/* The symbol `pbm' identifying images of this type. */ 5094/* The symbol `pbm' identifying images of this type. */
5095 5095
@@ -5511,8 +5511,8 @@ pbm_load (f, img)
5511 5511
5512/* Function prototypes. */ 5512/* Function prototypes. */
5513 5513
5514static int png_image_p P_ ((Lisp_Object object)); 5514static int png_image_p (Lisp_Object object);
5515static int png_load P_ ((struct frame *f, struct image *img)); 5515static int png_load (struct frame *f, struct image *img);
5516 5516
5517/* The symbol `png' identifying images of this type. */ 5517/* The symbol `png' identifying images of this type. */
5518 5518
@@ -6113,8 +6113,8 @@ png_load (struct frame *f, struct image *img)
6113 6113
6114#if defined (HAVE_JPEG) || defined (HAVE_NS) 6114#if defined (HAVE_JPEG) || defined (HAVE_NS)
6115 6115
6116static int jpeg_image_p P_ ((Lisp_Object object)); 6116static int jpeg_image_p (Lisp_Object object);
6117static int jpeg_load P_ ((struct frame *f, struct image *img)); 6117static int jpeg_load (struct frame *f, struct image *img);
6118 6118
6119/* The symbol `jpeg' identifying images of this type. */ 6119/* The symbol `jpeg' identifying images of this type. */
6120 6120
@@ -6685,8 +6685,8 @@ jpeg_load (struct frame *f, struct image *img)
6685 6685
6686#if defined (HAVE_TIFF) || defined (HAVE_NS) 6686#if defined (HAVE_TIFF) || defined (HAVE_NS)
6687 6687
6688static int tiff_image_p P_ ((Lisp_Object object)); 6688static int tiff_image_p (Lisp_Object object);
6689static int tiff_load P_ ((struct frame *f, struct image *img)); 6689static int tiff_load (struct frame *f, struct image *img);
6690 6690
6691/* The symbol `tiff' identifying images of this type. */ 6691/* The symbol `tiff' identifying images of this type. */
6692 6692
@@ -7136,9 +7136,9 @@ tiff_load (struct frame *f, struct image *img)
7136 7136
7137#if defined (HAVE_GIF) || defined (HAVE_NS) 7137#if defined (HAVE_GIF) || defined (HAVE_NS)
7138 7138
7139static int gif_image_p P_ ((Lisp_Object object)); 7139static int gif_image_p (Lisp_Object object);
7140static int gif_load P_ ((struct frame *f, struct image *img)); 7140static int gif_load (struct frame *f, struct image *img);
7141static void gif_clear_image P_ ((struct frame *f, struct image *img)); 7141static void gif_clear_image (struct frame *f, struct image *img);
7142 7142
7143/* The symbol `gif' identifying images of this type. */ 7143/* The symbol `gif' identifying images of this type. */
7144 7144
@@ -7576,11 +7576,11 @@ gif_load (struct frame *f, struct image *img)
7576 7576
7577/* Function prototypes. */ 7577/* Function prototypes. */
7578 7578
7579static int svg_image_p P_ ((Lisp_Object object)); 7579static int svg_image_p (Lisp_Object object);
7580static int svg_load P_ ((struct frame *f, struct image *img)); 7580static int svg_load (struct frame *f, struct image *img);
7581 7581
7582static int svg_load_image P_ ((struct frame *, struct image *, 7582static int svg_load_image (struct frame *, struct image *,
7583 unsigned char *, unsigned int)); 7583 unsigned char *, unsigned int);
7584 7584
7585/* The symbol `svg' identifying images of this type. */ 7585/* The symbol `svg' identifying images of this type. */
7586 7586
@@ -7982,9 +7982,9 @@ Lisp_Object Qpostscript;
7982 7982
7983#ifdef HAVE_GHOSTSCRIPT 7983#ifdef HAVE_GHOSTSCRIPT
7984 7984
7985static int gs_image_p P_ ((Lisp_Object object)); 7985static int gs_image_p (Lisp_Object object);
7986static int gs_load P_ ((struct frame *f, struct image *img)); 7986static int gs_load (struct frame *f, struct image *img);
7987static void gs_clear_image P_ ((struct frame *f, struct image *img)); 7987static void gs_clear_image (struct frame *f, struct image *img);
7988 7988
7989/* Keyword symbols. */ 7989/* Keyword symbols. */
7990 7990