Author: cwittich
Date: Sat Jan 17 13:27:13 2009
New Revision: 38837
URL:
http://svn.reactos.org/svn/reactos?rev=38837&view=rev
Log:
-Dmitry Timoshkov <dmitry at codeweavers.com>
wrc: Warn for duplicate dialog ids.
Modified:
trunk/reactos/tools/wrc/parser.tab.c
trunk/reactos/tools/wrc/parser.y
Modified: trunk/reactos/tools/wrc/parser.tab.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wrc/parser.tab.c?rev…
==============================================================================
--- trunk/reactos/tools/wrc/parser.tab.c [iso-8859-1] (original)
+++ trunk/reactos/tools/wrc/parser.tab.c [iso-8859-1] Sat Jan 17 13:27:13 2009
@@ -4656,6 +4656,14 @@
if(prev)
prev->next = ctrl;
+ /* Check for duplicate identifiers */
+ while (prev)
+ {
+ if (ctrl->id != -1 && ctrl->id == prev->id)
+ parser_warning("Duplicate dialog control id %d\n",
ctrl->id);
+ prev = prev->prev;
+ }
+
if(type != -1)
{
ctrl->ctlclass = new_name_id();
@@ -5773,3 +5781,4 @@
return token;
}
+
Modified: trunk/reactos/tools/wrc/parser.y
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wrc/parser.y?rev=388…
==============================================================================
--- trunk/reactos/tools/wrc/parser.y [iso-8859-1] (original)
+++ trunk/reactos/tools/wrc/parser.y [iso-8859-1] Sat Jan 17 13:27:13 2009
@@ -1966,6 +1966,14 @@
if(prev)
prev->next = ctrl;
+ /* Check for duplicate identifiers */
+ while (prev)
+ {
+ if (ctrl->id != -1 && ctrl->id == prev->id)
+ parser_warning("Duplicate dialog control id %d\n",
ctrl->id);
+ prev = prev->prev;
+ }
+
if(type != -1)
{
ctrl->ctlclass = new_name_id();