diff options
-rw-r--r-- | 7ed.h | 6 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | editmode.c | 6 | ||||
-rw-r--r-- | functions.c | 2 | ||||
-rw-r--r-- | process_multiples.c | 2 |
5 files changed, 9 insertions, 9 deletions
@@ -24,12 +24,12 @@ void shuffle(char arr[], int n); int startmode(char filename[]); -int get_line(char filename[], long focus, char **line, size_t *start); +int get_line(char *filename, long focus, char **line, size_t *start); int editmode(char filename[], uint64_t focus); -int new_line(char filename[], long new_line_pos_temp); +int new_line(char filename[], long long new_line_pos_temp); -int remove_line_contents(char filename[], long focus); +int remove_line_contents(char filename[], uint64_t focus); int delete_specified_newline(char filename[], long focus);
\ No newline at end of file @@ -1,5 +1,5 @@ CC=gcc -CFLAGS_TESTBIN=-O3 -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address +CFLAGS_TESTBIN=-O2 -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address CFLAGS=-O2 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -static TARGET=7ed TESTTARGET=7ed-TESTING @@ -149,9 +149,9 @@ int check_end_newline(char filename[]) { // function that checks if a file ends } -int new_line(char filename[], long new_line_pos_temp) { // creates a new line within a file after a specified line number +int new_line(char filename[], long long new_line_pos_temp) { // creates a new line within a file after a specified line number - long new_line_pos; + long long new_line_pos; if (new_line_pos_temp < 0) { fprintf(stderr, "The new line can not be under 0!\n"); return 1; @@ -203,7 +203,7 @@ int new_line(char filename[], long new_line_pos_temp) { // creates a new line wi } -int remove_line_contents(char filename[], long focus) { // removes contents of a specified line without removing the newline +int remove_line_contents(char *filename, uint64_t focus) { // removes contents of a specified line without removing the newline char *line; size_t start; diff --git a/functions.c b/functions.c index e7a8ad6..84cf0cb 100644 --- a/functions.c +++ b/functions.c @@ -108,7 +108,7 @@ void shuffle(char arr[], int n) { } } -int get_line(char filename[], long focus, char **line, size_t *start) { +int get_line(char *filename, long focus, char **line, size_t *start) { FILE *file; file = fopen(filename,"r"); // Open file diff --git a/process_multiples.c b/process_multiples.c index a2de559..b99b74d 100644 --- a/process_multiples.c +++ b/process_multiples.c @@ -294,7 +294,7 @@ int call_X(char *multiple, uint64_t focus, uint64_t Flines, char *filename) { return 0; } - fprintf(stdout, "%s\n", multiple); + fprintf(stdout, "%s %ld\n", multiple, Flines); return 0; } |