Author: hpoussin
Date: Sun Feb 10 22:47:42 2008
New Revision: 32274
URL:
http://svn.reactos.org/svn/reactos?rev=32274&view=rev
Log:
Use the same include guard in WIDL generated files and MIDL generated files
Modified:
trunk/reactos/tools/widl/widl.c
trunk/reactos/tools/widl/widl_ros.diff
Modified: trunk/reactos/tools/widl/widl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl.c?rev=3227…
==============================================================================
--- trunk/reactos/tools/widl/widl.c (original)
+++ trunk/reactos/tools/widl/widl.c Sun Feb 10 22:47:42 2008
@@ -174,7 +174,7 @@
token = xstrdup(name);
for (i=0; token[i]; i++) {
if (!isalnum(token[i])) token[i] = '_';
- else token[i] = toupper(token[i]);
+ else token[i] = tolower(token[i]);
}
return token;
}
@@ -561,8 +561,8 @@
fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit
***/\n", PACKAGE_VERSION, input_name);
fprintf(header, "#include <rpc.h>\n" );
fprintf(header, "#include <rpcndr.h>\n\n" );
- fprintf(header, "#ifndef __WIDL_%s\n", header_token);
- fprintf(header, "#define __WIDL_%s\n", header_token);
+ fprintf(header, "#ifndef __%s__\n", header_token);
+ fprintf(header, "#define __%s__\n", header_token);
start_cplusplus_guard(header);
}
@@ -606,7 +606,7 @@
fprintf(header, "/* End additional prototypes */\n");
fprintf(header, "\n");
end_cplusplus_guard(header);
- fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
+ fprintf(header, "#endif /* __%s__ */\n", header_token);
fclose(header);
}
Modified: trunk/reactos/tools/widl/widl_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widl_ros.diff?r…
==============================================================================
--- trunk/reactos/tools/widl/widl_ros.diff (original)
+++ trunk/reactos/tools/widl/widl_ros.diff Sun Feb 10 22:47:42 2008
@@ -60,6 +60,38 @@
#include "widl.h"
#include "utils.h"
+Index: widl.c
+===================================================================
+--- widl.c (revision 32187)
++++ widl.c (working copy)
+@@ -174,7 +174,7 @@
+ token = xstrdup(name);
+ for (i=0; token[i]; i++) {
+ if (!isalnum(token[i])) token[i] = '_';
+- else token[i] = toupper(token[i]);
++ else token[i] = tolower(token[i]);
+ }
+ return token;
+ }
+@@ -561,8 +561,8 @@
+ fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit
***/\n", PACKAGE_VERSION, input_name);
+ fprintf(header, "#include <rpc.h>\n" );
+ fprintf(header, "#include <rpcndr.h>\n\n" );
+- fprintf(header, "#ifndef __WIDL_%s\n", header_token);
+- fprintf(header, "#define __WIDL_%s\n", header_token);
++ fprintf(header, "#ifndef __%s__\n", header_token);
++ fprintf(header, "#define __%s__\n", header_token);
+ start_cplusplus_guard(header);
+ }
+
+@@ -606,7 +606,7 @@
+ fprintf(header, "/* End additional prototypes */\n");
+ fprintf(header, "\n");
+ end_cplusplus_guard(header);
+- fprintf(header, "#endif /* __WIDL_%s */\n", header_token);
++ fprintf(header, "#endif /* __%s__ */\n", header_token);
+ fclose(header);
+ }
Index: widltypes.h
===================================================================
--- widltypes.h (revision 32187)