summaryrefslogtreecommitdiff
path: root/startmode.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2023-10-27 22:21:06 +0200
committerOskar <[email protected]>2023-10-27 22:21:06 +0200
commit37e748be88e6e72c37809018f9c163917d609cbd (patch)
tree659bff87e914555c61d698d03725759fee5f2a87 /startmode.c
parentdfad11647c8ba58ec6912a3baf6c08e1326a28af (diff)
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
Diffstat (limited to 'startmode.c')
-rw-r--r--startmode.c8
1 files changed, 7 insertions, 1 deletions
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':