diff --git a/Makefile b/Makefile index 015eb29..ff07c87 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ CWARN=-Wall -Wpedantic -Wextra -Wsign-conversion -Wtype-limits -Wunused-result #CFLAGS += -fsanitize=address -fno-omit-frame-pointer CFLAGS += '-DBB_NAME="$(NAME)"' -CFILES=draw.c bterm.c +CFILES=draw.c terminal.c OBJFILES=$(CFILES:.c=.o) all: $(NAME) diff --git a/bb.c b/bb.c index 71a53fb..76bf659 100644 --- a/bb.c +++ b/bb.c @@ -22,6 +22,7 @@ #include "bb.h" #include "draw.h" +#include "terminal.h" #ifndef BB_NAME #define BB_NAME "bb" diff --git a/bb.h b/bb.h index 2b557a9..2967273 100644 --- a/bb.h +++ b/bb.h @@ -8,7 +8,9 @@ #ifndef FILE_BB__H #define FILE_BB__H -#include "bterm.h" +#include + +#include "terminal.h" #include "entry.h" // Macros: diff --git a/draw.c b/draw.c index 38e06bc..7a762c2 100644 --- a/draw.c +++ b/draw.c @@ -10,9 +10,9 @@ #include #include -#include "bterm.h" #include "draw.h" #include "entry.h" +#include "terminal.h" #define E_ISDIR(e) (S_ISDIR(S_ISLNK((e)->info.st_mode) ? (e)->linkedmode : (e)->info.st_mode)) diff --git a/bterm.c b/terminal.c similarity index 99% rename from bterm.c rename to terminal.c index 0a5d68f..2dda072 100644 --- a/bterm.c +++ b/terminal.c @@ -1,5 +1,5 @@ /* - * bterm.h + * terminal.c * Copyright 2019 Bruce Hill * Released under the MIT License * @@ -12,7 +12,7 @@ #include #include -#include "bterm.h" +#include "terminal.h" typedef struct { int key; diff --git a/bterm.h b/terminal.h similarity index 98% rename from bterm.h rename to terminal.h index d2fd963..ab176b8 100644 --- a/bterm.h +++ b/terminal.h @@ -1,5 +1,5 @@ /* - * bterm.h + * terminal.h * Copyright 2019 Bruce Hill * Released under the MIT License * @@ -7,8 +7,8 @@ * terminal escape sequences. */ -#ifndef FILE__BTERM_H -#define FILE__BTERM_H +#ifndef FILE__TERMINAL_H +#define FILE__TERMINAL_H #include #include @@ -17,7 +17,6 @@ // Maximum time in milliseconds between double clicks #define DOUBLECLICK_THRESHOLD 200 - typedef enum { // ASCII chars: KEY_CTRL_AT = 0x00, KEY_CTRL_A, KEY_CTRL_B, KEY_CTRL_C, KEY_CTRL_D,