mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Clean up comments and fix spelling errors
This commit is contained in:
parent
f7754a2927
commit
b9ba227733
3 changed files with 17 additions and 15 deletions
10
common.h
10
common.h
|
@ -125,8 +125,8 @@ extern const wchar_t *program_name;
|
||||||
/**
|
/**
|
||||||
This macro is used to check that an input argument is not null. It
|
This macro is used to check that an input argument is not null. It
|
||||||
is a bit lika a non-fatal form of assert. Instead of exit-ing on
|
is a bit lika a non-fatal form of assert. Instead of exit-ing on
|
||||||
failiure, the current function is ended at once. The second
|
failure, the current function is ended at once. The second
|
||||||
parameter is the return value of the current function on failiure.
|
parameter is the return value of the current function on failure.
|
||||||
*/
|
*/
|
||||||
#define CHECK( arg, retval ) \
|
#define CHECK( arg, retval ) \
|
||||||
if (!(arg)) \
|
if (!(arg)) \
|
||||||
|
@ -203,7 +203,7 @@ void show_stackframe();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Read a line from the stream f into the string. Returns
|
Read a line from the stream f into the string. Returns
|
||||||
the number of bytes read or -1 on failiure.
|
the number of bytes read or -1 on failure.
|
||||||
|
|
||||||
If the carriage return character is encountered, it is
|
If the carriage return character is encountered, it is
|
||||||
ignored. fgetws() considers the line to end if reading the file
|
ignored. fgetws() considers the line to end if reading the file
|
||||||
|
@ -621,13 +621,13 @@ __sentinel bool contains_internal(const wcstring &needle, ...);
|
||||||
long read_blocked(int fd, void *buf, size_t count);
|
long read_blocked(int fd, void *buf, size_t count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Loop a write request while failiure is non-critical. Return -1 and set errno
|
Loop a write request while failure is non-critical. Return -1 and set errno
|
||||||
in case of critical error.
|
in case of critical error.
|
||||||
*/
|
*/
|
||||||
ssize_t write_loop(int fd, const char *buff, size_t count);
|
ssize_t write_loop(int fd, const char *buff, size_t count);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Loop a read request while failiure is non-critical. Return -1 and set errno
|
Loop a read request while failure is non-critical. Return -1 and set errno
|
||||||
in case of critical error.
|
in case of critical error.
|
||||||
*/
|
*/
|
||||||
ssize_t read_loop(int fd, void *buff, size_t count);
|
ssize_t read_loop(int fd, void *buff, size_t count);
|
||||||
|
|
10
reader.cpp
10
reader.cpp
|
@ -556,7 +556,6 @@ static void reader_kill(size_t begin_idx, size_t length, int mode, int newv)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
wcstring old = data->kill_item;
|
wcstring old = data->kill_item;
|
||||||
if (mode == KILL_APPEND)
|
if (mode == KILL_APPEND)
|
||||||
{
|
{
|
||||||
|
@ -1555,8 +1554,11 @@ static const completion_t *cycle_competions(const std::vector<completion_t> &com
|
||||||
space.
|
space.
|
||||||
- If the list contains multiple elements with a common prefix, write
|
- If the list contains multiple elements with a common prefix, write
|
||||||
the prefix.
|
the prefix.
|
||||||
- If the list contains multiple elements without.
|
- If the list contains multiple elements without a common prefix, call
|
||||||
a common prefix, call run_pager to display a list of completions. Depending on terminal size and the length of the list, run_pager may either show less than a screenfull and exit or use an interactive pager to allow the user to scroll through the completions.
|
run_pager to display a list of completions. Depending on terminal size and
|
||||||
|
the length of the list, run_pager may either show less than a screenfull and
|
||||||
|
exit or use an interactive pager to allow the user to scroll through the
|
||||||
|
completions.
|
||||||
|
|
||||||
\param comp the list of completion strings
|
\param comp the list of completion strings
|
||||||
|
|
||||||
|
@ -1583,7 +1585,7 @@ static bool handle_completions(const std::vector<completion_t> &comp)
|
||||||
*/
|
*/
|
||||||
switch (comp.size())
|
switch (comp.size())
|
||||||
{
|
{
|
||||||
/* No suitable completions found, flash screen and return */
|
/* No suitable completions found, flash screen and return */
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
reader_flash();
|
reader_flash();
|
||||||
|
|
12
screen.h
12
screen.h
|
@ -194,15 +194,15 @@ void s_write(screen_t *s,
|
||||||
function than s_write has written to the screen.
|
function than s_write has written to the screen.
|
||||||
|
|
||||||
\param s the screen to reset
|
\param s the screen to reset
|
||||||
\param reset_cursor whether the line on which the curor has changed should be assumed to have changed. If \c reset_cursor is false, the library will attempt to make sure that the screen area does not seem to move up or down on repaint.
|
\param reset_cursor whether the line on which the cursor has changed should be assumed to have changed. If \c reset_cursor is false, the library will attempt to make sure that the screen area does not seem to move up or down on repaint.
|
||||||
\param Whether to reset the prompt as well. If so
|
\param reset_prompt whether to reset the prompt as well.
|
||||||
|
|
||||||
If reset_cursor is incorreclt set to 0, this may result in screen
|
If reset_cursor is incorrectly set to false, this may result in
|
||||||
contents being erased. If it is incorrectly set to one, it may
|
screen contents being erased. If it is incorrectly set to true, it
|
||||||
result in one or more lines of garbage on screen on the next
|
may result in one or more lines of garbage on screen on the next
|
||||||
repaint. If this happens during a loop, such as an interactive
|
repaint. If this happens during a loop, such as an interactive
|
||||||
resizing, there will be one line of garbage for every repaint,
|
resizing, there will be one line of garbage for every repaint,
|
||||||
which will quicly fill the screen.
|
which will quickly fill the screen.
|
||||||
*/
|
*/
|
||||||
void s_reset(screen_t *s, bool reset_cursor, bool reset_prompt = true);
|
void s_reset(screen_t *s, bool reset_cursor, bool reset_prompt = true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue