home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_03_06 / 3n06021a < prev    next >
Text File  |  1992-03-20  |  531b  |  29 lines

  1. /* Contrived buggy example to illustrate */
  2. /* diagnosing UAE with Dr. Watson. */
  3.  
  4. #include <windows.h>
  5.  
  6. /* export all functions during debugging */
  7. /* to aid Dr. Watson UAE diagnosis */
  8. #if DEBUG
  9. #define DBG _export
  10. #else
  11. #define DBG
  12. #endif
  13.  
  14. int DBG add_indirect(LPWORD, LPWORD);
  15.  
  16. int PASCAL WinMain(HANDLE hInstance,
  17.    HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
  18. {
  19.     WORD a = 1;
  20.     LPWORD p = NULL;
  21.  
  22.     return add_indirect(&a, p);
  23. }
  24.  
  25. int DBG add_indirect(LPWORD a, LPWORD b)
  26. {
  27.     return *a + *b;
  28. }
  29.