Clean up comments and fix spelling errors

This commit is contained in:
Yannis Chatzimichos 2013-02-18 08:03:00 +02:00 committed by ridiculousfish
parent f7754a2927
commit b9ba227733
3 changed files with 17 additions and 15 deletions

View File

@ -125,8 +125,8 @@ extern const wchar_t *program_name;
/**
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
failiure, the current function is ended at once. The second
parameter is the return value of the current function on failiure.
failure, the current function is ended at once. The second
parameter is the return value of the current function on failure.
*/
#define CHECK( arg, retval ) \
if (!(arg)) \
@ -203,7 +203,7 @@ void show_stackframe();
/**
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
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);
/**
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.
*/
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.
*/
ssize_t read_loop(int fd, void *buff, size_t count);

View File

@ -556,7 +556,6 @@ static void reader_kill(size_t begin_idx, size_t length, int mode, int newv)
}
else
{
wcstring old = data->kill_item;
if (mode == KILL_APPEND)
{
@ -1555,8 +1554,11 @@ static const completion_t *cycle_competions(const std::vector<completion_t> &com
space.
- If the list contains multiple elements with a common prefix, write
the prefix.
- If the list contains multiple elements without.
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.
- If the list contains multiple elements without 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.
\param comp the list of completion strings
@ -1583,7 +1585,7 @@ static bool handle_completions(const std::vector<completion_t> &comp)
*/
switch (comp.size())
{
/* No suitable completions found, flash screen and return */
/* No suitable completions found, flash screen and return */
case 0:
{
reader_flash();

View File

@ -194,15 +194,15 @@ void s_write(screen_t *s,
function than s_write has written to the screen.
\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 Whether to reset the prompt as well. If so
\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 reset_prompt whether to reset the prompt as well.
If reset_cursor is incorreclt set to 0, this may result in screen
contents being erased. If it is incorrectly set to one, it may
result in one or more lines of garbage on screen on the next
If reset_cursor is incorrectly set to false, this may result in
screen contents being erased. If it is incorrectly set to true, it
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
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);