https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fa8ce680d4715731bd70a…
commit fa8ce680d4715731bd70ad60baaf8eff72e3274b
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sun Aug 30 03:40:37 2020 +0300
Commit: Victor Perevertkin <victor.perevertkin(a)reactos.org>
CommitDate: Sun Aug 30 03:40:37 2020 +0300
[CLASSPNP] Add the license text along with the driver
Addendum to bf1b3cb175524724cc86c52735914c36ac407e14
---
drivers/storage/class/classpnp/license.txt | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/storage/class/classpnp/license.txt b/drivers/storage/class/classpnp/license.txt
new file mode 100644
index 00000000000..6ef3ee38d1c
--- /dev/null
+++ b/drivers/storage/class/classpnp/license.txt
@@ -0,0 +1,23 @@
+The Microsoft Public License (MS-PL)
+Copyright (c) 2015 Microsoft
+
+This license governs use of the accompanying software. If you use the software, you
+ accept this license. If you do not accept the license, do not use the software.
+
+1. Definitions
+ The terms "reproduce," "reproduction," "derivative works," and "distribution" have the
+ same meaning here as under U.S. copyright law.
+ A "contribution" is the original software, or any additions or changes to the software.
+ A "contributor" is any person that distributes its contribution under this license.
+ "Licensed patents" are a contributor's patent claims that read directly on its contribution.
+
+2. Grant of Rights
+ (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
+ (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
+
+3. Conditions and Limitations
+ (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
+ (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
+ (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
+ (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
+ (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd27b050fcd44d38cfbbe…
commit bd27b050fcd44d38cfbbe4d054dffecfc46c2432
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Aug 30 02:02:26 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Aug 30 02:16:15 2020 +0200
[SPEC2DEF] Improve the 'int128' arguments display. Addendum to commit a28fa3fd.
'int128' arguments are NOT almost always GUID, as was claimed, and the
usage of the wine_dbgstr_guid() function to display them would require
the presence of yet another wine-specific header.
Instead, define a "MyInt128" typedef, local to the stub file being
generated, as the structure of two __int64's (lower and upper), and
print this "MyInt128" as the couple of these two __int64's.
Besides, display the __int64 numbers prefixed with "0x" (together with
the PRIx64 formatter).
Finally, when generating the debug-print function calls, it is useless to
explicitly cast the 'aX' variables with their types, because their types
are already known from the prototype of the stub-function!!
Therefore we can use the same `fprintf(file, "a%d", i);` for all the
ARG_LONG, ARG_PTR, ARG_STR, ARG_WSTR, ARG_DBL, ARG_INT64 and ARG_FLOAT.
Only in the case of ARG_INT128 we output "a%d.lower, a%d.upper" .
---
sdk/tools/spec2def/spec2def.c | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/sdk/tools/spec2def/spec2def.c b/sdk/tools/spec2def/spec2def.c
index e4c9441c7e6..a7b67b8d239 100644
--- a/sdk/tools/spec2def/spec2def.c
+++ b/sdk/tools/spec2def/spec2def.c
@@ -227,6 +227,13 @@ OutputHeader_stub(FILE *file)
fprintf(file, "WINE_DECLARE_DEBUG_CHANNEL(relay);\n");
}
+ /* __int128 is not supported on x86, so use a custom type */
+ fprintf(file, "\n"
+ "typedef struct {\n"
+ " __int64 lower;\n"
+ " __int64 upper;\n"
+ "} MyInt128;\n");
+
fprintf(file, "\n");
}
@@ -303,8 +310,8 @@ OutputLine_stub(FILE *file, EXPORT *pexp)
case ARG_WSTR: fprintf(file, "wchar_t*"); break;
case ARG_DBL: fprintf(file, "double"); break;
case ARG_INT64: fprintf(file, "__int64"); break;
- /* __int128 is not supported on x86, and int128 in spec files most often represents a GUID */
- case ARG_INT128: fprintf(file, "GUID"); break;
+ /* __int128 is not supported on x86, so use a custom type */
+ case ARG_INT128: fprintf(file, "MyInt128"); break;
case ARG_FLOAT: fprintf(file, "float"); break;
}
fprintf(file, " a%d", i);
@@ -350,8 +357,8 @@ OutputLine_stub(FILE *file, EXPORT *pexp)
case ARG_STR: fprintf(file, "'%%s'"); break;
case ARG_WSTR: fprintf(file, "'%%ws'"); break;
case ARG_DBL: fprintf(file, "%%f"); break;
- case ARG_INT64: fprintf(file, "%%\"PRIx64\""); break;
- case ARG_INT128: fprintf(file, "'%%s'"); break;
+ case ARG_INT64: fprintf(file, "0x%%\"PRIx64\""); break;
+ case ARG_INT128: fprintf(file, "0x%%\"PRIx64\"-0x%%\"PRIx64\""); break;
case ARG_FLOAT: fprintf(file, "%%f"); break;
}
}
@@ -362,14 +369,13 @@ OutputLine_stub(FILE *file, EXPORT *pexp)
fprintf(file, ", ");
switch (pexp->anArgs[i])
{
- case ARG_LONG: fprintf(file, "(long)a%d", i); break;
- case ARG_PTR: fprintf(file, "(void*)a%d", i); break;
- case ARG_STR: fprintf(file, "(char*)a%d", i); break;
- case ARG_WSTR: fprintf(file, "(wchar_t*)a%d", i); break;
- case ARG_DBL: fprintf(file, "(double)a%d", i); break;
- case ARG_INT64: fprintf(file, "(__int64)a%d", i); break;
- case ARG_INT128: fprintf(file, "wine_dbgstr_guid(&a%d)", i); break;
- case ARG_FLOAT: fprintf(file, "(float)a%d", i); break;
+ case ARG_LONG: case ARG_PTR: case ARG_STR:
+ case ARG_WSTR: case ARG_DBL: case ARG_INT64:
+ fprintf(file, "a%d", i); break;
+ case ARG_INT128:
+ fprintf(file, "a%d.lower, a%d.upper", i, i); break;
+ case ARG_FLOAT:
+ fprintf(file, "a%d", i); break;
}
}
fprintf(file, ");\n");
@@ -404,7 +410,7 @@ OutputLine_stub(FILE *file, EXPORT *pexp)
{
if (pexp->uFlags & FL_RET64)
{
- fprintf(file, "\tif (TRACE_ON(relay))\n\t\tDPRINTF(\"%s: %.*s: retval = %%\"PRIx64\"\\n\", retval);\n",
+ fprintf(file, "\tif (TRACE_ON(relay))\n\t\tDPRINTF(\"%s: %.*s: retval = 0x%%\"PRIx64\"\\n\", retval);\n",
pszDllName, pexp->strName.len, pexp->strName.buf);
}
else