home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / maj / 4401 / exc.arj / FGDOC / EXAMPLES / C / 09-02.C < prev    next >
Text File  |  1994-01-24  |  451b  |  25 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. main()
  6. {
  7.    int mode, status;
  8.    char header[128];
  9.  
  10.    status = fg_pcxhead("CORAL.PCX",header);
  11.    if (status == -1)
  12.    {
  13.       printf("Can't open CORAL.PCX.\n");
  14.       exit(1);
  15.    }
  16.    else if (status == -2)
  17.    {
  18.       printf("CORAL.PCX is not a PCX file.\n");
  19.       exit(1);
  20.    }
  21.  
  22.    mode = fg_pcxmode(header);
  23.    printf("Optimal display mode is %d.\n",mode);
  24. }
  25.