home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
stg_v4.lzh
/
verify.c
< prev
Wrap
C/C++ Source or Header
|
1994-11-11
|
640b
|
42 lines
#include <stdio.h>
#include <module.h>
#define ERR (-1)
extern int errno;
mod_dev *psDesc;
mod_dev *modlink();
mod_dev *modload();
typedef unsigned char B;
typedef unsigned short W;
typedef unsigned long L;
#define STG_DSC "StG"
#define CRC_CHK 0xFF3440CC
main(argc,argv)
char **argv;
{
int c;
psDesc=(mod_dev*)modlink(STG_DSC,0);
if ((int)psDesc==ERR)
{
psDesc=(mod_dev*)modload(STG_DSC,0);
if ((int)psDesc==ERR)
exit(errno);
}
c=CRC_CHK;
crc((char*)psDesc+psDesc->_mdevcon,31,&c);
if (c==CRC_CHK)
writeln(1,"OK\n",80);
else
writeln(1,"ERR\n",80);
munlink(psDesc);
}