diff src/font.c @ 109726:64732fa6188a

Use const char* instead of char*. Reduce the number of warnings with -Wwrite-strings. * src/xrdb.c (get_environ_db, get_system_name): * src/unexelf.c (find_section): * src/term.c (string_cost, string_cost_one_line, per_line_cost) (get_named_tty, init_tty): * src/sysdep.c (sys_subshell): * src/sound.c (sound_perror, sound_warning, vox_open, vox_init) (alsa_sound_perror, alsa_open, alsa_configure, alsa_init): * src/search.c (Freplace_match): * src/process.c (Fmake_network_process, send_process, init_process): * src/lread.c (Fload, init_lread): * src/keymap.c (Fdescribe_buffer_bindings, describe_map_tree): * src/keyboard.c (parse_tool_bar_item, struct event_head): * src/gtkutil.h (xg_get_font_name): * src/gtkutil.c (get_dialog_title, create_dialog, xg_get_font_name) (make_widget_for_menu_item, make_menu_item, create_menus) (xg_make_tool_item): * src/font.c (parse_matrix, font_parse_name): * src/floatfns.c (rounding_driver, float_error_fn_name): * src/filelock.c (get_boot_time_1, lock_file_1): * src/fileio.c (barf_or_query_if_file_exists, check_writable): * src/editfns.c (get_system_name, get_operating_system_release) (Fencode_time, Fset_time_zone_rule): * src/dispextern.h (string_cost, per_line_cost, get_named_tty, init_tty): * src/buffer.c (defvar_per_buffer): Use const.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 09 Aug 2010 02:35:21 -0700
parents 8949aad5e992
children 0fe981e141e3
line wrap: on
line diff
--- a/src/font.c	Sun Aug 08 21:30:10 2010 -0500
+++ b/src/font.c	Mon Aug 09 02:35:21 2010 -0700
@@ -699,9 +699,9 @@
 
 /* Font name parser and unparser */
 
-static int parse_matrix (char *);
+static int parse_matrix (const char *);
 static int font_expand_wildcards (Lisp_Object *, int);
-static int font_parse_name (char *, Lisp_Object);
+static int font_parse_name (const char *, Lisp_Object);
 
 /* An enumerator for each field of an XLFD font name.  */
 enum xlfd_field_index
@@ -758,7 +758,7 @@
    -1.  */
 
 static int
-parse_matrix (char *p)
+parse_matrix (const char *p)
 {
   double matrix[4];
   char *end;
@@ -1765,7 +1765,7 @@
    0.  Otherwise return -1.  */
 
 static int
-font_parse_name (char *name, Lisp_Object font)
+font_parse_name (const char *name, Lisp_Object font)
 {
   if (name[0] == '-' || strchr (name, '*') || strchr (name, '?'))
     return font_parse_xlfd (name, font);