Dmitry Timoshkov : wrc: Warn for duplicate dialog ids.

Alexandre Julliard julliard at winehq.org
Wed Jan 14 09:03:31 CST 2009


Module: wine
Branch: master
Commit: c34b64d6d921c95a93abcb5b7e2e7d8f992bf8a8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c34b64d6d921c95a93abcb5b7e2e7d8f992bf8a8

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Wed Jan 14 18:31:29 2009 +0800

wrc: Warn for duplicate dialog ids.

---

 tools/wrc/parser.y |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y
index c0cc2ba..1742628 100644
--- a/tools/wrc/parser.y
+++ b/tools/wrc/parser.y
@@ -1966,6 +1966,14 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
 	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();




More information about the wine-cvs mailing list