]> git.eshelyaron.com Git - emacs.git/commitdiff
* process.c (ifflag_def): Make flag_sym constant.
authorDan Nicolaescu <dann@ics.uci.edu>
Wed, 11 Nov 2009 20:11:51 +0000 (20:11 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Wed, 11 Nov 2009 20:11:51 +0000 (20:11 +0000)
(Fnetwork_interface_info): Use a constant pointer.
(ifflag_table):
* xfns.c (cursor_bits):
* xdisp.c (power_letter):
* termcap.c (speeds, esctab):
* sysdep.c (baud_convert):
* keyboard.c (lispy_accent_codes, modifier_names):
* image.c (xbm_format, xpm_format, pbm_format, png_format)
(jpeg_format, tiff_format, gif_format, svg_format)
(interlace_start, interlace_increment, gs_format):
* gtkutil.c (separator_names):
* fringe.c (swap_nibble):
* fns.c (base64_value_to_char, base64_char_to_value):
* fileio.c (make_temp_name_tbl):
* coding.c (suffixes): Make constant.

13 files changed:
src/ChangeLog
src/coding.c
src/fileio.c
src/fns.c
src/fringe.c
src/gtkutil.c
src/image.c
src/keyboard.c
src/process.c
src/sysdep.c
src/termcap.c
src/xdisp.c
src/xfns.c

index c3d4e29124251f031748159ed589109ee33db6a3..5389118f62224a68cdf8a9728a6d61567c939764 100644 (file)
@@ -1,5 +1,22 @@
 2009-11-11  Dan Nicolaescu  <dann@ics.uci.edu>
 
+       * process.c (ifflag_def): Make flag_sym constant.
+       (Fnetwork_interface_info): Use a constant pointer.
+       (ifflag_table):
+       * xfns.c (cursor_bits):
+       * xdisp.c (power_letter):
+       * termcap.c (speeds, esctab):
+       * sysdep.c (baud_convert):
+       * keyboard.c (lispy_accent_codes, modifier_names):
+       * image.c (xbm_format, xpm_format, pbm_format, png_format)
+       (jpeg_format, tiff_format, gif_format, svg_format)
+       (interlace_start, interlace_increment, gs_format):
+       * gtkutil.c (separator_names):
+       * fringe.c (swap_nibble):
+       * fns.c (base64_value_to_char, base64_char_to_value):
+       * fileio.c (make_temp_name_tbl):
+       * coding.c (suffixes): Make constant.
+
        * frame.c (make_initial_frame):
        * buffer.c (init_buffer_once): Use make_pure_c_string instead of
        build_string.
@@ -18,6 +35,7 @@
        * lread.c (syms_of_lread):
        * keyboard.c (syms_of_keyboard): Use make_pure_c_string instead of
        build_string.
+
        * doc.c (Fsnarf_documentation): Purecopy Vbuild_files.
 
 2009-11-10  Stefan Monnier  <monnier@iro.umontreal.ca>
index b13766e30764807e815a53a1a6e097a84297dc70..1d838db36854e21c39437df589da683ee699150a 100644 (file)
@@ -9621,7 +9621,7 @@ HIGHESTP non-nil means just return the highest priority one.  */)
   return Fnreverse (val);
 }
 
-static char *suffixes[] = { "-unix", "-dos", "-mac" };
+static const char *const suffixes[] = { "-unix", "-dos", "-mac" };
 
 static Lisp_Object
 make_subsidiaries (base)
index bdab1d6180ddbe51fba4e3f430b6497dd450776d..1625c3d2547b0296a64a84bd8bc565637c7d0449 100644 (file)
@@ -657,7 +657,7 @@ In Unix-syntax, this function just removes the final slash.  */)
                                STRING_MULTIBYTE (directory));
 }
 
