Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
c027bd35
Commit
c027bd35
authored
May 17, 2021
by
Deucе
👌🏾
Browse files
Do the Zombie Shuffle
This is fine.
parent
f94c74b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
70 deletions
+1
-70
xtrn/sbl/sbl2smb.c
xtrn/sbl/sbl2smb.c
+1
-33
xtrn/sbl/smb2sbl.c
xtrn/sbl/smb2sbl.c
+0
-37
No files found.
xtrn/sbl/sbl2smb.c
View file @
c027bd35
...
...
@@ -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
;
...
...
xtrn/sbl/smb2sbl.c
View file @
c027bd35
...
...
@@ -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
,
"
\n
SMB2SBL 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 "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment