/* Fully extensible Emacs, running on Unix, intended for GNU.
- Copyright (C) 1985,86,87,93,94,95,97,98,1999,2001,2002
+ Copyright (C) 1985,86,87,93,94,95,97,98,1999,2001,02,2003
Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <sys/ioctl.h>
#endif
+#ifdef WINDOWSNT
+#include <fcntl.h>
+#endif
+
#include "lisp.h"
#include "commands.h"
#include "intervals.h"
#include "buffer.h"
+#include "window.h"
#include "systty.h"
#include "blockinput.h"
#ifdef DATA_SEG_BITS
EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS;
#else
-EMACS_INT gdb_data_seg_bits = 0;
+EMACS_INT gdb_data_seg_bits = 0;
#endif
EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG;
Lisp_Object Vsystem_time_locale;
Lisp_Object Vprevious_system_time_locale;
-/* If non-zero, emacs should not attempt to use an window-specific code,
+/* If non-zero, emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
int inhibit_window_system;
{}
void __do_global_dtors ()
{}
-/* Linux has a bug in its library; avoid an error. */
+/* GNU/Linux has a bug in its library; avoid an error. */
#ifndef GNU_LINUX
char * __CTOR_LIST__[2] = { (char *) (-1), 0 };
#endif
/* ARGSUSED */
int
-main (argc, argv, envp)
+main (argc, argv
+#ifdef VMS
+, envp
+#endif
+)
int argc;
char **argv;
+#ifdef VMS
char **envp;
+#endif
{
#if GC_MARK_STACK
Lisp_Object dummy;
uninterrupt_malloc ();
#endif /* not SYSTEM_MALLOC */
-#ifdef MSDOS
+#if defined (MSDOS) || defined (WINDOWSNT)
/* We do all file input/output as binary files. When we need to translate
newlines, we do that manually. */
_fmode = O_BINARY;
+#endif /* MSDOS || WINDOWSNT */
+#ifdef MSDOS
#if __DJGPP__ >= 2
if (!isatty (fileno (stdin)))
setmode (fileno (stdin), O_BINARY);
#endif /* MSDOS */
#ifdef WINDOWSNT
+ globals_of_w32 ();
/* Initialize environment from registry settings. */
init_environment (argv);
init_ntproc (); /* must precede init_editfns. */
keys_of_keymap ();
keys_of_minibuf ();
keys_of_window ();
+ }
+ else
+ {
+ /*
+ Initialization that must be done even if the global variable
+ initialized is non zero
+ */
+#ifdef HAVE_NTGUI
+ globals_of_w32fns ();
+ globals_of_w32menu ();
+#endif /* end #ifdef HAVE_NTGUI */
}
if (!noninteractive)
defsubr (&Sinvocation_directory);
DEFVAR_LISP ("command-line-args", &Vcommand_line_args,
- doc: /* Args passed by shell to Emacs, as a list of strings. */);
+ doc: /* Args passed by shell to Emacs, as a list of strings.
+Many arguments are deleted from the list as they are processed. */);
DEFVAR_LISP ("system-type", &Vsystem_type,
doc: /* Value is symbol indicating type of operating system you are using. */);
doc: /* Non-nil means Emacs is running without interactive terminal. */);
DEFVAR_LISP ("kill-emacs-hook", &Vkill_emacs_hook,
- doc: /* Hook to be run whenever kill-emacs is called.
-Since kill-emacs may be invoked when the terminal is disconnected (or
+ doc: /* Hook to be run when kill-emacs is called.
+Since `kill-emacs' may be invoked when the terminal is disconnected (or
in other similar situations), functions placed on this hook should not
expect to be able to interact with the user. To ask for confirmation,
-see `kill-emacs-query-functions' instead. */);
+see `kill-emacs-query-functions' instead.
+
+The hook is not run in batch mode, i.e., if `noninteractive' is non-nil. */);
Vkill_emacs_hook = Qnil;
empty_string = build_string ("");