add more int -> ssize_t line number fixes, plus one formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2826 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
757f739367
commit
de03989e86
|
@ -1,13 +1,14 @@
|
||||||
CVS code -
|
CVS code -
|
||||||
- General:
|
- General:
|
||||||
- Miscellaneous comment fixes. (DLR)
|
- Miscellaneous comment fixes. (DLR)
|
||||||
|
- Fix a few last instances of the current line number's being
|
||||||
|
saved as an int instead of a ssize_t. Changes to
|
||||||
|
renumber_all(), renumber(), do_alt_speller(), and
|
||||||
|
backup_lines(). (DLR)
|
||||||
- global.c:
|
- global.c:
|
||||||
shortcut_init()
|
shortcut_init()
|
||||||
- Simplify wording of nano_gotoline_msg. (Jordi)
|
- Simplify wording of nano_gotoline_msg. (Jordi)
|
||||||
- nano.c:
|
- nano.c:
|
||||||
renumber_all(), renumber()
|
|
||||||
- When renumbering, properly use a ssize_t instead of an int.
|
|
||||||
(DLR)
|
|
||||||
do_verbatim_input()
|
do_verbatim_input()
|
||||||
- If constant cursor position display is on when we finish, make
|
- If constant cursor position display is on when we finish, make
|
||||||
sure the cursor position is displayed properly. (DLR)
|
sure the cursor position is displayed properly. (DLR)
|
||||||
|
|
15
src/nano.c
15
src/nano.c
|
@ -2322,9 +2322,9 @@ const char *do_int_speller(const char *tempfile_name)
|
||||||
* otherwise the error string. */
|
* otherwise the error string. */
|
||||||
const char *do_alt_speller(char *tempfile_name)
|
const char *do_alt_speller(char *tempfile_name)
|
||||||
{
|
{
|
||||||
int alt_spell_status, lineno_save = current->lineno;
|
int alt_spell_status;
|
||||||
size_t current_x_save = current_x, pww_save = placewewant;
|
size_t current_x_save = current_x, pww_save = placewewant;
|
||||||
ssize_t current_y_save = current_y;
|
ssize_t lineno_save = current->lineno, current_y_save = current_y;
|
||||||
pid_t pid_spell;
|
pid_t pid_spell;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
static int arglen = 3;
|
static int arglen = 3;
|
||||||
|
@ -2365,7 +2365,8 @@ const char *do_alt_speller(char *tempfile_name)
|
||||||
spellargs[0] = strtok(alt_speller, " ");
|
spellargs[0] = strtok(alt_speller, " ");
|
||||||
while ((ptr = strtok(NULL, " ")) != NULL) {
|
while ((ptr = strtok(NULL, " ")) != NULL) {
|
||||||
arglen++;
|
arglen++;
|
||||||
spellargs = (char **)nrealloc(spellargs, arglen * sizeof(char *));
|
spellargs = (char **)nrealloc(spellargs, arglen *
|
||||||
|
sizeof(char *));
|
||||||
spellargs[arglen - 3] = ptr;
|
spellargs[arglen - 3] = ptr;
|
||||||
}
|
}
|
||||||
spellargs[arglen - 1] = NULL;
|
spellargs[arglen - 1] = NULL;
|
||||||
|
@ -3010,12 +3011,12 @@ filestruct *backup_lines(filestruct *first_line, size_t par_len, size_t
|
||||||
size_t i;
|
size_t i;
|
||||||
/* Generic loop variable. */
|
/* Generic loop variable. */
|
||||||
size_t current_x_save = current_x;
|
size_t current_x_save = current_x;
|
||||||
int fl_lineno_save = first_line->lineno;
|
ssize_t fl_lineno_save = first_line->lineno;
|
||||||
int edittop_lineno_save = edittop->lineno;
|
ssize_t edittop_lineno_save = edittop->lineno;
|
||||||
int current_lineno_save = current->lineno;
|
ssize_t current_lineno_save = current->lineno;
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
bool old_mark_set = ISSET(MARK_ISSET);
|
bool old_mark_set = ISSET(MARK_ISSET);
|
||||||
int mbb_lineno_save = 0;
|
ssize_t mbb_lineno_save = 0;
|
||||||
size_t mark_beginx_save = 0;
|
size_t mark_beginx_save = 0;
|
||||||
|
|
||||||
if (old_mark_set) {
|
if (old_mark_set) {
|
||||||
|
|
Loading…
Reference in New Issue