mirror of git://git.sv.gnu.org/nano.git
Correcting and adjusting some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5188 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
2dc9cbefd3
commit
ce48ca2223
|
@ -2,6 +2,7 @@
|
|||
* src/browser.c (browser_select_dirname, findnextfile): Rename
|
||||
'currselected' to 'looking_at', for more contrast with 'selected',
|
||||
and rename browser_select_filename() to browser_select_dirname().
|
||||
* src/text.c: Correct and adjust some comments.
|
||||
|
||||
2015-04-07 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/browser.c (do_fileresearch): Don't search for the empty string
|
||||
|
|
36
src/text.c
36
src/text.c
|
@ -2522,7 +2522,7 @@ const char *do_int_speller(const char *tempfile_name)
|
|||
|
||||
/* A new process to run sort in. */
|
||||
if ((pid_sort = fork()) == 0) {
|
||||
/* Child continues (i.e. future spell process). Replace the
|
||||
/* Child continues (i.e. future sort process). Replace the
|
||||
* standard input with the standard output of the old pipe. */
|
||||
if (dup2(spell_fd[0], STDIN_FILENO) != STDIN_FILENO)
|
||||
goto close_pipes_and_exit;
|
||||
|
@ -2535,8 +2535,7 @@ const char *do_int_speller(const char *tempfile_name)
|
|||
|
||||
close(sort_fd[1]);
|
||||
|
||||
/* Start the sort program. Use -f to remove mixed case. If
|
||||
* this isn't portable, let me know. */
|
||||
/* Start the sort program. Use -f to ignore case. */
|
||||
execlp("sort", "sort", "-f", NULL);
|
||||
|
||||
/* This should not be reached if sort is found. */
|
||||
|
@ -2625,7 +2624,7 @@ const char *do_int_speller(const char *tempfile_name)
|
|||
search_replace_abort();
|
||||
edit_refresh_needed = TRUE;
|
||||
|
||||
/* Process the end of the spell process. */
|
||||
/* Process the end of the three processes. */
|
||||
waitpid(pid_spell, &spell_status, 0);
|
||||
waitpid(pid_sort, &sort_status, 0);
|
||||
waitpid(pid_uniq, &uniq_status, 0);
|
||||
|
@ -2704,7 +2703,7 @@ const char *do_alt_speller(char *tempfile_name)
|
|||
|
||||
endwin();
|
||||
|
||||
/* Set up an argument list to pass execvp(). */
|
||||
/* Set up an argument list to pass to execvp(). */
|
||||
if (spellargs == NULL) {
|
||||
spellargs = (char **)nmalloc(arglen * sizeof(char *));
|
||||
|
||||
|
@ -2969,7 +2968,7 @@ void do_linter(void)
|
|||
statusbar(_("Invoking linter, please wait"));
|
||||
doupdate();
|
||||
|
||||
/* Set up an argument list to pass execvp(). */
|
||||
/* Set up an argument list to pass to execvp(). */
|
||||
if (lintargs == NULL) {
|
||||
lintargs = (char **)nmalloc(arglen * sizeof(char *));
|
||||
|
||||
|
@ -2984,13 +2983,13 @@ void do_linter(void)
|
|||
}
|
||||
lintargs[arglen - 2] = openfile->filename;
|
||||
|
||||
/* A new process to run linter. */
|
||||
/* A new process to run the linter in. */
|
||||
if ((pid_lint = fork()) == 0) {
|
||||
|
||||
/* Child continues (i.e. future spell process). */
|
||||
/* Child continues (i.e. future linting process). */
|
||||
close(lint_fd[0]);
|
||||
|
||||
/* Send spell's standard output/err to the pipe. */
|
||||
/* Send the linter's standard output + err to the pipe. */
|
||||
if (dup2(lint_fd[1], STDOUT_FILENO) != STDOUT_FILENO)
|
||||
exit(1);
|
||||
if (dup2(lint_fd[1], STDERR_FILENO) != STDERR_FILENO)
|
||||
|
@ -3024,7 +3023,7 @@ void do_linter(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Read in the returned spelling errors. */
|
||||
/* Read in the returned syntax errors. */
|
||||
read_buff_read = 0;
|
||||
read_buff_size = pipe_buff_size + 1;
|
||||
read_buff = read_buff_ptr = charalloc(read_buff_size);
|
||||
|
@ -3048,7 +3047,7 @@ void do_linter(void)
|
|||
fprintf(stderr, "text.c:do_lint:Raw output: %s\n", read_buff);
|
||||
#endif
|
||||
|
||||
/* Process output. */
|
||||
/* Process the output. */
|
||||
read_buff_word = read_buff_ptr = read_buff;
|
||||
|
||||
while (*read_buff_ptr != '\0') {
|
||||
|
@ -3116,7 +3115,9 @@ void do_linter(void)
|
|||
read_buff_ptr++;
|
||||
}
|
||||
|
||||
/* Process the end of the lint process. */
|
||||
/* Process the end of the linting process.
|
||||
* XXX: The return value should be checked.
|
||||
* Will make an invocation-error routine. */
|
||||
waitpid(pid_lint, &lint_status, 0);
|
||||
|
||||
free(read_buff);
|
||||
|
@ -3222,12 +3223,9 @@ free_lints_and_return:
|
|||
}
|
||||
|
||||
#ifndef DISABLE_SPELLER
|
||||
/* Run a formatter for the given syntax.
|
||||
* Expects the formatter to be non-interactive and
|
||||
* operate on a file in-place, which we'll pass it
|
||||
* on the command line. Another mashup of the speller
|
||||
* and alt_speller routines.
|
||||
*/
|
||||
/* Run a formatter for the current syntax. This expects the formatter
|
||||
* to be non-interactive and operate on a file in-place, which we'll
|
||||
* pass it on the command line. */
|
||||
void do_formatter(void)
|
||||
{
|
||||
bool status;
|
||||
|
@ -3282,7 +3280,7 @@ void do_formatter(void)
|
|||
|
||||
endwin();
|
||||
|
||||
/* Set up an argument list to pass execvp(). */
|
||||
/* Set up an argument list to pass to execvp(). */
|
||||
if (formatargs == NULL) {
|
||||
formatargs = (char **)nmalloc(arglen * sizeof(char *));
|
||||
|
||||
|
|
Loading…
Reference in New Issue