home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / envoy / netprobe_4_24.lha / NetProbe / src / main.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-11  |  1.5 KB  |  85 lines

  1. //
  2. //  $Log: main.c,v $
  3. //  Revision 1.4  1994/07/11  21:54:53  hakan
  4. //  *DUMB* mistake.  This one cost me about two week's motivation :-)
  5. //
  6. //  Revision 1.3  1994/06/19  18:57:24  hakan
  7. //  Global variables and SAS/C _WB* handling added
  8. //
  9. //  Revision 1.2  1994/06/14  21:22:13  hakan
  10. //  Elementary Eventloop
  11. //
  12. //  Revision 1.1  1994/06/14  20:26:41  hakan
  13. //  Initial revision
  14. //
  15. //
  16.  
  17. static char* RCSId = "$Id: main.c,v 1.4 1994/07/11 21:54:53 hakan Exp $";
  18.  
  19.  
  20.  
  21. #include <dos.h>
  22. #include "extern.h"
  23.  
  24.  
  25.  
  26. long __oslibversion     = 37L;
  27. long __netlibversion    = 37L;
  28.  
  29. long    NP_Config       = 0;
  30. long    NP_ScanTime     = 0;
  31. long    NP_ScanPackets  = 0;
  32. char*   NP_ScanHost     = "localhost";
  33.  
  34.  
  35.  
  36. int main (int argc, char* argv[])
  37. {
  38.     //
  39.     //  Ain't SAS nice?
  40.     //
  41.     if (argc == 0)
  42.     {
  43.         argc = _WBArgc;
  44.         argv = _WBArgv;
  45.     }
  46.  
  47.     //
  48.     //  Usual code
  49.     //
  50.     if (CreateUI (argc, argv))
  51.     {
  52.         if (CreateTimer ())
  53.         {
  54.             if (CreateEnvoy ())
  55.             {
  56.                 EventLoop ();
  57.  
  58.                 DestroyEnvoy ();
  59.             }
  60.             else
  61.             {
  62.                 puts ("Envoy initialization failed");
  63.                 return (20);
  64.             }
  65.  
  66.             DestroyTimer ();
  67.         }
  68.         else
  69.         {
  70.             puts ("Timer initialization failed");
  71.             return (20);
  72.         }
  73.  
  74.         DestroyUI ();
  75.     }
  76.     else
  77.     {
  78.         puts ("UI initialization failed");
  79.         return (20);
  80.     }
  81.  
  82.  
  83.     return (0);
  84. }
  85.