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
184e8f15
Commit
184e8f15
authored
3 years ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Some consitifications
parent
6e0ec02a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/uifc/uifc.h
+5
-5
5 additions, 5 deletions
src/uifc/uifc.h
src/uifc/uifc32.c
+10
-10
10 additions, 10 deletions
src/uifc/uifc32.c
src/uifc/uifcx.c
+10
-10
10 additions, 10 deletions
src/uifc/uifcx.c
with
25 additions
and
25 deletions
src/uifc/uifc.h
+
5
−
5
View file @
184e8f15
...
...
@@ -424,11 +424,11 @@ typedef struct {
/* str is the title for the application banner. */
/* Returns 0 on success, non-zero on failure. */
/****************************************************************************/
int
(
*
scrn
)
(
char
*
str
);
int
(
*
scrn
)
(
const
char
*
str
);
/****************************************************************************/
/* Popup a message, maybe wait for the user to hit a key or click button. */
/****************************************************************************/
int
(
*
msg
)
(
char
*
str
);
int
(
*
msg
)
(
const
char
*
str
);
int
(
*
msgf
)
(
char
*
fmt
,
...);
BOOL
(
*
deny
)
(
char
*
fmt
,
...);
BOOL
(
*
confirm
)
(
char
*
fmt
,
...);
...
...
@@ -437,7 +437,7 @@ typedef struct {
/* str is the message to display on popup. */
/* if str==NULL, then the the status is to be cleared (popdown). */
/****************************************************************************/
void
(
*
pop
)
(
char
*
str
);
void
(
*
pop
)
(
const
char
*
str
);
/****************************************************************************/
/* General menu function. */
/* mode contains WIN_* flags to control display and functionality. */
...
...
@@ -453,7 +453,7 @@ typedef struct {
/* option number OR'd with MSK_INS, MSK_DEL, MSK_GET, MSK_PUT, or MSK_EDIT. */
/****************************************************************************/
int
(
*
list
)
(
int
mode
,
int
left
,
int
top
,
int
width
,
int
*
dflt
,
int
*
bar
,
char
*
title
,
char
**
option
);
,
int
*
bar
,
const
char
*
title
,
char
**
option
);
/****************************************************************************/
/* Windowed string input routine. */
/* mode contains WIN_* flags to control display and functionality. */
...
...
@@ -465,7 +465,7 @@ typedef struct {
/* This function sets uifcapi_t.changes to TRUE if the string is modified. */
/* Returns the length of the string or -1 on escape/abort. */
/****************************************************************************/
int
(
*
input
)(
int
mode
,
int
left
,
int
top
,
char
*
prompt
,
char
*
str
int
(
*
input
)(
int
mode
,
int
left
,
int
top
,
const
char
*
prompt
,
char
*
str
,
int
len
,
int
kmode
);
/****************************************************************************/
/* Sets the current help index by source code file and line number. */
...
...
This diff is collapsed.
Click to expand it.
src/uifc/uifc32.c
+
10
−
10
View file @
184e8f15
...
...
@@ -76,16 +76,16 @@ static void timedisplay(BOOL force);
/* API routines */
static
void
uifcbail
(
void
);
static
int
uscrn
(
char
*
str
);
static
int
uscrn
(
const
char
*
str
);
static
int
ulist
(
int
mode
,
int
left
,
int
top
,
int
width
,
int
*
dflt
,
int
*
bar
,
char
*
title
,
char
**
option
);
static
int
uinput
(
int
imode
,
int
left
,
int
top
,
char
*
prompt
,
char
*
str
,
const
char
*
title
,
char
**
option
);
static
int
uinput
(
int
imode
,
int
left
,
int
top
,
const
char
*
prompt
,
char
*
str
,
int
len
,
int
kmode
);
static
int
umsg
(
char
*
str
);
static
int
umsg
(
const
char
*
str
);
static
int
umsgf
(
char
*
fmt
,
...);
static
BOOL
confirm
(
char
*
fmt
,
...);
static
BOOL
deny
(
char
*
fmt
,
...);
static
void
upop
(
char
*
str
);
static
void
upop
(
const
char
*
str
);
static
void
sethelp
(
int
line
,
char
*
file
);
static
void
showbuf
(
int
mode
,
int
left
,
int
top
,
int
width
,
int
height
,
char
*
title
,
char
*
hbuf
,
int
*
curp
,
int
*
barp
);
...
...
@@ -535,7 +535,7 @@ void uifcbail(void)
/* Clear screen, fill with background attribute, display application title. */
/* Returns 0 on success. */
/****************************************************************************/
int
uscrn
(
char
*
str
)
int
uscrn
(
const
char
*
str
)
{
textattr
(
api
->
bclr
|
(
api
->
cclr
<<
4
));
gotoxy
(
1
,
1
);
...
...
@@ -620,7 +620,7 @@ inactive_win(struct vmem_cell *buf, int left, int top, int right, int bottom, in
/* General menu function, see uifc.h for details. */
/****************************************************************************/
int
ulist
(
int
mode
,
int
left
,
int
top
,
int
width
,
int
*
cur
,
int
*
bar
,
char
*
initial_title
,
char
**
option
)
,
const
char
*
initial_title
,
char
**
option
)
{
struct
vmem_cell
*
ptr
,
*
win
,
shade
[
MAX_LINES
*
2
],
line
[
MAX_COLS
];
static
char
search
[
MAX_OPLN
]
=
""
;
...
...
@@ -1836,7 +1836,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
/*************************************************************************/
/* This function is a windowed input string input routine. */
/*************************************************************************/
int
uinput
(
int
mode
,
int
left
,
int
top
,
char
*
inprompt
,
char
*
str
,
int
uinput
(
int
mode
,
int
left
,
int
top
,
const
char
*
inprompt
,
char
*
str
,
int
max
,
int
kmode
)
{
struct
vmem_cell
shade
[
MAX_COLS
],
save_buf
[
MAX_COLS
*
4
],
in_win
[
MAX_COLS
*
3
];
...
...
@@ -2000,7 +2000,7 @@ int uinput(int mode, int left, int top, char *inprompt, char *str,
/****************************************************************************/
/* Displays the message 'str' and waits for the user to select "OK" */
/****************************************************************************/
int
umsg
(
char
*
str
)
int
umsg
(
const
char
*
str
)
{
int
i
=
0
;
char
*
ok
[
2
]
=
{
"OK"
,
""
};
...
...
@@ -2638,7 +2638,7 @@ char *utimestr(time_t *intime)
/****************************************************************************/
/* Status popup/down function, see uifc.h for details. */
/****************************************************************************/
void
upop
(
char
*
str
)
void
upop
(
const
char
*
str
)
{
static
struct
vmem_cell
sav
[
80
*
3
],
buf
[
80
*
3
];
int
i
,
j
,
k
;
...
...
This diff is collapsed.
Click to expand it.
src/uifc/uifcx.c
+
10
−
10
View file @
184e8f15
...
...
@@ -54,16 +54,16 @@ static void help(void);
/* API routines */
static
void
uifcbail
(
void
);
static
int
uscrn
(
char
*
str
);
static
int
uscrn
(
const
char
*
str
);
static
int
ulist
(
int
mode
,
int
left
,
int
top
,
int
width
,
int
*
dflt
,
int
*
bar
,
char
*
title
,
char
**
option
);
static
int
uinput
(
int
imode
,
int
left
,
int
top
,
char
*
prompt
,
char
*
str
,
const
char
*
title
,
char
**
option
);
static
int
uinput
(
int
imode
,
int
left
,
int
top
,
const
char
*
prompt
,
char
*
str
,
int
len
,
int
kmode
);
static
int
umsg
(
char
*
str
);
static
int
umsg
(
const
char
*
str
);
static
int
umsgf
(
char
*
str
,
...);
static
BOOL
confirm
(
char
*
str
,
...);
static
BOOL
deny
(
char
*
str
,
...);
static
void
upop
(
char
*
str
);
static
void
upop
(
const
char
*
str
);
static
void
sethelp
(
int
line
,
char
*
file
);
/****************************************************************************/
...
...
@@ -134,7 +134,7 @@ void uifcbail(void)
/* Clear screen, fill with background attribute, display application title. */
/* Returns 0 on success. */
/****************************************************************************/
int
uscrn
(
char
*
str
)
int
uscrn
(
const
char
*
str
)
{
return
(
0
);
}
...
...
@@ -193,7 +193,7 @@ static int which(char* prompt, int max)
/* General menu function, see uifc.h for details. */
/****************************************************************************/
int
ulist
(
int
mode
,
int
left
,
int
top
,
int
width
,
int
*
cur
,
int
*
bar
,
char
*
title
,
char
**
option
)
,
const
char
*
title
,
char
**
option
)
{
char
str
[
128
];
int
i
,
opts
;
...
...
@@ -336,7 +336,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
/*************************************************************************/
/* This function is a windowed input string input routine. */
/*************************************************************************/
int
uinput
(
int
mode
,
int
left
,
int
top
,
char
*
prompt
,
char
*
outstr
,
int
uinput
(
int
mode
,
int
left
,
int
top
,
const
char
*
prompt
,
char
*
outstr
,
int
max
,
int
kmode
)
{
char
str
[
256
];
...
...
@@ -361,7 +361,7 @@ int uinput(int mode, int left, int top, char *prompt, char *outstr,
/****************************************************************************/
/* Displays the message 'str' and waits for the user to hit ENTER */
/****************************************************************************/
int
umsg
(
char
*
str
)
int
umsg
(
const
char
*
str
)
{
int
ch
;
printf
(
"%s
\n
Hit enter to continue:"
,
str
);
...
...
@@ -415,7 +415,7 @@ BOOL deny(char* fmt, ...)
/****************************************************************************/
/* Status popup/down function, see uifc.h for details. */
/****************************************************************************/
void
upop
(
char
*
str
)
void
upop
(
const
char
*
str
)
{
static
int
len
;
...
...
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