Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : AT2IBM.ZIP
Filename : AT2IBM.C

 
Output of file : AT2IBM.C contained in archive : AT2IBM.ZIP
/* PUBLICWARE - brought to you by Rat*Ware Softworks */
/* This is FREE SOFTWARE, no donations required */
/* Feel free to copy it and pass it on to friends. */
/* LONG LIVE ATARI and ibm */




#include
#include

/* Convert ATARI ATASCII text file to IBM ASCII text file */

/* Constants */

#define ATARI_RETURN 155
#define CR 13
#define LF 10

main( argc, argv )
int argc;
char *argv[];
{
int i, cnt;
FILE *fil, *ifil;
char file[80], ifile[80], *junk;

printf("\nAT2IBM - Convert Atari ASCII to IBM Standard ASCII\n");
printf("PUBLICWARE from Rat*Ware Softworks, by Mat*Rat\n\n");
cnt = 1;

if (argc < 2)
{

puts("\nAtari FILE to convert to IBM format?\n");
junk = gets( file );

}
else
strcpy(file,argv[cnt++]);

while (argc > 0)
{
fil = fopen( file, "rb");
if (fil == NULL)
{
puts("Couldn't find Atari input file ");
puts(file);
}
else
{
filecnv( file, ifile ); /* Convert ATARI filename to IBM filename */
ifil = fopen( ifile, "wb" );
if (ifile != NULL)
{
while( (i=fgetc(fil)) != EOF)
{
if (i == ATARI_RETURN)
{
fputc(CR, ifil);
fputc(LF, ifil);
}
else fputc(i, ifil);
}
fclose( fil );
fclose( ifil);
}

else
{
puts("Can't open output file: ");
puts(ifile);
fclose( fil );
}
}
argc--;
if (argc > 1)
strcpy(file, argv[cnt++]);
else
argc = 0;

} /* while end */

} /* main end */

filecnv( atafil, ibmfil )
char *atafil, *ibmfil;
{
char ext[10], *exptr;


strcpy(ibmfil, atafil);
strcpy(ext, ".ITX"); /* IBM Text */
exptr = strchr(ibmfil, '.');
if (exptr == 0)
strcat(ibmfil, ext);
else
strcpy(exptr, ext);


puts("Input Atari file is:");
puts(atafil);
puts("Output IBM file is:");
puts(ibmfil);


}










  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : AT2IBM.ZIP
Filename : AT2IBM.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/