/* ****************************************************************************** * SMQ TI-89/92+ to TI-92 Level Converter v1.0 for DOS * ****************************************************************************** * C Source By Don Barnes * ****************************************************************************** * This program simply changes the first few bytes of the files's header so * * that it can be sent using the TI-Graph Link(TM) for TI-92 software. * ****************************************************************************** */ #include #include main(int argc, char* argv[]) { FILE *fp; if(argc == 2) { if((fp = fopen(argv[1],"rb+")) == NULL) { printf("Unable to open %s, exiting\n",argv[1]); exit(0); } if(fseek(fp,2,SEEK_SET) != 0) { printf("Unable to position stream, exiting\n"); fclose(fp); exit(0); } if(fwrite("TI92**", 6, 1, fp) != 1) { printf("Error writing to file, exiting\n"); fclose(fp); exit(0); } fclose(fp); printf("%s converted succesfully!\n",argv[1]); } else { printf("SMQ TI-89/92+ to TI-92 Level Converter v1.0\nBy Don Barnes\nUsage: smq92 \n"); } }