Remove support for DJGPP v1.x (bug#5813).
[bpt/emacs.git] / src / emacs.c
index 2f73e8b..0d90776 100644 (file)
@@ -32,7 +32,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #endif
 
-#ifdef BSD_SYSTEM
+#ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
 #endif
 
@@ -345,7 +345,7 @@ abbreviation for a --option.\n\
 Various environment variables and window system resources also affect\n\
 Emacs' operation.  See the main documentation.\n\
 \n\
-Report bugs to %s.  First, please see the Bugs\n\
+Report bugs to bug-gnu-emacs@gnu.org.  First, please see the Bugs\n\
 section of the Emacs manual or the file BUGS.\n"
 
 \f
@@ -746,41 +746,6 @@ void (*__malloc_initialize_hook) () = malloc_initialize_hook;
 #endif /* DOUG_LEA_MALLOC */
 
 
-#define REPORT_EMACS_BUG_ADDRESS "bug-gnu-emacs@gnu.org"
-#define REPORT_EMACS_BUG_PRETEST_ADDRESS "bug-gnu-emacs@gnu.org"
-
-/* This function is used to determine an address to which bug report should
-   be sent.  */
-
-char *
-bug_reporting_address ()
-{
-  int count = 0;
-  Lisp_Object temp;
-  char *string;
-
-  temp = Fsymbol_value (intern ("emacs-version"));
-
-  /* When `emacs-version' is invalid, use normal address.  */
-  if (!STRINGP(temp))
-    return REPORT_EMACS_BUG_ADDRESS;
-
-  string = SDATA (temp);
-
-  /* Count dots in `emacs-version'.  */
-  while (*string)
-    {
-      if (*string == '.')
-       count++;
-      string++;
-    }
-
-  /* When `emacs-version' has at least three dots, it is development or
-     pretest version of Emacs.  */
-  return count >= 3 ? REPORT_EMACS_BUG_PRETEST_ADDRESS : REPORT_EMACS_BUG_ADDRESS;
-}
-
-
 /* ARGSUSED */
 int
 main (int argc, char **argv)
@@ -825,11 +790,6 @@ main (int argc, char **argv)
       heap_bss_diff = (char *)my_heap_start - max (my_endbss, my_endbss_static);
     }
 
-#ifdef LINUX_SBRK_BUG
-  /* This is only used GNU/LINUX running on alpha when using libc5 */
-  __sbrk (1);
-#endif
-
 #ifdef RUN_TIME_REMAP
   if (initialized)
     run_time_remap (argv[0]);
@@ -985,7 +945,6 @@ main (int argc, char **argv)
 #endif /* MSDOS || WINDOWSNT */
 
 #ifdef MSDOS
-#if __DJGPP__ >= 2
   if (!isatty (fileno (stdin)))
     setmode (fileno (stdin), O_BINARY);
   if (!isatty (fileno (stdout)))
@@ -993,11 +952,6 @@ main (int argc, char **argv)
       fflush (stdout);
       setmode (fileno (stdout), O_BINARY);
     }
-#else  /* not __DJGPP__ >= 2 */
-  (stdin)->_flag &= ~_IOTEXT;
-  (stdout)->_flag &= ~_IOTEXT;
-  (stderr)->_flag &= ~_IOTEXT;
-#endif /* not __DJGPP__ >= 2 */
 #endif /* MSDOS */
 
 #ifdef SET_EMACS_PRIORITY
@@ -1082,7 +1036,7 @@ main (int argc, char **argv)
     {
       printf (USAGE1, argv[0], USAGE2);
       printf (USAGE3);
-      printf (USAGE4, bug_reporting_address ());
+      printf (USAGE4);
       exit (0);
     }
 
