commit - e6a7541a484c047b50c57445389c0660807988ea
commit + 50c63039ab458da77c04eca7fff565f780e6086a
blob - f16e7397692fc6cdff7dc3f577cd1b98e2ae0434
blob + 3fbd42de54fd47f7f2f1ff8992151dd199cecdbd
--- rover.c
+++ rover.c
typedef enum {DEFAULT, RED, GREEN, YELLOW, BLUE, CYAN, MAGENTA, WHITE} color_t;
+#define STATUSPOS COLS - 16
+
/* Height of listing view. */
#define HEIGHT (LINES-4)
#define SHOW_DIRS 0x02u
#define SHOW_HIDDEN 0x04u
+/* Marks parameters. */
#define BULK_INIT 5
#define BULK_THRESH 256
sprintf(ROW, "%d/%d", FSEL + 1, rover.nfiles);
sprintf(STATUS+3, "%*s", 12, ROW);
color_set(RVC_STATUS, NULL);
- mvaddstr(LINES - 1, COLS - 16, STATUS);
+ mvaddstr(LINES - 1, STATUSPOS, STATUS);
color_set(DEFAULT, NULL);
refresh();
}
return 1;
}
+static void
+message(const char *msg, color_t color)
+{
+ int len, pos;
+
+ len = strlen(msg);
+ pos = (STATUSPOS - len) >> 1;
+ attr_on(A_BOLD, NULL);
+ color_set(color, NULL);
+ mvaddstr(LINES - 1, pos, msg);
+ color_set(DEFAULT, NULL);
+ attr_off(A_BOLD, NULL);
+ getch();
+ mvhline(LINES - 1, pos, ' ', len);
+}
+
int
main(int argc, char *argv[])
{