Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
b89511e3
Commit
b89511e3
authored
3 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Do the Zombie Shuffle
This is fine.
parent
90e94bf1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
xtrn/sbl/sbl2smb.c
+1
-33
1 addition, 33 deletions
xtrn/sbl/sbl2smb.c
xtrn/sbl/smb2sbl.c
+0
-37
0 additions, 37 deletions
xtrn/sbl/smb2sbl.c
with
1 addition
and
70 deletions
xtrn/sbl/sbl2smb.c
+
1
−
33
View file @
b89511e3
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
xtrn/sbl/smb2sbl.c
+
0
−
37
View file @
b89511e3
...
...
@@ -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 "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment