Commit 6fe61499 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

All the updates that I've been waiting all weekend to commit, no desc, tough

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 9a46f3cf
Showing with 551 additions and 472 deletions
+551 -472
This diff is collapsed.
This diff is collapsed.
...@@ -34,7 +34,7 @@ extern int current_x, current_y, posible_max, totlines; ...@@ -34,7 +34,7 @@ extern int current_x, current_y, posible_max, totlines;
extern int placewewant; extern int placewewant;
extern int mark_beginx, samelinewrap; extern int mark_beginx, samelinewrap;
extern int totsize, temp_opt; extern int totsize, temp_opt;
extern int fill, flags,tabsize; extern int fill, wrap_at, flags,tabsize;
extern int search_last_line; extern int search_last_line;
extern int currslen; extern int currslen;
......
...@@ -50,7 +50,11 @@ rcoption rcopts[NUM_RCOPTS] = ...@@ -50,7 +50,11 @@ rcoption rcopts[NUM_RCOPTS] =
{"nofollow", FOLLOW_SYMLINKS}, {"nofollow", FOLLOW_SYMLINKS},
{"mouse", USE_MOUSE}, {"mouse", USE_MOUSE},
{"pico", PICO_MODE}, {"pico", PICO_MODE},
#ifndef DISABLE_WRAPJUSTIFY
{"fill", 0}, {"fill", 0},
#endif
{"speller", 0}, {"speller", 0},
{"tempfile", TEMP_OPT}, {"tempfile", TEMP_OPT},
{"view", VIEW_MODE}, {"view", VIEW_MODE},
...@@ -160,8 +164,16 @@ void parse_rcfile(FILE *rcstream, char *filename) ...@@ -160,8 +164,16 @@ void parse_rcfile(FILE *rcstream, char *filename)
rcopts[i].name); rcopts[i].name);
#endif #endif
if (set == 1 || rcopts[i].flag == FOLLOW_SYMLINKS) { if (set == 1 || rcopts[i].flag == FOLLOW_SYMLINKS) {
if (!strcasecmp(rcopts[i].name, "fill") || if (
!strcasecmp(rcopts[i].name, "speller")) { #ifndef DISABLE_WRAPJUSTIFY
!strcasecmp(rcopts[i].name, "fill") ||
#endif
#ifndef DISABLE_SPELLER
!strcasecmp(rcopts[i].name, "speller")
#else
0
#endif
) {
if (*ptr == '\n' || *ptr == '\0') { if (*ptr == '\n' || *ptr == '\0') {
rcfile_msg(&errors, _("Error in %s on line %d: option %s requires an argument"), rcfile_msg(&errors, _("Error in %s on line %d: option %s requires an argument"),
...@@ -171,6 +183,8 @@ void parse_rcfile(FILE *rcstream, char *filename) ...@@ -171,6 +183,8 @@ void parse_rcfile(FILE *rcstream, char *filename)
option = ptr; option = ptr;
ptr = parse_next_word(ptr); ptr = parse_next_word(ptr);
if (!strcasecmp(rcopts[i].name, "fill")) { if (!strcasecmp(rcopts[i].name, "fill")) {
#ifndef DISABLE_WRAPJUSTIFY
if ((i = atoi(option)) < MIN_FILL_LENGTH) { if ((i = atoi(option)) < MIN_FILL_LENGTH) {
rcfile_msg(&errors, rcfile_msg(&errors,
_("Error in %s on line %d: requested fill size %d too small"), _("Error in %s on line %d: requested fill size %d too small"),
...@@ -178,10 +192,13 @@ void parse_rcfile(FILE *rcstream, char *filename) ...@@ -178,10 +192,13 @@ void parse_rcfile(FILE *rcstream, char *filename)
} }
else else
fill = i; fill = i;
#endif
} }
else { else {
#ifndef DISABLE_SPELLER
alt_speller = charalloc(strlen(option) + 1); alt_speller = charalloc(strlen(option) + 1);
strcpy(alt_speller, option); strcpy(alt_speller, option);
#endif
} }
} else } else
SET(rcopts[i].flag); SET(rcopts[i].flag);
......
...@@ -271,8 +271,11 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen, ...@@ -271,8 +271,11 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen,
x_left = strlen(buf); x_left = strlen(buf);
x = strlen(def) + x_left; x = strlen(def) + x_left;
#ifndef DISABLE_MOUSE
currshortcut = s; currshortcut = s;
currslen = slen; currslen = slen;
#endif
/* Get the input! */ /* Get the input! */
if (strlen(def) > 0) if (strlen(def) > 0)
strcpy(inputbuf, def); strcpy(inputbuf, def);
...@@ -1420,8 +1423,11 @@ int do_help(void) ...@@ -1420,8 +1423,11 @@ int do_help(void)
curs_set(0); curs_set(0);
blank_statusbar(); blank_statusbar();
#ifndef DISABLE_MOUSE
currshortcut = help_list; currshortcut = help_list;
currslen = HELP_LIST_LEN; currslen = HELP_LIST_LEN;
#endif
kp = keypad_on(edit, 1); kp = keypad_on(edit, 1);
kp2 = keypad_on(bottomwin, 1); kp2 = keypad_on(bottomwin, 1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment