tRename to 'te' - ve - a minimal text editor (work in progress) | |
git clone git://src.adamsgaard.dk/ve | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 36ee312271f23de904472f0ae2208489cec7cdfd | |
parent e110c48cae139c4f68653b9de4c454f155e0cbef | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 6 Aug 2019 20:47:49 +0200 | |
Rename to 'te' | |
Diffstat: | |
M Makefile | 2 +- | |
D byote.h | 37 -----------------------------… | |
M edit.c | 2 +- | |
M input.c | 2 +- | |
M io.c | 2 +- | |
M main.c | 2 +- | |
M output.c | 2 +- | |
M row.c | 2 +- | |
M row.h | 2 +- | |
A te.h | 37 +++++++++++++++++++++++++++++… | |
M terminal.c | 2 +- | |
11 files changed, 46 insertions(+), 46 deletions(-) | |
--- | |
diff --git a/Makefile b/Makefile | |
t@@ -3,7 +3,7 @@ CFLAGS = -g -std=c99 -pedantic -Wall -Wextra | |
SRC = $(wildcard *.c) | |
OBJ = $(patsubst %.c,%.o,$(SRC)) | |
HDR = $(wildcard *.h) | |
-BIN = ./byote | |
+BIN = ./te | |
PREFIX ?= /usr/local | |
INSTALL ?= install | |
diff --git a/byote.h b/byote.h | |
t@@ -1,37 +0,0 @@ | |
-#ifndef BYOTE_H_ | |
-#define BYOTE_H_ | |
- | |
-#include <termios.h> | |
-#include <time.h> | |
- | |
-#define PROGNAME "byote" | |
-#define VERSION "0.0.1" | |
- | |
-#define TAB_WIDTH 4 | |
-#define STATUS_MESSAGE_TIMEOUT 3 | |
- | |
-/* editor row: stores a row of text */ | |
-typedef struct eRow { | |
- char *chars; /* text read from file */ | |
- char *rchars; /* text to render */ | |
- int size; /* length of chars */ | |
- int rsize; /* length of rchars */ | |
-} eRow; | |
- | |
-struct editor_config { | |
- int cursor_x, cursor_y, cursor_rx; | |
- int screen_rows, screen_columns; | |
- int num_rows; | |
- eRow *row; | |
- int row_offset, column_offset; | |
- char *filename; | |
- struct termios orig_termios; | |
- int mode; /* 0: normal, 1: insert, 2: visual */ | |
- int show_status; | |
- char status_msg[80]; | |
- time_t status_msg_time; | |
- int file_changed; | |
-}; | |
- | |
-extern struct editor_config E; | |
-#endif | |
diff --git a/edit.c b/edit.c | |
t@@ -1,5 +1,5 @@ | |
#include "row.h" | |
-#include "byote.h" | |
+#include "te.h" | |
void | |
editor_insert_char(int c) | |
diff --git a/input.c b/input.c | |
t@@ -1,6 +1,6 @@ | |
#include <unistd.h> | |
#include <stdlib.h> | |
-#include "byote.h" | |
+#include "te.h" | |
#include "terminal.h" | |
#include "edit.h" | |
#include "output.h" | |
diff --git a/io.c b/io.c | |
t@@ -10,7 +10,7 @@ | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <errno.h> | |
-#include "byote.h" | |
+#include "te.h" | |
#include "terminal.h" | |
#include "row.h" | |
#include "output.h" | |
diff --git a/main.c b/main.c | |
t@@ -3,7 +3,7 @@ | |
#include "input.h" | |
#include "io.h" | |
#include "output.h" | |
-#include "byote.h" | |
+#include "te.h" | |
int | |
main(int argc, char* argv[]) | |
diff --git a/output.c b/output.c | |
t@@ -7,7 +7,7 @@ | |
#include "terminal.h" | |
#include "output.h" | |
#include "row.h" | |
-#include "byote.h" | |
+#include "te.h" | |
/* reallocate append buffer to hold string s */ | |
void | |
diff --git a/row.c b/row.c | |
t@@ -1,6 +1,6 @@ | |
#include <stdlib.h> | |
#include <string.h> | |
-#include "byote.h" | |
+#include "te.h" | |
/* navigate over tab-representative string as one character */ | |
int | |
diff --git a/row.h b/row.h | |
t@@ -1,7 +1,7 @@ | |
#ifndef ROW_H_ | |
#define ROW_H_ | |
-#include "byote.h" | |
+#include "te.h" | |
int editor_row_cursor_x_to_rx(eRow *row, int cursor_x); | |
void editor_row_update(eRow* row); | |
diff --git a/te.h b/te.h | |
t@@ -0,0 +1,37 @@ | |
+#ifndef BYOTE_H_ | |
+#define BYOTE_H_ | |
+ | |
+#include <termios.h> | |
+#include <time.h> | |
+ | |
+#define PROGNAME "te" | |
+#define VERSION "0.0.1" | |
+ | |
+#define TAB_WIDTH 4 | |
+#define STATUS_MESSAGE_TIMEOUT 3 | |
+ | |
+/* editor row: stores a row of text */ | |
+typedef struct eRow { | |
+ char *chars; /* text read from file */ | |
+ char *rchars; /* text to render */ | |
+ int size; /* length of chars */ | |
+ int rsize; /* length of rchars */ | |
+} eRow; | |
+ | |
+struct editor_config { | |
+ int cursor_x, cursor_y, cursor_rx; | |
+ int screen_rows, screen_columns; | |
+ int num_rows; | |
+ eRow *row; | |
+ int row_offset, column_offset; | |
+ char *filename; | |
+ struct termios orig_termios; | |
+ int mode; /* 0: normal, 1: insert, 2: visual */ | |
+ int show_status; | |
+ char status_msg[80]; | |
+ time_t status_msg_time; | |
+ int file_changed; | |
+}; | |
+ | |
+extern struct editor_config E; | |
+#endif | |
diff --git a/terminal.c b/terminal.c | |
t@@ -5,7 +5,7 @@ | |
#include <termios.h> | |
#include <unistd.h> | |
#include <sys/ioctl.h> | |
-#include "byote.h" | |
+#include "te.h" | |
struct editor_config E; | |