diff src/intl-encap-win32.c @ 778:2923009caf47

[xemacs-hg @ 2002-03-16 10:38:59 by ben] cm.c, file-coding.c: fix warnings. .cvsignore: Those pesky *.tmp files. mule\arabic.el, mule\canna-leim.el, mule\china-util.el, mule\chinese.el, mule\cyril-util.el, mule\cyrillic.el, mule\devan-util.el, mule\devanagari.el, mule\english.el, mule\ethio-util.el, mule\ethiopic.el, mule\european.el, mule\greek.el, mule\hebrew.el, mule\indian.el, mule\japan-util.el, mule\japanese.el, mule\korea-util.el, mule\korean.el, mule\lao-util.el, mule\lao.el, mule\misc-lang.el, mule\mule-charset.el, mule\mule-cmds.el, mule\thai-util.el, mule\thai.el, mule\tibet-util.el, mule\tibetan.el, mule\viet-util.el, mule\vietnamese.el, unicode.el: Fix lots of warnings. Sync up some files to FSF 21.1. Copy over all charset definitions from FSF 21.1, convert them to our format, and stick them in the relevant files. Eventually we will actually be able to dump these files (though they may not quite work). autoload.el: Support defun*, defmacro*. mule/mule-composite.el, mule/mule-composite-stub.el: New file, stubs for nonexistent composition funs/vars. mule/viet-chars.el, dumped-lisp.el: Account for these changes. font.el, mouse.el, msw-font-menu.el, printer.el, startup.el: fix warnings.
author ben
date Sat, 16 Mar 2002 10:39:19 +0000
parents 943eaba38521
children 1f5108485fe7
line wrap: on
line diff
--- a/src/intl-encap-win32.c	Fri Mar 15 11:00:56 2002 +0000
+++ b/src/intl-encap-win32.c	Sat Mar 16 10:39:19 2002 +0000
@@ -159,7 +159,6 @@
 
 \(The following is copied from lib-src/make-mswin-unicode.pl.)
 
-dir sets the directory for include files.
 file specifies a file to start reading from.
 yes indicates a function to be automatically Unicode-encapsulated.
    (All parameters either need no special processing or are LPTSTR or
@@ -191,10 +190,6 @@
 	cd $(SRC)
 	perl ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c
 
-NOTE: If your copy of VC++ is not in the directory indicated below, you'll
-have to change that directive (or create a symlink, provided you're using
-Cygwin perl).  #### There should be an option to the perl script to specify
-this.
 */
 
 /*
@@ -215,8 +210,6 @@
 
 begin-unicode-encapsulation-script
 
-dir c:\Program Files\Microsoft Visual Studio\VC98\Include\
-
 file WINBASE.H
 
 yes GetBinaryType
@@ -227,8 +220,8 @@
 yes FormatMessage
 yes CreateMailslot
 begin-bracket !defined (CYGWIN_HEADERS)
-yes EncryptFile
-yes DecryptFile
+no EncryptFile Win2K+ only
+no DecryptFile Win2K+ only
 end-bracket
 no OpenRaw error "The procedure entry point OpenRawW could not be located in the dynamic link library ADVAPI32.dll."
 no QueryRecoveryAgents split-sized LPRECOVERY_AGENT_INFORMATION
@@ -957,7 +950,7 @@
 yes mciSendString
 yes mciGetDeviceID
 begin-bracket !defined (MINGW)
-yes mciGetDeviceIDFromElementID
+no mciGetDeviceIDFromElementID missing from Win98se version of ADVAPI32.dll
 end-bracket
 yes mciGetErrorString
 
@@ -1409,7 +1402,7 @@
 
 static void
 copy_shfileinfoa_to_shfileinfow (const SHFILEINFOA *pa,
-				 SHFILEINFOW *pw)
+				 SHFILEINFOW *pw, UINT sz)
 {
   /* the layout of SHFILEINFO is
 
@@ -1418,6 +1411,7 @@
      TCHAR szTypeName[...];
      */
 
+  assert (sz >= sizeof (SHFILEINFOW));
   xzero (*pw);
   memcpy (pw, pa, offsetof (SHFILEINFOA, szDisplayName));
   memcpy (pw->szDisplayName, pa->szDisplayName, sizeof (pa->szDisplayName));
@@ -1437,10 +1431,10 @@
       BOOL retval;
 
       retval = SHGetFileInfoA ((LPCSTR) pszPath, dwFileAttributes,
-			       (SHFILEINFOA FAR *) &ansidat, sizeof (ansidat),
-			       uFlags);
-      if (retval)
-	copy_shfileinfoa_to_shfileinfow (&ansidat, psfi);
+			       (SHFILEINFOA FAR *) &ansidat,
+			       cbFileInfo ? sizeof (ansidat) : 0, uFlags);
+      if (retval && cbFileInfo)
+	copy_shfileinfoa_to_shfileinfow (&ansidat, psfi, cbFileInfo);
       return retval;
     }
 }