mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
Random fixes to comments.
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
3). Create a file doc_src/NAME.txt, containing the manual for the builtin in Doxygen-format. Check the other builtin manuals for proper syntax.
|
3). Create a file doc_src/NAME.txt, containing the manual for the builtin in Doxygen-format. Check the other builtin manuals for proper syntax.
|
||||||
|
|
||||||
4). Use 'darcs add doc_src/NAME.txt' to start tracking changes to the documentation file.
|
4). Use 'git add doc_src/NAME.txt' to start tracking changes to the documentation file.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
18
exec.cpp
18
exec.cpp
@@ -2,7 +2,7 @@
|
|||||||
Functions for executing a program.
|
Functions for executing a program.
|
||||||
|
|
||||||
Some of the code in this file is based on code from the Glibc
|
Some of the code in this file is based on code from the Glibc
|
||||||
manual, though I the changes performed have been massive.
|
manual, though the changes performed have been massive.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -913,20 +913,8 @@ void exec(parser_t &parser, job_t *j)
|
|||||||
/*
|
/*
|
||||||
FIXME:
|
FIXME:
|
||||||
|
|
||||||
When
|
When requesting that stdin be closed, we
|
||||||
requesting
|
really don't do anything. How should this be
|
||||||
that
|
|
||||||
stdin
|
|
||||||
be
|
|
||||||
closed,
|
|
||||||
we
|
|
||||||
really
|
|
||||||
don't
|
|
||||||
do
|
|
||||||
anything. How
|
|
||||||
should
|
|
||||||
this
|
|
||||||
be
|
|
||||||
handled?
|
handled?
|
||||||
*/
|
*/
|
||||||
builtin_stdin = -1;
|
builtin_stdin = -1;
|
||||||
|
|||||||
10
parser.cpp
10
parser.cpp
@@ -749,7 +749,7 @@ void parser_t::destroy()
|
|||||||
Print error message to string if an error has occured while parsing
|
Print error message to string if an error has occured while parsing
|
||||||
|
|
||||||
\param target the buffer to write to
|
\param target the buffer to write to
|
||||||
\param prefix: The string token to prefix the ech line with. Usually the name of the command trying to parse something.
|
\param prefix: The string token to prefix the each line with. Usually the name of the command trying to parse something.
|
||||||
*/
|
*/
|
||||||
void parser_t::print_errors(wcstring &target, const wchar_t *prefix)
|
void parser_t::print_errors(wcstring &target, const wchar_t *prefix)
|
||||||
{
|
{
|
||||||
@@ -898,7 +898,7 @@ void parser_t::stack_trace(block_t *b, wcstring &buff)
|
|||||||
buff.append(L"\n");
|
buff.append(L"\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Stop recursing at event handler. No reason to belive that
|
Stop recursing at event handler. No reason to believe that
|
||||||
any other code is relevant.
|
any other code is relevant.
|
||||||
|
|
||||||
It might make sense in the future to continue printing the
|
It might make sense in the future to continue printing the
|
||||||
@@ -1066,7 +1066,7 @@ const wchar_t *parser_t::current_filename() const
|
|||||||
/**
|
/**
|
||||||
Calculates the on-screen width of the specified substring of the
|
Calculates the on-screen width of the specified substring of the
|
||||||
specified string. This function takes into account the width and
|
specified string. This function takes into account the width and
|
||||||
allignment of the tab character, but other wise behaves like
|
alignment of the tab character, but other wise behaves like
|
||||||
repeatedly calling wcwidth.
|
repeatedly calling wcwidth.
|
||||||
*/
|
*/
|
||||||
static int printed_width(const wchar_t *str, int len)
|
static int printed_width(const wchar_t *str, int len)
|
||||||
@@ -1368,7 +1368,7 @@ void parser_t::parse_job_argument_list(process_t *p,
|
|||||||
tok_next(tok);
|
tok_next(tok);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Don't do anything on failiure. parse_job will notice
|
Don't do anything on failure. parse_job will notice
|
||||||
the error flag and report any errors for us
|
the error flag and report any errors for us
|
||||||
*/
|
*/
|
||||||
parse_job(p->next, j, tok);
|
parse_job(p->next, j, tok);
|
||||||
@@ -1713,7 +1713,7 @@ int parser_t::parse_job(process_t *p,
|
|||||||
job_t *j,
|
job_t *j,
|
||||||
tokenizer_t *tok)
|
tokenizer_t *tok)
|
||||||
{
|
{
|
||||||
std::vector<completion_t> args; // The list that will become the argc array for the program
|
std::vector<completion_t> args; // The list that will become the argv array for the program
|
||||||
int use_function = 1; // May functions be considered when checking what action this command represents
|
int use_function = 1; // May functions be considered when checking what action this command represents
|
||||||
int use_builtin = 1; // May builtins be considered when checking what action this command represents
|
int use_builtin = 1; // May builtins be considered when checking what action this command represents
|
||||||
int use_command = 1; // May commands be considered when checking what action this command represents
|
int use_command = 1; // May commands be considered when checking what action this command represents
|
||||||
|
|||||||
4
proc.cpp
4
proc.cpp
@@ -860,7 +860,7 @@ void proc_update_jiffies()
|
|||||||
|
|
||||||
\param j the job to test
|
\param j the job to test
|
||||||
|
|
||||||
\return 1 if buffers were avaialble, zero otherwise
|
\return 1 if buffers were available, zero otherwise
|
||||||
*/
|
*/
|
||||||
static int select_try(job_t *j)
|
static int select_try(job_t *j)
|
||||||
{
|
{
|
||||||
@@ -989,7 +989,7 @@ static int terminal_give_to_job(job_t *j, int cont)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns contol of the terminal to the shell, and saves the terminal
|
Returns control of the terminal to the shell, and saves the terminal
|
||||||
attribute state to the job, so that we can restore the terminal
|
attribute state to the job, so that we can restore the terminal
|
||||||
ownership to the job at a later time .
|
ownership to the job at a later time .
|
||||||
*/
|
*/
|
||||||
|
|||||||
16
reader.cpp
16
reader.cpp
@@ -13,7 +13,7 @@ last search position is remembered and a new search continues from the
|
|||||||
last search position. All search results are saved in the list
|
last search position. All search results are saved in the list
|
||||||
'search_prev'. When the user searches forward, i.e. presses Alt-down,
|
'search_prev'. When the user searches forward, i.e. presses Alt-down,
|
||||||
the list is consulted for previous search result, and subsequent
|
the list is consulted for previous search result, and subsequent
|
||||||
backwards searches are also handled by consultiung the list up until
|
backwards searches are also handled by consulting the list up until
|
||||||
the end of the list is reached, at which point regular searching will
|
the end of the list is reached, at which point regular searching will
|
||||||
commence.
|
commence.
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ commence.
|
|||||||
/**
|
/**
|
||||||
The maximum number of characters to read from the keyboard without
|
The maximum number of characters to read from the keyboard without
|
||||||
repainting. Note that this readahead will only occur if new
|
repainting. Note that this readahead will only occur if new
|
||||||
characters are avaialble for reading, fish will never block for
|
characters are available for reading, fish will never block for
|
||||||
more input without repainting.
|
more input without repainting.
|
||||||
*/
|
*/
|
||||||
#define READAHEAD_MAX 256
|
#define READAHEAD_MAX 256
|
||||||
@@ -161,12 +161,12 @@ commence.
|
|||||||
*/
|
*/
|
||||||
#define NO_SEARCH 0
|
#define NO_SEARCH 0
|
||||||
/**
|
/**
|
||||||
History search mode. This value means that we are perforing a line
|
History search mode. This value means that we are performing a line
|
||||||
history search.
|
history search.
|
||||||
*/
|
*/
|
||||||
#define LINE_SEARCH 1
|
#define LINE_SEARCH 1
|
||||||
/**
|
/**
|
||||||
History search mode. This value means that we are perforing a token
|
History search mode. This value means that we are performing a token
|
||||||
history search.
|
history search.
|
||||||
*/
|
*/
|
||||||
#define TOKEN_SEARCH 2
|
#define TOKEN_SEARCH 2
|
||||||
@@ -320,7 +320,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool repaint_needed;
|
bool repaint_needed;
|
||||||
|
|
||||||
/** Whether the a screen reset is needed after a repaint. */
|
/** Whether a screen reset is needed after a repaint. */
|
||||||
bool screen_reset_needed;
|
bool screen_reset_needed;
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
@@ -577,7 +577,7 @@ void reader_data_t::command_line_changed()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Remove any duplicate completions in the list. This relies on the list first beeing sorted. */
|
/** Remove any duplicate completions in the list. This relies on the list first being sorted. */
|
||||||
static void remove_duplicates(std::vector<completion_t> &l)
|
static void remove_duplicates(std::vector<completion_t> &l)
|
||||||
{
|
{
|
||||||
l.erase(std::unique(l.begin(), l.end()), l.end());
|
l.erase(std::unique(l.begin(), l.end()), l.end());
|
||||||
@@ -602,7 +602,7 @@ void reader_write_title()
|
|||||||
as that of a virtual terminal, we assume it supports setting the
|
as that of a virtual terminal, we assume it supports setting the
|
||||||
title. If we recognise it as that of a console, we assume it
|
title. If we recognise it as that of a console, we assume it
|
||||||
does not support setting the title. Otherwise we check the
|
does not support setting the title. Otherwise we check the
|
||||||
ttyname and see if we belive it is a virtual terminal.
|
ttyname and see if we believe it is a virtual terminal.
|
||||||
|
|
||||||
One situation in which this breaks down is with screen, since
|
One situation in which this breaks down is with screen, since
|
||||||
screen supports setting the terminal title if the underlying
|
screen supports setting the terminal title if the underlying
|
||||||
@@ -797,7 +797,7 @@ static void remove_backward()
|
|||||||
if (data->buff_pos <= 0)
|
if (data->buff_pos <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Fake composed character sequences by continuning to delete until we delete a character of width at least 1. */
|
/* Fake composed character sequences by continuing to delete until we delete a character of width at least 1. */
|
||||||
int width;
|
int width;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user