Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
7e0c4e57
Commit
7e0c4e57
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a function and adjust indentation
parent
50616148
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/prompt.c
+10
-10
src/prompt.c
src/proto.h
+0
-9
src/proto.h
with
10 additions
and
19 deletions
+10
-19
src/prompt.c
View file @
7e0c4e57
...
...
@@ -506,7 +506,7 @@ void update_bar_if_needed(void)
}
/* Get a string of input at the statusbar prompt. */
functionptrtype
get_prompt_string
(
int
*
actual
,
bool
allow_tabs
,
functionptrtype
acquire_an_answer
(
int
*
actual
,
bool
allow_tabs
,
#ifndef DISABLE_TABCOMP
bool
allow_files
,
bool
*
listed
,
#endif
...
...
@@ -546,7 +546,7 @@ functionptrtype get_prompt_string(int *actual, bool allow_tabs,
}
#ifdef DEBUG
fprintf
(
stderr
,
"
get_prompt_string
: answer =
\"
%s
\"
, statusbar_x = %lu
\n
"
,
answer
,
(
unsigned
long
)
statusbar_x
);
fprintf
(
stderr
,
"
acquire_an_answer
: answer =
\"
%s
\"
, statusbar_x = %lu
\n
"
,
answer
,
(
unsigned
long
)
statusbar_x
);
#endif
update_the_statusbar
();
...
...
@@ -720,13 +720,13 @@ int do_prompt(bool allow_tabs,
bottombars
(
menu
);
while
(
retval
==
KEY_WINCH
)
{
prompt
=
charalloc
((
COLS
*
mb_cur_max
())
+
1
);
va_start
(
ap
,
msg
);
vsnprintf
(
prompt
,
COLS
*
mb_cur_max
(),
msg
,
ap
);
va_end
(
ap
);
null_at
(
&
prompt
,
actual_x
(
prompt
,
(
COLS
<
4
)
?
0
:
COLS
-
4
));
prompt
=
charalloc
((
COLS
*
mb_cur_max
())
+
1
);
va_start
(
ap
,
msg
);
vsnprintf
(
prompt
,
COLS
*
mb_cur_max
(),
msg
,
ap
);
va_end
(
ap
);
null_at
(
&
prompt
,
actual_x
(
prompt
,
(
COLS
<
4
)
?
0
:
COLS
-
4
));
func
=
get_prompt_string
(
&
retval
,
allow_tabs
,
func
=
acquire_an_answer
(
&
retval
,
allow_tabs
,
#ifndef DISABLE_TABCOMP
allow_files
,
&
listed
,
#endif
...
...
@@ -736,8 +736,8 @@ int do_prompt(bool allow_tabs,
#endif
refresh_func
);
free
(
prompt
);
prompt
=
NULL
;
free
(
prompt
);
prompt
=
NULL
;
}
/* If we're done with this prompt, restore the x position to what
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
7e0c4e57
...
...
@@ -518,15 +518,6 @@ void reinit_statusbar_x(void);
void
reset_statusbar_cursor
(
void
);
void
update_the_statusbar
(
void
);
void
update_bar_if_needed
(
void
);
functionptrtype
get_prompt_string
(
int
*
value
,
bool
allow_tabs
,
#ifndef DISABLE_TABCOMP
bool
allow_files
,
bool
*
listed
,
#endif
const
char
*
curranswer
,
#ifndef DISABLE_HISTORIES
filestruct
**
history_list
,
#endif
void
(
*
refresh_func
)(
void
));
int
do_prompt
(
bool
allow_tabs
,
#ifndef DISABLE_TABCOMP
bool
allow_files
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help