Module: wine
Branch: master
Commit: b005e9ed0dfe9c4398c8ea609bc7083768bd0d45
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b005e9ed0dfe9c4398c8ea609…
Author: Rob Shearman <rob(a)codeweavers.com>
Date: Wed May 9 23:31:08 2007 +0100
ole32: Move the logic in StgCreateDocfile for "if no share mode given then DENY_NONE is the default" to before the validateSTGM check.
Add a test that shows this behaviour is correct.
Remove a test on the access mode that is redundant because it is already
done in validateSTGM.
---
dlls/ole32/storage32.c | 12 ++++--------
dlls/ole32/tests/storage32.c | 6 ++++++
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 5b4314f..623516e 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -5680,6 +5680,10 @@ HRESULT WINAPI StgCreateDocfile(
if (reserved != 0)
return STG_E_INVALIDPARAMETER;
+ /* if no share mode given then DENY_NONE is the default */
+ if (STGM_SHARE_MODE(grfMode) == 0)
+ grfMode |= STGM_SHARE_DENY_NONE;
+
/*
* Validate the STGM flags
*/
@@ -5696,14 +5700,6 @@ HRESULT WINAPI StgCreateDocfile(
goto end;
}
- /* if no share mode given then DENY_NONE is the default */
- if (STGM_SHARE_MODE(grfMode) == 0)
- grfMode |= STGM_SHARE_DENY_NONE;
-
- /* must have at least one access mode */
- if (STGM_ACCESS_MODE(grfMode) == 0)
- goto end;
-
/* in direct mode, can only use SHARE_EXCLUSIVE */
if (!(grfMode & STGM_TRANSACTED) && (STGM_SHARE_MODE(grfMode) != STGM_SHARE_EXCLUSIVE))
goto end;
diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c
index d96a7ed..e6c3542 100644
--- a/dlls/ole32/tests/storage32.c
+++ b/dlls/ole32/tests/storage32.c
@@ -163,6 +163,12 @@ static void test_create_storage_modes(void)
ok(r == 0, "storage not released\n");
ok(DeleteFileW(filename), "failed to delete file\n");
+ r = StgCreateDocfile( filename, STGM_CREATE | STGM_READWRITE |STGM_TRANSACTED, 0, &stg);
+ ok(r==S_OK, "StgCreateDocfile failed\n");
+ r = IStorage_Release(stg);
+ ok(r == 0, "storage not released\n");
+ ok(DeleteFileW(filename), "failed to delete file\n");
+
/* test the way excel uses StgCreateDocFile */
r = StgCreateDocfile( filename, STGM_TRANSACTED|STGM_CREATE|STGM_SHARE_DENY_WRITE|STGM_READWRITE, 0, &stg);
ok(r==S_OK, "StgCreateDocfile the excel way failed\n");
Module: wine
Branch: master
Commit: abf204cd3c992c81cf8982f294d48417d405e3af
URL: http://source.winehq.org/git/wine.git/?a=commit;h=abf204cd3c992c81cf8982f29…
Author: Thomas Spear <Speeddymon(a)gmail.com>
Date: Wed May 9 11:18:29 2007 -0500
regedit: Spelling and grammar fixes.
---
programs/regedit/regedit.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/programs/regedit/regedit.c b/programs/regedit/regedit.c
index 1ede60f..116be3d 100644
--- a/programs/regedit/regedit.c
+++ b/programs/regedit/regedit.c
@@ -32,15 +32,15 @@ static const char *usage =
"filename - registry file name\n"
"regpath - name of the registry key\n"
"\n"
- "When is called without any switches adds contents of the specified\n"
- "registry file to the registry\n"
+ "When regedit is called without any switches, it adds the contents of the\n"
+ "specified registry file to the registry\n"
"\n"
"Switches:\n"
" /E - exports contents of the specified registry key to the specified\n"
" file. Exports the whole registry if no key is specified.\n"
" /D - deletes specified registry key\n"
" /S - silent execution, can be used with any other switch.\n"
- " The only existing mode, exists for compatibility with Windows regedit.\n"
+ " Default. The only existing mode, exists for compatibility with Windows regedit.\n"
" /V - advanced mode, can be used with any other switch.\n"
" Ignored, exists for compatibility with Windows regedit.\n"
" /L - location of system.dat file. Can be used with any other switch.\n"
@@ -48,7 +48,7 @@ static const char *usage =
" /R - location of user.dat file. Can be used with any other switch.\n"
" Ignored. Exists for compatibility with Windows regedit.\n"
" /? - print this help. Any other switches are ignored.\n"
- " /C - create registry from. Not implemented.\n"
+ " /C - create registry from file. Not implemented.\n"
"\n"
"The switches are case-insensitive, can be prefixed either by '-' or '/'.\n"
"This program is command-line compatible with Microsoft Windows\n"
@@ -73,7 +73,7 @@ static void error_unknown_switch(char chu, char *s)
fprintf(stderr,"%s: Undefined switch /%c!\n", getAppName(), chu);
} else {
fprintf(stderr,"%s: Alphabetic character is expected after '%c' "
- "in swit ch specification\n", getAppName(), *(s - 1));
+ "in switch specification\n", getAppName(), *(s - 1));
}
exit(1);
}
@@ -161,7 +161,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
get_file_name(&s, filename);
if (!filename[0]) {
- fprintf(stderr,"%s: No file name is specified\n", getAppName());
+ fprintf(stderr,"%s: No file name was specified\n", getAppName());
fprintf(stderr,usage);
exit(1);
}
@@ -203,7 +203,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
get_file_name(&s, reg_key_name);
if (!reg_key_name[0]) {
- fprintf(stderr,"%s: No registry key is specified for removal\n",
+ fprintf(stderr,"%s: No registry key was specified for removal\n",
getAppName());
fprintf(stderr,usage);
exit(1);
@@ -217,7 +217,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s)
filename[0] = '\0';
get_file_name(&s, filename);
if (!filename[0]) {
- fprintf(stderr,"%s: No file name is specified\n", getAppName());
+ fprintf(stderr,"%s: No file name was specified\n", getAppName());
fprintf(stderr,usage);
exit(1);
}
Module: wine
Branch: master
Commit: 2b7d8cb9d560848cf8e4ae7eb6181f84962ba495
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2b7d8cb9d560848cf8e4ae7eb…
Author: Misha Koshelev <mk144210(a)bcm.edu>
Date: Wed May 9 07:56:44 2007 -0500
msi/tests: automation: Add more tests for Installer::RegistryValue.
Add test for a new error condition and tests for returning data from values of different registry value types.
---
dlls/msi/tests/automation.c | 133 +++++++++++++++++++++++++++++++------------
1 files changed, 96 insertions(+), 37 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=2b7d8cb9d560848cf8e4a…