remove an obsolete comment, and remove some superfluous #ifndefs.
* src/global.c (shortcut_init) - Put ^B and ^F in the same order as
all other command keys: first the backward then the forward motion.
+ * src/{nano.h,*.c} - Remove stray spaces before tabs.
2014-03-16 Benno Schulenberg <bensberg@justemail.net>
* src/nano.h - Display more help items when the terminal is wider.
tmp = strrchr(retval, '/');
if (tmp != NULL)
- null_at(&retval, tmp - retval);
+ null_at(&retval, tmp - retval);
return retval;
}
statusbar(_("Error reading %s: %s"), filename,
strerror(errno));
beep();
- return -1;
+ return -1;
} else {
/* The file is A-OK. Open it. */
*f = fdopen(fd, "rb");
#ifdef ENABLE_MULTIBUFFER
N_("Close the current file buffer / Exit from nano")
#else
- N_("Exit from nano")
+ N_("Exit from nano")
#endif
;
const char *nano_writeout_msg =
add_to_sclist(MMAIN, "M-{", do_unindent, 0, TRUE);
if (ISSET(UNDOABLE)) {
add_to_sclist(MMAIN, "M-U", do_undo, 0, TRUE);
- add_to_sclist(MMAIN, "M-E", do_redo, 0, TRUE);
+ add_to_sclist(MMAIN, "M-E", do_redo, 0, TRUE);
}
#endif
add_to_sclist(MALL, "^F", do_right, 0, TRUE);
#endif
if (edit_refresh_needed) {
#ifdef DEBUG
- fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
+ fprintf(stderr, "running edit_refresh() as edit_refresh_needed is true\n");
#endif
edit_refresh();
edit_refresh_needed = FALSE;
fprintf(stderr, "mouse_y = %d, current_y = %d\n", mouse_y, openfile->current_y);
#endif
- if (ISSET(SOFTWRAP)) {
+ if (ISSET(SOFTWRAP)) {
int i = 0;
for (openfile->current = openfile->edittop;
openfile->current->next && i < mouse_y;
message before starting this later if it takes
too long to do this routine. For now silently
abort if they hit a key */
- nodelay(edit, FALSE);
+ nodelay(edit, FALSE);
for (; tmpcolor != NULL; tmpcolor = tmpcolor->next) {
if ((cur_check = time(NULL)) - last_check > 1) {
last_check = cur_check;
if (wgetch(edit) != ERR)
- goto precalc_cleanup;
+ goto precalc_cleanup;
}
while ((nostart = regexec(tmpcolor->start, &fileptr->data[startx], 1, &startmatch, 0)) == 0) {
if ((cur_check = time(NULL)) - last_check > 1) {
last_check = cur_check;
if (wgetch(edit) != ERR)
- goto precalc_cleanup;
+ goto precalc_cleanup;
}
if (regexec(tmpcolor->end, endptr->data, 1, &endmatch, 0) == 0)
break;
if (endptr == NULL) {
#ifdef DEBUG
- fprintf(stderr, "no end found, breaking out\n");
+ fprintf(stderr, "no end found, breaking out\n");
#endif
break;
}
} lintstruct;
-#define CNONE (1<<1)
+#define CNONE (1<<1)
/* Yay, regex doesn't apply to this line at all! */
-#define CBEGINBEFORE (1<<2)
+#define CBEGINBEFORE (1<<2)
/* regex starts on an earlier line, ends on this one */
-#define CENDAFTER (1<<3)
+#define CENDAFTER (1<<3)
/* regex sraers on this line and ends on a later one */
-#define CWHOLELINE (1<<4)
+#define CWHOLELINE (1<<4)
/* whole line engulfed by the regex start < me, end > me */
-#define CSTARTENDHERE (1<<5)
+#define CSTARTENDHERE (1<<5)
/* regex starts and ends within this line */
#define CWTF (1<<6)
/* Something else */
else if (s->scfunc == do_verbatim_input) {
/* If we're using restricted mode, the filename
* isn't blank, and we're at the "Write File"
- * prompt, disable verbatim input. */
+ * prompt, disable verbatim input. */
if (!ISSET(RESTRICTED) ||
openfile->filename[0] == '\0' ||
currmenu != MWRITEFILE) {
parse_syntax(ptr);
}
else if (strcasecmp(keyword, "magic") == 0) {
- parse_magictype(ptr);
+ parse_magictype(ptr);
} else if (strcasecmp(keyword, "header") == 0)
parse_headers(ptr);
else if (strcasecmp(keyword, "color") == 0)
for (s = sclist; s != NULL; s = s->next)
if ((s->menu & currmenu) && i == s->seq) {
func = s->scfunc;
- break;
+ break;
}
if (i == -2 || i == 0 ) {
t = t->next;
}
openfile->mark_begin = t;
- openfile->mark_begin_x = 0;
+ openfile->mark_begin_x = 0;
openfile->mark_set = TRUE;
}
/* Get the system pipe buffer size. */
if ((pipe_buff_size = fpathconf(lint_fd[0], _PC_PIPE_BUF)) < 1) {
close(lint_fd[0]);
- statusbar(_("Could not get size of pipe buffer"));
+ statusbar(_("Could not get size of pipe buffer"));
return;
}
/* Set up multi-line color data for this line if it's not yet calculated */
if (fileptr->multidata == NULL && openfile->syntax
&& openfile->syntax->nmultis > 0) {
- int i;
+ int i;
fileptr->multidata = (short *) nmalloc(openfile->syntax->nmultis * sizeof(short));
for (i = 0; i < openfile->syntax->nmultis; i++)
fileptr->multidata[i] = -1; /* Assue this applies until we know otherwise */