]> code.delx.au - gnu-emacs/blobdiff - src/msdos.c
*** empty log message ***
[gnu-emacs] / src / msdos.c
index 27ff5cd9a4a464e75f0d2430b452bff1efe1d5a5..6134c1beabe83156e4abbf651a6b3a89f5d9e870 100644 (file)
@@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA.  */
 #include <unistd.h>     /* for chdir, dup, dup2, etc. */
 #include <dir.h>        /* for getdisk */
 #if __DJGPP__ >= 2
+#pragma pack(0)                 /* dir.h does a pack(4), which isn't GCC's default */
 #include <fcntl.h>
 #include <io.h>                 /* for setmode */
 #include <dpmi.h>       /* for __dpmi_xxx stuff */
@@ -413,7 +414,8 @@ static unsigned short screen_virtual_offset = 0;
 /* A flag to control how to display unibyte 8-bit characters.  */
 extern int unibyte_display_via_language_environment;
 
-Lisp_Object Qbar, Qhbar;
+extern Lisp_Object Qcursor_type;
+extern Lisp_Object Qbar, Qhbar;
 
 /* The screen colors of the current frame, which serve as the default
    colors for newly-created frames.  */
@@ -1328,7 +1330,7 @@ show_mouse_face (struct display_info *dpyinfo, int hl)
 static void
 clear_mouse_face (struct display_info *dpyinfo)
 {
-  if (! NILP (dpyinfo->mouse_face_window))
+  if (!dpyinfo->mouse_face_hidden && ! NILP (dpyinfo->mouse_face_window))
     show_mouse_face (dpyinfo, 0);
 
   dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
@@ -1993,8 +1995,6 @@ IT_update_end (struct frame *f)
   FRAME_X_DISPLAY_INFO (f)->mouse_face_defer = 0;
 }
 
-Lisp_Object Qcursor_type;
-
 static void
 IT_frame_up_to_date (struct frame *f)
 {
@@ -3132,7 +3132,7 @@ dos_rawgetc ()
   union REGS regs;
   struct display_info *dpyinfo = FRAME_X_DISPLAY_INFO (SELECTED_FRAME());
   EVENT_INIT (event);
-  
+
 #ifndef HAVE_X_WINDOWS
   /* Maybe put the cursor where it should be.  */
   IT_cmgoto (SELECTED_FRAME());
@@ -3343,8 +3343,8 @@ dos_rawgetc ()
 
       if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight))
        {
-         dpyinfo->mouse_face_hidden = 1;
          clear_mouse_face (dpyinfo);
+         dpyinfo->mouse_face_hidden = 1;
        }
 
       if (code >= 0x100)
@@ -4409,9 +4409,28 @@ init_environment (argc, argv, skip_args)
   for (i = 0; i < imax ; i++)
     {
       const char *tmp = tempdirs[i];
+      char buf[FILENAME_MAX];
 
       if (*tmp == '$')
-       tmp = getenv (tmp + 1);
+       {
+         int tmp_len;
+
+         tmp = getenv (tmp + 1);
+         if (!tmp)
+           continue;
+
+         /* Some lusers set TMPDIR=e:, probably because some losing
+            programs cannot handle multiple slashes if they use e:/.
+            e: fails in `access' below, so we interpret e: as e:/.  */
+         tmp_len = strlen(tmp);
+         if (tmp[tmp_len - 1] != '/' && tmp[tmp_len - 1] != '\\')
+           {
+             strcpy(buf, tmp);
+             buf[tmp_len++] = '/', buf[tmp_len] = 0;
+             tmp = buf;
+           }
+       }
+
       /* Note that `access' can lie to us if the directory resides on a
         read-only filesystem, like CD-ROM or a write-protected floppy.
         The only way to be really sure is to actually create a file and
@@ -5267,18 +5286,11 @@ syms_of_msdos ()
 #ifndef HAVE_X_WINDOWS
 
   /* The following two are from xfns.c:  */
-  Qbar = intern ("bar");
-  staticpro (&Qbar);
-  Qhbar = intern ("hbar");
-  staticpro (&Qhbar);
-  Qcursor_type = intern ("cursor-type");
-  staticpro (&Qcursor_type);
   Qreverse = intern ("reverse");
   staticpro (&Qreverse);
 
   DEFVAR_LISP ("dos-unsupported-char-glyph", &Vdos_unsupported_char_glyph,
               doc: /* *Glyph to display instead of chars not supported by current codepage.
-
 This variable is used only by MSDOS terminals.  */);
   Vdos_unsupported_char_glyph = '\177';
 
@@ -5298,3 +5310,6 @@ nil means don't delete them until `list-processes' is run.  */);
 }
 
 #endif /* MSDOS */
+
+/* arch-tag: db404e92-52a5-475f-9eb2-1cb78dd05f30
+   (do not change this comment) */