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
6a051e81
Commit
6a051e81
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Eliminated use of ungetch() in favor of ungetkey()
Made client_socket global.
parent
0abda651
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xtrn/sdk/xsdk.c
+12
-10
12 additions, 10 deletions
xtrn/sdk/xsdk.c
with
12 additions
and
10 deletions
xtrn/sdk/xsdk.c
+
12
−
10
View file @
6a051e81
...
...
@@ -204,6 +204,13 @@
programs. Use atexit() to add cleanup code.
3.01
Eliminated warnings in ctrl_a() when compiled with VC++ 6.0.
Added Linux/GCC support (xsdkwrap.c, xsdkwrap.h, and xsdkinet.h)
3.10
Added COMPILER_DESC and PLATFORM_DESC macros to xsdkwrap.h
Added support for no local console (XSDK_MODE_NOCONSOLE)
- This is now the default mode when building 32-bit programs
Eliminated use of ungetch() in favor of ungetkey() - more secure
3.11
\****************************************************************************/
...
...
@@ -213,15 +220,9 @@
WSADATA
WSAData
;
// WinSock data
#endif
char
*
xsdk_ver
=
"3.1
0
"
;
char
*
xsdk_ver
=
"3.1
1
"
;
ulong
xsdk_mode
=
XSDK_MODE_NOCONSOLE
;
#ifndef __16BIT__
/* Sockets */
SOCKET
client_socket
=
INVALID_SOCKET
;
#endif
/****************************************************************************/
/* This allows users to abort the listing of text by using Ctrl-C */
/****************************************************************************/
...
...
@@ -559,7 +560,7 @@ char inkey(long mode)
ch
=
keybuf
[
keybufbot
++
];
if
(
keybufbot
==
KEY_BUFSIZE
)
keybufbot
=
0
;
}
else
if
(
kbhit
())
{
else
if
(
!
(
xsdk_mode
&
XSDK_MODE_NOCONSOLE
)
&&
kbhit
())
{
i
=
getch
();
#ifdef __unix__
if
(
i
==
LF
)
i
=
CR
;
/* Enter key returns Ctrl-J on Unix! (ohmygod) */
...
...
@@ -1151,7 +1152,7 @@ int getstr(char *strout, size_t maxlen, long mode)
if
(
!
(
user_misc
&
ANSI
))
break
;
if
((
ch
=
getkey
(
0x8000
))
!=
'['
)
{
unget
ch
(
ch
);
unget
key
(
ch
);
break
;
}
if
((
ch
=
getkey
(
0x8000
))
==
'C'
)
{
...
...
@@ -1174,7 +1175,7 @@ int getstr(char *strout, size_t maxlen, long mode)
}
ch
=
getkey
(
0
);
}
unget
ch
(
ch
);
unget
key
(
ch
);
}
break
;
default:
...
...
@@ -1635,6 +1636,7 @@ void initdata(void)
#ifdef _WINSOCKAPI_
WSAStartup
(
MAKEWORD
(
1
,
1
),
&
WSAData
);
client_socket
=
INVALID_SOCKET
;
#endif
#ifdef __WATCOMC__
...
...
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