home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / DOOG / CTASK.ZIP / SNAP.C < prev    next >
C/C++ Source or Header  |  1989-12-20  |  813b  |  38 lines

  1.  
  2. /*
  3.    This program installs the tasker, does a snapshot dump, and exits.
  4.    It is useful if you want to peek into a resident copy of CTask.
  5.  
  6.    Program call is
  7.       SNAPxx      - Dump to STDOUT
  8.       SNAPxx M    - Dump to Mono screen
  9.       SNAPxx C    - Dump to Colour screen
  10. */
  11.  
  12. #include <stdlib.h>
  13. #include <ctype.h>
  14.  
  15. #include "tsk.h"
  16. #include "tsksup.h"
  17.  
  18.  
  19. int main (int argc, char **argv)
  20. {
  21.    int c;
  22.  
  23.    install_tasker (0, 0, IFL_STD, "Snap");
  24.    init_conout ();
  25.    c = (argc < 2) ? 'x' : tolower (argv [1][0]);
  26.  
  27.    switch (c)
  28.       {
  29.       case 'm': screensnap ((char far *)0xb0000000L, 25); break;
  30.       case 'c': screensnap ((char far *)0xb8000000L, 60); break;
  31.       default:  snapshot (stdout); break;
  32.       }
  33.    end_conout ();
  34.    remove_tasker ();
  35.    return 0;
  36. }
  37.  
  38.