summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--7ed.c2
-rw-r--r--Makefile8
-rw-r--r--TODO12
-rw-r--r--startmode.c8
4 files changed, 16 insertions, 14 deletions
diff --git a/7ed.c b/7ed.c
index 7ef9107..a202bea 100644
--- a/7ed.c
+++ b/7ed.c
@@ -6,7 +6,7 @@
#include "input.h"
#include <stdint.h>
-#define VERSION 1
+#define VERSION 2
#define USAGE "7ed [OPTION] [FILENAME]\n" \
"\nVALID COMMAND-LINE OPTIONS:\n\n"\
" -v Prints out the version number\n"\
diff --git a/Makefile b/Makefile
index 1be84f3..cc171d8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC=gcc
-CFLAGS_TESTBIN=-O3 -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address
-CFLAGS=-O2 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -static
+CFLAGS_TESTBIN=-O3 -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address -Wpedantic -std=gnu11
+CFLAGS=-O3 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -static -std=gnu11
TARGET=7ed
TESTTARGET=7ed-TESTING
INSTALL_DIRECTORY=/usr/local/bin
@@ -24,6 +24,6 @@ install:
echo "$(TARGET) was installed to $(INSTALL_DIRECTORY)"
release:
- echo "CC 7ed.c functions.c startmode.c editmode.c ---> $(TARGET)"
- $(CC) $(CFLAGS) 7ed.c functions.c startmode.c editmode.c -o $(TARGET)
+ echo "CC 7ed.c functions.c startmode.c editmode.c i_validation.c process_multiples.c ---> $(TARGET)"
+ $(CC) $(CFLAGS) 7ed.c functions.c startmode.c editmode.c input.c i_validation.c process_multiples.c -o $(TARGET)
echo "$(TARGET) is done."
diff --git a/TODO b/TODO
index b3ea199..8e374ba 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,10 @@
TODO list. This is mostly so i can plan more granularly and remember small stuff i was working on last time and what i should prioritise first.
This is not my overall big planning board. (1 highest prio, 10 lowest)
-1 - Start working on X
-1 - Start working on D
-2 - Re-write new_line and remove_line_contents for better performance. (They are very inefficient)
-2 - All L and N functionality is done. Did some testing and made some fixes. I will keep this here for now in case i find anything more.
-2 - Not really a TODO point but more of an observation and a realisation i have made. I could have just used regex to do the validation of my commands. How about that... Well im too far in (sunk cost fallacy or whatever its called).
+1 - Remove testing code, add comments for future me.
+1 - Perform full test of the whole program
+1 - Re-write USAGE
+2 - Re-write Makefile to make it easier
+2 - Add some quality of life features
+3 - Re-write new_line and remove_line_contents for better performance. (They are very inefficient)
+4 - Not really a TODO point but more of an observation and a realisation i have made. I could have just used regex to do the validation of my commands. How about that... Well im too far in (sunk cost fallacy or whatever its called).
diff --git a/startmode.c b/startmode.c
index e7175a2..372cc94 100644
--- a/startmode.c
+++ b/startmode.c
@@ -46,7 +46,7 @@ int call_singles(char single, uint64_t focus, char *filename) {
switch(single) {
case 'p':
- case 'P':
+ case 'P': {
char *line;
size_t start;
@@ -57,7 +57,7 @@ int call_singles(char single, uint64_t focus, char *filename) {
fprintf(stdout, "%s", line);
free(line);
- break;
+ break; }
case 'e':
case 'E':
@@ -65,14 +65,14 @@ int call_singles(char single, uint64_t focus, char *filename) {
break;
case 'c':
- case 'C':
+ case 'C': {
int dnl = display_name_linecount(filename);
if (dnl == 1) {
return EXIT_FAILURE;
}
- break;
+ break; }
case 'q':
case 'Q':