comparison src/emacs.c @ 46370:40db0673e6f0

Most uses of XSTRING combined with STRING_BYTES or indirection changed to SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references left unchanged for now.
author Ken Raeburn <raeburn@raeburn.org>
date Mon, 15 Jul 2002 00:00:41 +0000
parents 1fb8f75062c6
children aff9c7fcedb0
comparison
equal deleted inserted replaced
46369:dd1d3b1d0053 46370:40db0673e6f0
741 741
742 /* When `emacs-version' is invalid, use normal address. */ 742 /* When `emacs-version' is invalid, use normal address. */
743 if (!STRINGP(temp)) 743 if (!STRINGP(temp))
744 return REPORT_EMACS_BUG_ADDRESS; 744 return REPORT_EMACS_BUG_ADDRESS;
745 745
746 string = XSTRING (temp)->data; 746 string = SDATA (temp);
747 747
748 /* Count dots in `emacs-version'. */ 748 /* Count dots in `emacs-version'. */
749 while (*string) 749 while (*string)
750 { 750 {
751 if (*string == '.') 751 if (*string == '.')
815 fprintf (stderr, "Invalid value of `emacs-version'\n"); 815 fprintf (stderr, "Invalid value of `emacs-version'\n");
816 exit (1); 816 exit (1);
817 } 817 }
818 else 818 else
819 { 819 {
820 printf ("GNU Emacs %s\n", XSTRING (tem)->data); 820 printf ("GNU Emacs %s\n", SDATA (tem));
821 printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); 821 printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n");
822 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); 822 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n");
823 printf ("You may redistribute copies of Emacs\n"); 823 printf ("You may redistribute copies of Emacs\n");
824 printf ("under the terms of the GNU General Public License.\n"); 824 printf ("under the terms of the GNU General Public License.\n");
825 printf ("For more information about these matters, "); 825 printf ("For more information about these matters, ");
1906 1906
1907 /* If we have an auto-save list file, 1907 /* If we have an auto-save list file,
1908 kill it because we are exiting Emacs deliberately (not crashing). 1908 kill it because we are exiting Emacs deliberately (not crashing).
1909 Do it after shut_down_emacs, which does an auto-save. */ 1909 Do it after shut_down_emacs, which does an auto-save. */
1910 if (STRINGP (Vauto_save_list_file_name)) 1910 if (STRINGP (Vauto_save_list_file_name))
1911 unlink (XSTRING (Vauto_save_list_file_name)->data); 1911 unlink (SDATA (Vauto_save_list_file_name));
1912 1912
1913 exit (INTEGERP (arg) ? XINT (arg) 1913 exit (INTEGERP (arg) ? XINT (arg)
1914 #ifdef VMS 1914 #ifdef VMS
1915 : 1 1915 : 1
1916 #else 1916 #else
1975 1975
1976 #if 0 /* This triggers a bug in XCloseDisplay and is not needed. */ 1976 #if 0 /* This triggers a bug in XCloseDisplay and is not needed. */
1977 #ifdef HAVE_X_WINDOWS 1977 #ifdef HAVE_X_WINDOWS
1978 /* It's not safe to call intern here. Maybe we are crashing. */ 1978 /* It's not safe to call intern here. Maybe we are crashing. */
1979 if (!noninteractive && SYMBOLP (Vwindow_system) 1979 if (!noninteractive && SYMBOLP (Vwindow_system)
1980 && XSTRING (SYMBOL_NAME (Vwindow_system))->size == 1 1980 && SCHARS (SYMBOL_NAME (Vwindow_system)) == 1
1981 && XSTRING (SYMBOL_NAME (Vwindow_system))->data[0] == 'x' 1981 && SREF (SYMBOL_NAME (Vwindow_system), 0) == 'x'
1982 && ! no_x) 1982 && ! no_x)
1983 Fx_close_current_connection (); 1983 Fx_close_current_connection ();
1984 #endif /* HAVE_X_WINDOWS */ 1984 #endif /* HAVE_X_WINDOWS */
1985 #endif 1985 #endif
1986 1986
2034 /* Tell malloc where start of impure now is. */ 2034 /* Tell malloc where start of impure now is. */
2035 /* Also arrange for warnings when nearly out of space. */ 2035 /* Also arrange for warnings when nearly out of space. */
2036 #ifndef SYSTEM_MALLOC 2036 #ifndef SYSTEM_MALLOC
2037 memory_warnings (my_edata, malloc_warning); 2037 memory_warnings (my_edata, malloc_warning);
2038 #endif 2038 #endif
2039 map_out_data (XSTRING (filename)->data); 2039 map_out_data (SDATA (filename));
2040 2040
2041 Vpurify_flag = tem; 2041 Vpurify_flag = tem;
2042 2042
2043 return Qnil; 2043 return Qnil;
2044 } 2044 }
2073 CHECK_STRING (filename); 2073 CHECK_STRING (filename);
2074 filename = Fexpand_file_name (filename, Qnil); 2074 filename = Fexpand_file_name (filename, Qnil);
2075 if (!NILP (symfile)) 2075 if (!NILP (symfile))
2076 { 2076 {
2077 CHECK_STRING (symfile); 2077 CHECK_STRING (symfile);
2078 if (XSTRING (symfile)->size) 2078 if (SCHARS (symfile))
2079 symfile = Fexpand_file_name (symfile, Qnil); 2079 symfile = Fexpand_file_name (symfile, Qnil);
2080 } 2080 }
2081 2081
2082 tem = Vpurify_flag; 2082 tem = Vpurify_flag;
2083 Vpurify_flag = Qnil; 2083 Vpurify_flag = Qnil;
2090 #endif 2090 #endif
2091 #endif 2091 #endif
2092 2092
2093 fflush (stdout); 2093 fflush (stdout);
2094 #ifdef VMS 2094 #ifdef VMS
2095 mapout_data (XSTRING (filename)->data); 2095 mapout_data (SDATA (filename));
2096 #else 2096 #else
2097 /* Tell malloc where start of impure now is. */ 2097 /* Tell malloc where start of impure now is. */
2098 /* Also arrange for warnings when nearly out of space. */ 2098 /* Also arrange for warnings when nearly out of space. */
2099 #ifndef SYSTEM_MALLOC 2099 #ifndef SYSTEM_MALLOC
2100 #ifndef WINDOWSNT 2100 #ifndef WINDOWSNT
2108 #endif 2108 #endif
2109 2109
2110 #ifdef USE_MMAP_FOR_BUFFERS 2110 #ifdef USE_MMAP_FOR_BUFFERS
2111 mmap_set_vars (0); 2111 mmap_set_vars (0);
2112 #endif 2112 #endif
2113 unexec (XSTRING (filename)->data, 2113 unexec (SDATA (filename),
2114 !NILP (symfile) ? XSTRING (symfile)->data : 0, my_edata, 0, 0); 2114 !NILP (symfile) ? SDATA (symfile) : 0, my_edata, 0, 0);
2115 #ifdef USE_MMAP_FOR_BUFFERS 2115 #ifdef USE_MMAP_FOR_BUFFERS
2116 mmap_set_vars (1); 2116 mmap_set_vars (1);
2117 #endif 2117 #endif
2118 #ifdef DOUG_LEA_MALLOC 2118 #ifdef DOUG_LEA_MALLOC
2119 free (malloc_state_ptr); 2119 free (malloc_state_ptr);
2149 { 2149 {
2150 if (! EQ (*plocale, desired_locale)) 2150 if (! EQ (*plocale, desired_locale))
2151 { 2151 {
2152 *plocale = desired_locale; 2152 *plocale = desired_locale;
2153 setlocale (category, (STRINGP (desired_locale) 2153 setlocale (category, (STRINGP (desired_locale)
2154 ? (char *)(XSTRING (desired_locale)->data) 2154 ? (char *)(SDATA (desired_locale))
2155 : "")); 2155 : ""));
2156 } 2156 }
2157 } 2157 }
2158 2158
2159 /* Set system time locale to match Vsystem_time_locale, if possible. */ 2159 /* Set system time locale to match Vsystem_time_locale, if possible. */