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
874f1ff7
Commit
874f1ff7
authored
14 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Fixes per Marcin Cieslak (Saper)
Thanks!
parent
f9688d0e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/xpdoor/objects.mk
+1
-0
1 addition, 0 deletions
src/xpdoor/objects.mk
src/xpdoor/xpdoor.c
+8
-6
8 additions, 6 deletions
src/xpdoor/xpdoor.c
src/xpdoor/xpdoor.h
+2
-2
2 additions, 2 deletions
src/xpdoor/xpdoor.h
with
11 additions
and
8 deletions
src/xpdoor/objects.mk
+
1
−
0
View file @
874f1ff7
OBJS
=
\
OBJS
=
\
$(
MTOBJODIR
)$(
DIRSEP
)
comio
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
comio
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
dropfiles
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
telnet
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
telnet
$(
OFILE
)
\
$(
MTOBJODIR
)$(
DIRSEP
)
xpdoor
$(
OFILE
)
$(
MTOBJODIR
)$(
DIRSEP
)
xpdoor
$(
OFILE
)
...
...
This diff is collapsed.
Click to expand it.
src/xpdoor/xpdoor.c
+
8
−
6
View file @
874f1ff7
...
@@ -57,12 +57,12 @@ static int xpd_ansi_readbyte_cb(void)
...
@@ -57,12 +57,12 @@ static int xpd_ansi_readbyte_cb(void)
return
(
-
2
);
return
(
-
2
);
}
}
static
int
dummy_writebyte_cb
(
unsigned
char
ch
)
static
int
dummy_writebyte_cb
(
const
unsigned
char
ch
)
{
{
return
(
ch
);
return
(
ch
);
}
}
static
int
xpd_ansi_writebyte_cb
(
unsigned
char
ch
)
static
int
xpd_ansi_writebyte_cb
(
const
unsigned
char
ch
)
{
{
switch
(
xpd_info
.
io_type
)
{
switch
(
xpd_info
.
io_type
)
{
case
XPD_IO_STDIO
:
case
XPD_IO_STDIO
:
...
@@ -116,7 +116,7 @@ static int xpd_ansi_initio_cb(void)
...
@@ -116,7 +116,7 @@ static int xpd_ansi_initio_cb(void)
return
(
0
);
return
(
0
);
}
}
static
int
xpd_ansi_writestr_cb
(
unsigned
char
*
str
,
size_t
len
)
static
int
xpd_ansi_writestr_cb
(
const
unsigned
char
*
str
,
size_t
len
)
{
{
int
i
;
int
i
;
...
@@ -128,7 +128,7 @@ static int xpd_ansi_writestr_cb(unsigned char *str, size_t len)
...
@@ -128,7 +128,7 @@ static int xpd_ansi_writestr_cb(unsigned char *str, size_t len)
case
XPD_IO_SOCKET
:
case
XPD_IO_SOCKET
:
case
XPD_IO_TELNET
:
case
XPD_IO_TELNET
:
for
(
i
=
0
;
i
<
len
;
i
++
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
xpd_ansi_writebyte_cb
(
(
unsigned
char
)
str
[
i
])
<
0
)
if
(
xpd_ansi_writebyte_cb
(
str
[
i
])
<
0
)
return
(
-
2
);
return
(
-
2
);
}
}
}
}
...
@@ -166,7 +166,7 @@ void xpd_parse_cmdline(int argc, char **argv)
...
@@ -166,7 +166,7 @@ void xpd_parse_cmdline(int argc, char **argv)
}
}
}
}
int
xpd_exit
()
void
xpd_exit
()
{
{
if
(
xpd_info
.
doorway_mode
)
if
(
xpd_info
.
doorway_mode
)
ansi_ciolib_setdoorway
(
0
);
ansi_ciolib_setdoorway
(
0
);
...
@@ -190,9 +190,10 @@ int xpd_init()
...
@@ -190,9 +190,10 @@ int xpd_init()
}
}
gettextinfo
(
&
ti
);
gettextinfo
(
&
ti
);
cterm_init
(
ti
.
screenheight
,
ti
.
screenwidth
,
1
,
1
,
0
,
NULL
,
CTERM_EMULATION_ANSI_BBS
);
cterm_init
(
ti
.
screenheight
,
ti
.
screenwidth
,
1
,
1
,
0
,
NULL
,
CTERM_EMULATION_ANSI_BBS
);
return
0
;
}
}
int
xpd_doorway
(
int
enable
)
void
xpd_doorway
(
int
enable
)
{
{
xpd_info
.
doorway_mode
=
enable
;
xpd_info
.
doorway_mode
=
enable
;
ansi_ciolib_setdoorway
(
enable
);
ansi_ciolib_setdoorway
(
enable
);
...
@@ -228,4 +229,5 @@ int xpd_rwrite(const char *data, int data_len)
...
@@ -228,4 +229,5 @@ int xpd_rwrite(const char *data, int data_len)
/* Re-enable ciolib output */
/* Re-enable ciolib output */
ciolib_ansi_writebyte_cb
=
xpd_ansi_writebyte_cb
;
ciolib_ansi_writebyte_cb
=
xpd_ansi_writebyte_cb
;
return
0
;
}
}
This diff is collapsed.
Click to expand it.
src/xpdoor/xpdoor.h
+
2
−
2
View file @
874f1ff7
...
@@ -114,12 +114,12 @@ void xpd_parse_cmdline(int argc, char **argv);
...
@@ -114,12 +114,12 @@ void xpd_parse_cmdline(int argc, char **argv);
/*
/*
* Initialize (turns on Doorway mode)
* Initialize (turns on Doorway mode)
*/
*/
int
xpd_init
();
int
xpd_init
(
void
);
/*
/*
* Exit (turns off Doorway mode)
* Exit (turns off Doorway mode)
*/
*/
int
xpd_exit
(
void
);
void
xpd_exit
(
void
);
/*
/*
* Parse dropfile
* Parse dropfile
...
...
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