home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / STORM2.DMS / in.adf / Includes.LHA / wbstartup.h < prev   
Encoding:
C/C++ Source or Header  |  1995-08-28  |  1002 b   |  47 lines

  1. #ifndef _INCLUDE_WBSTARTUP
  2. #define _INCLUDE_WBSTARTUP
  3.  
  4. /*
  5. **  $VER: wbstartup.h 10.1 (19.7.95)
  6. **  Includes Release 40.15
  7. **
  8. **  (C) Copyright 1995 Haage & Partner
  9. **     All Rights Reserved
  10. */
  11.  
  12. #ifdef WBWINNAME
  13.  #ifndef _INCLUDE_STDIO_H
  14.  #include <stdio.h>
  15.  #endif
  16.  
  17.  #ifndef INCLUDE_IO_STREAM
  18.  #include <streamdefs.h>
  19.  #endif
  20. #endif
  21.  
  22. unsigned short _wbflag;       // Flag wird bei Workbench-Start auf 1 gesetzt
  23.  
  24. extern "C" void wbparse(struct WBStartup *);
  25. // Die neue Library-Funktion (ab V 1.01.5) "wbparse" wertet die
  26. // Startup-Message aus und springt dann in "main" ein.
  27.  
  28. // Eine vorgefertigte wbmain-Funktion:
  29.  
  30. extern "C" void wbmain(struct WBStartup *w)
  31. {
  32.   _wbflag = 1;
  33.  
  34.   #ifdef WBWINNAME
  35.     // Ausgabe in Window umleiten:
  36.     if(!freopen(WBWINNAME, "r+", stdout))
  37.       return;
  38.     // Eingabe aus selbem Window:
  39.     stdin->Filehandle = stdout->Filehandle;  // THIS ASSIGNMENT WAS MADE
  40.                           // BY TRAINED EXPERTS. DO NOT TRY THIS AT HOME!
  41.   #endif
  42.  
  43.   wbparse(w);
  44. }
  45.  
  46. #endif
  47.