+static void XRCID_Assign(const wxString& str_id, int value)
+{
+ const wxCharBuffer buf_id(str_id.mb_str());
+ const unsigned index = XRCIdHash(buf_id);
+
+
+ XRCID_record *oldrec = NULL;
+ for (XRCID_record *rec = XRCID_Records[index]; rec; rec = rec->next)
+ {
+ if (wxStrcmp(rec->key, buf_id) == 0)
+ {
+ rec->id = value;
+ return;
+ }
+ oldrec = rec;
+ }
+
+ XRCID_record **rec_var = (oldrec == NULL) ?
+ &XRCID_Records[index] : &oldrec->next;
+ *rec_var = new XRCID_record;
+ (*rec_var)->key = wxStrdup(str_id);
+ (*rec_var)->id = value;
+ (*rec_var)->next = NULL;
+}
+