CVS code -
+- General
+ - Added void to functions declared as () args, nano.c:do_mark()
+ and search.c:regexp_cleanup(). (Christian Weisgerber).
+ - Changed internal variables called "new" to "newnode" to avoid
+ the "new" C++ reserved word, even though there is likely no way
+ nano will EVER be compilable with a C++ compiler. (suggested by
+ Rocco Corsi).
+
+1.0-test prerelease - 03/17/2001
- nano.c:
do_wrap()
- Added case for autoindenting text causing new line (Adam).
}
/* Splice a node into an existing filestruct */
-void splice_node(filestruct * begin, filestruct * new, filestruct * end)
+void splice_node(filestruct * begin, filestruct * newnode, filestruct * end)
{
- new->next = end;
- new->prev = begin;
- begin->next = new;
+ newnode->next = end;
+ newnode->prev = begin;
+ begin->next = newnode;
if (end != NULL)
- end->prev = new;
+ end->prev = newnode;
}
-int do_mark()
+int do_mark(void)
{
#ifdef NANO_SMALL
nano_disabled_msg();
/* Someone hits return *gasp!* */
int do_enter(filestruct * inptr)
{
- filestruct *new;
+ filestruct *newnode;
char *tmp, *spc;
int extra = 0;
- new = make_new_node(inptr);
+ newnode = make_new_node(inptr);
tmp = ¤t->data[current_x];
current_x = 0;
current_x++;
totsize++;
}
- new->data = nmalloc(strlen(tmp) + extra + 1);
- strncpy(new->data, current->data, extra);
- strcpy(&new->data[extra], tmp);
+ newnode->data = nmalloc(strlen(tmp) + extra + 1);
+ strncpy(newnode->data, current->data, extra);
+ strcpy(&newnode->data[extra], tmp);
}
} else {
- new->data = nmalloc(strlen(tmp) + 1);
- strcpy(new->data, tmp);
+ newnode->data = nmalloc(strlen(tmp) + 1);
+ strcpy(newnode->data, tmp);
}
*tmp = 0;
if (inptr->next == NULL) {
- filebot = new;
- editbot = new;
+ filebot = newnode;
+ editbot = newnode;
}
- splice_node(inptr, new, inptr->next);
+ splice_node(inptr, newnode, inptr->next);
totsize++;
renumber(current);
- current = new;
+ current = newnode;
align(¤t->data);
/* The logic here is as follows:
void die(char *msg, ...);
void new_file(void);
void new_magicline(void);
-void splice_node(filestruct *begin, filestruct *new, filestruct *end);
+void splice_node(filestruct *begin, filestruct *newnode, filestruct *end);
void null_at(char *data, int index);
void page_up_center(void);
void blank_edit(void);
int do_delete(void), do_backspace(void), do_tab(void), do_justify(void);
int do_first_line(void), do_last_line(void);
int do_replace(void), do_help(void), do_enter_void(void);
-int keypad_on(WINDOW * win, int new);
+int keypad_on(WINDOW * win, int newval);
#ifndef DISABLE_BROWSER
char *do_browser(char *path);
SET(REGEXP_COMPILED);
}
-void regexp_cleanup()
+void regexp_cleanup(void)
{
UNSET(REGEXP_COMPILED);
regfree(&search_regexp);
}
#endif
-int keypad_on(WINDOW * win, int new)
+int keypad_on(WINDOW * win, int newval)
{
/* This is taken right from aumix. Don't sue me */
int old;
old = win->_use_keypad;
- keypad(win, new);
+ keypad(win, newval);
return old;
#else
- keypad(win, new);
+ keypad(win, newval);
return 1;
#endif /* HAVE_USEKEYPAD */