]> git.ipfire.org Git - pakfire.git/commitdiff
util: Drop unused function pakfire_sgets
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 10 Apr 2021 14:30:11 +0000 (14:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 10 Apr 2021 14:30:11 +0000 (14:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/include/pakfire/util.h
src/libpakfire/util.c

index 7de9630d8d2f5da6f450deb3f8304903e260a608..7050746ffd851cfe49bf5e5c885c06c53c089792 100644 (file)
@@ -42,7 +42,6 @@ char* pakfire_basename(const char* path);
 char* pakfire_dirname(const char* path);
 int pakfire_access(Pakfire pakfire, const char* dir, const char* file, int mode);
 
-char* pakfire_sgets(char* str, int num, char** input);
 char* pakfire_remove_trailing_newline(char* str);
 
 int pakfire_read_file_into_buffer(FILE* f, char** buffer, size_t* len);
index 8bfe96243147838c0fd6f55e3367c92a4addf5cb..8445e786aa8c502d56076abd14a0883f9b676829 100644 (file)
@@ -329,28 +329,6 @@ PAKFIRE_EXPORT int pakfire_access(Pakfire pakfire, const char* dir, const char*
        return r;
 }
 
-char* pakfire_sgets(char* str, int num, char** input) {
-       char* next = *input;
-       int numread = 0;
-
-       while (numread + 1 < num && *next) {
-               int isnewline = (*next == '\n');
-
-               *str++ = *next++;
-               numread++;
-
-               if (isnewline)
-                       break;
-       }
-
-       // Terminate string
-       *str = '\0';
-
-       *input = next;
-
-       return str;
-}
-
 char* pakfire_remove_trailing_newline(char* str) {
        ssize_t pos = strlen(str) - 1;