From 9d6931a2700d792cf0d8cb7a3c5e85e576ec9b04 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 28 Sep 2014 14:04:09 +1300 Subject: Removed unused function --- common.c | 12 +++--------- common.h | 1 - getfreq.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/common.c b/common.c index a85efd3..2a802d8 100644 --- a/common.c +++ b/common.c @@ -48,7 +48,7 @@ int get_int_value_from_file(const char* filename) bool file_has_line(const char *filename, const char *line) { FILE* fd; - char buffer[512]; + char buffer[4096]; if (!(fd = fopen(filename, "r"))) return false; @@ -94,13 +94,7 @@ int get_int(const char* string) return atoi(first_num); } - /*********************************************************************** - * Replace occurrences of \n from end of string with \0 + * Get value after token in file. + * For example: **********************************************************************/ -void chomp(char* string) -{ - int i; - for (i = strlen(string)-1; (i >= 0 && string[i] == '\n'); i--) - string[i] = '\0'; -} diff --git a/common.h b/common.h index d8af81f..06dd072 100644 --- a/common.h +++ b/common.h @@ -26,7 +26,6 @@ int get_int_value_from_file(const char* filename); int get_int(const char* string); bool file_has_line(const char *filename, const char *line); FILE* check_for_file(char* path); -void chomp(char* string); // Stringification of line number #define STRING2(x) #x diff --git a/getfreq.c b/getfreq.c index e812de8..bae86cf 100644 --- a/getfreq.c +++ b/getfreq.c @@ -64,7 +64,7 @@ void gf_init() total_freqs = 0; do { - chomp(next_token); + //chomp(next_token); debug("Found frequency #%d (%s KHz)\n",total_freqs,next_token); strncpy(freqs[i][total_freqs], next_token, FREQ_LENGTH); total_freqs++; -- cgit v1.1