Category : Miscellaneous Language Source Code
Archive   : HACKROM.ZIP
Filename : APPEND.C

 
Output of file : APPEND.C contained in archive : HACKROM.ZIP
/* Ibm rom append routine written by Allan Teo 5 may 1987*/

#include
#include
main(argc,argv)
int argc;
char **argv;
{
int c1,c2, c;
char *s;
unsigned char x,i;
FILE *infile,*infile2, *outfile;
if (argc != 4)
{
printf("Argument error\n");
printf("Usage: Append inputfile inputfile2 outputfile\n");
exit(0);
}
argv++; /* get filename */
if ((infile = fopen(*argv, "rb")) == NULL)
{
perror("Can't open input file %s",*argv);
exit(0);
}

argv++; /* get filename */
if ((infile2 = fopen(*argv, "rb")) == NULL)
{
perror("Can't open input file %s",*argv);
exit(0);
}

argv++;
if ((outfile = fopen(*argv, "wb")) == NULL)
{
perror("Can't open output file %s",*argv);
exit(0);
}

while (((c = getc(infile)) != EOF))
{
putc(c,outfile);
}
fclose(infile);

while (((c = getc(infile2)) != EOF))
{
putc(c,outfile);
}

fclose(outfile); fclose(infile2);
exit(0);
}


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : HACKROM.ZIP
Filename : APPEND.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/