-static char make_temp_name_tbl[64] =
+static const char make_temp_name_tbl[64] =
 {
   'A','B','C','D','E','F','G','H',
   'I','J','K','L','M','N','O','P',
index 78b2f27e79843574b10c6ca8b494104e8675d968..c453d05662b8f1650962868f3fc8c3ba773f216f 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -3189,7 +3189,7 @@ The data read from the system are decoded using `locale-coding-system'.  */)
   while (IS_BASE64_IGNORABLE (c))
 
 /* Table of characters coding the 64 values.  */
-static char base64_value_to_char[64] =
+static const char base64_value_to_char[64] =
 {
   'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',    /*  0- 9 */
   'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',    /* 10-19 */
@@ -3201,7 +3201,7 @@ static char base64_value_to_char[64] =
 };
 
 /* Table of base64 values for first 128 characters.  */
-static short base64_char_to_value[128] =
+static const short base64_char_to_value[128] =
 {
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,     /*   0-  9 */
   -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,     /*  10- 19 */
index 2cea24b1dcd77d8416736a31e1aa47947fc85703..febb7a53011f5908e4db90255c63feabf34ec81d 100644 (file)
@@ -1330,7 +1330,7 @@ If BITMAP overrides a standard fringe bitmap, the original bitmap is restored.
 */
 
 #if defined (HAVE_X_WINDOWS)
-static unsigned char swap_nibble[16] = {
+static const unsigned char swap_nibble[16] = {
   0x0, 0x8, 0x4, 0xc,           /* 0000 1000 0100 1100 */
   0x2, 0xa, 0x6, 0xe,           /* 0010 1010 0110 1110 */
   0x1, 0x9, 0x5, 0xd,           /* 0001 1001 0101 1101 */
index ba9d95e03254fb02ddf7c56ae7041b6ac81d8341..e972679a5722c8d90e2a325276c5117e3adec38c 100644 (file)
@@ -2013,7 +2013,7 @@ make_menu_item (utf8_label, utf8_key, item, group)
 /* Return non-zero if LABEL specifies a separator (GTK only has one
    separator type)  */
 
-static char* separator_names[] = {
+static const char* separator_names[] = {
   "space",
   "no-line",
   "single-line",
index 55ceec326c4358e0daafa591df83f09f78177c5e..8cd8355acb767da0faaaa14fcbd3411a6f065420 100644 (file)
@@ -2338,7 +2338,7 @@ enum xbm_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid XBM image specifications.  */
 
-static struct image_keyword xbm_format[XBM_LAST] =
+static const struct image_keyword xbm_format[XBM_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":file",            IMAGE_STRING_VALUE,                     0},
@@ -3138,7 +3138,7 @@ enum xpm_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid XPM image specifications.  */
 
-static struct image_keyword xpm_format[XPM_LAST] =
+static const struct image_keyword xpm_format[XPM_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":file",            IMAGE_STRING_VALUE,                     0},
@@ -5087,7 +5087,7 @@ enum pbm_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid user-defined image specifications.  */
 
-static struct image_keyword pbm_format[PBM_LAST] =
+static const struct image_keyword pbm_format[PBM_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":file",            IMAGE_STRING_VALUE,                     0},
@@ -5509,7 +5509,7 @@ enum png_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid user-defined image specifications.  */
 
-static struct image_keyword png_format[PNG_LAST] =
+static const struct image_keyword png_format[PNG_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":data",            IMAGE_STRING_VALUE,                     0},
@@ -6111,7 +6111,7 @@ enum jpeg_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid user-defined image specifications.  */
 
-static struct image_keyword jpeg_format[JPEG_LAST] =
+static const struct image_keyword jpeg_format[JPEG_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":data",            IMAGE_STRING_VALUE,                     0},
@@ -6684,7 +6684,7 @@ enum tiff_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid user-defined image specifications.  */
 
-static struct image_keyword tiff_format[TIFF_LAST] =
+static const struct image_keyword tiff_format[TIFF_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":data",            IMAGE_STRING_VALUE,                     0},
@@ -7136,7 +7136,7 @@ enum gif_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid user-defined image specifications.  */
 
-static struct image_keyword gif_format[GIF_LAST] =
+static const struct image_keyword gif_format[GIF_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":data",            IMAGE_STRING_VALUE,                     0},
@@ -7280,8 +7280,8 @@ gif_read_from_memory (file, buf, len)
 /* Load GIF image IMG for use on frame F.  Value is non-zero if
    successful.  */
 
-static int interlace_start[] = {0, 4, 2, 1};
-static int interlace_increment[] = {8, 8, 4, 2};
+static const int interlace_start[] = {0, 4, 2, 1};
+static const int interlace_increment[] = {8, 8, 4, 2};
 
 static int
 gif_load (f, img)
@@ -7575,7 +7575,7 @@ enum svg_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid user-defined image specifications.  */
 
-static struct image_keyword svg_format[SVG_LAST] =
+static const struct image_keyword svg_format[SVG_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":data",            IMAGE_STRING_VALUE,                     0},
@@ -7982,7 +7982,7 @@ enum gs_keyword_index
 /* Vector of image_keyword structures describing the format
    of valid user-defined image specifications.  */
 
-static struct image_keyword gs_format[GS_LAST] =
+static const struct image_keyword gs_format[GS_LAST] =
 {
   {":type",            IMAGE_SYMBOL_VALUE,                     1},
   {":pt-width",                IMAGE_POSITIVE_INTEGER_VALUE,           1},
index 3b4f0c54eb75c805bce1b5627605e22efdf46958..5ea4f350809423721ab5934ece17c13610cbcc13 100644 (file)
@@ -4770,7 +4770,7 @@ static Lisp_Object drag_n_drop_syms;
 /* This is a list of keysym codes for special "accent" characters.
    It parallels lispy_accent_keys.  */
 
-static int lispy_accent_codes[] =
+static const int lispy_accent_codes[] =
 {
 #ifdef XK_dead_circumflex
   XK_dead_circumflex,
@@ -6484,7 +6484,7 @@ apply_modifiers_uncached (modifiers, base, base_len, base_len_byte)
 }
 
 
-static char *modifier_names[] =
+static const char *modifier_names[] =
 {
   "up", "down", "drag", "click", "double", "triple", 0, 0,
   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
index fd94731a41373397a4e6259ac9bfbb4a3773fa32..b604f97cffc3745aa2411c18f547c0326d95891a 100644 (file)
@@ -3980,10 +3980,10 @@ format; see the description of ADDRESS in `make-network-process'.  */)
 
 struct ifflag_def {
   int flag_bit;
-  char *flag_sym;
+  const char *flag_sym;
 };
 
-static struct ifflag_def ifflag_table[] = {
+static const struct ifflag_def ifflag_table[] = {
 #ifdef IFF_UP
   { IFF_UP,            "up" },
 #endif
@@ -4079,7 +4079,7 @@ FLAGS is the current flags of the interface.  */)
   if (ioctl (s, SIOCGIFFLAGS, &rq) == 0)
     {
       int flags = rq.ifr_flags;
-      struct ifflag_def *fp;
+      const struct ifflag_def *fp;
       int fnum;
 
       any++;
index fc252e87aa87ec12925852135372614425d934d5..b983694baf942da40f82e59e54193f50e62f67bf 100644 (file)
@@ -168,7 +168,7 @@ struct utimbuf {
 #define LPASS8 0
 #endif
 
-static int baud_convert[] =
+static const int baud_convert[] =
   {
     0, 50, 75, 110, 135, 150, 200, 300, 600, 1200,
     1800, 2400, 4800, 9600, 19200, 38400
index 46254c67c1c1a3b04921a0aac675228a5085ddfd..9b4a7f657f6f46ca506ea9dd3766135dab41e36b 100644 (file)
@@ -184,7 +184,7 @@ tgetstr (cap, area)
    gives meaning of character following \, or a space if no special meaning.
    Sixteen characters per line within the string.  */
 
-static char esctab[]
+static const char esctab[]
   = " \057\026  \047\014         \
      \025   \015      \
    \005 \013          \
@@ -194,7 +194,7 @@ static char esctab[]
    gives meaning of character following \, or a space if no special meaning.
    Eight characters per line within the string.  */
 
-static char esctab[]
+static const char esctab[]
   = " \007\010  \033\014 \
       \012 \
   \015 \011 \013 \
@@ -348,7 +348,7 @@ char PC;
 /* Actual baud rate if positive;
    - baud rate / 100 if negative.  */
 
-static int speeds[] =
+static const int speeds[] =
   {
     0, 50, 75, 110, 135, 150, -2, -3, -6, -12,
     -18, -24, -48, -96, -192, -288, -384, -576, -1152
index 46cd45a9ebad1c77211fbc3f6d7ca0a4dc7aedd8..568fa0fdd04f2ce56750fbb2ca366c42e1be61bb 100644 (file)
@@ -18077,7 +18077,7 @@ pint2str (buf, width, d)
    readable" representation of the nonnegative integer D to BUF using
    a minimal field width WIDTH.  D should be smaller than 999.5e24. */
 
-static const char power_letter[] =
+static const const char power_letter[] =
   {
     0,  /* not used */
     'k', /* kilo */
index 9d4c1f8063702bc22714fff02b7938825bad8b62..0a041a7dc9dfd6a10d7f2f24f9ebc8172f8eb332 100644 (file)
@@ -2885,14 +2885,6 @@ x_icon (f, parms)
    background, border and mouse colors; also create the
    mouse cursor and the gray border tile.  */
 
-static char cursor_bits[] =
-  {
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-  };
-
 static void
 x_make_gc (f)
      struct frame *f;