summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.h
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-28 17:30:08 -0400
committerDan McGee <dan@archlinux.org>2012-06-25 23:04:24 -0500
commit74274b5dc347ba70e4abd1f329feb41538f82ff4 (patch)
tree5750f0e41d16dabf70a321d40bb1cfc656da5ed2 /lib/libalpm/util.h
parent7245bc8e8e01149e076e820ea251f23839b1e0b2 (diff)
downloadpacman-74274b5dc347ba70e4abd1f329feb41538f82ff4.tar.xz
add real_line_size to alpm_read_buffer
We inevitably call strlen() or similar on the line returned from _alpm_archive_fgets(), so include the line size of the interesting line in the struct. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.h')
-rw-r--r--lib/libalpm/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 87d51eaa..9bcd59e1 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -97,6 +97,7 @@ struct archive_read_buffer {
char *line_offset;
size_t line_size;
size_t max_line_size;
+ size_t real_line_size;
char *block;
char *block_offset;
@@ -108,7 +109,7 @@ struct archive_read_buffer {
int _alpm_makepath(const char *path);
int _alpm_makepath_mode(const char *path, mode_t mode);
int _alpm_copyfile(const char *src, const char *dest);
-size_t _alpm_strip_newline(char *str);
+size_t _alpm_strip_newline(char *str, size_t len);
int _alpm_open_archive(alpm_handle_t *handle, const char *path,
struct stat *buf, struct archive **archive, alpm_errno_t error);