]> git.wh0rd.org Git - nano.git/commitdiff
a few last cosmetic reorderings and fixes
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 29 May 2004 16:47:52 +0000 (16:47 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 29 May 2004 16:47:52 +0000 (16:47 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/global.c
src/nano.c
src/proto.h
src/rcfile.c

index 9b0334b55fe5aa715f806584a19df5dc29537fcb..be8ce563314f2b2ec066280b847c6df596322c84 100644 (file)
@@ -66,6 +66,12 @@ filestruct *cutbuffer = NULL;        /* A place to store cut text */
 openfilestruct *open_files = NULL;     /* The list of open files */
 #endif
 
+#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
+char *whitespace = NULL;       /* Characters used when displaying
+                                  the first characters of tabs and
+                                  spaces. */
+#endif
+
 #ifndef DISABLE_JUSTIFY
 char *punct = NULL;            /* Closing punctuation that can end
                                   sentences. */
@@ -78,11 +84,6 @@ char *quotestr = NULL;               /* Quote string.  The default value is
 
 #ifndef NANO_SMALL
 char *backup_dir = NULL;       /* Backup directory. */
-#ifdef ENABLE_NANORC
-char *whitespace = NULL;       /* Characters used when displaying
-                                  the first characters of tabs and
-                                  spaces. */
-#endif
 #endif
 
 int resetstatuspos;            /* Hack for resetting the status bar 
index e8addff099f34f982ffd85aa416c18f244371ee9..99c0a2fedf617ca2a0275b0e0114ccb727a5f31b 100644 (file)
@@ -1283,7 +1283,7 @@ int do_wrap(filestruct *inptr)
  * create the new wrap line.  Finally, we clean up. */
 
 /* Step 1, finding where to wrap.  We are going to add a new-line
- * after a white-space character.  In this step, we set wrap_loc as the
+ * after a whitespace character.  In this step, we set wrap_loc as the
  * location of this replacement.
  *
  * Where should we break the line?  We need the last "legal wrap point"
index e38ae6416821fe4dc7ef37b4244795cf489a4d09..68565c0df96afd7acdc38fa24847783c4a89b638 100644 (file)
@@ -46,6 +46,10 @@ extern int search_last_line;
 extern int search_offscreen;
 extern int currslen;
 
+#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
+extern char *whitespace;
+#endif
+
 #ifndef DISABLE_JUSTIFY
 extern char *punct;
 extern char *brackets;
@@ -54,9 +58,6 @@ extern char *quotestr;
 
 #ifndef NANO_SMALL
 extern char *backup_dir;
-#ifdef ENABLE_NANORC
-extern char *whitespace;
-#endif
 #endif
 
 extern WINDOW *topwin, *edit, *bottomwin;
index 0dbad5fb082460a889bbeb6e52a8c79c05973664..fa99dcee27e21eda2f585dc69682bee7b440208d 100644 (file)
@@ -548,6 +548,9 @@ void parse_rcfile(FILE *rcstream)
 #ifndef DISABLE_WRAPJUSTIFY
                                || !strcasecmp(rcopts[i].name, "fill")
 #endif
+#ifndef NANO_SMALL
+                               || !strcasecmp(rcopts[i].name, "whitespace")
+#endif
 #ifndef DISABLE_JUSTIFY
                                || !strcasecmp(rcopts[i].name, "punct")
                                || !strcasecmp(rcopts[i].name, "brackets")
@@ -555,7 +558,6 @@ void parse_rcfile(FILE *rcstream)
 #endif
 #ifndef NANO_SMALL
                                || !strcasecmp(rcopts[i].name, "backupdir")
-                               || !strcasecmp(rcopts[i].name, "whitespace")
 #endif
 #ifndef DISABLE_SPELLER
                                || !strcasecmp(rcopts[i].name, "speller")
@@ -594,6 +596,19 @@ void parse_rcfile(FILE *rcstream)
                                    wrap_at = j;
                            } else
 #endif
+#ifndef NANO_SMALL
+                           if (!strcasecmp(rcopts[i].name, "whitespace")) {
+                               size_t ws_len;
+                               whitespace = mallocstrcpy(NULL, option);
+                               ws_len = strlen(whitespace);
+                               if (ws_len != 2 || (ws_len == 2 && (is_cntrl_char(whitespace[0]) || is_cntrl_char(whitespace[1])))) {
+                                   rcfile_error(_("Two non-control characters required"));
+                                   free(whitespace);
+                                   whitespace = NULL;
+                               } else
+                                   SET(WHITESPACE_DISPLAY);
+                           } else
+#endif
 #ifndef DISABLE_JUSTIFY
                            if (!strcasecmp(rcopts[i].name, "punct")) {
                                punct = mallocstrcpy(NULL, option);
@@ -616,18 +631,6 @@ void parse_rcfile(FILE *rcstream)
                            if (!strcasecmp(rcopts[i].name, "backupdir"))
                                backup_dir = mallocstrcpy(NULL, option);
                            else
-
-                           if (!strcasecmp(rcopts[i].name, "whitespace")) {
-                               size_t ws_len;
-                               whitespace = mallocstrcpy(NULL, option);
-                               ws_len = strlen(whitespace);
-                               if (ws_len != 2 || (ws_len == 2 && (is_cntrl_char(whitespace[0]) || is_cntrl_char(whitespace[1])))) {
-                                   rcfile_error(_("Two non-control characters required"));
-                                   free(whitespace);
-                                   whitespace = NULL;
-                               } else
-                                   SET(WHITESPACE_DISPLAY);
-                           } else
 #endif
 #ifndef DISABLE_SPELLER
                            if (!strcasecmp(rcopts[i].name, "speller"))