@@ -1851,9 +1805,6 @@ struct standard_args
 const struct standard_args standard_args[] =
 {
   { "-version", "--version", 150, 0 },
-#ifdef HAVE_SHM
-  { "-nl", "--no-shared-memory", 140, 0 },
-#endif
   { "-t", "--terminal", 120, 1 },
   { "-nw", "--no-window-system", 110, 0 },
   { "-nw", "--no-windows", 110, 0 },
@@ -1869,7 +1820,7 @@ const struct standard_args standard_args[] =
   /* -d must come last before the options handled in startup.el.  */
   { "-d", "--display", 60, 1 },
   { "-display", 0, 60, 1 },
-  /* Now for the options handled in startup.el.  */
+  /* Now for the options handled in `command-line' (startup.el).  */
   { "-Q", "--quick", 55, 0 },
   { "-quick", 0, 55, 0 },
   { "-q", "--no-init-file", 50, 0 },
@@ -1878,10 +1829,12 @@ const struct standard_args standard_args[] =
   { "-u", "--user", 30, 1 },
   { "-user", 0, 30, 1 },
   { "-debug-init", "--debug-init", 20, 0 },
-  { "-nbi", "--no-bitmap-icon", 15, 0 },
   { "-iconic", "--iconic", 15, 0 },
   { "-D", "--basic-display", 12, 0},
   { "-basic-display", 0, 12, 0},
+  { "-nbc", "--no-blinking-cursor", 12, 0 },
+  /* Now for the options handled in `command-line-1' (startup.el).  */
+  { "-nbi", "--no-bitmap-icon", 10, 0 },
   { "-bg", "--background-color", 10, 1 },
   { "-background", 0, 10, 1 },
   { "-fg", "--foreground-color", 10, 1 },
@@ -1891,7 +1844,6 @@ const struct standard_args standard_args[] =
   { "-ib", "--internal-border", 10, 1 },
   { "-ms", "--mouse-color", 10, 1 },
   { "-cr", "--cursor-color", 10, 1 },
-  { "-nbc", "--no-blinking-cursor", 10, 0 },
   { "-fn", "--font", 10, 1 },
   { "-font", 0, 10, 1 },
   { "-fs", "--fullscreen", 10, 0 },
@@ -2244,39 +2196,6 @@ shut_down_emacs (sig, no_x, stuff)
 \f
 #ifndef CANNOT_DUMP
 
-#ifdef HAVE_SHM
-
-DEFUN ("dump-emacs-data", Fdump_emacs_data, Sdump_emacs_data, 1, 1, 0,
-       doc: /* Dump current state of Emacs into data file FILENAME.
-This function exists on systems that use HAVE_SHM.  */)
-     (filename)
-     Lisp_Object filename;
-{
-  extern char my_edata[];
-  Lisp_Object tem;
-
-  check_pure_size ();
-  CHECK_STRING (filename);
-  filename = Fexpand_file_name (filename, Qnil);
-
-  tem = Vpurify_flag;
-  Vpurify_flag = Qnil;
-
-  fflush (stdout);
-  /* Tell malloc where start of impure now is.  */
-  /* Also arrange for warnings when nearly out of space.  */
-#ifndef SYSTEM_MALLOC
-  memory_warnings (my_edata, malloc_warning);
-#endif
-  map_out_data (SDATA (filename));
-
-  Vpurify_flag = tem;
-
-  return Qnil;
-}
-
-#else /* not HAVE_SHM */
-
 DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0,
        doc: /* Dump current state of Emacs into executable file FILENAME.
 Take symbols from SYMFILE (presumably the file you executed to run Emacs).
@@ -2373,8 +2292,6 @@ You must run Emacs in batch mode in order to dump it.  */)
   return unbind_to (count, Qnil);
 }
 
-#endif /* not HAVE_SHM */
-
 #endif /* not CANNOT_DUMP */
 \f
 #if HAVE_SETLOCALE
@@ -2551,11 +2468,7 @@ syms_of_emacs ()
   staticpro (&Qfile_name_handler_alist);
 
 #ifndef CANNOT_DUMP
-#ifdef HAVE_SHM
-  defsubr (&Sdump_emacs_data);
-#else
   defsubr (&Sdump_emacs);
-#endif
 #endif
 
   defsubr (&Skill_emacs);