summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/util.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-03-26 03:23:14 +0100
committerDan McGee <dan@archlinux.org>2008-03-27 18:07:26 +0100
commitf8c737d3b6b28373a69d5979a4ba2e31b77baa62 (patch)
treeda339690b576917897b80a0d305c695d17535237 /lib/libalpm/util.h
parent1dfd841e40344ff401e0d9e8d61b55cb64b2681f (diff)
downloadpacman-f8c737d3b6b28373a69d5979a4ba2e31b77baa62.tar.gz
pacman-f8c737d3b6b28373a69d5979a4ba2e31b77baa62.tar.xz
Add an archive_fgets() function
This crude function allows reading from an archive on a line-by-line basis similar to the familiar fgets() call on a FILE stream. This is the first step in being able to read DB entries straight from an archive. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.h')
-rw-r--r--lib/libalpm/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 6849fa19..0bf122cd 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -30,6 +30,7 @@
#include <stdarg.h>
#include <time.h>
#include <sys/stat.h> /* struct stat */
+#include <archive.h> /* struct archive */
#ifdef ENABLE_NLS
#include <libintl.h> /* here so it doesn't need to be included elsewhere */
@@ -66,6 +67,7 @@ char *_alpm_filecache_find(const char *filename);
const char *_alpm_filecache_setup(void);
int _alpm_lstat(const char *path, struct stat *buf);
int _alpm_test_md5sum(const char *filepath, const char *md5sum);
+char *_alpm_archive_fgets(char *line, size_t size, struct archive *a);
#ifndef HAVE_STRVERSCMP
int strverscmp(const char *, const char *);