Commit 648801d1 authored by Dan Nicolaescu's avatar Dan Nicolaescu

Use const for some arrays and functions.

* src/xterm.h (xg_set_icon_from_xpm_data):
* src/xfns.c (xg_set_icon_from_xpm_data):
* src/term.c (fkeys):
* src/keyboard.c (lispy_accent_keys, lispy_function_keys)
(lispy_multimedia_keys, lispy_kana_keys, iso_lispy_function_keys)
(lispy_drag_n_drop_names, scroll_bar_parts, modify_event_symbol)
(frame.c frame_parms):
* src/emacs-icon.h (gnu_xpm_bits):
* src/callint.c (callint_argfuns): Use const.
parent 8646d999
2010-08-06 Dan Nicolaescu <dann@ics.uci.edu>
Use const for some arrays and functions.
* xterm.h (xg_set_icon_from_xpm_data):
* xfns.c (xg_set_icon_from_xpm_data):
* term.c (fkeys):
* keyboard.c (lispy_accent_keys, lispy_function_keys)
(lispy_multimedia_keys, lispy_kana_keys, iso_lispy_function_keys)
(lispy_drag_n_drop_names, scroll_bar_parts, modify_event_symbol)
(frame.c frame_parms):
* emacs-icon.h (gnu_xpm_bits):
* callint.c (callint_argfuns): Use const.
2010-08-06 Jan Djärv <jan.h.d@swipnet.se>
* sysdep.c: Move include term.h last of includes (Bug#6812).
......
......@@ -149,7 +149,7 @@ quotify_args (Lisp_Object exp)
return exp;
}
char *callint_argfuns[]
static const char *callint_argfuns[]
= {"", "point", "mark", "region-beginning", "region-end"};
static void
......
......@@ -23,7 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Note that the GTK port uses gdk to display the icon, so Emacs need
not have XPM support compiled in. */
#if (defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)) || defined (USE_GTK)
static char * gnu_xpm_bits[] = {
static const char * gnu_xpm_bits[] = {
/* width height ncolors chars_per_pixel */
"32 32 255 2",
/* colors */
......
......@@ -613,7 +613,7 @@ static Lisp_Object make_lispy_movement (struct frame *, Lisp_Object,
unsigned long);
#endif
static Lisp_Object modify_event_symbol (int, unsigned, Lisp_Object,
Lisp_Object, char **,
Lisp_Object, const char **,
Lisp_Object *, unsigned);
static Lisp_Object make_lispy_switch_frame (Lisp_Object);
static void save_getcjmp (jmp_buf);
......@@ -4724,7 +4724,7 @@ static const int lispy_accent_codes[] =
/* This is a list of Lisp names for special "accent" characters.
It parallels lispy_accent_codes. */
static char *lispy_accent_keys[] =
static const char *lispy_accent_keys[] =
{
"dead-circumflex",
"dead-grave",
......@@ -4751,7 +4751,7 @@ static char *lispy_accent_keys[] =
#ifdef HAVE_NTGUI
#define FUNCTION_KEY_OFFSET 0x0
char *lispy_function_keys[] =
char const *lispy_function_keys[] =
{
0, /* 0 */
......@@ -4945,7 +4945,7 @@ char *lispy_function_keys[] =
/* Some of these duplicate the "Media keys" on newer keyboards,
but they are delivered to the application in a different way. */
static char *lispy_multimedia_keys[] =
static const char *lispy_multimedia_keys[] =
{
0,
"browser-back",
......@@ -5009,7 +5009,7 @@ static char *lispy_multimedia_keys[] =
the XK_kana_A case below. */
#if 0
#ifdef XK_kana_A
static char *lispy_kana_keys[] =
static const char *lispy_kana_keys[] =
{
/* X Keysym value */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x400 .. 0x40f */
......@@ -5048,7 +5048,7 @@ static char *lispy_kana_keys[] =
/* You'll notice that this table is arranged to be conveniently
indexed by X Windows keysym values. */
static char *lispy_function_keys[] =
static const char *lispy_function_keys[] =
{
/* X Keysym value */
......@@ -5134,7 +5134,7 @@ static char *lispy_function_keys[] =
/* ISO 9995 Function and Modifier Keys; the first byte is 0xFE. */
#define ISO_FUNCTION_KEY_OFFSET 0xfe00
static char *iso_lispy_function_keys[] =
static const char *iso_lispy_function_keys[] =
{
0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe00 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe08 */
......@@ -5157,14 +5157,14 @@ static char *iso_lispy_function_keys[] =
Lisp_Object Vlispy_mouse_stem;
static char *lispy_wheel_names[] =
static const char *lispy_wheel_names[] =
{
"wheel-up", "wheel-down", "wheel-left", "wheel-right"
};
/* drag-n-drop events are generated when a set of selected files are
dragged from another application and dropped onto an Emacs window. */
static char *lispy_drag_n_drop_names[] =
static const char *lispy_drag_n_drop_names[] =
{
"drag-n-drop"
};
......@@ -5175,7 +5175,7 @@ Lisp_Object Qup, Qdown, Qbottom, Qend_scroll;
Lisp_Object Qtop, Qratio;
/* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */
Lisp_Object *scroll_bar_parts[] = {
const Lisp_Object *scroll_bar_parts[] = {
&Qabove_handle, &Qhandle, &Qbelow_handle,
&Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio
};
......@@ -6542,7 +6542,7 @@ reorder_modifiers (Lisp_Object symbol)
static Lisp_Object
modify_event_symbol (int symbol_num, unsigned int modifiers, Lisp_Object symbol_kind,
Lisp_Object name_alist_or_stem, char **name_table,
Lisp_Object name_alist_or_stem, const char **name_table,
Lisp_Object *symbol_table, unsigned int table_size)
{
Lisp_Object value;
......
......@@ -1266,7 +1266,7 @@ struct fkey_table {
other keys (as on the IBM PC keyboard) they get overridden.
*/
static struct fkey_table keys[] =
static const struct fkey_table keys[] =
{
{"kh", "home"}, /* termcap */
{"kl", "left"}, /* termcap */
......@@ -2906,7 +2906,6 @@ term_mouse_highlight (struct frame *f, int x, int y)
/* Look for a `help-echo' property. */
{
Lisp_Object help;
extern Lisp_Object Qhelp_echo;
/* Check overlays first. */
help = Qnil;
......
......@@ -762,10 +762,10 @@ xg_set_icon (FRAME_PTR f, Lisp_Object file)
}
int
xg_set_icon_from_xpm_data (FRAME_PTR f, char **data)
xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data)
{
int result = 0;
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) data);
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data);
if (!pixbuf)
return 0;
......
......@@ -1062,7 +1062,7 @@ extern Lisp_Object x_get_focus_frame (struct frame *);
#ifdef USE_GTK
extern int xg_set_icon (struct frame *, Lisp_Object);
extern int xg_set_icon_from_xpm_data (struct frame *, char**);
extern int xg_set_icon_from_xpm_data (struct frame *, const char**);
#endif /* USE_GTK */
extern void x_real_positions (struct frame *, int *, int *);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment