Release 941017
[wine/gsoc-2012-control.git] / include / debug.h
blobab069232efcf23b6dff06e6fa4e6ffa73ee79086
1 #include <stdio.h>
3 #define stddeb stdout
4 #define stdnimp stderr
6 # /* Do not remove this line or change anything below this line */
9 #ifdef DEBUG_NONE_EXT
10 #undef DEBUG_ACCEL
11 #undef DEBUG_BITMAP
12 #undef DEBUG_CARET
13 #undef DEBUG_CDAUDIO
14 #undef DEBUG_CLASS
15 #undef DEBUG_CLIPBOARD
16 #undef DEBUG_CLIPPING
17 #undef DEBUG_COMBO
18 #undef DEBUG_COMM
19 #undef DEBUG_CURSOR
20 #undef DEBUG_DC
21 #undef DEBUG_DIALOG
22 #undef DEBUG_DLL
23 #undef DEBUG_DOSFS
24 #undef DEBUG_DRIVER
25 #undef DEBUG_EDIT
26 #undef DEBUG_ENUM
27 #undef DEBUG_EVENT
28 #undef DEBUG_EXEC
29 #undef DEBUG_FILE
30 #undef DEBUG_FIXUP
31 #undef DEBUG_FONT
32 #undef DEBUG_GDI
33 #undef DEBUG_GRAPHICS
34 #undef DEBUG_HEAP
35 #undef DEBUG_ICON
36 #undef DEBUG_INT
37 #undef DEBUG_KEY
38 #undef DEBUG_KEYBOARD
39 #undef DEBUG_LDT
40 #undef DEBUG_LISTBOX
41 #undef DEBUG_MCIWAVE
42 #undef DEBUG_MDI
43 #undef DEBUG_MENU
44 #undef DEBUG_MENUCALC
45 #undef DEBUG_MESSAGE
46 #undef DEBUG_METAFILE
47 #undef DEBUG_MODULE
48 #undef DEBUG_MSG
49 #undef DEBUG_NONCLIENT
50 #undef DEBUG_PALETTE
51 #undef DEBUG_REGION
52 #undef DEBUG_RESOURCE
53 #undef DEBUG_SCROLL
54 #undef DEBUG_SYSCOLOR
55 #undef DEBUG_TEXT
56 #undef DEBUG_TIMER
57 #undef DEBUG_UTILITY
58 #undef DEBUG_WIN
59 #endif
62 #ifdef DEBUG_ALL_EXT
63 #define DEBUG_ACCEL
64 #define DEBUG_BITMAP
65 #define DEBUG_CARET
66 #define DEBUG_CDAUDIO
67 #define DEBUG_CLASS
68 #define DEBUG_CLIPBOARD
69 #define DEBUG_CLIPPING
70 #define DEBUG_COMBO
71 #define DEBUG_COMM
72 #define DEBUG_CURSOR
73 #define DEBUG_DC
74 #define DEBUG_DIALOG
75 #define DEBUG_DLL
76 #define DEBUG_DOSFS
77 #define DEBUG_DRIVER
78 #define DEBUG_EDIT
79 #define DEBUG_ENUM
80 #define DEBUG_EVENT
81 #define DEBUG_EXEC
82 #define DEBUG_FILE
83 #define DEBUG_FIXUP
84 #define DEBUG_FONT
85 #define DEBUG_GDI
86 #define DEBUG_GRAPHICS
87 #define DEBUG_HEAP
88 #define DEBUG_ICON
89 #define DEBUG_INT
90 #define DEBUG_KEY
91 #define DEBUG_KEYBOARD
92 #define DEBUG_LDT
93 #define DEBUG_LISTBOX
94 #define DEBUG_MCIWAVE
95 #define DEBUG_MDI
96 #define DEBUG_MENU
97 #define DEBUG_MENUCALC
98 #define DEBUG_MESSAGE
99 #define DEBUG_METAFILE
100 #define DEBUG_MODULE
101 #define DEBUG_MSG
102 #define DEBUG_NONCLIENT
103 #define DEBUG_PALETTE
104 #define DEBUG_REGION
105 #define DEBUG_RESOURCE
106 #define DEBUG_SCROLL
107 #define DEBUG_SYSCOLOR
108 #define DEBUG_TEXT
109 #define DEBUG_TIMER
110 #define DEBUG_UTILITY
111 #define DEBUG_WIN
112 #endif
115 #ifdef DEBUG_RUNTIME
116 #ifdef DEBUG_DEFINE_VARIABLES
117 short debug_msg_enabled[]={
118 #ifdef DEBUG_ACCEL
120 #else
122 #endif
123 #ifdef DEBUG_BITMAP
125 #else
127 #endif
128 #ifdef DEBUG_CARET
130 #else
132 #endif
133 #ifdef DEBUG_CDAUDIO
135 #else
137 #endif
138 #ifdef DEBUG_CLASS
140 #else
142 #endif
143 #ifdef DEBUG_CLIPBOARD
145 #else
147 #endif
148 #ifdef DEBUG_CLIPPING
150 #else
152 #endif
153 #ifdef DEBUG_COMBO
155 #else
157 #endif
158 #ifdef DEBUG_COMM
160 #else
162 #endif
163 #ifdef DEBUG_CURSOR
165 #else
167 #endif
168 #ifdef DEBUG_DC
170 #else
172 #endif
173 #ifdef DEBUG_DIALOG
175 #else
177 #endif
178 #ifdef DEBUG_DLL
180 #else
182 #endif
183 #ifdef DEBUG_DOSFS
185 #else
187 #endif
188 #ifdef DEBUG_DRIVER
190 #else
192 #endif
193 #ifdef DEBUG_EDIT
195 #else
197 #endif
198 #ifdef DEBUG_ENUM
200 #else
202 #endif
203 #ifdef DEBUG_EVENT
205 #else
207 #endif
208 #ifdef DEBUG_EXEC
210 #else
212 #endif
213 #ifdef DEBUG_FILE
215 #else
217 #endif
218 #ifdef DEBUG_FIXUP
220 #else
222 #endif
223 #ifdef DEBUG_FONT
225 #else
227 #endif
228 #ifdef DEBUG_GDI
230 #else
232 #endif
233 #ifdef DEBUG_GRAPHICS
235 #else
237 #endif
238 #ifdef DEBUG_HEAP
240 #else
242 #endif
243 #ifdef DEBUG_ICON
245 #else
247 #endif
248 #ifdef DEBUG_INT
250 #else
252 #endif
253 #ifdef DEBUG_KEY
255 #else
257 #endif
258 #ifdef DEBUG_KEYBOARD
260 #else
262 #endif
263 #ifdef DEBUG_LDT
265 #else
267 #endif
268 #ifdef DEBUG_LISTBOX
270 #else
272 #endif
273 #ifdef DEBUG_MCIWAVE
275 #else
277 #endif
278 #ifdef DEBUG_MDI
280 #else
282 #endif
283 #ifdef DEBUG_MENU
285 #else
287 #endif
288 #ifdef DEBUG_MENUCALC
290 #else
292 #endif
293 #ifdef DEBUG_MESSAGE
295 #else
297 #endif
298 #ifdef DEBUG_METAFILE
300 #else
302 #endif
303 #ifdef DEBUG_MODULE
305 #else
307 #endif
308 #ifdef DEBUG_MSG
310 #else
312 #endif
313 #ifdef DEBUG_NONCLIENT
315 #else
317 #endif
318 #ifdef DEBUG_PALETTE
320 #else
322 #endif
323 #ifdef DEBUG_REGION
325 #else
327 #endif
328 #ifdef DEBUG_RESOURCE
330 #else
332 #endif
333 #ifdef DEBUG_SCROLL
335 #else
337 #endif
338 #ifdef DEBUG_SYSCOLOR
340 #else
342 #endif
343 #ifdef DEBUG_TEXT
345 #else
347 #endif
348 #ifdef DEBUG_TIMER
350 #else
352 #endif
353 #ifdef DEBUG_UTILITY
355 #else
357 #endif
358 #ifdef DEBUG_WIN
360 #else
362 #endif
364 #else
365 extern short debug_msg_enabled[];
366 #endif
367 #endif
370 #ifdef DEBUG_RUNTIME
371 #define dprintf_accel if(debug_msg_enabled[0]) fprintf
372 #else
373 #ifdef DEBUG_ACCEL
374 #define dprintf_accel fprintf
375 #else
376 #define dprintf_accel
377 #endif
378 #endif
380 #ifdef DEBUG_RUNTIME
381 #define dprintf_bitmap if(debug_msg_enabled[1]) fprintf
382 #else
383 #ifdef DEBUG_BITMAP
384 #define dprintf_bitmap fprintf
385 #else
386 #define dprintf_bitmap
387 #endif
388 #endif
390 #ifdef DEBUG_RUNTIME
391 #define dprintf_caret if(debug_msg_enabled[2]) fprintf
392 #else
393 #ifdef DEBUG_CARET
394 #define dprintf_caret fprintf
395 #else
396 #define dprintf_caret
397 #endif
398 #endif
400 #ifdef DEBUG_RUNTIME
401 #define dprintf_cdaudio if(debug_msg_enabled[3]) fprintf
402 #else
403 #ifdef DEBUG_CDAUDIO
404 #define dprintf_cdaudio fprintf
405 #else
406 #define dprintf_cdaudio
407 #endif
408 #endif
410 #ifdef DEBUG_RUNTIME
411 #define dprintf_class if(debug_msg_enabled[4]) fprintf
412 #else
413 #ifdef DEBUG_CLASS
414 #define dprintf_class fprintf
415 #else
416 #define dprintf_class
417 #endif
418 #endif
420 #ifdef DEBUG_RUNTIME
421 #define dprintf_clipboard if(debug_msg_enabled[5]) fprintf
422 #else
423 #ifdef DEBUG_CLIPBOARD
424 #define dprintf_clipboard fprintf
425 #else
426 #define dprintf_clipboard
427 #endif
428 #endif
430 #ifdef DEBUG_RUNTIME
431 #define dprintf_clipping if(debug_msg_enabled[6]) fprintf
432 #else
433 #ifdef DEBUG_CLIPPING
434 #define dprintf_clipping fprintf
435 #else
436 #define dprintf_clipping
437 #endif
438 #endif
440 #ifdef DEBUG_RUNTIME
441 #define dprintf_combo if(debug_msg_enabled[7]) fprintf
442 #else
443 #ifdef DEBUG_COMBO
444 #define dprintf_combo fprintf
445 #else
446 #define dprintf_combo
447 #endif
448 #endif
450 #ifdef DEBUG_RUNTIME
451 #define dprintf_comm if(debug_msg_enabled[8]) fprintf
452 #else
453 #ifdef DEBUG_COMM
454 #define dprintf_comm fprintf
455 #else
456 #define dprintf_comm
457 #endif
458 #endif
460 #ifdef DEBUG_RUNTIME
461 #define dprintf_cursor if(debug_msg_enabled[9]) fprintf
462 #else
463 #ifdef DEBUG_CURSOR
464 #define dprintf_cursor fprintf
465 #else
466 #define dprintf_cursor
467 #endif
468 #endif
470 #ifdef DEBUG_RUNTIME
471 #define dprintf_dc if(debug_msg_enabled[10]) fprintf
472 #else
473 #ifdef DEBUG_DC
474 #define dprintf_dc fprintf
475 #else
476 #define dprintf_dc
477 #endif
478 #endif
480 #ifdef DEBUG_RUNTIME
481 #define dprintf_dialog if(debug_msg_enabled[11]) fprintf
482 #else
483 #ifdef DEBUG_DIALOG
484 #define dprintf_dialog fprintf
485 #else
486 #define dprintf_dialog
487 #endif
488 #endif
490 #ifdef DEBUG_RUNTIME
491 #define dprintf_dll if(debug_msg_enabled[12]) fprintf
492 #else
493 #ifdef DEBUG_DLL
494 #define dprintf_dll fprintf
495 #else
496 #define dprintf_dll
497 #endif
498 #endif
500 #ifdef DEBUG_RUNTIME
501 #define dprintf_dosfs if(debug_msg_enabled[13]) fprintf
502 #else
503 #ifdef DEBUG_DOSFS
504 #define dprintf_dosfs fprintf
505 #else
506 #define dprintf_dosfs
507 #endif
508 #endif
510 #ifdef DEBUG_RUNTIME
511 #define dprintf_driver if(debug_msg_enabled[14]) fprintf
512 #else
513 #ifdef DEBUG_DRIVER
514 #define dprintf_driver fprintf
515 #else
516 #define dprintf_driver
517 #endif
518 #endif
520 #ifdef DEBUG_RUNTIME
521 #define dprintf_edit if(debug_msg_enabled[15]) fprintf
522 #else
523 #ifdef DEBUG_EDIT
524 #define dprintf_edit fprintf
525 #else
526 #define dprintf_edit
527 #endif
528 #endif
530 #ifdef DEBUG_RUNTIME
531 #define dprintf_enum if(debug_msg_enabled[16]) fprintf
532 #else
533 #ifdef DEBUG_ENUM
534 #define dprintf_enum fprintf
535 #else
536 #define dprintf_enum
537 #endif
538 #endif
540 #ifdef DEBUG_RUNTIME
541 #define dprintf_event if(debug_msg_enabled[17]) fprintf
542 #else
543 #ifdef DEBUG_EVENT
544 #define dprintf_event fprintf
545 #else
546 #define dprintf_event
547 #endif
548 #endif
550 #ifdef DEBUG_RUNTIME
551 #define dprintf_exec if(debug_msg_enabled[18]) fprintf
552 #else
553 #ifdef DEBUG_EXEC
554 #define dprintf_exec fprintf
555 #else
556 #define dprintf_exec
557 #endif
558 #endif
560 #ifdef DEBUG_RUNTIME
561 #define dprintf_file if(debug_msg_enabled[19]) fprintf
562 #else
563 #ifdef DEBUG_FILE
564 #define dprintf_file fprintf
565 #else
566 #define dprintf_file
567 #endif
568 #endif
570 #ifdef DEBUG_RUNTIME
571 #define dprintf_fixup if(debug_msg_enabled[20]) fprintf
572 #else
573 #ifdef DEBUG_FIXUP
574 #define dprintf_fixup fprintf
575 #else
576 #define dprintf_fixup
577 #endif
578 #endif
580 #ifdef DEBUG_RUNTIME
581 #define dprintf_font if(debug_msg_enabled[21]) fprintf
582 #else
583 #ifdef DEBUG_FONT
584 #define dprintf_font fprintf
585 #else
586 #define dprintf_font
587 #endif
588 #endif
590 #ifdef DEBUG_RUNTIME
591 #define dprintf_gdi if(debug_msg_enabled[22]) fprintf
592 #else
593 #ifdef DEBUG_GDI
594 #define dprintf_gdi fprintf
595 #else
596 #define dprintf_gdi
597 #endif
598 #endif
600 #ifdef DEBUG_RUNTIME
601 #define dprintf_graphics if(debug_msg_enabled[23]) fprintf
602 #else
603 #ifdef DEBUG_GRAPHICS
604 #define dprintf_graphics fprintf
605 #else
606 #define dprintf_graphics
607 #endif
608 #endif
610 #ifdef DEBUG_RUNTIME
611 #define dprintf_heap if(debug_msg_enabled[24]) fprintf
612 #else
613 #ifdef DEBUG_HEAP
614 #define dprintf_heap fprintf
615 #else
616 #define dprintf_heap
617 #endif
618 #endif
620 #ifdef DEBUG_RUNTIME
621 #define dprintf_icon if(debug_msg_enabled[25]) fprintf
622 #else
623 #ifdef DEBUG_ICON
624 #define dprintf_icon fprintf
625 #else
626 #define dprintf_icon
627 #endif
628 #endif
630 #ifdef DEBUG_RUNTIME
631 #define dprintf_int if(debug_msg_enabled[26]) fprintf
632 #else
633 #ifdef DEBUG_INT
634 #define dprintf_int fprintf
635 #else
636 #define dprintf_int
637 #endif
638 #endif
640 #ifdef DEBUG_RUNTIME
641 #define dprintf_key if(debug_msg_enabled[27]) fprintf
642 #else
643 #ifdef DEBUG_KEY
644 #define dprintf_key fprintf
645 #else
646 #define dprintf_key
647 #endif
648 #endif
650 #ifdef DEBUG_RUNTIME
651 #define dprintf_keyboard if(debug_msg_enabled[28]) fprintf
652 #else
653 #ifdef DEBUG_KEYBOARD
654 #define dprintf_keyboard fprintf
655 #else
656 #define dprintf_keyboard
657 #endif
658 #endif
660 #ifdef DEBUG_RUNTIME
661 #define dprintf_ldt if(debug_msg_enabled[29]) fprintf
662 #else
663 #ifdef DEBUG_LDT
664 #define dprintf_ldt fprintf
665 #else
666 #define dprintf_ldt
667 #endif
668 #endif
670 #ifdef DEBUG_RUNTIME
671 #define dprintf_listbox if(debug_msg_enabled[30]) fprintf
672 #else
673 #ifdef DEBUG_LISTBOX
674 #define dprintf_listbox fprintf
675 #else
676 #define dprintf_listbox
677 #endif
678 #endif
680 #ifdef DEBUG_RUNTIME
681 #define dprintf_mciwave if(debug_msg_enabled[31]) fprintf
682 #else
683 #ifdef DEBUG_MCIWAVE
684 #define dprintf_mciwave fprintf
685 #else
686 #define dprintf_mciwave
687 #endif
688 #endif
690 #ifdef DEBUG_RUNTIME
691 #define dprintf_mdi if(debug_msg_enabled[32]) fprintf
692 #else
693 #ifdef DEBUG_MDI
694 #define dprintf_mdi fprintf
695 #else
696 #define dprintf_mdi
697 #endif
698 #endif
700 #ifdef DEBUG_RUNTIME
701 #define dprintf_menu if(debug_msg_enabled[33]) fprintf
702 #else
703 #ifdef DEBUG_MENU
704 #define dprintf_menu fprintf
705 #else
706 #define dprintf_menu
707 #endif
708 #endif
710 #ifdef DEBUG_RUNTIME
711 #define dprintf_menucalc if(debug_msg_enabled[34]) fprintf
712 #else
713 #ifdef DEBUG_MENUCALC
714 #define dprintf_menucalc fprintf
715 #else
716 #define dprintf_menucalc
717 #endif
718 #endif
720 #ifdef DEBUG_RUNTIME
721 #define dprintf_message if(debug_msg_enabled[35]) fprintf
722 #else
723 #ifdef DEBUG_MESSAGE
724 #define dprintf_message fprintf
725 #else
726 #define dprintf_message
727 #endif
728 #endif
730 #ifdef DEBUG_RUNTIME
731 #define dprintf_metafile if(debug_msg_enabled[36]) fprintf
732 #else
733 #ifdef DEBUG_METAFILE
734 #define dprintf_metafile fprintf
735 #else
736 #define dprintf_metafile
737 #endif
738 #endif
740 #ifdef DEBUG_RUNTIME
741 #define dprintf_module if(debug_msg_enabled[37]) fprintf
742 #else
743 #ifdef DEBUG_MODULE
744 #define dprintf_module fprintf
745 #else
746 #define dprintf_module
747 #endif
748 #endif
750 #ifdef DEBUG_RUNTIME
751 #define dprintf_msg if(debug_msg_enabled[38]) fprintf
752 #else
753 #ifdef DEBUG_MSG
754 #define dprintf_msg fprintf
755 #else
756 #define dprintf_msg
757 #endif
758 #endif
760 #ifdef DEBUG_RUNTIME
761 #define dprintf_nonclient if(debug_msg_enabled[39]) fprintf
762 #else
763 #ifdef DEBUG_NONCLIENT
764 #define dprintf_nonclient fprintf
765 #else
766 #define dprintf_nonclient
767 #endif
768 #endif
770 #ifdef DEBUG_RUNTIME
771 #define dprintf_palette if(debug_msg_enabled[40]) fprintf
772 #else
773 #ifdef DEBUG_PALETTE
774 #define dprintf_palette fprintf
775 #else
776 #define dprintf_palette
777 #endif
778 #endif
780 #ifdef DEBUG_RUNTIME
781 #define dprintf_region if(debug_msg_enabled[41]) fprintf
782 #else
783 #ifdef DEBUG_REGION
784 #define dprintf_region fprintf
785 #else
786 #define dprintf_region
787 #endif
788 #endif
790 #ifdef DEBUG_RUNTIME
791 #define dprintf_resource if(debug_msg_enabled[42]) fprintf
792 #else
793 #ifdef DEBUG_RESOURCE
794 #define dprintf_resource fprintf
795 #else
796 #define dprintf_resource
797 #endif
798 #endif
800 #ifdef DEBUG_RUNTIME
801 #define dprintf_scroll if(debug_msg_enabled[43]) fprintf
802 #else
803 #ifdef DEBUG_SCROLL
804 #define dprintf_scroll fprintf
805 #else
806 #define dprintf_scroll
807 #endif
808 #endif
810 #ifdef DEBUG_RUNTIME
811 #define dprintf_syscolor if(debug_msg_enabled[44]) fprintf
812 #else
813 #ifdef DEBUG_SYSCOLOR
814 #define dprintf_syscolor fprintf
815 #else
816 #define dprintf_syscolor
817 #endif
818 #endif
820 #ifdef DEBUG_RUNTIME
821 #define dprintf_text if(debug_msg_enabled[45]) fprintf
822 #else
823 #ifdef DEBUG_TEXT
824 #define dprintf_text fprintf
825 #else
826 #define dprintf_text
827 #endif
828 #endif
830 #ifdef DEBUG_RUNTIME
831 #define dprintf_timer if(debug_msg_enabled[46]) fprintf
832 #else
833 #ifdef DEBUG_TIMER
834 #define dprintf_timer fprintf
835 #else
836 #define dprintf_timer
837 #endif
838 #endif
840 #ifdef DEBUG_RUNTIME
841 #define dprintf_utility if(debug_msg_enabled[47]) fprintf
842 #else
843 #ifdef DEBUG_UTILITY
844 #define dprintf_utility fprintf
845 #else
846 #define dprintf_utility
847 #endif
848 #endif
850 #ifdef DEBUG_RUNTIME
851 #define dprintf_win if(debug_msg_enabled[48]) fprintf
852 #else
853 #ifdef DEBUG_WIN
854 #define dprintf_win fprintf
855 #else
856 #define dprintf_win
857 #endif
858 #endif
862 #ifdef DEBUG_RUNTIME
863 #ifdef DEBUG_DEFINE_VARIABLES
864 static char *debug_msg_name[] = {
865 "accel",
866 "bitmap",
867 "caret",
868 "cdaudio",
869 "class",
870 "clipboard",
871 "clipping",
872 "combo",
873 "comm",
874 "cursor",
875 "dc",
876 "dialog",
877 "dll",
878 "dosfs",
879 "driver",
880 "edit",
881 "enum",
882 "event",
883 "exec",
884 "file",
885 "fixup",
886 "font",
887 "gdi",
888 "graphics",
889 "heap",
890 "icon",
891 "int",
892 "key",
893 "keyboard",
894 "ldt",
895 "listbox",
896 "mciwave",
897 "mdi",
898 "menu",
899 "menucalc",
900 "message",
901 "metafile",
902 "module",
903 "msg",
904 "nonclient",
905 "palette",
906 "region",
907 "resource",
908 "scroll",
909 "syscolor",
910 "text",
911 "timer",
912 "utility",
913 "win",
914 ""};
915 #endif
916 #endif