From 859aac7242fe3767c19c1bfff73d5e6159cbad31 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Dec 2008 19:54:49 +0100 Subject: utils: removed myFgets() Replaced myFgets() with fgets() + g_strchomp(). --- src/utils.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 1b12cd81..9d763c48 100644 --- a/src/utils.c +++ b/src/utils.c @@ -33,18 +33,6 @@ #include #endif -char *myFgets(char *buffer, int bufferSize, FILE * fp) -{ - char *ret = fgets(buffer, bufferSize, fp); - if (ret && strlen(buffer) > 0 && buffer[strlen(buffer) - 1] == '\n') { - buffer[strlen(buffer) - 1] = '\0'; - } - if (ret && strlen(buffer) > 0 && buffer[strlen(buffer) - 1] == '\r') { - buffer[strlen(buffer) - 1] = '\0'; - } - return ret; -} - void stripReturnChar(char *string) { while (string && (string = strchr(string, '\n'))) { -- cgit v1.2.3