aboutsummaryrefslogtreecommitdiffstats
path: root/noice.c
diff options
context:
space:
mode:
authorlostd <lostd@2f30.org>2014-10-07 15:36:29 +0000
committerlostd <>2014-10-07 15:36:29 +0000
commit10d2d18cb244d76862b508d7dffa65c6a5147040 (patch)
tree14c6c63edeab534a66859875d276c6cc0c535a7e /noice.c
parent88fd8fcf8b325cb5c5e6cb0a5553537039a10690 (diff)
downloadnoice-10d2d18cb244d76862b508d7dffa65c6a5147040.tar.gz
Reorder configuration stuff
Diffstat (limited to 'noice.c')
-rw-r--r--noice.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/noice.c b/noice.c
index e2ec37d..3e735fe 100644
--- 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);
Un proyecto texto-plano.xyz