Initialize the output buffer parameters to 0 in RegQueryValue*
[wine.git] / tools / wrc / dumpres.c
blob3a46bfe45d3380a1b4dd5336064f0a1d54d7bd56
1 /*
2 * Copyrignt 1998 Bertho A. Stultiens (BS)
4 * 16-Apr-1998 BS - Yeah, dump it to stdout.
6 */
8 #include <stdio.h>
9 #include <ctype.h>
11 #include <config.h>
12 #include "wrc.h"
13 #include "dumpres.h"
16 *****************************************************************************
17 * Function : get_typename
18 * Syntax : char *get_typename(resource_t* r)
19 * Input :
20 * r - Resource description
21 * Output : A pointer to a string representing the resource type
22 * Description :
23 * Remarks :
24 *****************************************************************************
26 char *get_typename(resource_t* r)
28 switch(r->type){
29 case res_acc: return "ACCELERATOR";
30 case res_bmp: return "BITMAP";
31 case res_cur: return "CURSOR";
32 case res_curg: return "GROUP_CURSOR";
33 case res_dlg: return "DIALOG";
34 case res_dlgex: return "DIALOGEX";
35 case res_fnt: return "FONT";
36 case res_ico: return "ICON";
37 case res_icog: return "GROUP_ICON";
38 case res_men: return "MENU";
39 case res_menex: return "MENUEX";
40 case res_rdt: return "RCDATA";
41 case res_stt: return "STRINGTABLE";
42 case res_usr: return "UserResource";
43 case res_msg: return "MESSAGETABLE";
44 case res_ver: return "VERSIONINFO";
45 case res_toolbar: return "TOOLBAR";
46 default: return "Unknown";
51 *****************************************************************************
52 * Function : strncpyWtoA
53 * Syntax : char *strncpyWtoA(char *cs, short *ws, int maxlen)
54 * Input :
55 * cs - Pointer to buffer to receive result
56 * ws - Source wide-string
57 * maxlen - Max chars to copy
58 * Output : 'cs'
59 * Description : Copy a unicode string to ascii. Copying stops after the
60 * first occuring '\0' or when maxlen-1 chars are copied. The
61 * String is always nul terminated.
62 * Remarks : No codepage translation is done.
63 *****************************************************************************
65 char *strncpyWtoA(char *cs, short *ws, int maxlen)
67 char *cptr = cs;
68 short *wsMax = ws + maxlen;
69 while(ws < wsMax)
71 if(*ws < -128 || *ws > 127)
72 printf("***Warning: Unicode string contains non-printable chars***");
73 *cptr++ = (char)*ws++;
74 maxlen--;
76 *cptr = '\0';
77 return cs;
81 *****************************************************************************
82 * Function : print_string
83 * Syntax : void print_string(string_t *str)
84 * Input :
85 * Output :
86 * Description :
87 * Remarks :
88 *****************************************************************************
90 void print_string(string_t *str)
92 char buffer[512];
93 if(!str)
94 printf("<none>");
95 else if(str->type == str_char)
96 printf("\"%s\"", str->str.cstr);
97 else
99 strncpyWtoA(buffer, str->str.wstr, sizeof(buffer));
100 printf("L\"%s\"", buffer);
105 *****************************************************************************
106 * Function : get_nameid_str
107 * Syntax : char *get_nameid_str(name_id_t *n)
108 * Input :
109 * n - nameid to convert to text
110 * Output : A pointer to the name.
111 * Description :
112 * Remarks : Not reentrant because of static buffer
113 *****************************************************************************
115 char *get_nameid_str(name_id_t *n)
117 static char buffer[256];
119 if(!n)
120 return "<none>";
122 if(n->type == name_ord)
124 sprintf(buffer, "%d", n->name.i_name);
125 return buffer;
127 else if(n->type == name_str)
129 if(n->name.s_name->type == str_char)
130 return n->name.s_name->str.cstr;
131 else
133 strncpyWtoA(buffer, n->name.s_name->str.wstr, sizeof(buffer));
134 return buffer;
137 else
138 return "Hoooo, report this: wrong type in nameid";
142 *****************************************************************************
143 * Function : dump_memopt
144 * Syntax : void dump_memopt(DWORD memopt)
145 * Input :
146 * memopt - flag bits of the options set
147 * Output :
148 * Description :
149 * Remarks :
150 *****************************************************************************
152 void dump_memopt(DWORD memopt)
154 printf("Memory/load options: ");
155 if(memopt & 0x0040)
156 printf("PRELOAD ");
157 else
158 printf("LOADONCALL ");
159 if(memopt & 0x0010)
160 printf("MOVEABLE ");
161 else
162 printf("FIXED ");
163 if(memopt & 0x0020)
164 printf("PURE ");
165 else
166 printf("IMPURE ");
167 if(memopt & 0x1000)
168 printf("DISCARDABLE");
169 printf("\n");
173 *****************************************************************************
174 * Function : dump_lvc
175 * Syntax : void dump_lvc(lvc_t *l)
176 * Input :
177 * l - pointer to lvc structure
178 * Output :
179 * Description : Dump language, version and characteristics
180 * Remarks :
181 *****************************************************************************
183 void dump_lvc(lvc_t *l)
185 if(l->language)
186 printf("LANGUAGE %04x, %04x\n", l->language->id, l->language->sub);
187 else
188 printf("LANGUAGE <not set>\n");
190 if(l->version)
191 printf("VERSION %08lx\n", *(l->version));
192 else
193 printf("VERSION <not set>\n");
195 if(l->characts)
196 printf("CHARACTERISTICS %08lx\n", *(l->characts));
197 else
198 printf("CHARACTERISTICS <not set>\n");
202 *****************************************************************************
203 * Function : dump_raw_data
204 * Syntax : void dump_raw_data(raw_data_t *d)
205 * Input :
206 * d - Raw data descriptor
207 * Output :
208 * Description :
209 * Remarks :
210 *****************************************************************************
212 void dump_raw_data(raw_data_t *d)
214 int n;
215 int i;
216 int j;
218 if(!d)
220 printf("<none>");
221 return;
223 printf("Rawdata size: %d\n", d->size);
224 if(debuglevel < 2)
225 return;
227 for(n = 0; n < d->size; n++)
229 if((n % 16) == 0)
231 if(n)
233 printf("- ");
234 for(i = 0; i < 16; i++)
235 printf("%c", isprint(d->data[n-16+i]) ? d->data[n-16+i] : '.');
236 printf("\n%08x: ", n);
238 else
239 printf("%08x: ", n);
241 printf("%02x ", d->data[n] & 0xff);
243 printf("- ");
244 j = d->size % 16;
245 if(!j)
246 j = 16;
247 for(i = 0; i < j; i++)
248 printf("%c", isprint(d->data[n-j+i]) ? d->data[n-j+i] : '.');
249 printf("\n");
253 *****************************************************************************
254 * Function : dump_accelerator
255 * Syntax : void dump_accelerator(resource_t *acc)
256 * Input :
257 * acc - Accelerator resource descriptor
258 * Output : nop
259 * Description :
260 * Remarks :
261 *****************************************************************************
263 void dump_accelerator(accelerator_t *acc)
265 event_t *ev = acc->events;
267 dump_memopt(acc->memopt);
268 dump_lvc(&(acc->lvc));
270 printf("Events: %s\n", ev ? "" : "<none>");
271 while(ev)
273 printf("Key=");
274 if(isprint(ev->key))
275 printf("\"%c\"", ev->key);
276 else if(iscntrl(ev->key))
277 printf("\"^%c\"", ev->key +'@');
278 else
279 printf("\\x%02x", ev->key & 0xff);
281 printf(" Id=%d flags=%04x\n", ev->id, ev->flags);
282 ev = ev->next;
287 *****************************************************************************
288 * Function : dump_cursor
289 * Syntax : void dump_cursor(cursor_t *cur)
290 * Input :
291 * cur - Cursor resource descriptor
292 * Output : nop
293 * Description :
294 * Remarks :
295 *****************************************************************************
297 void dump_cursor(cursor_t *cur)
299 printf("Id: %d\n", cur->id);
300 printf("Width: %d\n", cur->width);
301 printf("Height: %d\n", cur->height);
302 printf("X Hotspot: %d\n", cur->xhot);
303 printf("Y Hotspot: %d\n", cur->yhot);
304 dump_raw_data(cur->data);
308 *****************************************************************************
309 * Function : dump_cursor_group
310 * Syntax : void dump_cursor_group(cursor_group_t *cur)
311 * Input :
312 * cur - Cursor group resource descriptor
313 * Output : nop
314 * Description :
315 * Remarks :
316 *****************************************************************************
318 void dump_cursor_group(cursor_group_t *curg)
320 dump_memopt(curg->memopt);
321 printf("There are %d cursors in this group\n", curg->ncursor);
325 *****************************************************************************
326 * Function : dump_icon
327 * Syntax : void dump_icon(icon_t *ico)
328 * Input :
329 * ico - Icon resource descriptor
330 * Output : nop
331 * Description :
332 * Remarks :
333 *****************************************************************************
335 void dump_icon(icon_t *ico)
337 printf("Id: %d\n", ico->id);
338 printf("Width: %d\n", ico->width);
339 printf("Height: %d\n", ico->height);
340 printf("NColor: %d\n", ico->nclr);
341 printf("NPlanes: %d\n", ico->planes);
342 printf("NBits: %d\n", ico->bits);
343 dump_raw_data(ico->data);
347 *****************************************************************************
348 * Function : dump_icon_group
349 * Syntax : void dump_icon_group(icon_group_t *ico)
350 * Input :
351 * ico - Icon group resource descriptor
352 * Output : nop
353 * Description :
354 * Remarks :
355 *****************************************************************************
357 void dump_icon_group(icon_group_t *icog)
359 dump_memopt(icog->memopt);
360 printf("There are %d icons in this group\n", icog->nicon);
364 *****************************************************************************
365 * Function : dump_font
366 * Syntax : void dump_font(font_t *fnt)
367 * Input :
368 * fnt - Font resource descriptor
369 * Output : nop
370 * Description :
371 * Remarks :
372 *****************************************************************************
374 void dump_font(font_t *fnt)
376 dump_memopt(fnt->memopt);
377 dump_raw_data(fnt->data);
381 *****************************************************************************
382 * Function : dump_bitmap
383 * Syntax : void dump_bitmap(bitmap_t *bmp)
384 * Input :
385 * bmp - Bitmap resource descriptor
386 * Output : nop
387 * Description :
388 * Remarks :
389 *****************************************************************************
391 void dump_bitmap(bitmap_t *bmp)
393 dump_memopt(bmp->memopt);
394 dump_raw_data(bmp->data);
398 *****************************************************************************
399 * Function : dump_rcdata
400 * Syntax : void dump_rcdata(rcdata_t *rdt)
401 * Input :
402 * rdt - RCData resource descriptor
403 * Output : nop
404 * Description :
405 * Remarks :
406 *****************************************************************************
408 void dump_rcdata(rcdata_t *rdt)
410 dump_memopt(rdt->memopt);
411 dump_raw_data(rdt->data);
415 *****************************************************************************
416 * Function : dump_user
417 * Syntax : void dump_user(user_t *usr)
418 * Input :
419 * usr - User resource descriptor
420 * Output : nop
421 * Description :
422 * Remarks :
423 *****************************************************************************
425 void dump_user(user_t *usr)
427 dump_memopt(usr->memopt);
428 printf("Class %s\n", get_nameid_str(usr->type));
429 dump_raw_data(usr->data);
433 *****************************************************************************
434 * Function : dump_messagetable
435 * Syntax : void dump_messagetable(messagetable_t *msg)
436 * Input :
437 * msg - Messagetable resource descriptor
438 * Output : nop
439 * Description :
440 * Remarks :
441 *****************************************************************************
443 void dump_messagetable(messagetable_t *msg)
445 dump_raw_data(msg->data);
449 *****************************************************************************
450 * Function : dump_stringtable
451 * Syntax : void dump_stringtable(stringtable_t *stt)
452 * Input :
453 * stt - Stringtable resource descriptor
454 * Output : nop
455 * Description :
456 * Remarks :
457 *****************************************************************************
459 void dump_stringtable(stringtable_t *stt)
461 int i;
462 for(; stt; stt = stt->next)
464 printf("{\n");
465 dump_memopt(stt->memopt);
466 dump_lvc(&(stt->lvc));
467 for(i = 0; i < stt->nentries; i++)
469 printf("Id=%-5d (%d) ", stt->idbase+i, stt->entries[i].id);
470 if(stt->entries[i].str)
471 print_string(stt->entries[i].str);
472 else
473 printf("<none>");
474 printf("\n");
476 printf("}\n");
481 *****************************************************************************
482 * Function : dump_control
483 * Syntax : void dump_control(control_t *ctrl)
484 * Input :
485 * ctrl - Control resource descriptor
486 * Output :
487 * Description :
488 * Remarks :
489 *****************************************************************************
491 void dump_control(control_t *ctrl)
493 printf("Control {\n\tClass: %s\n", get_nameid_str(ctrl->ctlclass));
494 printf("\tText: "); print_string(ctrl->title); printf("\n");
495 printf("\tId: %d\n", ctrl->id);
496 printf("\tx, y, w, h: %d, %d, %d, %d\n", ctrl->x, ctrl->y, ctrl->width, ctrl->height);
497 if(ctrl->gotstyle)
498 printf("\tStyle: %08lx\n", ctrl->style);
499 if(ctrl->gotexstyle)
500 printf("\tExStyle: %08lx\n", ctrl->exstyle);
501 if(ctrl->gothelpid)
502 printf("\tHelpid: %ld\n", ctrl->helpid);
503 if(ctrl->extra)
505 printf("\t");
506 dump_raw_data(ctrl->extra);
508 printf("}\n");
512 *****************************************************************************
513 * Function : dump_dialog
514 * Syntax : void dump_dialog(dialog_t *dlg)
515 * Input :
516 * dlg - Dialog resource descriptor
517 * Output :
518 * Description :
519 * Remarks :
520 *****************************************************************************
522 void dump_dialog(dialog_t *dlg)
524 control_t *c = dlg->controls;
526 dump_memopt(dlg->memopt);
527 dump_lvc(&(dlg->lvc));
528 printf("x, y, w, h: %d, %d, %d, %d\n", dlg->x, dlg->y, dlg->width, dlg->height);
529 if(dlg->gotstyle)
530 printf("Style: %08lx\n", dlg->style);
531 if(dlg->gotexstyle)
532 printf("ExStyle: %08lx\n", dlg->exstyle);
533 printf("Menu: %s\n", get_nameid_str(dlg->menu));
534 printf("Class: %s\n", get_nameid_str(dlg->dlgclass));
535 printf("Title: "); print_string(dlg->title); printf("\n");
536 printf("Font: ");
537 if(!dlg->font)
538 printf("<none>\n");
539 else
541 printf("%d, ", dlg->font->size);
542 print_string(dlg->font->name);
543 printf("\n");
545 while(c)
547 dump_control(c);
548 c = c->next;
553 *****************************************************************************
554 * Function : dump_dialogex
555 * Syntax : void dump_dialogex(dialogex_t *dlgex)
556 * Input :
557 * dlgex - DialogEx resource descriptor
558 * Output :
559 * Description :
560 * Remarks :
561 *****************************************************************************
563 void dump_dialogex(dialogex_t *dlgex)
565 control_t *c = dlgex->controls;
567 dump_memopt(dlgex->memopt);
568 dump_lvc(&(dlgex->lvc));
569 printf("x, y, w, h: %d, %d, %d, %d\n", dlgex->x, dlgex->y, dlgex->width, dlgex->height);
570 if(dlgex->gotstyle)
571 printf("Style: %08lx\n", dlgex->style);
572 if(dlgex->gotexstyle)
573 printf("ExStyle: %08lx\n", dlgex->exstyle);
574 if(dlgex->gothelpid)
575 printf("Helpid: %ld\n", dlgex->helpid);
576 printf("Menu: %s\n", get_nameid_str(dlgex->menu));
577 printf("Class: %s\n", get_nameid_str(dlgex->dlgclass));
578 printf("Title: "); print_string(dlgex->title); printf("\n");
579 printf("Font: ");
580 if(!dlgex->font)
581 printf("<none>\n");
582 else
584 printf("%d, ", dlgex->font->size);
585 print_string(dlgex->font->name);
586 printf(", %d, %d\n", dlgex->font->weight, dlgex->font->italic);
588 while(c)
590 dump_control(c);
591 c = c->next;
596 *****************************************************************************
597 * Function : dump_menu_item
598 * Syntax : void dump_menu_item(menu_item_t *item)
599 * Input :
600 * Output :
601 * Description :
602 * Remarks :
603 *****************************************************************************
605 void dump_menu_item(menu_item_t *item)
607 while(item)
609 if(item->popup)
611 printf("POPUP ");
612 print_string(item->name);
613 printf("\n");
614 dump_menu_item(item->popup);
616 else
618 printf("MENUITEM ");
619 if(item->name)
621 print_string(item->name);
622 printf(", %d, %08lx", item->id, item->state);
624 else
625 printf("SEPARATOR");
626 printf("\n");
628 item = item->next;
633 *****************************************************************************
634 * Function : dump_menu
635 * Syntax : void dump_menu(menu_t *men)
636 * Input :
637 * men - Menu resource descriptor
638 * Output :
639 * Description :
640 * Remarks :
641 *****************************************************************************
643 void dump_menu(menu_t *men)
645 dump_memopt(men->memopt);
646 dump_lvc(&(men->lvc));
647 dump_menu_item(men->items);
651 *****************************************************************************
652 * Function : dump_menuex_item
653 * Syntax : void dump_menuex_item(menuex_item_t *item)
654 * Input :
655 * Output :
656 * Description :
657 * Remarks :
658 *****************************************************************************
660 void dump_menuex_item(menuex_item_t *item)
662 while(item)
664 if(item->popup)
666 printf("POPUP ");
667 print_string(item->name);
668 if(item->gotid)
669 printf(", Id=%d", item->id);
670 if(item->gottype)
671 printf(", Type=%ld", item->type);
672 if(item->gotstate)
673 printf(", State=%08lx", item->state);
674 if(item->gothelpid)
675 printf(", HelpId=%d", item->helpid);
676 printf("\n");
677 dump_menuex_item(item->popup);
679 else
681 printf("MENUITEM ");
682 if(item->name)
684 print_string(item->name);
685 if(item->gotid)
686 printf(", Id=%d", item->id);
687 if(item->gottype)
688 printf(", Type=%ld", item->type);
689 if(item->gotstate)
690 printf(", State=%08lx", item->state);
691 if(item->gothelpid)
692 printf(", HelpId=%d", item->helpid);
694 else
695 printf("SEPARATOR");
696 printf("\n");
698 item = item->next;
703 *****************************************************************************
704 * Function : dump_menuex
705 * Syntax : void dump_menuex(dialogex_t *menex)
706 * Input :
707 * menex - MenuEx resource descriptor
708 * Output :
709 * Description :
710 * Remarks :
711 *****************************************************************************
713 void dump_menuex(menuex_t *menex)
715 dump_memopt(menex->memopt);
716 dump_lvc(&(menex->lvc));
717 dump_menuex_item(menex->items);
721 *****************************************************************************
722 * Function : dump_ver_value
723 * Syntax : void dump_ver_value(ver_value_t *val)
724 * Input :
725 * Output :
726 * Description :
727 * Remarks :
728 *****************************************************************************
730 void dump_ver_value(ver_value_t *val)
732 extern void dump_ver_block(ver_block_t *);
733 if(val->type == val_str)
735 printf("VALUE ");
736 print_string(val->key);
737 printf(" ");
738 print_string(val->value.str);
739 printf("\n");
741 else if(val->type == val_words)
743 int i;
744 printf("VALUE");
745 print_string(val->key);
746 for(i = 0; i < val->value.words->nwords; i++)
747 printf(" %04x", val->value.words->words[i]);
748 printf("\n");
750 else if(val->type == val_block)
752 dump_ver_block(val->value.block);
757 *****************************************************************************
758 * Function : dump_ver_block
759 * Syntax : void dump_ver_block(ver_block_t *blk)
760 * Input :
761 * Output :
762 * Description :
763 * Remarks :
764 *****************************************************************************
766 void dump_ver_block(ver_block_t *blk)
768 ver_value_t *val = blk->values;
769 printf("BLOCK ");
770 print_string(blk->name);
771 printf("\n{\n");
772 while(val)
774 dump_ver_value(val);
775 val = val->next;
777 printf("}\n");
781 *****************************************************************************
782 * Function : dump_versioninfo
783 * Syntax : void dump_versioninfo(versioninfo_t *ver)
784 * Input :
785 * ver - Versioninfo resource descriptor
786 * Output :
787 * Description :
788 * Remarks :
789 *****************************************************************************
791 void dump_versioninfo(versioninfo_t *ver)
793 ver_block_t *blk = ver->blocks;
795 if(ver->gotit.fv)
796 printf("FILEVERSION %04x, %04x, %04x, %04x\n",
797 ver->filever_maj1,
798 ver->filever_maj2,
799 ver->filever_min1,
800 ver->filever_min2);
801 if(ver->gotit.pv)
802 printf("PRODUCTVERSION %04x, %04x, %04x, %04x\n",
803 ver->prodver_maj1,
804 ver->prodver_maj2,
805 ver->prodver_min1,
806 ver->prodver_min2);
807 if(ver->gotit.fo)
808 printf("FILEOS %08x\n", ver->fileos);
809 if(ver->gotit.ff)
810 printf("FILEFLAGS %08x\n", ver->fileflags);
811 if(ver->gotit.ffm)
812 printf("FILEFLAGSMASK %08x\n", ver->fileflagsmask);
813 if(ver->gotit.ft)
814 printf("FILETYPE %08x\n", ver->filetype);
815 if(ver->gotit.fst)
816 printf("FILESUBTYPE %08x\n", ver->filesubtype);
817 while(blk)
819 dump_ver_block(blk);
820 blk = blk->next;
825 *****************************************************************************
826 * Function : dump_toolbar_item
827 * Syntax : void dump_toolbar_item(toolbar_item_t *item)
828 * Input :
829 * Output :
830 * Description :
831 * Remarks :
832 *****************************************************************************
834 void dump_toolbar_items(toolbar_item_t *items)
836 while(items)
838 if(items->id)
839 printf(" BUTTON %d", items->id );
840 else
841 printf(" SEPARATOR");
843 printf("\n");
845 items = items->next;
850 *****************************************************************************
851 * Function : dump_toolbar
852 * Syntax : void dump_toolbar(dialogex_t *toolbar)
853 * Input :
854 * toolbar - Toolbar resource descriptor
855 * Output :
856 * Description :
857 * Remarks :
858 *****************************************************************************
860 void dump_toolbar(toolbar_t *toolbar)
862 dump_memopt(toolbar->memopt);
863 dump_lvc(&(toolbar->lvc));
864 dump_toolbar_items(toolbar->items);
868 *****************************************************************************
869 * Function :
870 * Syntax :
871 * Input :
872 * Output :
873 * Description :
874 * Remarks :
875 *****************************************************************************
878 *****************************************************************************
879 * Function : dump_resources
880 * Syntax : void dump_resources(resource_t *top)
881 * Input :
882 * top - Top of the resource tree
883 * Output :
884 * nop
885 * Description : Dump the parsed resource-tree to stdout
886 * Remarks :
887 *****************************************************************************
889 void dump_resources(resource_t *top)
891 printf("Internal resource-tree dump:\n");
892 while(top)
894 printf("Resource: %s\nId: %s\n",
895 get_typename(top),
896 get_nameid_str(top->name));
897 switch(top->type)
899 case res_acc:
900 dump_accelerator(top->res.acc);
901 break;
902 case res_bmp:
903 dump_bitmap(top->res.bmp);
904 break;
905 case res_cur:
906 dump_cursor(top->res.cur);
907 break;
908 case res_curg:
909 dump_cursor_group(top->res.curg);
910 break;
911 case res_dlg:
912 dump_dialog(top->res.dlg);
913 break;
914 case res_dlgex:
915 dump_dialogex(top->res.dlgex);
916 break;
917 case res_fnt:
918 dump_font(top->res.fnt);
919 break;
920 case res_icog:
921 dump_icon_group(top->res.icog);
922 break;
923 case res_ico:
924 dump_icon(top->res.ico);
925 break;
926 case res_men:
927 dump_menu(top->res.men);
928 break;
929 case res_menex:
930 dump_menuex(top->res.menex);
931 break;
932 case res_rdt:
933 dump_rcdata(top->res.rdt);
934 break;
935 case res_stt:
936 dump_stringtable(top->res.stt);
937 break;
938 case res_usr:
939 dump_user(top->res.usr);
940 break;
941 case res_msg:
942 dump_messagetable(top->res.msg);
943 break;
944 case res_ver:
945 dump_versioninfo(top->res.ver);
946 break;
947 case res_toolbar:
948 dump_toolbar(top->res.tbt);
949 break;
950 default:
951 printf("Report this: Unknown resource type parsed %08x\n", top->type);
953 printf("\n");
954 top = top->next;