/* SG C Tools 1.2 (C) 1993 Steve Goldsmith All Rights Reserved Saves both VDC character sets to a file. Compiled with HI-TECH C 3.09 (CP/M-80). To compile with HI-TECH C and SG C Tools source on same disk use: C SAVECHRS.C -LC128 */ #include #include #include void disphelp(void); void savecharsets(char *FileName); extern ushort vdcCharMem; extern ushort vdcCharMemSize; main(int argc, char *argv[]) { puts("\nSAVECHRS (C) 1993 Steve Goldsmith"); if (argc == 2) { savevdc(); mapvdc(); savecharsets(argv[1]); restorevdc(); } else disphelp(); } void disphelp(void) { puts("\nTo save VDC character definitions use:\n"); puts("SAVECHRS FILENAME.EXT"); } void savecharsets(char *FileName) { uchar *BufPtr; FILE *CharFile; if ((CharFile = fopen(FileName,"wb")) != NULL) { puts("\nCopying VDC character definitions to buffer..."); BufPtr = memtobufvdc(vdcCharMem,vdcCharMemSize); if (BufPtr != NULL) { printf("Copying buffer to %s...\n",FileName); fwrite(BufPtr,sizeof(uchar),vdcCharMemSize,CharFile); free(BufPtr); } fclose(CharFile); } }