home *** CD-ROM | disk | FTP | other *** search
- #include <my_tos.h>
- #include <my_defs.h>
-
- char *value="12";
-
- void main(void)
- {
- long ret,len;
- int handle;
- ret=Fopen("ZIP.TTP",O_RDWR);
- if(ret<0L)
- {
- Cconws("ABORT> Can't open ZIP.TTP");
- return;
- }
- handle=(int)ret;
- len=Fseek(0,handle,2);
- if(len!=103678L)
- {
- Cconws("ABORT> File has not correct length. -> Unknown version");
- Fclose(handle);
- return;
- }
- Fseek(0xf238L,handle,0);
- Fread(handle,2,value);
- if((value[0]!='N')||(value[1]!='u'))
- {
- Fseek(0xf238L,handle,0);
- Fwrite(handle,2,"Nu");
- Cconws("File patched");
- }
- else
- Cconws("File already patched");
- Fclose(handle);
- Cconws("\r\nPress any key to continue");
- Cnecin();
- return;
- }