From 37e748be88e6e72c37809018f9c163917d609cbd Mon Sep 17 00:00:00 2001 From: Oskar Date: Fri, 27 Oct 2023 22:21:06 +0200 Subject: GET_LINE() function is done. It was a PAIN to get working right. I hope to god ill be able to reuse code from here if in other functions. Im suspecting that im going to have to --- startmode.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'startmode.c') diff --git a/startmode.c b/startmode.c index dc71ffa..866da36 100644 --- a/startmode.c +++ b/startmode.c @@ -71,8 +71,14 @@ int startmode(char filename[]) { break; case 'P': case 'p': - print_7ed(filename, focus); + char *line; + int ret = GET_LINE(filename, focus, &line); + if (ret == 1) { + return EXIT_FAILURE; + } + printf("%s", line); + free(line); break; case 'E': case 'e': -- cgit v1.2.3