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
84a2b7e6
Commit
84a2b7e6
authored
17 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Make sbbslist work on *nix and add target in GNUmakefile
(not build by default though)
parent
2d26c022
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
xtrn/sbl/GNUmakefile
+4
-0
4 additions, 0 deletions
xtrn/sbl/GNUmakefile
xtrn/sbl/sbbslist.c
+33
-27
33 additions, 27 deletions
xtrn/sbl/sbbslist.c
xtrn/sbl/targets.mk
+1
-0
1 addition, 0 deletions
xtrn/sbl/targets.mk
with
38 additions
and
27 deletions
xtrn/sbl/GNUmakefile
+
4
−
0
View file @
84a2b7e6
...
...
@@ -42,3 +42,7 @@ $(SMB2SBL): $(OBJODIR)$(DIRSEP)smb2sbl$(OFILE)
$(SBLPACK)
:
$(OBJODIR)$(DIRSEP)sblpack$(OFILE)
@
echo
Linking
$@
$(
QUIET
)$(
CC
)
$(
LDFLAGS
)
$(
SMBLIB_LDFLAGS
)
$^
-o
$@
$(
XPDEV_LIBS
)
$(SBBSLIST)
:
$(OBJODIR)$(DIRSEP)sbbslist$(OFILE)
@
echo
Linking
$@
$(
QUIET
)$(
CC
)
$(
LDFLAGS
)
$(
SMBLIB_LDFLAGS
)
$^
-o
$@
$(
XPDEV_LIBS
)
This diff is collapsed.
Click to expand it.
xtrn/sbl/sbbslist.c
+
33
−
27
View file @
84a2b7e6
...
...
@@ -7,6 +7,8 @@
#include
"xsdk.h"
#include
"telnet.h"
#include
"sbldefs.h"
#include
"filewrap.h"
#include
"sockwrap.h"
char
*
wday
[]
=
{
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
};
char
*
mon
[]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
...
...
@@ -14,11 +16,10 @@ char *mon[]={"Jan","Feb","Mar","Apr","May","Jun"
char
*
nulstr
=
""
;
char
tmp
[
256
];
#ifdef _WIN32
extern
int
daylight
=
0
;
extern
long
timezone
=
0L
;
#undef ERROR_VALUE
#define ERROR_VALUE (GetLastError()-WSABASEERR)
#endif
#define SORT TRUE
#define VERIFY TRUE
...
...
@@ -53,18 +54,6 @@ int sort_cmp(sort_t **str1, sort_t **str2)
return
(((
*
str1
)
->
attempts
)
-
((
*
str2
)
->
attempts
));
}
/****************************************************************************/
/* Truncates white-space chars off end of 'str' */
/****************************************************************************/
void
truncsp
(
uchar
*
str
)
{
uint
c
;
c
=
strlen
(
str
);
while
(
c
&&
(
uchar
)
str
[
c
-
1
]
<=
' '
)
c
--
;
str
[
c
]
=
0
;
}
/****************************************************************************/
/* Generates a 24 character ASCII string that represents the time_t pointer */
/* Used as a replacement for ctime() */
...
...
@@ -103,14 +92,14 @@ char *timestr(time_t *intime)
/****************************************************************************/
/* Converts unix time format (long - time_t) into a char str MM/DD/YY */
/****************************************************************************/
char
*
unixtodstr
(
time_t
unix
,
char
*
str
)
char
*
unixtodstr
(
time_t
t
,
char
*
str
)
{
struct
tm
*
tm
;
if
(
!
unix
)
if
(
!
t
)
strcpy
(
str
,
"00/00/00"
);
else
{
tm
=
gmtime
(
&
unix
);
tm
=
gmtime
(
&
t
);
if
(
tm
==
NULL
)
strcpy
(
str
,
"00/00/00"
);
else
{
...
...
@@ -287,7 +276,7 @@ int telnet_negotiate(SOCKET sock, uchar* buf, int rd, int max_rd)
printf
(
"%02X "
,
rsp
[
i
]);
printf
(
"
\n
"
);
send
(
sock
,
rsp
,
rsplen
,
0
);
S
leep
(
3000
);
S
LEEP
(
3000
);
rd
=
recv
(
sock
,
buf
,
max_rd
,
0
);
}
while
(
rd
>
0
);
...
...
@@ -362,7 +351,7 @@ BOOL check_imsg_support(ulong ip_addr)
}
memset
(
&
addr
,
0
,
sizeof
(
addr
));
addr
.
sin_addr
.
S_un
.
S
_addr
=
ip_addr
;
addr
.
sin_addr
.
s
_addr
=
ip_addr
;
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
79
);
/* finger */
...
...
@@ -409,7 +398,7 @@ BOOL check_imsg_support(ulong ip_addr)
}
memset
(
&
addr
,
0
,
sizeof
(
addr
));
addr
.
sin_addr
.
S_un
.
S
_addr
=
ip_addr
;
addr
.
sin_addr
.
s
_addr
=
ip_addr
;
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
25
);
/* SMTP */
...
...
@@ -459,7 +448,7 @@ int main(int argc, char **argv)
ulong
total_systems
;
ulong
total_attempts
=
0
;
ulong
total_verified
=
0
;
FILE
*
in
,
*
shrt
,
*
lng
,
*
html
,
*
mail
;
FILE
*
in
,
*
shrt
,
*
lng
,
*
html
,
*
mail
,
*
syncterm
;
FILE
*
ibbs
;
ulong
ip_list
[
1000
];
ulong
ip_total
=
0
;
...
...
@@ -472,12 +461,14 @@ int main(int argc, char **argv)
SOCKET
sock
;
SOCKADDR_IN
addr
;
int
status
;
/* Status Code */
#ifdef _WIN32
WSADATA
WSAData
;
if
((
status
=
WSAStartup
(
MAKEWORD
(
1
,
1
),
&
WSAData
))
!=
0
)
{
printf
(
"!WinSock startup ERROR %d
\n
"
,
status
);
return
(
1
);
}
#endif
#if 0
if(_putenv("TZ=UCT0"))
...
...
@@ -486,7 +477,7 @@ int main(int argc, char **argv)
#endif
now
=
time
(
NULL
);
if
((
i
=
_
sopen
(
"
SBL.DAB
"
,
O_RDWR
|
O_BINARY
,
SH_DENYNO
,
S_IREAD
|
S_IWRITE
))
==-
1
)
{
if
((
i
=
sopen
(
"
sbl.dab
"
,
O_RDWR
|
O_BINARY
,
SH_DENYNO
,
S_IREAD
|
S_IWRITE
))
==-
1
)
{
printf
(
"error opening SBL.DAB
\n
"
);
return
(
1
);
}
...
...
@@ -494,11 +485,11 @@ int main(int argc, char **argv)
printf
(
"error opening SBL.DAB
\n
"
);
return
(
1
);
}
if
((
shrt
=
fopen
(
"
SBBS.LST
"
,
"wb"
))
==
NULL
)
{
if
((
shrt
=
fopen
(
"
sbbs.lst
"
,
"wb"
))
==
NULL
)
{
printf
(
"error opening/creating SBBS.LST
\n
"
);
return
(
1
);
}
if
((
lng
=
fopen
(
"
SBBS_DET.LST
"
,
"wb"
))
==
NULL
)
{
if
((
lng
=
fopen
(
"
sbbs_det.lst
"
,
"wb"
))
==
NULL
)
{
printf
(
"error opening/creating SBBS_DET.LST
\n
"
);
return
(
1
);
}
...
...
@@ -514,6 +505,10 @@ int main(int argc, char **argv)
printf
(
"error opening/creating sysop.lst
\n
"
);
return
(
1
);
}
if
((
syncterm
=
fopen
(
"syncterm.lst"
,
"w"
))
==
NULL
)
{
printf
(
"error opening/creating syncterm.lst
\n
"
);
return
(
1
);
}
fprintf
(
shrt
,
"Synchronet BBS List exported from Vertrauen on %s
\r\n
"
"======================================================="
"
\r\n\r\n
"
...
...
@@ -720,7 +715,7 @@ int main(int argc, char **argv)
}
memset
(
&
addr
,
0
,
sizeof
(
addr
));
addr
.
sin_addr
.
S_un
.
S
_addr
=
ip_addr
;
addr
.
sin_addr
.
s
_addr
=
ip_addr
;
addr
.
sin_family
=
AF_INET
;
addr
.
sin_port
=
htons
(
telnet_port
);
...
...
@@ -730,7 +725,7 @@ int main(int argc, char **argv)
else
{
l
=
1
;
ioctlsocket
(
sock
,
FIONBIO
,
&
l
);
S
leep
(
3000
);
S
LEEP
(
3000
);
buf
[
0
]
=
0
;
rd
=
recv
(
sock
,
buf
,
sizeof
(
buf
)
-
1
,
0
);
...
...
@@ -798,6 +793,13 @@ int main(int argc, char **argv)
else
sprintf
(
telnet_portstr
,
":%d"
,
telnet_port
);
if
(
verified
&&
i
==
0
)
{
fprintf
(
syncterm
,
"[%s]
\n
ConnectionType=Telnet
\n
Port=%d
\n
Address=%s
\n\n
"
,
bbs
.
name
,
telnet_port
,
telnet_addr
);
}
fprintf
(
html
,
"<TD><B>%s%s</B><TD>%s%s<TD>%s%s<TD>%s%s<TD%s>"
"<A HREF=telnet://%s%s>%s%s%s%s%s</A><TD%s>%s%s
\n
"
,
fontstr
,
i
?
""
:
name
...
...
@@ -812,6 +814,10 @@ int main(int argc, char **argv)
,
i
?
" BGCOLOR=
\"
#EEEEEE
\"
"
:
""
,
fontstr
,
verify_result
);
}
else
fprintf
(
syncterm
,
"[%s (%s)]
\n
ConnectionType=Modem
\n
Address=1-%s
\n\n
"
,
bbs
.
name
,
bbs
.
number
[
i
].
modem
.
number
,
bbs
.
number
[
i
].
modem
.
number
);
fprintf
(
html
,
"<TD><B>%s%s</B><TD>%s%s<TD>%s%s<TD>%s%s<TD%s>%s%s"
"<TD%s>%s%s
\n
"
,
fontstr
,
i
?
""
:
name
...
...
This diff is collapsed.
Click to expand it.
xtrn/sbl/targets.mk
+
1
−
0
View file @
84a2b7e6
...
...
@@ -2,6 +2,7 @@ SBL = $(EXEODIR)$(DIRSEP)sbl$(EXEFILE)
SBL2SMB
=
$(
EXEODIR
)$(
DIRSEP
)
sbl2smb
$(
EXEFILE
)
SMB2SBL
=
$(
EXEODIR
)$(
DIRSEP
)
smb2sbl
$(
EXEFILE
)
SBLPACK
=
$(
EXEODIR
)$(
DIRSEP
)
sblpack
$(
EXEFILE
)
SBBSLIST
=
$(
EXEODIR
)$(
DIRSEP
)
sbbslist
$(
EXEFILE
)
all
:
xpdev xpdev-mt smblib $(EXEODIR) $(MTOBJODIR) $(OBJODIR)
\
$(SBL) $(SBL2SMB) $(SMB2SBL) $(SBLPACK)
...
...
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