summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@twinsun.com>1999-11-22 08:19:51 +0000
committerPaul Eggert <eggert@twinsun.com>1999-11-22 08:19:51 +0000
commitca9c056758a507f1508933de24d2410188b978fb (patch)
tree6da0a2b930d59b0c44dbd8f6d29faf8564589319 /src/emacs.c
parentb718982a2a661a3bf4bb226ff164925c3d0f9ed3 (diff)
downloademacs-ca9c056758a507f1508933de24d2410188b978fb.tar.gz
emacs-ca9c056758a507f1508933de24d2410188b978fb.tar.bz2
emacs-ca9c056758a507f1508933de24d2410188b978fb.zip
* callproc.c (strerror): Remove decl.
* fileio.c (strerror): Likewise. * process.c (strerror): Likewise. * emacs.c (strerror): Likewise. (Vsystem_messages_locale): Renamed from Vmessages_locale. All uses changed. (Vprevious_system_messages_locale): Likewise, from Vprevious_messages_locale. (Vsystem_time_locale): Likewise, from Vtime_locale. (Vprevious_system_time_locale): Likewise, from Vprevious_time_locale. (ABORT_RETURN_TYPE): New macro. (abort): Return type is now ABORT_RETURN_TYPE. (main): Always invoke init_signals, even if POSIX_SIGNALS is not defined. (syms_of_emacs): messages-locale -> system-messages-locale, previous-messages-locale -> previous-system-messages-locale, time-locale -> system-time-locale, previous-time-locale -> previous-system-time-locale. * gmalloc.c (PP, __ptr_t): Assume ANSI C if STDC_HEADERS is defined. (const): Do not define; that's config.h's job. (<limits.h>): Include if HAVE_LIMITS_H is defined. (CHAR_BIT): Move test for definedness outside of limits.h condition. (<stddef.h>): Include if STDC_HEADERS is defined. (FREE_RETURN_TYPE): New macro. (free): Return type is now FREE_RETURN_TYPE. * lisp.h (synchronize_system_time_locale): Renamed from synchronize_time_locale. All uses changed. (synchronize_system_messages_locale): Likewise, from synchronize_messages_locale. * process.c (sys_siglist): Remove. * syntax.c (scan_sexps_forward): Use abort, not assert. * sysdep.c (my_sys_siglist): New var. (sys_siglist): New macro. Remove old initialized vars of same name. (init_signals): Initialize sys_siglist. * xfns.c (abort): Remove decl; stdlib.h now does this.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c59
1 files changed, 32 insertions, 27 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 932c3758a91..192b308bbc0 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -67,7 +67,6 @@ Boston, MA 02111-1307, USA. */
extern void malloc_warning ();
extern void set_time_zone_rule ();
extern char *index ();
-extern char *strerror ();
/* Command line args from shell, as list of strings */
Lisp_Object Vcommand_line_args;
@@ -128,10 +127,10 @@ Lisp_Object Vsystem_configuration_options;
Lisp_Object Qfile_name_handler_alist;
/* Current and previous system locales for messages and time. */
-Lisp_Object Vmessages_locale;
-Lisp_Object Vprevious_messages_locale;
-Lisp_Object Vtime_locale;
-Lisp_Object Vprevious_time_locale;
+Lisp_Object Vsystem_messages_locale;
+Lisp_Object Vprevious_system_messages_locale;
+Lisp_Object Vsystem_time_locale;
+Lisp_Object Vprevious_system_time_locale;
/* If non-zero, emacs should not attempt to use an window-specific code,
but instead should use the virtual terminal under which it was started */
@@ -283,7 +282,12 @@ memory_warning_signal (sig)
MSDOS has its own definition on msdos.c */
#if ! defined (DOS_NT) && ! defined (NO_ABORT)
-void
+
+#ifndef ABORT_RETURN_TYPE
+#define ABORT_RETURN_TYPE void
+#endif
+
+ABORT_RETURN_TYPE
abort ()
{
kill (getpid (), SIGABRT);
@@ -881,9 +885,7 @@ the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]);
#endif
}
-#ifdef POSIX_SIGNALS
init_signals ();
-#endif
/* Don't catch SIGHUP if dumping. */
if (1
@@ -1019,8 +1021,8 @@ the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]);
if (do_initial_setlocale)
{
fixup_locale ();
- Vmessages_locale = Vprevious_messages_locale;
- Vtime_locale = Vprevious_time_locale;
+ Vsystem_messages_locale = Vprevious_system_messages_locale;
+ Vsystem_time_locale = Vprevious_system_time_locale;
}
init_eval ();
@@ -1905,10 +1907,10 @@ fixup_locale ()
#ifdef LC_MESSAGES
l = setlocale (LC_MESSAGES, (char *) 0);
- Vprevious_messages_locale = l ? build_string (l) : Qnil;
+ Vprevious_system_messages_locale = l ? build_string (l) : Qnil;
#endif
l = setlocale (LC_TIME, (char *) 0);
- Vprevious_time_locale = l ? build_string (l) : Qnil;
+ Vprevious_system_time_locale = l ? build_string (l) : Qnil;
}
static void
@@ -1923,20 +1925,22 @@ synchronize_locale (category, plocale, desired_locale)
*plocale = desired_locale;
}
-/* Set system time locale to match Vtime_locale, if possible. */
+/* Set system time locale to match Vsystem_time_locale, if possible. */
void
-synchronize_time_locale ()
+synchronize_system_time_locale ()
{
- synchronize_locale (LC_TIME, &Vprevious_time_locale, Vtime_locale);
+ synchronize_locale (LC_TIME, &Vprevious_system_time_locale,
+ Vsystem_time_locale);
}
-/* Set system messages locale to match Vmessages_locale, if possible. */
+/* Set system messages locale to match Vsystem_messages_locale, if
+ possible. */
void
-synchronize_messages_locale ()
+synchronize_system_messages_locale ()
{
#ifdef LC_MESSAGES
- synchronize_locale (LC_MESSAGES, &Vprevious_messages_locale,
- Vmessages_locale);
+ synchronize_locale (LC_MESSAGES, &Vprevious_system_messages_locale,
+ Vsystem_messages_locale);
#endif
}
#endif /* HAVE_SETLOCALE */
@@ -2086,19 +2090,20 @@ installed locations, but we can find them\n\
near where the Emacs executable was found.");
Vinstallation_directory = Qnil;
- DEFVAR_LISP ("messages-locale", &Vmessages_locale,
+ DEFVAR_LISP ("system-messages-locale", &Vsystem_messages_locale,
"System locale for messages.");
- Vmessages_locale = Qnil;
+ Vsystem_messages_locale = Qnil;
- DEFVAR_LISP ("previous-messages-locale", &Vprevious_messages_locale,
+ DEFVAR_LISP ("previous-system-messages-locale",
+ &Vprevious_system_messages_locale,
"Most recently used system locale for messages.");
- Vprevious_messages_locale = Qnil;
+ Vprevious_system_messages_locale = Qnil;
- DEFVAR_LISP ("time-locale", &Vtime_locale,
+ DEFVAR_LISP ("system-time-locale", &Vsystem_time_locale,
"System locale for time.");
- Vtime_locale = Qnil;
+ Vsystem_time_locale = Qnil;
- DEFVAR_LISP ("previous-time-locale", &Vprevious_time_locale,
+ DEFVAR_LISP ("previous-system-time-locale", &Vprevious_system_time_locale,
"Most recently used system locale for time.");
- Vprevious_time_locale = Qnil;
+ Vprevious_system_time_locale = Qnil;
}