do_gotolinecolumn()
- Add parameter allow_update to control whether the screen is
updated after moving. (DLR)
+ do_gotopos()
+ - Only include this function when DISABLE_SPELLER isn't defined,
+ as the alternate spell checking code is now the only place
+ where it's used. (DLR)
- winio.c:
edit_scroll(), edit_redraw(), edit_refresh()
- Clean up and simplify. (DLR)
}
/* c is a control character. It displays as ^@, ^?, or ^[ch], where ch
- * is c + 64. We return that character. */
+ * is (c + 64). We return that character. */
char control_rep(char c)
{
/* Treat newlines embedded in a line as encoded nulls. */
#ifdef NANO_WIDE
/* c is a wide control character. It displays as ^@, ^?, or ^[ch],
- * where ch is c + 64. We return that wide character. */
+ * where ch is (c + 64). We return that wide character. */
wchar_t control_wrep(wchar_t wc)
{
/* Treat newlines embedded in a line as encoded nulls. */
#endif
/* c is a multibyte control character. It displays as ^@, ^?, or ^[ch],
- * where ch is c + 64. We return that multibyte character. */
+ * where ch is (c + 64). We return that multibyte character. */
char *control_mbrep(const char *c, char *crep, int *crep_len)
{
assert(c != NULL && crep != NULL && crep_len != NULL);
assert(openfile->current_y == openfile->current->lineno - openfile->edittop->lineno);
- /* Move the current line of the edit window up, and then get the
- * equivalent x-coordinate of the current line. */
+ /* Move the current line of the edit window up. */
openfile->current = openfile->current->prev;
openfile->current_x = actual_x(openfile->current->data,
openfile->placewewant);
- /* If we're on the first row of the edit window, scroll the edit
+ /* If we're on the first line of the edit window, scroll the edit
* window up one line if we're in smooth scrolling mode, or up half
* a page if we're not. */
if (openfile->current_y == 0)
assert(openfile->current_y == openfile->current->lineno - openfile->edittop->lineno);
- /* Move the current line of the edit window down, and then get the
- * equivalent x-coordinate of the current line. */
+ /* Move the current line of the edit window down. */
openfile->current = openfile->current->next;
openfile->current_x = actual_x(openfile->current->data,
openfile->placewewant);
- /* If we're on the last row of the edit window, scroll the edit
+ /* If we're on the last line of the edit window, scroll the edit
* window down one line if we're in smooth scrolling mode, or down
* half a page if we're not. */
if (openfile->current_y == editwinrows - 1)
#ifndef DISABLE_JUSTIFY
if (punct == NULL)
- punct = mallocstrcpy(punct, ".?!");
+ punct = mallocstrcpy(NULL, ".?!");
if (brackets == NULL)
- brackets = mallocstrcpy(brackets, "'\")}]>");
+ brackets = mallocstrcpy(NULL, "'\")}]>");
if (quotestr == NULL)
quotestr = mallocstrcpy(NULL,
void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
bool interactive, bool save_pos, bool allow_update);
void do_gotolinecolumn_void(void);
-#if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER)
+#ifndef DISABLE_SPELLER
void do_gotopos(ssize_t line, size_t pos_x, ssize_t pos_y, size_t
pos_pww);
#endif
/* Search for a string. */
void do_search(void)
{
- size_t old_pww = openfile->placewewant;
+ filestruct *fileptr = openfile->current;
size_t fileptr_x = openfile->current_x;
+ size_t old_pww = openfile->placewewant;
int i;
bool didfind;
- filestruct *fileptr = openfile->current;
#ifndef DISABLE_WRAPPING
wrap_reset();
/* Search for the next string without prompting. */
void do_research(void)
{
- size_t old_pww = openfile->placewewant;
+ filestruct *fileptr = openfile->current;
size_t fileptr_x = openfile->current_x;
+ size_t old_pww = openfile->placewewant;
bool didfind;
- filestruct *fileptr = openfile->current;
#ifndef DISABLE_WRAPPING
wrap_reset();
/* Replace a string. */
void do_replace(void)
{
- int i;
filestruct *edittop_save, *begin;
size_t begin_x, pww_save;
ssize_t numreplaced;
+ int i;
if (ISSET(VIEW_MODE)) {
print_view_warning();
openfile->placewewant + 1, FALSE, TRUE, FALSE, TRUE);
}
-#if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER)
+#ifndef DISABLE_SPELLER
void do_gotopos(ssize_t line, size_t pos_x, ssize_t pos_y, size_t
pos_pww)
{