]> Sergey Matveev's repositories - nnn.git/commitdiff
Reorder configuration stuff
authorlostd <lostd@2f30.org>
Tue, 7 Oct 2014 15:36:29 +0000 (15:36 +0000)
committerlostd <>
Tue, 7 Oct 2014 15:36:29 +0000 (15:36 +0000)
noice.c

diff --git a/noice.c b/noice.c
index e2ec37df702cc074ebb279dc3f8bf5db11c4504b..3e735fe22908c2f67fb44f7f698ff56a71c583d9 100644 (file)
--- a/noice.c
+++ b/noice.c
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
 #define ISODD(x) ((x) & 1)
 
+struct assoc {
+       char *ext; /* Extension */
+       char *bin; /* Program */
+};
+
+/* Configuration */
+struct assoc assocs[] = {
+       { ".avi", "mplayer" },
+       { ".mp4", "mplayer" },
+       { ".mkv", "mplayer" },
+       { ".mp3", "mplayer" },
+       { ".ogg", "mplayer" },
+       { ".srt", "less" },
+       { ".txt", "less" },
+       { "README", "less" },
+};
+
+#define CWD "cwd: "
+#define CURSR " > "
+#define EMPTY "   "
+
 /*
  * Layout:
  * .---------
@@ -49,20 +70,6 @@ struct entry {
        char name[MAXNAMLEN + 1];
 };
 
-struct assoc {
-       char *ext; /* Extension */
-       char *bin; /* Program */
-} assocs[] = {
-       { ".avi", "mplayer" },
-       { ".mp4", "mplayer" },
-       { ".mkv", "mplayer" },
-       { ".mp3", "mplayer" },
-       { ".ogg", "mplayer" },
-       { ".srt", "less" },
-       { ".txt", "less" },
-       { "README", "less" },
-};
-
 char *
 openwith(char *file)
 {
@@ -266,10 +273,6 @@ redraw:
                DPRINTF_D(cur);
                DPRINTF_S(path);
 
-#define CWD "cwd: "
-#define CURSR " > "
-#define EMPTY "   "
-
                /* No text wrapping in cwd line */
                cwd = malloc(COLS * sizeof(char));
                strncpy(cwd, path, COLS);