aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2007-07-15 19:10:34 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2007-07-15 19:10:34 +0000
commit75d0856ca5bd3d33a6a3627d58bd1a3fd73b3a0c (patch)
tree0a92e6da312e1c5b2f59612c3d02a6373a8e46d8
parent58bdc3275cf6d88f39d5453f2c8fa2adb1481748 (diff)
Add archive_entry_copy_gname() and archive_entry_copy_uname()
functions. Approved by: re (bmah) MFC after: 3 days
Notes
Notes: svn path=/head/; revision=171459
-rw-r--r--lib/libarchive/Makefile2
-rw-r--r--lib/libarchive/archive_entry.36
-rw-r--r--lib/libarchive/archive_entry.c12
-rw-r--r--lib/libarchive/archive_entry.h2
4 files changed, 22 insertions, 0 deletions
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile
index 19524960054a..1ebc8e1b4612 100644
--- a/lib/libarchive/Makefile
+++ b/lib/libarchive/Makefile
@@ -121,11 +121,13 @@ MLINKS+= archive_entry.3 archive_entry_acl_text_w.3
MLINKS+= archive_entry.3 archive_entry_clear.3
MLINKS+= archive_entry.3 archive_entry_clone.3
MLINKS+= archive_entry.3 archive_entry_copy_fflags_text_w.3
+MLINKS+= archive_entry.3 archive_entry_copy_gname.3
MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3
MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3
MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3
MLINKS+= archive_entry.3 archive_entry_copy_stat.3
MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3
+MLINKS+= archive_entry.3 archive_entry_copy_uname.3
MLINKS+= archive_entry.3 archive_entry_copy_uname_w.3
MLINKS+= archive_entry.3 archive_entry_dev.3
MLINKS+= archive_entry.3 archive_entry_devmajor.3
diff --git a/lib/libarchive/archive_entry.3 b/lib/libarchive/archive_entry.3
index 47c00090b9b5..0dc69cf59d70 100644
--- a/lib/libarchive/archive_entry.3
+++ b/lib/libarchive/archive_entry.3
@@ -41,6 +41,7 @@
.Nm archive_entry_clear ,
.Nm archive_entry_clone ,
.Nm archive_entry_copy_fflags_text_w ,
+.Nm archive_entry_copy_gname ,
.Nm archive_entry_copy_gname_w ,
.Nm archive_entry_copy_hardlink ,
.Nm archive_entry_copy_hardlink_w ,
@@ -48,6 +49,7 @@
.Nm archive_entry_copy_stat ,
.Nm archive_entry_copy_symlink ,
.Nm archive_entry_copy_symlink_w ,
+.Nm archive_entry_copy_uname ,
.Nm archive_entry_copy_uname_w ,
.Nm archive_entry_dev ,
.Nm archive_entry_devmajor ,
@@ -125,6 +127,8 @@
.Ft const wchar_t *
.Fn archive_entry_copy_fflags_text_w "struct archive_entry *" "const wchar_t *"
.Ft void
+.Fn archive_entry_copy_gname "struct archive_entry *" "const char *"
+.Ft void
.Fn archive_entry_copy_gname_w "struct archive_entry *" "const wchar_t *"
.Ft void
.Fn archive_entry_copy_hardlink "struct archive_entry *" "const char *"
@@ -139,6 +143,8 @@
.Ft void
.Fn archive_entry_copy_symlink_w "struct archive_entry *" "const wchar_t *"
.Ft void
+.Fn archive_entry_copy_uname "struct archive_entry *" "const char *"
+.Ft void
.Fn archive_entry_copy_uname_w "struct archive_entry *" "const wchar_t *"
.Ft dev_t
.Fn archive_entry_dev "struct archive_entry *"
diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c
index 6123a6a33fce..3f6984d72014 100644
--- a/lib/libarchive/archive_entry.c
+++ b/lib/libarchive/archive_entry.c
@@ -652,6 +652,12 @@ archive_entry_set_gname(struct archive_entry *entry, const char *name)
}
void
+archive_entry_copy_gname(struct archive_entry *entry, const char *name)
+{
+ aes_copy_mbs(&entry->ae_gname, name);
+}
+
+void
archive_entry_copy_gname_w(struct archive_entry *entry, const wchar_t *name)
{
aes_copy_wcs(&entry->ae_gname, name);
@@ -836,6 +842,12 @@ archive_entry_set_uname(struct archive_entry *entry, const char *name)
}
void
+archive_entry_copy_uname(struct archive_entry *entry, const char *name)
+{
+ aes_copy_mbs(&entry->ae_uname, name);
+}
+
+void
archive_entry_copy_uname_w(struct archive_entry *entry, const wchar_t *name)
{
aes_copy_wcs(&entry->ae_uname, name);
diff --git a/lib/libarchive/archive_entry.h b/lib/libarchive/archive_entry.h
index 043ddcf6dbc4..2f18d31cac47 100644
--- a/lib/libarchive/archive_entry.h
+++ b/lib/libarchive/archive_entry.h
@@ -135,6 +135,7 @@ const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *,
const wchar_t *);
void archive_entry_set_gid(struct archive_entry *, gid_t);
void archive_entry_set_gname(struct archive_entry *, const char *);
+void archive_entry_copy_gname(struct archive_entry *, const char *);
void archive_entry_copy_gname_w(struct archive_entry *, const wchar_t *);
void archive_entry_set_hardlink(struct archive_entry *, const char *);
void archive_entry_copy_hardlink(struct archive_entry *, const char *);
@@ -156,6 +157,7 @@ void archive_entry_copy_symlink(struct archive_entry *, const char *);
void archive_entry_copy_symlink_w(struct archive_entry *, const wchar_t *);
void archive_entry_set_uid(struct archive_entry *, uid_t);
void archive_entry_set_uname(struct archive_entry *, const char *);
+void archive_entry_copy_uname(struct archive_entry *, const char *);
void archive_entry_copy_uname_w(struct archive_entry *, const wchar_t *);
/*