commit 10d2d18cb244d76862b508d7dffa65c6a5147040
parent 88fd8fcf8b325cb5c5e6cb0a5553537039a10690
Author: lostd <lostd@2f30.org>
Date: Tue, 7 Oct 2014 15:36:29 +0000
Reorder configuration stuff
Diffstat:
M | noice.c | | | 39 | +++++++++++++++++++++------------------ |
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/noice.c b/noice.c
@@ -26,6 +26,27 @@
#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);