Commit in reactos/lib/comdlg32 on MAIN
filedlg.c+11-91.11 -> 1.12
filedlgbrowser.h+1-11.1 -> 1.2
printdlg.c+4-41.8 -> 1.9
+16-14
3 modified files
Sync to Wine-20041201
Mike McCormack <mike@codeweavers.com>
- CFM_GETSPEC always returns a space-separated list.
- Fix ofn.nFileOffset when multiple files are selected.

reactos/lib/comdlg32
filedlg.c 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- filedlg.c	20 Oct 2004 08:53:06 -0000	1.11
+++ filedlg.c	6 Dec 2004 09:51:03 -0000	1.12
@@ -841,7 +841,7 @@
 
     /* get path and filenames */
     SHGetPathFromIDListW(fodInfos->ShellInfos.pidlAbsCurrent,lpstrCurrentDir);
-    n = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed);
+    n = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed, ' ');
 
     TRACE("path >%s< filespec >%s< %d files\n",
          debugstr_w(lpstrCurrentDir),debugstr_w(lpstrFileList),n);
@@ -897,7 +897,7 @@
 
     TRACE("CDM_GETSPEC:\n");
 
-    FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed);
+    FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed, ' ');
     if( fodInfos->unicode )
     {
         LPWSTR bufW = buffer;
@@ -1650,7 +1650,7 @@
 
     if (ofn->lpstrFile != NULL)
     {
-      WideCharToMultiByte(CP_ACP, 0, lpstrPathSpec, -1,
+      nSizePath = WideCharToMultiByte(CP_ACP, 0, lpstrPathSpec, -1,
 			  ofn->lpstrFile, ofn->nMaxFile, NULL, NULL);
       if (ofn->nMaxFile > nSizePath)
       {
@@ -1661,7 +1661,7 @@
     }
   }
 
-  fodInfos->ofnInfos->nFileOffset = nSizePath + 1;
+  fodInfos->ofnInfos->nFileOffset = nSizePath;
   fodInfos->ofnInfos->nFileExtension = 0;
 
   if ( !FILEDLG95_SendFileOK(hwnd, fodInfos) )
@@ -1709,7 +1709,7 @@
   TRACE("hwnd=%p\n", hwnd);
 
   /* get the files from the edit control */
-  nFileCount = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed);
+  nFileCount = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed, '\0');
 
   /* try if the user selected a folder in the shellview */
   if(nFileCount == 0)
@@ -3029,9 +3029,11 @@
 /***********************************************************************
  * FILEDLG95_FILENAME_GetFileNames
  *
- * copies the filenames to a 0-delimited string list (A\0B\0C\0\0)
+ * Copies the filenames to a delimited string list.
+ * The delimiter is specified by the parameter 'separator',
+ *  usually either a space or a nul
  */
-int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed)
+int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed, char separator)
 {
 	FileOpenDlgInfos *fodInfos  = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr);
 	UINT nStrCharCount = 0;	/* index in src buffer */
@@ -3054,7 +3056,7 @@
 	*lpstrFileList = MemAlloc( (nStrLen+2)*sizeof(WCHAR) );
 	*sizeUsed = 0;
 
-	/* build 0-delimited file list from filenames */
+	/* build delimited file list from filenames */
 	while ( nStrCharCount <= nStrLen )
 	{
 	  if ( lpstrEdit[nStrCharCount]=='"' )
@@ -3066,7 +3068,7 @@
 	      (*sizeUsed)++;
 	      nStrCharCount++;
 	    }
-	    (*lpstrFileList)[nFileIndex++] = '\0';
+	    (*lpstrFileList)[nFileIndex++] = separator;
 	    (*sizeUsed)++;
 	    nFileCount++;
 	  }

reactos/lib/comdlg32
filedlgbrowser.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- filedlgbrowser.h	9 Jan 2004 01:58:22 -0000	1.1
+++ filedlgbrowser.h	6 Dec 2004 09:51:03 -0000	1.2
@@ -161,6 +161,6 @@
 
 /* Functions used by the EDIT box */
 void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd);
-int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed);
+int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed, char separator);
 
 #endif /*SHBROWSER_H*/

reactos/lib/comdlg32
printdlg.c 1.8 -> 1.9
diff -u -r1.8 -r1.9
--- printdlg.c	20 Oct 2004 08:53:06 -0000	1.8
+++ printdlg.c	6 Dec 2004 09:51:03 -0000	1.9
@@ -1746,8 +1746,8 @@
 /***********************************************************************
  *           PrintDlgProcA			[internal]
  */
-INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
-			  LPARAM lParam)
+static INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
+                                      LPARAM lParam)
 {
     PRINT_PTRA* PrintStructures;
     INT_PTR res = FALSE;
@@ -1790,8 +1790,8 @@
     return res;
 }
 
-INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
-			  LPARAM lParam)
+static INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
+                                      LPARAM lParam)
 {
     static const WCHAR propW[] = {'_','_','W','I','N','E','_','P','R','I','N','T','D','L','G','D','A','T','A',0};
     PRINT_PTRW* PrintStructures;
CVSspam 0.2.8