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
eb6f0e3b
Commit
eb6f0e3b
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added programmable escape delay and forced IBM-charset (by Deuce).
parent
4312181c
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
src/sbbs3/scfg/scfg.c
+14
-2
14 additions, 2 deletions
src/sbbs3/scfg/scfg.c
src/uifc/uifc.h
+5
-0
5 additions, 0 deletions
src/uifc/uifc.h
src/uifc/uifcc.c
+177
-164
177 additions, 164 deletions
src/uifc/uifcc.c
with
196 additions
and
166 deletions
src/sbbs3/scfg/scfg.c
+
14
−
2
View file @
eb6f0e3b
...
@@ -90,6 +90,8 @@ int main(int argc, char **argv)
...
@@ -90,6 +90,8 @@ int main(int argc, char **argv)
else
else
getcwd
(
cfg
.
ctrl_dir
,
sizeof
(
cfg
.
ctrl_dir
));
getcwd
(
cfg
.
ctrl_dir
,
sizeof
(
cfg
.
ctrl_dir
));
uifc
.
esc_delay
=
25
;
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
argv
[
i
][
0
]
==
'-'
if
(
argv
[
i
][
0
]
==
'-'
#ifndef __unix__
#ifndef __unix__
...
@@ -126,11 +128,17 @@ int main(int argc, char **argv)
...
@@ -126,11 +128,17 @@ int main(int argc, char **argv)
case
'L'
:
case
'L'
:
uifc
.
scrn_len
=
atoi
(
argv
[
i
]
+
2
);
uifc
.
scrn_len
=
atoi
(
argv
[
i
]
+
2
);
break
;
break
;
#if !defined(__unix__)
case
'E'
:
uifc
.
esc_delay
=
atoi
(
argv
[
i
]
+
2
);
break
;
case
'I'
:
uifc
.
mode
|=
UIFC_IBM
;
break
;
case
'V'
:
case
'V'
:
#if !defined(__unix__)
textmode
(
atoi
(
argv
[
i
]
+
2
));
textmode
(
atoi
(
argv
[
i
]
+
2
));
break
;
#endif
#endif
break
;
default:
default:
printf
(
"
\n
usage: scfg [ctrl_dir] [options]"
printf
(
"
\n
usage: scfg [ctrl_dir] [options]"
"
\n\n
options:
\n\n
"
"
\n\n
options:
\n\n
"
...
@@ -140,6 +148,10 @@ int main(int argc, char **argv)
...
@@ -140,6 +148,10 @@ int main(int argc, char **argv)
"-h = don't update message base status headers
\r\n
"
"-h = don't update message base status headers
\r\n
"
"-d = run in standard input/output/door mode
\r\n
"
"-d = run in standard input/output/door mode
\r\n
"
"-c = force color mode
\r\n
"
"-c = force color mode
\r\n
"
#ifdef USE_CURSES
"-e# = set escape delay to #msec
\r\n
"
"-i = force IBM charset
\r\n
"
#endif
#if !defined(__unix__)
#if !defined(__unix__)
"-v# = set video mode to #
\r\n
"
"-v# = set video mode to #
\r\n
"
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
src/uifc/uifc.h
+
5
−
0
View file @
eb6f0e3b
...
@@ -143,6 +143,7 @@
...
@@ -143,6 +143,7 @@
#define UIFC_MOUSE (1<<1)
/* Mouse installed and available */
#define UIFC_MOUSE (1<<1)
/* Mouse installed and available */
#define UIFC_MONO (1<<2)
/* Force monochrome mode */
#define UIFC_MONO (1<<2)
/* Force monochrome mode */
#define UIFC_COLOR (1<<3)
/* Force color mode */
#define UIFC_COLOR (1<<3)
/* Force color mode */
#define UIFC_IBM (1<<4)
/* Force use of IBM charset */
/* Bits in uifcapi_t.list mode */
/* Bits in uifcapi_t.list mode */
#define WIN_ORG (1<<0)
/* Original menu - destroy valid screen area */
#define WIN_ORG (1<<0)
/* Original menu - destroy valid screen area */
...
@@ -262,6 +263,10 @@ typedef struct {
...
@@ -262,6 +263,10 @@ typedef struct {
/****************************************************************************/
/****************************************************************************/
uint
scrn_len
;
uint
scrn_len
;
/****************************************************************************/
/****************************************************************************/
/* ESC key delay for curses */
/****************************************************************************/
uint
esc_delay
;
/****************************************************************************/
/* Alternative method of setting current help text. */
/* Alternative method of setting current help text. */
/****************************************************************************/
/****************************************************************************/
char
*
helpbuf
;
char
*
helpbuf
;
...
...
This diff is collapsed.
Click to expand it.
src/uifc/uifcc.c
+
177
−
164
View file @
eb6f0e3b
...
@@ -86,7 +86,7 @@ enum {
...
@@ -86,7 +86,7 @@ enum {
#define SH_DENYRW 2
#define SH_DENYRW 2
#define O_BINARY 0
#define O_BINARY 0
static
char
hclr
,
lclr
,
bclr
,
cclr
,
show_free_mem
=
0
;
static
char
hfclr
,
hbclr
,
hclr
,
lclr
,
bclr
,
cclr
,
show_free_mem
=
0
;
static
char
*
helpfile
=
0
;
static
char
*
helpfile
=
0
;
static
uint
helpline
=
0
;
static
uint
helpline
=
0
;
static
char
blk_scrn
[
MAX_BFLN
];
static
char
blk_scrn
[
MAX_BFLN
];
...
@@ -174,6 +174,7 @@ int uifcinic(uifcapi_t* uifcapi)
...
@@ -174,6 +174,7 @@ int uifcinic(uifcapi_t* uifcapi)
keypad
(
stdscr
,
TRUE
);
keypad
(
stdscr
,
TRUE
);
scrollok
(
stdscr
,
FALSE
);
scrollok
(
stdscr
,
FALSE
);
raw
();
raw
();
ESCDELAY
=
api
->
esc_delay
;
// Set up color pairs
// Set up color pairs
for
(
bg
=
0
;
bg
<
8
;
bg
++
)
{
for
(
bg
=
0
;
bg
<
8
;
bg
++
)
{
...
@@ -181,6 +182,7 @@ int uifcinic(uifcapi_t* uifcapi)
...
@@ -181,6 +182,7 @@ int uifcinic(uifcapi_t* uifcapi)
init_pair
(
++
pair
,
curses_color
(
fg
),
curses_color
(
bg
));
init_pair
(
++
pair
,
curses_color
(
fg
),
curses_color
(
bg
));
}
}
}
}
clear
();
clear
();
refresh
();
refresh
();
getmaxyx
(
stdscr
,
height
,
width
);
getmaxyx
(
stdscr
,
height
,
width
);
...
@@ -222,11 +224,15 @@ int uifcinic(uifcapi_t* uifcapi)
...
@@ -222,11 +224,15 @@ int uifcinic(uifcapi_t* uifcapi)
hclr
=
WHITE
;
hclr
=
WHITE
;
lclr
=
LIGHTGRAY
;
lclr
=
LIGHTGRAY
;
cclr
=
LIGHTGRAY
;
cclr
=
LIGHTGRAY
;
hbclr
=
BLACK
;
/* Highlight Background Colour */
hfclr
=
WHITE
;
/* Highlight Foreground Colour */
}
else
{
}
else
{
bclr
=
BLUE
;
bclr
=
BLUE
;
hclr
=
YELLOW
;
hclr
=
YELLOW
;
lclr
=
WHITE
;
lclr
=
WHITE
;
cclr
=
CYAN
;
cclr
=
CYAN
;
hbclr
=
LIGHTGRAY
;
hfclr
=
YELLOW
;
}
}
for
(
i
=
0
;
i
<
MAX_BFLN
;
i
+=
2
)
{
for
(
i
=
0
;
i
<
MAX_BFLN
;
i
+=
2
)
{
blk_scrn
[
i
]
=
''
;
blk_scrn
[
i
]
=
''
;
...
@@ -538,7 +544,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -538,7 +544,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
*
(
ptr
++
)
=
''
;
*
(
ptr
++
)
=
''
;
*
(
ptr
++
)
=
lclr
|
(
bclr
<<
4
);
*
(
ptr
++
)
=
lclr
|
(
bclr
<<
4
);
if
(
i
==
(
*
cur
))
if
(
i
==
(
*
cur
))
a
=
b
clr
|
(
LIGHTGRAY
<<
4
);
a
=
hf
clr
|
(
hbclr
<<
4
);
else
else
a
=
lclr
|
(
bclr
<<
4
);
a
=
lclr
|
(
bclr
<<
4
);
b
=
strlen
(
option
[
i
]);
b
=
strlen
(
option
[
i
]);
...
@@ -613,7 +619,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -613,7 +619,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
if
(
inkey
(
1
))
{
if
(
inkey
(
1
))
{
i
=
inkey
(
0
);
i
=
inkey
(
0
);
if
(
i
==
KEY_BACKSPACE
)
if
(
i
==
KEY_BACKSPACE
||
i
==
BS
)
i
=
ESC
;
i
=
ESC
;
if
(
i
>
255
)
{
if
(
i
>
255
)
{
s
=
0
;
s
=
0
;
...
@@ -630,7 +636,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -630,7 +636,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gotoxy
(
SCRN_LEFT
+
left
+
1
,
SCRN_TOP
+
top
+
height
-
2
);
gotoxy
(
SCRN_LEFT
+
left
+
1
,
SCRN_TOP
+
top
+
height
-
2
);
putch
(
31
);
/* put the down arrow */
putch
(
31
);
/* put the down arrow */
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
,
b
clr
|
(
LIGHTGRAY
<<
4
)
,
hf
clr
|
(
hbclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
0
]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
0
]);
for
(
i
=
1
;
i
<
height
-
4
;
i
++
)
/* re-display options */
for
(
i
=
1
;
i
<
height
-
4
;
i
++
)
/* re-display options */
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
i
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
i
...
@@ -656,7 +662,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -656,7 +662,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
line
[
i
]
=
b
clr
|
(
LIGHTGRAY
<<
4
);
line
[
i
]
=
hf
clr
|
(
hbclr
<<
4
);
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
showmouse
();
showmouse
();
...
@@ -673,7 +679,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -673,7 +679,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
putch
(
' '
);
/* delete the down arrow */
putch
(
' '
);
/* delete the down arrow */
for
(
i
=
(
opts
+
4
)
-
height
,
j
=
0
;
i
<
opts
;
i
++
,
j
++
)
for
(
i
=
(
opts
+
4
)
-
height
,
j
=
0
;
i
<
opts
;
i
++
,
j
++
)
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
j
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
j
,
i
==
opts
-
1
?
b
clr
|
(
LIGHTGRAY
<<
4
)
,
i
==
opts
-
1
?
hf
clr
|
(
hbclr
<<
4
)
:
lclr
|
(
bclr
<<
4
)
:
lclr
|
(
bclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
i
]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
i
]);
(
*
cur
)
=
opts
-
1
;
(
*
cur
)
=
opts
-
1
;
...
@@ -714,7 +720,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -714,7 +720,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
scroll_text
(
SCRN_LEFT
+
left
+
2
,
SCRN_TOP
+
top
+
3
scroll_text
(
SCRN_LEFT
+
left
+
2
,
SCRN_TOP
+
top
+
3
,
SCRN_LEFT
+
left
+
width
-
3
,
SCRN_TOP
+
top
+
height
-
2
,
1
);
,
SCRN_LEFT
+
left
+
width
-
3
,
SCRN_TOP
+
top
+
height
-
2
,
1
);
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
,
b
clr
|
(
LIGHTGRAY
<<
4
)
,
hf
clr
|
(
hbclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
*
cur
]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
*
cur
]);
showmouse
();
}
showmouse
();
}
else
{
else
{
...
@@ -722,7 +728,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -722,7 +728,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
line
[
i
]
=
b
clr
|
(
LIGHTGRAY
<<
4
);
line
[
i
]
=
hf
clr
|
(
hbclr
<<
4
);
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
showmouse
();
}
showmouse
();
}
...
@@ -746,7 +752,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -746,7 +752,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
for(i=(opts+4)-height,j=0;i<opts;i++,j++)
for(i=(opts+4)-height,j=0;i<opts;i++,j++)
uprintf(SCRN_LEFT+left+3,SCRN_TOP+top+3+j
uprintf(SCRN_LEFT+left+3,SCRN_TOP+top+3+j
,i==(*cur)
b
clr|(
LIGHTGRAY
<<4) : lclr|(bclr<<4)
,i==(*cur)
hf
clr|(
hbclr
<<4) : lclr|(bclr<<4)
,"%-*.*s",width-4,width-4,option[i]);
,"%-*.*s",width-4,width-4,option[i]);
y=top+height-2;
y=top+height-2;
if(bar)
if(bar)
...
@@ -754,7 +760,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -754,7 +760,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gettext(SCRN_LEFT+3+left,SCRN_TOP+y
gettext(SCRN_LEFT+3+left,SCRN_TOP+y
,SCRN_LEFT+left+width-2,SCRN_TOP+y,line);
,SCRN_LEFT+left+width-2,SCRN_TOP+y,line);
for(i=1;i<148;i+=2)
for(i=1;i<148;i+=2)
line[i]=
b
clr|(
LIGHTGRAY
<<4);
line[i]=
hf
clr|(
hbclr
<<4);
puttext(SCRN_LEFT+3+left,SCRN_TOP+y
puttext(SCRN_LEFT+3+left,SCRN_TOP+y
,SCRN_LEFT+left+width-2,SCRN_TOP+y,line);
,SCRN_LEFT+left+width-2,SCRN_TOP+y,line);
showmouse();
showmouse();
...
@@ -772,7 +778,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -772,7 +778,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
putch
(
' '
);
/* delete the down arrow */
putch
(
' '
);
/* delete the down arrow */
for
(
i
=
(
opts
+
4
)
-
height
,
j
=
0
;
i
<
opts
;
i
++
,
j
++
)
for
(
i
=
(
opts
+
4
)
-
height
,
j
=
0
;
i
<
opts
;
i
++
,
j
++
)
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
j
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
j
,
i
==
opts
-
1
?
b
clr
|
(
LIGHTGRAY
<<
4
)
,
i
==
opts
-
1
?
hf
clr
|
(
hbclr
<<
4
)
:
lclr
|
(
bclr
<<
4
)
:
lclr
|
(
bclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
i
]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
i
]);
(
*
cur
)
=
opts
-
1
;
(
*
cur
)
=
opts
-
1
;
...
@@ -795,7 +801,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -795,7 +801,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
for
(
i
=
1
;
i
<
148
;
i
+=
2
)
for
(
i
=
1
;
i
<
148
;
i
+=
2
)
line
[
i
]
=
b
clr
|
(
LIGHTGRAY
<<
4
);
line
[
i
]
=
hf
clr
|
(
hbclr
<<
4
);
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
showmouse
();
showmouse
();
...
@@ -811,7 +817,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -811,7 +817,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gotoxy
(
SCRN_LEFT
+
left
+
1
,
SCRN_TOP
+
top
+
height
-
2
);
gotoxy
(
SCRN_LEFT
+
left
+
1
,
SCRN_TOP
+
top
+
height
-
2
);
putch
(
31
);
/* put the down arrow */
putch
(
31
);
/* put the down arrow */
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
,
b
clr
|
(
LIGHTGRAY
<<
4
)
,
hf
clr
|
(
hbclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
0
]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
0
]);
for
(
i
=
1
;
i
<
height
-
4
;
i
++
)
/* re-display options */
for
(
i
=
1
;
i
<
height
-
4
;
i
++
)
/* re-display options */
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
i
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
i
...
@@ -859,7 +865,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -859,7 +865,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
,
SCRN_LEFT
+
left
+
width
-
3
,
SCRN_TOP
+
top
+
height
-
2
,
0
);
,
SCRN_LEFT
+
left
+
width
-
3
,
SCRN_TOP
+
top
+
height
-
2
,
0
);
/* gotoxy(1,1); cprintf("\rdebug: %4d ",__LINE__); */
/* gotoxy(1,1); cprintf("\rdebug: %4d ",__LINE__); */
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
height
-
2
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
height
-
2
,
b
clr
|
(
LIGHTGRAY
<<
4
)
,
hf
clr
|
(
hbclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
*
cur
]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
*
cur
]);
showmouse
();
}
showmouse
();
}
else
{
else
{
...
@@ -868,7 +874,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -868,7 +874,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
line
);
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
line
[
i
]
=
b
clr
|
(
LIGHTGRAY
<<
4
);
line
[
i
]
=
hf
clr
|
(
hbclr
<<
4
);
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
line
);
...
@@ -954,7 +960,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -954,7 +960,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
putch
(
' '
);
}
/* delete the down arrow */
putch
(
' '
);
}
/* delete the down arrow */
for
(
i
=
((
*
cur
)
+
5
)
-
height
,
j
=
0
;
i
<
(
*
cur
)
+
1
;
i
++
,
j
++
)
for
(
i
=
((
*
cur
)
+
5
)
-
height
,
j
=
0
;
i
<
(
*
cur
)
+
1
;
i
++
,
j
++
)
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
j
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
j
,
i
==
(
*
cur
)
?
b
clr
|
(
LIGHTGRAY
<<
4
)
,
i
==
(
*
cur
)
?
hf
clr
|
(
hbclr
<<
4
)
:
lclr
|
(
bclr
<<
4
)
:
lclr
|
(
bclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
i
]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[
i
]);
y
=
top
+
height
-
2
;
y
=
top
+
height
-
2
;
...
@@ -970,7 +976,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -970,7 +976,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gotoxy
(
SCRN_LEFT
+
left
+
1
,
SCRN_TOP
+
top
+
height
-
2
);
gotoxy
(
SCRN_LEFT
+
left
+
1
,
SCRN_TOP
+
top
+
height
-
2
);
putch
(
31
);
/* put the down arrow */
putch
(
31
);
/* put the down arrow */
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
,
b
clr
|
(
LIGHTGRAY
<<
4
)
,
hf
clr
|
(
hbclr
<<
4
)
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[(
*
cur
)]);
,
"%-*.*s"
,
width
-
4
,
width
-
4
,
option
[(
*
cur
)]);
for
(
i
=
1
;
i
<
height
-
4
;
i
++
)
/* re-display options */
for
(
i
=
1
;
i
<
height
-
4
;
i
++
)
/* re-display options */
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
i
uprintf
(
SCRN_LEFT
+
left
+
3
,
SCRN_TOP
+
top
+
3
+
i
...
@@ -1001,7 +1007,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
...
@@ -1001,7 +1007,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
gettext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
for
(
i
=
1
;
i
<
width
*
2
;
i
+=
2
)
line
[
i
]
=
b
clr
|
(
LIGHTGRAY
<<
4
);
line
[
i
]
=
hf
clr
|
(
hbclr
<<
4
);
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
puttext
(
SCRN_LEFT
+
3
+
left
,
SCRN_TOP
+
y
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
,
SCRN_LEFT
+
left
+
width
-
2
,
SCRN_TOP
+
y
,
line
);
showmouse
();
showmouse
();
...
@@ -1191,7 +1197,7 @@ static int ugetstr(char *outstr, int max, long mode)
...
@@ -1191,7 +1197,7 @@ static int ugetstr(char *outstr, int max, long mode)
truncsp(outstr);
truncsp(outstr);
***/
***/
outstr
[
max
]
=
0
;
outstr
[
max
]
=
0
;
textattr
(
b
clr
|
(
LIGHTGRAY
<<
4
));
textattr
(
hf
clr
|
(
hbclr
<<
4
));
cputs
(
outstr
);
cputs
(
outstr
);
textattr
(
lclr
|
(
bclr
<<
4
));
textattr
(
lclr
|
(
bclr
<<
4
));
strcpy
(
str
,
outstr
);
strcpy
(
str
,
outstr
);
...
@@ -1321,7 +1327,7 @@ static int ugetstr(char *outstr, int max, long mode)
...
@@ -1321,7 +1327,7 @@ static int ugetstr(char *outstr, int max, long mode)
j
--
;
j
--
;
}
}
continue
;
continue
;
case
0
3
:
case
3
:
case
ESC
:
case
ESC
:
{
{
curs_set
(
0
);
curs_set
(
0
);
...
@@ -1441,8 +1447,8 @@ void bottomline(int line)
...
@@ -1441,8 +1447,8 @@ void bottomline(int line)
i
+=
4
;
i
+=
4
;
uprintf
(
i
,
api
->
scrn_len
+
1
,
BLACK
|
(
cclr
<<
4
),
"Delete Item "
);
uprintf
(
i
,
api
->
scrn_len
+
1
,
BLACK
|
(
cclr
<<
4
),
"Delete Item "
);
i
+=
13
;
}
i
+=
13
;
}
uprintf
(
i
,
api
->
scrn_len
+
1
,
bclr
|
(
cclr
<<
4
),
"
BACKSP "
);
uprintf
(
i
,
api
->
scrn_len
+
1
,
bclr
|
(
cclr
<<
4
),
"
ESC "
);
/* Backspace is no good no way to abort editing */
i
+=
7
;
i
+=
4
;
uprintf
(
i
,
api
->
scrn_len
+
1
,
BLACK
|
(
cclr
<<
4
),
"Exit"
);
uprintf
(
i
,
api
->
scrn_len
+
1
,
BLACK
|
(
cclr
<<
4
),
"Exit"
);
i
+=
4
;
i
+=
4
;
gotoxy
(
i
,
api
->
scrn_len
+
1
);
gotoxy
(
i
,
api
->
scrn_len
+
1
);
...
@@ -1794,7 +1800,7 @@ static int gettext(int sx, int sy, int ex, int ey, unsigned char *fill)
...
@@ -1794,7 +1800,7 @@ static int gettext(int sx, int sy, int ex, int ey, unsigned char *fill)
for
(
x
=
sx
-
1
;
x
<=
ex
-
1
;
x
++
)
for
(
x
=
sx
-
1
;
x
<=
ex
-
1
;
x
++
)
{
{
attr
=
mvinch
(
y
,
x
);
attr
=
mvinch
(
y
,
x
);
if
(
attr
&
A_ALTCHARSET
){
if
(
attr
&
A_ALTCHARSET
&&
!
(
api
->
mode
&
UIFC_IBM
)
){
ext_char
=
A_ALTCHARSET
|
(
attr
&
255
);
ext_char
=
A_ALTCHARSET
|
(
attr
&
255
);
/* likely ones */
/* likely ones */
if
(
ext_char
==
ACS_CKBOARD
)
if
(
ext_char
==
ACS_CKBOARD
)
...
@@ -2064,148 +2070,155 @@ static void _putch(unsigned char ch, BOOL refresh_now)
...
@@ -2064,148 +2070,155 @@ static void _putch(unsigned char ch, BOOL refresh_now)
{
{
int
cha
;
int
cha
;
switch
(
ch
)
if
(
!
(
api
->
mode
&
UIFC_IBM
)
)
{
{
case
30
:
switch
(
ch
)
cha
=
ACS_UARROW
;
{
break
;
case
30
:
case
31
:
cha
=
ACS_UARROW
;
cha
=
ACS_DARROW
;
break
;
break
;
case
31
:
case
176
:
cha
=
ACS_DARROW
;
cha
=
ACS_CKBOARD
;
break
;
break
;
case
176
:
case
177
:
cha
=
ACS_CKBOARD
;
cha
=
ACS_BOARD
;
break
;
break
;
case
177
:
case
178
:
cha
=
ACS_BOARD
;
cha
=
ACS_BOARD
;
break
;
break
;
case
178
:
case
179
:
cha
=
ACS_BOARD
;
cha
=
ACS_SBSB
;
break
;
break
;
case
179
:
case
180
:
cha
=
ACS_SBSB
;
cha
=
ACS_SBSS
;
break
;
break
;
case
180
:
case
181
:
cha
=
ACS_SBSS
;
cha
=
ACS_SBSD
;
break
;
break
;
case
181
:
case
182
:
cha
=
ACS_SBSD
;
cha
=
ACS_DBDS
;
break
;
break
;
case
182
:
case
183
:
cha
=
ACS_DBDS
;
cha
=
ACS_BBDS
;
break
;
break
;
case
183
:
case
184
:
cha
=
ACS_BBDS
;
cha
=
ACS_BBSD
;
break
;
break
;
case
184
:
case
185
:
cha
=
ACS_BBSD
;
cha
=
ACS_DBDD
;
break
;
break
;
case
185
:
case
186
:
cha
=
ACS_DBDD
;
cha
=
ACS_DBDB
;
break
;
break
;
case
186
:
case
187
:
cha
=
ACS_DBDB
;
cha
=
ACS_BBDD
;
break
;
break
;
case
187
:
case
188
:
cha
=
ACS_BBDD
;
cha
=
ACS_DBBD
;
break
;
break
;
case
188
:
case
189
:
cha
=
ACS_DBBD
;
cha
=
ACS_DBBS
;
break
;
break
;
case
189
:
case
190
:
cha
=
ACS_DBBS
;
cha
=
ACS_SBBD
;
break
;
break
;
case
190
:
case
191
:
cha
=
ACS_SBBD
;
cha
=
ACS_BBSS
;
break
;
break
;
case
191
:
case
192
:
cha
=
ACS_BBSS
;
cha
=
ACS_SSBB
;
break
;
break
;
case
192
:
case
193
:
cha
=
ACS_SSBB
;
cha
=
ACS_SSBS
;
break
;
break
;
case
193
:
case
194
:
cha
=
ACS_SSBS
;
cha
=
ACS_BSSS
;
break
;
break
;
case
194
:
case
195
:
cha
=
ACS_BSSS
;
cha
=
ACS_SSSB
;
break
;
break
;
case
195
:
case
196
:
cha
=
ACS_SSSB
;
cha
=
ACS_BSBS
;
break
;
break
;
case
196
:
case
197
:
cha
=
ACS_BSBS
;
cha
=
ACS_SSSS
;
break
;
break
;
case
197
:
case
198
:
cha
=
ACS_SSSS
;
cha
=
ACS_SDSB
;
break
;
break
;
case
198
:
case
199
:
cha
=
ACS_SDSB
;
cha
=
ACS_DSDB
;
break
;
break
;
case
199
:
case
200
:
cha
=
ACS_DSDB
;
cha
=
ACS_DDBB
;
break
;
break
;
case
200
:
case
201
:
cha
=
ACS_DDBB
;
cha
=
ACS_BDDB
;
break
;
break
;
case
201
:
case
202
:
cha
=
ACS_BDDB
;
cha
=
ACS_DDBD
;
break
;
break
;
case
202
:
case
203
:
cha
=
ACS_DDBD
;
cha
=
ACS_BDDD
;
break
;
break
;
case
203
:
case
204
:
cha
=
ACS_BDDD
;
cha
=
ACS_DDDB
;
break
;
break
;
case
204
:
case
205
:
cha
=
ACS_DDDB
;
cha
=
ACS_BDBD
;
break
;
break
;
case
205
:
case
206
:
cha
=
ACS_BDBD
;
cha
=
ACS_DDDD
;
break
;
break
;
case
206
:
case
207
:
cha
=
ACS_DDDD
;
cha
=
ACS_SDBD
;
break
;
break
;
case
207
:
case
208
:
cha
=
ACS_SDBD
;
cha
=
ACS_DSBS
;
break
;
break
;
case
208
:
case
209
:
cha
=
ACS_DSBS
;
cha
=
ACS_BDSD
;
break
;
break
;
case
209
:
case
210
:
cha
=
ACS_BDSD
;
cha
=
ACS_BSDS
;
break
;
break
;
case
210
:
case
211
:
cha
=
ACS_BSDS
;
cha
=
ACS_DSBB
;
break
;
break
;
case
211
:
case
212
:
cha
=
ACS_DSBB
;
cha
=
ACS_SDBB
;
break
;
break
;
case
212
:
case
213
:
cha
=
ACS_SDBB
;
cha
=
ACS_BDSB
;
break
;
break
;
case
213
:
case
214
:
cha
=
ACS_BDSB
;
cha
=
ACS_BSDB
;
break
;
break
;
case
214
:
case
215
:
cha
=
ACS_BSDB
;
cha
=
ACS_DSDS
;
break
;
break
;
case
215
:
case
216
:
cha
=
ACS_DSDS
;
cha
=
ACS_SDSD
;
break
;
break
;
case
216
:
case
217
:
cha
=
ACS_SDSD
;
cha
=
ACS_SBBS
;
break
;
break
;
case
217
:
case
218
:
cha
=
ACS_SBBS
;
cha
=
ACS_BSSB
;
break
;
break
;
case
218
:
case
219
:
cha
=
ACS_BSSB
;
cha
=
ACS_BLOCK
;
break
;
break
;
case
219
:
default:
cha
=
ACS_BLOCK
;
cha
=
ch
;
break
;
default:
cha
=
ch
;
}
}
else
{
cha
=
ch
;
}
}
...
...
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