comparison src/editfns.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 dbc0119ac80e
children 4d54e23aa31e
comparison
equal deleted inserted replaced
109723:3783b558402b 109726:64732fa6188a
1402 return Vsystem_name; 1402 return Vsystem_name;
1403 } 1403 }
1404 1404
1405 /* For the benefit of callers who don't want to include lisp.h */ 1405 /* For the benefit of callers who don't want to include lisp.h */
1406 1406
1407 char * 1407 const char *
1408 get_system_name (void) 1408 get_system_name (void)
1409 { 1409 {
1410 if (STRINGP (Vsystem_name)) 1410 if (STRINGP (Vsystem_name))
1411 return (char *) SDATA (Vsystem_name); 1411 return (const char *) SDATA (Vsystem_name);
1412 else 1412 else
1413 return ""; 1413 return "";
1414 } 1414 }
1415 1415
1416 char * 1416 const char *
1417 get_operating_system_release (void) 1417 get_operating_system_release (void)
1418 { 1418 {
1419 if (STRINGP (Voperating_system_release)) 1419 if (STRINGP (Voperating_system_release))
1420 return (char *) SDATA (Voperating_system_release); 1420 return (char *) SDATA (Voperating_system_release);
1421 else 1421 else
1817 UNBLOCK_INPUT; 1817 UNBLOCK_INPUT;
1818 } 1818 }
1819 else 1819 else
1820 { 1820 {
1821 char tzbuf[100]; 1821 char tzbuf[100];
1822 char *tzstring; 1822 const char *tzstring;
1823 char **oldenv = environ, **newenv; 1823 char **oldenv = environ, **newenv;
1824 1824
1825 if (EQ (zone, Qt)) 1825 if (EQ (zone, Qt))
1826 tzstring = "UTC0"; 1826 tzstring = "UTC0";
1827 else if (STRINGP (zone)) 1827 else if (STRINGP (zone))
1999 doc: /* Set the local time zone using TZ, a string specifying a time zone rule. 1999 doc: /* Set the local time zone using TZ, a string specifying a time zone rule.
2000 If TZ is nil, use implementation-defined default time zone information. 2000 If TZ is nil, use implementation-defined default time zone information.
2001 If TZ is t, use Universal Time. */) 2001 If TZ is t, use Universal Time. */)
2002 (Lisp_Object tz) 2002 (Lisp_Object tz)
2003 { 2003 {
2004 char *tzstring; 2004 const char *tzstring;
2005 2005
2006 /* When called for the first time, save the original TZ. */ 2006 /* When called for the first time, save the original TZ. */
2007 if (!environbuf) 2007 if (!environbuf)
2008 initial_tz = (char *) getenv ("TZ"); 2008 initial_tz = (char *) getenv ("TZ");
2009 2009