/* 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"
{}
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
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 /* end #ifdef HAVE_NTGUI */
}
- if (!noninteractive)
- {
-#ifdef VMS
- init_vms_input ();/* init_display calls get_frame_size, that needs this. */
-#endif /* VMS */
- init_display (); /* Determine terminal type. init_sys_modes uses results. */
- }
#ifndef MAC_OS8
/* Called before init_window_once for Mac OS Classic. */
init_keyboard (); /* This too must precede init_sys_modes. */
#ifdef VMS
init_vmsproc (); /* And this too. */
#endif /* VMS */
- init_sys_modes (); /* Init system terminal modes (RAW or CBREAK, etc.). */
+ if (!noninteractive)
+ {
+#ifdef VMS
+ init_vms_input ();/* init_display calls get_tty_size, that needs this. */
+#endif /* VMS */
+ init_display (); /* Determine terminal type. Calls init_sys_modes. */
+ }
#if defined (HAVE_X_WINDOWS) || defined (WINDOWSNT)
init_xfns ();
#endif /* HAVE_X_WINDOWS */
bcopy (new, argv, sizeof (char *) * argc);
- free (options);
- free (new);
- free (priority);
+ xfree (options);
+ xfree (new);
+ xfree (priority);
}
\f
DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P",
&& tpgrp == pgrp)
{
fflush (stdout);
- reset_sys_modes ();
+ reset_all_sys_modes ();
if (sig && sig != SIGTERM)
- fprintf (stderr, "Fatal error (%d).", sig);
+ fprintf (stderr, "Fatal error (%d)", sig);
}
}
#else
fflush (stdout);
- reset_sys_modes ();
+ reset_all_sys_modes ();
#endif
stuff_buffered_input (stuff);
doc: /* Most recently used system locale for time. */);
Vprevious_system_time_locale = Qnil;
}
+
+/* arch-tag: 7bfd356a-c720-4612-8ab6-aa4222931c2e
+ (do not change this comment) */