Skip to content
Snippets Groups Projects
Commit b89511e3 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Do the Zombie Shuffle

This is fine.
parent 90e94bf1
No related branches found
No related tags found
No related merge requests found
......@@ -59,38 +59,6 @@
smb_t smb;
char revision[16];
/****************************************************************************/
/* Updates 16-bit "rcrc" with character 'ch' */
/****************************************************************************/
void ucrc16(uchar ch, ushort *rcrc) {
ushort i, cy;
uchar nch=ch;
for (i=0; i<8; i++) {
cy=*rcrc & 0x8000;
*rcrc<<=1;
if (nch & 0x80) *rcrc |= 1;
nch<<=1;
if (cy) *rcrc ^= 0x1021; }
}
/****************************************************************************/
/* Returns 16-crc of string (not counting terminating NULL) */
/****************************************************************************/
ushort crc16(char *str)
{
int i=0;
ushort crc=0;
ucrc16(0,&crc);
while(str[i])
ucrc16(str[i++],&crc);
ucrc16(0,&crc);
ucrc16(0,&crc);
return(crc);
}
/****************************************************************************/
/* Converts unix time format (long - time_t) into a char str MM/DD/YY */
/****************************************************************************/
......@@ -358,7 +326,7 @@ int main(int argc, char **argv)
length+=2;
memset(&msg,0,sizeof(smbmsg_t));
memcpy(msg.hdr.id,"SHD\x1a",4);
memcpy(msg.hdr.msghdr_id,"SHD\x1a",4);
msg.hdr.version=smb_ver();
msg.hdr.when_written.time=now;
msg.hdr.when_imported.time=now;
......
......@@ -144,37 +144,6 @@ time_t dstrtounix(char *instr)
return(mktime(&tm));
}
/****************************************************************************/
/* Updates 16-bit "rcrc" with character 'ch' */
/****************************************************************************/
void ucrc16(uchar ch, ushort *rcrc) {
ushort i, cy;
uchar nch=ch;
for (i=0; i<8; i++) {
cy=*rcrc & 0x8000;
*rcrc<<=1;
if (nch & 0x80) *rcrc |= 1;
nch<<=1;
if (cy) *rcrc ^= 0x1021; }
}
/****************************************************************************/
/* Returns 16-crc of string (not counting terminating NULL) */
/****************************************************************************/
ushort crc16(char *str)
{
int i=0;
ushort crc=0;
ucrc16(0,&crc);
while(str[i])
ucrc16(str[i++],&crc);
ucrc16(0,&crc);
ucrc16(0,&crc);
return(crc);
}
/****************************************************************************/
/* Truncates white-space chars off end of 'str' */
/* This is a *special* version of trunccrsp that truncates at first CR char */
......@@ -206,12 +175,6 @@ int main(int argc, char **argv)
fprintf(stderr,"\nSMB2SBL v2.%s-%s - Updates SBL via SMB - Copyright 2003 "
"Rob Swindell\n\n",revision,PLATFORM_DESC);
#if 0
if(putenv("TZ=UCT0"))
fprintf(stderr,"!putenv() FAILED\n");
tzset();
#endif
if(argc<3) {
fprintf(stderr,"usage: smb2sbl <smb_file> <sbl.dab>\n\n");
fprintf(stderr,"ex: smb2sbl /sbbs/data/subs/syncdata "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment