Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 14199afeb5 | |||
| 9f3558c430 | |||
| ce64e4637d |
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15)
|
|||||||
project(ke C) # Specify C language explicitly
|
project(ke C) # Specify C language explicitly
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 99)
|
set(CMAKE_C_STANDARD 99)
|
||||||
set(KE_VERSION "1.0.8")
|
set(KE_VERSION "1.0.10")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g")
|
set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_XOPEN_SOURCE")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -D_XOPEN_SOURCE")
|
||||||
@@ -14,9 +14,3 @@ add_executable(ke main.c)
|
|||||||
|
|
||||||
# Define KE_VERSION for use in C code (e.g., #define KE_VERSION)
|
# Define KE_VERSION for use in C code (e.g., #define KE_VERSION)
|
||||||
target_compile_definitions(ke PRIVATE KE_VERSION="ke version ${KE_VERSION}")
|
target_compile_definitions(ke PRIVATE KE_VERSION="ke version ${KE_VERSION}")
|
||||||
|
|
||||||
# Set output properties
|
|
||||||
set_target_properties(ke PROPERTIES
|
|
||||||
FOLDER bin
|
|
||||||
RUNTIME_OUTPUT_DIRECTORY bin
|
|
||||||
)
|
|
||||||
|
|||||||
2
ke.1
2
ke.1
@@ -26,6 +26,8 @@ saving a file can be done with either C-k s or C-k C-s.
|
|||||||
Delete from the cursor to the beginning of the line.
|
Delete from the cursor to the beginning of the line.
|
||||||
.It C-k d
|
.It C-k d
|
||||||
Delete from the cursor to the end of the line.
|
Delete from the cursor to the end of the line.
|
||||||
|
.It C-k C-d
|
||||||
|
Delete the entire link.
|
||||||
.It C-k e
|
.It C-k e
|
||||||
Edit a new file. Also C-k C-e.
|
Edit a new file. Also C-k C-e.
|
||||||
.It C-k f
|
.It C-k f
|
||||||
|
|||||||
2
main.c
2
main.c
@@ -627,7 +627,7 @@ open_file(const char *filename)
|
|||||||
|
|
||||||
editor.filename = strdup(filename);
|
editor.filename = strdup(filename);
|
||||||
assert(editor.filename != NULL);
|
assert(editor.filename != NULL);
|
||||||
|
|
||||||
editor.dirty = 0;
|
editor.dirty = 0;
|
||||||
if ((fp = fopen(filename, "r")) == NULL) {
|
if ((fp = fopen(filename, "r")) == NULL) {
|
||||||
if (errno == ENOENT) {
|
if (errno == ENOENT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user