diff options
author | Nick Clifton <nickc@redhat.com> | 2003-03-31 10:15:58 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-03-31 10:15:58 +0000 |
commit | 7adbf450a7e4889b8e7a50b85679eab25b5b9242 (patch) | |
tree | 6c30a55e6a2cccb16259f8f9696a5d460c2767d1 /binutils/resrc.c | |
parent | ed234cf86397afc0a0e87f7d264a41aac93d0587 (diff) | |
download | gdb-7adbf450a7e4889b8e7a50b85679eab25b5b9242.zip gdb-7adbf450a7e4889b8e7a50b85679eab25b5b9242.tar.gz gdb-7adbf450a7e4889b8e7a50b85679eab25b5b9242.tar.bz2 |
Allow resource IDs to be strings or numbers.
Add a test for this.
Diffstat (limited to 'binutils/resrc.c')
-rw-r--r-- | binutils/resrc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/binutils/resrc.c b/binutils/resrc.c index 3cf708a..a895597 100644 --- a/binutils/resrc.c +++ b/binutils/resrc.c @@ -1,5 +1,5 @@ /* resrc.c -- read and write Windows rc files. - Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -818,8 +818,8 @@ define_dialog (id, resinfo, dialog) merely allocates and fills in a structure. */ struct dialog_control * -define_control (text, id, x, y, width, height, class, style, exstyle) - const char *text; +define_control (iid, id, x, y, width, height, class, style, exstyle) + struct res_id iid; unsigned long id; unsigned long x; unsigned long y; @@ -842,9 +842,7 @@ define_control (text, id, x, y, width, height, class, style, exstyle) n->height = height; n->class.named = 0; n->class.u.id = class; - if (text == NULL) - text = ""; - res_string_to_id (&n->text, text); + n->text = iid; n->data = NULL; n->help = 0; @@ -864,9 +862,12 @@ define_icon_control (iid, id, x, y, style, exstyle, help, data, ex) struct dialog_ex *ex; { struct dialog_control *n; + struct res_id tid; + if (style == 0) style = SS_ICON | WS_CHILD | WS_VISIBLE; - n = define_control (0, id, x, y, 0, 0, CTL_STATIC, style, exstyle); + res_string_to_id (&tid, ""); + n = define_control (tid, id, x, y, 0, 0, CTL_STATIC, style, exstyle); n->text = iid; if (help && !ex) rcparse_warning (_("help ID requires DIALOGEX")); |