home *** CD-ROM | disk | FTP | other *** search
- /*==================================================================*/
- /* Sample program in C language to show files in CAP format. */
- /* By: Kuo Shiang Shiang (Djohan) & Jeng Shun Huo (Fire) */
- /* */
- /* Compiler : Turbo C V1.5 or later */
- /* Model : Huge */
- /* Project file : SAMPLEC.PRJ */
- /* Library used : CAP.OBJ */
- /*==================================================================*/
-
- extern int Show_CAP(char *);
- extern void Set_Screen_Mode(int);
-
- main()
- {
- int error_code=0;
-
- error_code = Show_CAP("SAMPLE.CAP"); /* Show "SAMPLE.CAP" */
-
- if (error_code==0) getch(); /* If no error, wait for a key */
- Set_Screen_Mode(3); /* Switch back to color text mode */
-
- switch(error_code) {
- case 1: printf("ERROR: The image file is not in CAP format!\7\n");
- break;
- case 2: printf("ERROR: File I/O error or file not found!\7\n");
- break;
- case 3: printf("ERROR: Not enough memory!\7\n");
- break;
- case 4: printf("ERROR: This file can't be shown in Chinese system!\7\n");
- break;
- }
- }