XEmacs 21.4.9 "Informed Management".
[chise/xemacs-chise.git.1] / src / emacs.c
index 33b515b..d1922a9 100644 (file)
@@ -241,6 +241,10 @@ static void *malloc_state_ptr;
 void r_alloc_reinit (void);
 # endif
 
+#ifdef HAVE_GTK
+void console_type_create_select_gtk(void);
+#endif
+
 /* Variable whose value is symbol giving operating system type. */
 Lisp_Object Vsystem_type;
 
@@ -463,8 +467,8 @@ static JMP_BUF run_temacs_catch;
 static int run_temacs_argc;
 static char **run_temacs_argv;
 static char *run_temacs_args;
-static size_t run_temacs_argv_size;
-static size_t run_temacs_args_size;
+static EMACS_INT run_temacs_argv_size;
+static EMACS_INT run_temacs_args_size;
 
 static void shut_down_emacs (int sig, Lisp_Object stuff, int no_auto_save);
 
@@ -795,7 +799,7 @@ argmatch (char **argv, int argc, char *sstr, char *lstr,
       return 1;
     }
   arglen = (valptr != NULL && (p = strchr (arg, '=')) != NULL
-           ? p - arg : strlen (arg));
+           ? p - arg : (int) strlen (arg));
   if (lstr == 0 || arglen < minlen || strncmp (arg, lstr, arglen) != 0)
     return 0;
   else if (valptr == NULL)
@@ -1144,6 +1148,11 @@ main_1 (int argc, char **argv, char **envp, int restart)
                                       so we can be fairly accurate. */
   init_intl_very_early (); /* set up the locale and domain for gettext and
                              such. */
+#ifdef HAVE_MS_WINDOWS
+  init_mswindows_very_early ();        /* Some things - like dde need to be
+                                  initialized early so that the
+                                  client doesn't give up waiting.  */
+#endif
 
   /* Now initialize the Lisp engine and the like.  Done only during
      dumping.  No dependence on anything that may be in the user's
@@ -2853,10 +2862,13 @@ all of which are called before XEmacs is actually killed.
 
 #ifdef HAVE_MS_WINDOWS
   /* If we displayed a message on the console, then we must allow the
-     user to see this message.  This may be unnecessary, but can't hurt,
-     and we can't necessarily check arg; e.g. xemacs --help kills with
-     argument 0. */
-  if (mswindows_message_outputted)
+     user to see this message.  This may be unnecessary, but can't
+     hurt, and we can't necessarily check arg; e.g. xemacs --help
+     kills with argument 0.
+
+     Don't do this in batch mode, it makes no sense and is more
+     annoying than useful. --andyp */
+  if (mswindows_message_outputted && !noninteractive)
     Fmswindows_message_box (build_string ("Messages outputted.  XEmacs is exiting."),
                            Qnil, Qnil);
 #endif
@@ -3185,7 +3197,7 @@ decode_env_path (const char *evarname, const char *default_)
 /* Ben thinks this function should not exist or be exported to Lisp.
    We use it to define split-path-string in subr.el (not!).  */
 
-DEFUN ("split-string-by-char", Fsplit_string_by_char, 1, 2, 0, /*
+DEFUN ("split-string-by-char", Fsplit_string_by_char, 2, 2, 0, /*
 Split STRING into a list of substrings originally separated by SEPCHAR.
 */
        (string, sepchar))