emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/image.c,v


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/image.c,v
Date: Tue, 31 Oct 2006 08:31:02 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     YAMAMOTO Mitsuharu <mituharu>   06/10/31 08:31:01

Index: image.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/image.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- image.c     12 Oct 2006 19:22:38 -0000      1.61
+++ image.c     31 Oct 2006 08:31:01 -0000      1.62
@@ -2393,7 +2393,7 @@
      struct frame *f;
      struct image *img;
      OSType type;
-     FSSpec *fss;
+     const FSSpec *fss;
      Handle dh;
 {
   ComponentResult err;
@@ -2407,8 +2407,7 @@
   XImagePtr ximg;
   RGBColor bg_color;
 
-  err = OpenADefaultComponent (GraphicsImporterComponentType,
-                              type, &gi);
+  err = OpenADefaultComponent (GraphicsImporterComponentType, type, &gi);
   if (err != noErr)
     {
       image_error ("Cannot get importer component for `%s'", img->spec, Qnil);
@@ -4110,25 +4109,25 @@
 /* XPM support functions for Mac OS where libxpm is not available.
    Only XPM version 3 (without any extensions) is supported.  */
 
-static int xpm_scan P_ ((unsigned char **, unsigned char *,
-                        unsigned char **, int *));
+static int xpm_scan P_ ((const unsigned char **, const unsigned char *,
+                        const unsigned char **, int *));
 static Lisp_Object xpm_make_color_table_v
-  P_ ((void (**) (Lisp_Object, unsigned char *, int, Lisp_Object),
-       Lisp_Object (**) (Lisp_Object, unsigned char *, int)));
-static void xpm_put_color_table_v P_ ((Lisp_Object, unsigned char *,
+  P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
+       Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
+static void xpm_put_color_table_v P_ ((Lisp_Object, const unsigned char *,
                                       int, Lisp_Object));
 static Lisp_Object xpm_get_color_table_v P_ ((Lisp_Object,
-                                             unsigned char *, int));
+                                             const unsigned char *, int));
 static Lisp_Object xpm_make_color_table_h
-  P_ ((void (**) (Lisp_Object, unsigned char *, int, Lisp_Object),
-       Lisp_Object (**) (Lisp_Object, unsigned char *, int)));
-static void xpm_put_color_table_h P_ ((Lisp_Object, unsigned char *,
+  P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
+       Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
+static void xpm_put_color_table_h P_ ((Lisp_Object, const unsigned char *,
                                       int, Lisp_Object));
 static Lisp_Object xpm_get_color_table_h P_ ((Lisp_Object,
-                                             unsigned char *, int));
-static int xpm_str_to_color_key P_ ((char *));
+                                             const unsigned char *, int));
+static int xpm_str_to_color_key P_ ((const char *));
 static int xpm_load_image P_ ((struct frame *, struct image *,
-                              unsigned char *, unsigned char *));
+                              const unsigned char *, const unsigned char *));
 
 /* Tokens returned from xpm_scan.  */
 
@@ -4148,7 +4147,7 @@
 
 static int
 xpm_scan (s, end, beg, len)
-     unsigned char **s, *end, **beg;
+     const unsigned char **s, *end, **beg;
      int *len;
 {
   int c;
@@ -4214,8 +4213,8 @@
 
 static Lisp_Object
 xpm_make_color_table_v (put_func, get_func)
-     void (**put_func) (Lisp_Object, unsigned char *, int, Lisp_Object);
-     Lisp_Object (**get_func) (Lisp_Object, unsigned char *, int);
+     void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object);
+     Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int);
 {
   *put_func = xpm_put_color_table_v;
   *get_func = xpm_get_color_table_v;
@@ -4225,7 +4224,7 @@
 static void
 xpm_put_color_table_v (color_table, chars_start, chars_len, color)
      Lisp_Object color_table;
-     unsigned char *chars_start;
+     const unsigned char *chars_start;
      int chars_len;
      Lisp_Object color;
 {
@@ -4235,7 +4234,7 @@
 static Lisp_Object
 xpm_get_color_table_v (color_table, chars_start, chars_len)
      Lisp_Object color_table;
-     unsigned char *chars_start;
+     const unsigned char *chars_start;
      int chars_len;
 {
   return XVECTOR (color_table)->contents[*chars_start];
@@ -4243,8 +4242,8 @@
 
 static Lisp_Object
 xpm_make_color_table_h (put_func, get_func)
-     void (**put_func) (Lisp_Object, unsigned char *, int, Lisp_Object);
-     Lisp_Object (**get_func) (Lisp_Object, unsigned char *, int);
+     void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object);
+     Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int);
 {
   *put_func = xpm_put_color_table_h;
   *get_func = xpm_get_color_table_h;
@@ -4257,7 +4256,7 @@
 static void
 xpm_put_color_table_h (color_table, chars_start, chars_len, color)
      Lisp_Object color_table;
-     unsigned char *chars_start;
+     const unsigned char *chars_start;
      int chars_len;
      Lisp_Object color;
 {
@@ -4272,7 +4271,7 @@
 static Lisp_Object
 xpm_get_color_table_h (color_table, chars_start, chars_len)
      Lisp_Object color_table;
-     unsigned char *chars_start;
+     const unsigned char *chars_start;
      int chars_len;
 {
   struct Lisp_Hash_Table *table = XHASH_TABLE (color_table);
@@ -4290,11 +4289,11 @@
   XPM_COLOR_KEY_C
 };
 
-static char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"};
+static const char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"};
 
 static int
 xpm_str_to_color_key (s)
-     char *s;
+     const char *s;
 {
   int i;
 
@@ -4310,15 +4309,15 @@
 xpm_load_image (f, img, contents, end)
      struct frame *f;
      struct image *img;
-     unsigned char *contents, *end;
+     const unsigned char *contents, *end;
 {
-  unsigned char *s = contents, *beg, *str;
+  const unsigned char *s = contents, *beg, *str;
   unsigned char buffer[BUFSIZ];
   int width, height, x, y;
   int num_colors, chars_per_pixel;
   int len, LA1;
-  void (*put_color_table) (Lisp_Object, unsigned char *, int, Lisp_Object);
-  Lisp_Object (*get_color_table) (Lisp_Object, unsigned char *, int);
+  void (*put_color_table) (Lisp_Object, const unsigned char *, int, 
Lisp_Object);
+  Lisp_Object (*get_color_table) (Lisp_Object, const unsigned char *, int);
   Lisp_Object frame, color_symbols, color_table;
   int best_key, have_mask = 0;
   XImagePtr ximg = NULL, mask_img = NULL;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]