1
1

make mark_beginx a size_t instead of an int

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2035 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
David Lawrence Ramsey 2004-10-30 01:16:08 +00:00
родитель 7a97e18667
Коммит 687776b1a8
6 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -89,10 +89,10 @@ CVS code -
- When saving or changing file positions, be sure not to ignore
placewewant. Changes to do_int_spell_fix(), findnextstr(),
do_replace_loop(), and do_replace(). (DLR)
- Convert current_x to a size_t, and convert some functions that
use it as a parameter to use size_t as well. Also change some
current_x-related assertions to handle it. (David Benbennick
and DLR)
- Convert current_x and mark_beginx to size_t's, and convert
some functions that use them as a parameter to use size_t as
well. Also change some related assertions to handle them.
(David Benbennick and DLR)
- files.c:
do_insertfile()
- Simplify by reusing variables whereever possible, and add a

Просмотреть файл

@ -113,7 +113,7 @@ char *help_text; /* The text in the help window */
#ifndef NANO_SMALL
filestruct *mark_beginbuf; /* The begin marker buffer */
int mark_beginx; /* X value in the string to start */
size_t mark_beginx; /* X value in the string to start */
#endif
#ifndef DISABLE_OPERATINGDIR

Просмотреть файл

@ -2365,7 +2365,7 @@ void do_justify(bool full_justify)
filestruct *edittop_save = edittop, *current_save = current;
#ifndef NANO_SMALL
filestruct *mark_beginbuf_save = mark_beginbuf;
int mark_beginx_save = mark_beginx;
size_t mark_beginx_save = mark_beginx;
#endif
int kbinput;
bool meta_key, func_key;

Просмотреть файл

@ -165,7 +165,7 @@ typedef struct openfilestruct {
struct filestruct *file_mark_beginbuf;
/* Current file's beginning marked
* line. */
int file_mark_beginx; /* Current file's beginning marked
size_t file_mark_beginx; /* Current file's beginning marked
* line's x-coordinate position. */
#endif
size_t file_current_x; /* Current file's x-coordinate

Просмотреть файл

@ -37,7 +37,7 @@ extern int current_y;
extern int totlines;
extern size_t placewewant;
#ifndef NANO_SMALL
extern int mark_beginx;
extern size_t mark_beginx;
#endif
extern long totsize;
extern long flags;

Просмотреть файл

@ -745,7 +745,7 @@ ssize_t do_replace_loop(const char *needle, filestruct *real_current,
if (i > 0 || replaceall) { /* Yes, replace it!!!! */
char *copy;
ssize_t length_change;
size_t length_change;
if (i == 2)
replaceall = TRUE;
@ -763,7 +763,6 @@ ssize_t do_replace_loop(const char *needle, filestruct *real_current,
}
#endif
assert(0 <= match_len + length_change);
if (current == real_current && current_x <= *real_current_x) {
if (*real_current_x < current_x + match_len)
*real_current_x = current_x + match_len;