home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
disks
/
disk429.lzh
/
ATCopy
/
Patch_Option.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-10
|
1KB
|
56 lines
/* $Revision Header *** Header built automatically - do not edit! ***********
*
* (C) Copyright 1990 by Peter Vorwerk
*
* Name .....: Patch_Option.c
* Created ..: Sunday 30-Dec-90 14:49
* Revision .: 0
*
* Date Author Comment
* ========= ======== ====================
* 30-Dec-90 Peter Vorwerk Created this file!
*
* $Revision Header ********************************************************/
#define REVISION 0
#include <stdio.h>
#include <string.h>
#include <libraries/arpbase.h>
void main(int argc, char *argv[])
{
FILE *fp;
char *s;
char string[16];
if (argc != 3)
{
Printf("USAGE: %s ATCopy option\n",argv[0]);
exit(10);
}
fp = fopen(argv[1],"r+");
if (fp == NULL)
{
Printf("Error: Can't open %s\n",argv[1]);
exit(10);
}
fseek(fp,0x965,0);
fscanf(fp,"%s",string);
if (strcmp(string,"Option"))
{
Printf("Error: Wrong Version\nAbortet\n");
fclose(fp);
exit(10);
}
fseek(fp,0x962,0);
s = argv[2];
while(*s != '\0')
{
fputc((int) *s++,fp);
}
fclose(fp);
exit(0);
}