home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR41 / CTASK22D.ZIP / SNAP.C < prev    next >
C/C++ Source or Header  |  1992-12-21  |  939b  |  44 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. #include "tskprf.h"
  18.  
  19. int main (int argc, char **argv)
  20. {
  21.    int c;
  22.  
  23.    c = install_tasker (0, 0, IFL_STD, "Snap");
  24.    tsk_printf ("Install_tasker returned %d\n", c);
  25.  
  26.    c = (argc < 2) ? 'x' : tolower (argv [1][0]);
  27.  
  28.    switch (c)
  29.       {
  30.       case 'm': tsk_set_mono (25, 80);
  31.                 screensnap (25); 
  32.                 break;
  33.       case 'c': tsk_set_colour (25, 80);
  34.                 screensnap (25); 
  35.                 break;
  36.       default:  snapshot (stdout); 
  37.                 break;
  38.       }
  39.  
  40.    remove_tasker ();
  41.    return 0;
  42. }
  43.  
  44.