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
3b30bfd1
Commit
3b30bfd1
authored
4 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
We can't pollute the namespace with curses everywhere.
Just rename ESCDELAY member to escdelay.
parent
6b956410
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/conio/ciolib.c
+2
-2
2 additions, 2 deletions
src/conio/ciolib.c
src/conio/ciolib.h
+1
-11
1 addition, 11 deletions
src/conio/ciolib.h
src/sbbs3/js_conio.c
+3
-3
3 additions, 3 deletions
src/sbbs3/js_conio.c
src/uifc/uifc32.c
+2
-2
2 additions, 2 deletions
src/uifc/uifc32.c
with
8 additions
and
18 deletions
src/conio/ciolib.c
+
2
−
2
View file @
3b30bfd1
...
...
@@ -286,7 +286,7 @@ static int try_curses_init(int mode)
cio_api
.
setvideoflags
=
curs_setvideoflags
;
cio_api
.
getvideoflags
=
curs_getvideoflags
;
#if defined(NCURSES_VERSION_MAJOR) || defined (__NetBSD__)
cio_api
.
ESCDELAY
=&
ESCDELAY
;
cio_api
.
escdelay
=&
ESCDELAY
;
#endif
cio_api
.
setfont
=
curs_setfont
;
cio_api
.
getfont
=
curs_getfont
;
...
...
@@ -319,7 +319,7 @@ static int try_ansi_init(int mode)
cio_api
.
setcursortype
=
ansi_setcursortype
;
cio_api
.
getch
=
ansi_getch
;
cio_api
.
textmode
=
ansi_textmode
;
cio_api
.
ESCDELAY
=&
CIOLIB_ANSI_TIMEOUT
;
cio_api
.
escdelay
=&
CIOLIB_ANSI_TIMEOUT
;
cio_api
.
beep
=
ansi_beep
;
cio_api
.
suspend
=
ansi_suspend
;
return
(
1
);
...
...
This diff is collapsed.
Click to expand it.
src/conio/ciolib.h
+
1
−
11
View file @
3b30bfd1
...
...
@@ -41,16 +41,6 @@
#include
"gen_defs.h"
#include
"utf8_codepages.h"
#ifndef _WIN32
/* This is included because it seems openSUSE Leap-15.2 apparently contains this:
* #define ESCDELAY _nc_ESCDELAY.
* which means we need to not set the ESCDELAY member (because we can't), or we
* need to rename the member to _nc_ESCDELAY. Do the second because it's very
* *very* slightly less stupid.
*/
#include
"curs_fix.h"
#endif
#ifdef CIOLIBEXPORT
#undef CIOLIBEXPORT
#endif
...
...
@@ -379,7 +369,7 @@ typedef struct {
int
(
*
getvideoflags
)
(
void
);
void
(
*
setscaling
)
(
int
new_value
);
int
(
*
getscaling
)
(
void
);
int
*
ESCDELAY
;
int
*
escdelay
;
int
(
*
setpalette
)
(
uint32_t
entry
,
uint16_t
r
,
uint16_t
g
,
uint16_t
b
);
int
(
*
attr2palette
)
(
uint8_t
attr
,
uint32_t
*
fg
,
uint32_t
*
bg
);
int
(
*
setpixel
)
(
uint32_t
x
,
uint32_t
y
,
uint32_t
colour
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/js_conio.c
+
3
−
3
View file @
3b30bfd1
...
...
@@ -101,7 +101,7 @@ static JSBool js_get(JSContext *cx, JSObject *obj, jsid id, jsval *vp)
*
vp
=
BOOLEAN_TO_JSVAL
(
cio_api
.
mouse
);
break
;
case
PROP_ESCDELAY
:
*
vp
=
INT_TO_JSVAL
(
cio_api
.
ESCDELAY
?*
cio_api
.
ESCDELAY
:
0
);
*
vp
=
INT_TO_JSVAL
(
cio_api
.
escdelay
?*
cio_api
.
escdelay
:
0
);
break
;
case
PROP_TEXTATTR
:
*
vp
=
INT_TO_JSVAL
(
cio_textinfo
.
attribute
);
...
...
@@ -185,8 +185,8 @@ static JSBool js_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval
JS_ValueToBoolean
(
cx
,
*
vp
,
&
puttext_can_move
);
break
;
case
PROP_ESCDELAY
:
if
(
cio_api
.
ESCDELAY
)
{
if
(
!
JS_ValueToInt32
(
cx
,
*
vp
,
(
int32
*
)
cio_api
.
ESCDELAY
))
if
(
cio_api
.
escdelay
)
{
if
(
!
JS_ValueToInt32
(
cx
,
*
vp
,
(
int32
*
)
cio_api
.
escdelay
))
return
JS_FALSE
;
}
break
;
...
...
This diff is collapsed.
Click to expand it.
src/uifc/uifc32.c
+
2
−
2
View file @
3b30bfd1
...
...
@@ -359,8 +359,8 @@ int UIFCCALL uifcini32(uifcapi_t* uifcapi)
if
(
api
->
esc_delay
<
10
)
api
->
esc_delay
=
25
;
if
(
cio_api
.
ESCDELAY
)
*
(
cio_api
.
ESCDELAY
)
=
api
->
esc_delay
;
if
(
cio_api
.
escdelay
)
*
(
cio_api
.
escdelay
)
=
api
->
esc_delay
;
for
(
i
=
0
;
i
<
MAX_BUFS
;
i
++
)
sav
[
i
].
buf
=
NULL
;
...
...
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