in do_replace_loop(), make real_current_x a const filestruct* again

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2048 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2004-11-03 16:02:41 +00:00
parent 6d9aa085d1
commit 182b2c936f
2 changed files with 6 additions and 4 deletions

View File

@ -418,8 +418,9 @@ void replace_abort(void);
int replace_regexp(char *string, bool create_flag); int replace_regexp(char *string, bool create_flag);
#endif #endif
char *replace_line(const char *needle); char *replace_line(const char *needle);
ssize_t do_replace_loop(const char *needle, filestruct *real_current, ssize_t do_replace_loop(const char *needle, const filestruct
size_t *real_current_x, bool wholewords, bool *canceled); *real_current, size_t *real_current_x, bool wholewords, bool
*canceled);
void do_replace(void); void do_replace(void);
void do_gotoline(int line, bool save_pos); void do_gotoline(int line, bool save_pos);
void do_gotoline_void(void); void do_gotoline_void(void);

View File

@ -654,8 +654,9 @@ char *replace_line(const char *needle)
* needle is the string to seek. We replace it with answer. Return -1 * needle is the string to seek. We replace it with answer. Return -1
* if needle isn't found, else the number of replacements performed. If * if needle isn't found, else the number of replacements performed. If
* canceled isn't NULL, set it to TRUE if we canceled. */ * canceled isn't NULL, set it to TRUE if we canceled. */
ssize_t do_replace_loop(const char *needle, filestruct *real_current, ssize_t do_replace_loop(const char *needle, const filestruct
size_t *real_current_x, bool wholewords, bool *canceled) *real_current, size_t *real_current_x, bool wholewords, bool
*canceled)
{ {
ssize_t numreplaced = -1; ssize_t numreplaced = -1;
size_t match_len; size_t match_len;