home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 330_02 / snap.c < prev    next >
C/C++ Source or Header  |  1990-10-12  |  883b  |  43 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.    install_tasker (0, 0, IFL_STD, "Snap");
  24.  
  25.    c = (argc < 2) ? 'x' : tolower (argv [1][0]);
  26.  
  27.    switch (c)
  28.       {
  29.       case 'm': tsk_set_mono (25, 80);
  30.                 screensnap (25); 
  31.                 break;
  32.       case 'c': tsk_set_colour (25, 80);
  33.                 screensnap (25); 
  34.                 break;
  35.       default:  snapshot (stdout); 
  36.                 break;
  37.       }
  38.  
  39.    remove_tasker ();
  40.    return 0;
  41. }
  42.  
  43.