emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/src ChangeLog w32proc.c


From: Juanma Barranquero
Subject: [Emacs-diffs] emacs/src ChangeLog w32proc.c
Date: Sat, 29 Nov 2008 18:35:36 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      08/11/29 18:35:36

Modified files:
        src            : ChangeLog w32proc.c 

Log message:
        * w32proc.c: Include "coding.h".
          (Fw32_short_file_name): Encode filename passed to Windows API.
          (Fw32_long_file_name): Encode filename passed to Windows API and
          decode back the result.  (Bug#1433)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7132&r2=1.7133
http://cvs.savannah.gnu.org/viewcvs/emacs/src/w32proc.c?cvsroot=emacs&r1=1.84&r2=1.85

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7132
retrieving revision 1.7133
diff -u -b -r1.7132 -r1.7133
--- ChangeLog   29 Nov 2008 13:47:31 -0000      1.7132
+++ ChangeLog   29 Nov 2008 18:35:33 -0000      1.7133
@@ -1,3 +1,10 @@
+2008-11-29  Juanma Barranquero  <address@hidden>
+
+       * w32proc.c: Include "coding.h".
+       (Fw32_short_file_name): Encode filename passed to Windows API.
+       (Fw32_long_file_name): Encode filename passed to Windows API and
+       decode back the result.  (Bug#1433)
+
 2008-11-29  Kenichi Handa  <address@hidden>
 
        * charset.h (CHAR_CHARSET_P): Check if the encoder is loaded or

Index: w32proc.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32proc.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -b -r1.84 -r1.85
--- w32proc.c   22 Jul 2008 15:28:21 -0000      1.84
+++ w32proc.c   29 Nov 2008 18:35:36 -0000      1.85
@@ -63,6 +63,7 @@
 #include "syssignal.h"
 #include "w32term.h"
 #include "dispextern.h"                /* for xstrcasecmp */
+#include "coding.h"
 
 #define RVA_TO_PTR(var,section,filedata) \
   ((void *)((section)->PointerToRawData                                        
\
@@ -1781,7 +1782,7 @@
   filename = Fexpand_file_name (filename, Qnil);
 
   /* luckily, this returns the short version of each element in the path.  */
-  if (GetShortPathName (SDATA (filename), shortname, MAX_PATH) == 0)
+  if (GetShortPathName (SDATA (ENCODE_FILE (filename)), shortname, MAX_PATH) 
== 0)
     return Qnil;
 
   CORRECT_DIR_SEPS (shortname);
@@ -1810,7 +1811,7 @@
   /* first expand it.  */
   filename = Fexpand_file_name (filename, Qnil);
 
-  if (!w32_get_long_filename (SDATA (filename), longname, MAX_PATH))
+  if (!w32_get_long_filename (SDATA (ENCODE_FILE (filename)), longname, 
MAX_PATH))
     return Qnil;
 
   CORRECT_DIR_SEPS (longname);
@@ -1821,7 +1822,7 @@
   if (drive_only && longname[1] == ':' && longname[2] == '/' && !longname[3])
     longname[2] = '\0';
 
-  return build_string (longname);
+  return DECODE_FILE (build_string (longname));
 }
 
 DEFUN ("w32-set-process-priority", Fw32_set_process_priority,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]