home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / PIXELD.ZIP / PIXVIEW.C < prev    next >
C/C++ Source or Header  |  1989-09-22  |  720b  |  34 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #define INCL_BASE
  4. #define INCL_NOPM
  5. #include <os2.h>
  6. #include "pixeldll.h"
  7.  
  8. #define  IN_ARG           1
  9. #define  VIEW_ARG         2
  10.  
  11. main (int argc, char *argv [])
  12. {
  13. if (argc != 3)
  14.    {
  15.    printf ("\nUSAGE : PIXVIEW <infile> <viewing time in seconds>\n");
  16.    exit (0);
  17.    }
  18.  
  19. CliOpenVGA ();
  20. if (!PgrRestoreScreenVGA (argv [IN_ARG]))
  21.    {
  22.    CliCloseVGA ();
  23.    DosBeep (260, 60);
  24.    printf ("\nCould not restore screen from %s\n", argv [IN_ARG]);
  25.    exit (0);
  26.    }
  27. DosBeep (260, 30);
  28. DosSleep ((LONG) ((atol (argv [VIEW_ARG])) * 1000));
  29. CliCloseVGA ();
  30. return (TRUE);
  31. }
  32. /****************************************************************************/
  33.  
  34.