Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=4a0809cb703bd9616d6f73d079e1712434fb9f08

commit 4a0809cb703bd9616d6f73d079e1712434fb9f08
Author: Michel Hermier <herm...@frugalware.org>
Date:   Fri Nov 8 13:46:22 2013 +0100

libpacman: Remove now unecessary _pacman_archive_fgets.

diff --git a/lib/libpacman/util.c b/lib/libpacman/util.c
index d5da75a..a2a2d5b 100644
--- a/lib/libpacman/util.c
+++ b/lib/libpacman/util.c
@@ -696,35 +696,6 @@ int _pacman_reg_match(const char *string, const char 
*pattern)
return(!(result));
}

-char *_pacman_archive_fgets(char *line, size_t size, struct archive *a)
-{
-       /* for now, just read one char at a time until we get to a
-        * '\n' char. we can optimize this later with an internal
-        * buffer. */
-       /* leave room for zero terminator */
-       char *last = line + size - 1;
-       char *i;
-
-       for(i = line; i < last; i++) {
-               int ret = archive_read_data(a, i, 1);
-               /* special check for first read- if null, return null,
-                * this indicates EOF */
-               if(i == line && (ret <= 0 || *i == '\0')) {
-                       return(NULL);
-               }
-               /* check if read value was null or newline */
-               if(ret <= 0 || *i == '\0' || *i == '\n') {
-                       last = i + 1;
-                       break;
-               }
-       }
-
-       /* always null terminate the buffer */
-       *last = '\0';
-
-       return(line);
-}
-
#endif

/* vim: set ts=2 sw=2 noet: */
diff --git a/lib/libpacman/util.h b/lib/libpacman/util.h
index 44350e3..03f2eb4 100644
--- a/lib/libpacman/util.h
+++ b/lib/libpacman/util.h
@@ -81,7 +81,6 @@ int _pacman_reg_match(const char *string, const char 
*pattern);
char* strsep(char** str, const char* delims);
char* mkdtemp(char *template);
#endif
-char *_pacman_archive_fgets(char *line, size_t size, struct archive *a);

static inline int _pacman_strempty(const char *s)
{
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to