summaryrefslogtreecommitdiff
path: root/lib/header.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-10-11 20:58:58 +0000
committerjbj <devnull@localhost>1998-10-11 20:58:58 +0000
commit0406f6dae3c777968467b6845e02bccb544ceca6 (patch)
tree37b9107675cc7f47183842f0908f0717c9e1c635 /lib/header.c
parenta776c84fe10d2fa21211c605665a2ecaa2811b6b (diff)
downloadlibrpm-tizen-0406f6dae3c777968467b6845e02bccb544ceca6.tar.gz
librpm-tizen-0406f6dae3c777968467b6845e02bccb544ceca6.tar.bz2
librpm-tizen-0406f6dae3c777968467b6845e02bccb544ceca6.zip
Test drill.
CVS patchset: 2446 CVS date: 1998/10/11 20:58:58
Diffstat (limited to 'lib/header.c')
-rw-r--r--lib/header.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/header.c b/lib/header.c
index b46bc2331..ab230f4eb 100644
--- a/lib/header.c
+++ b/lib/header.c
@@ -988,6 +988,26 @@ int headerAddEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c)
return 1;
}
+char **
+headerGetLangs(Header h)
+{
+ char **s, *e, **table;
+ int i, type, count;
+
+ if (!headerGetRawEntry(h, HEADER_I18NTABLE, &type, (void **)&s, &count))
+ return NULL;
+
+ if ((table = (char **)calloc((count+1), sizeof(char *))) == NULL)
+ return NULL;
+
+ for (i = 0, e = *s; i < count > 0; i++, e += strlen(e)+1) {
+ table[i] = e;
+ }
+ table[count] = NULL;
+
+ return table;
+}
+
int headerAddI18NString(Header h, int_32 tag, char * string, char * lang) {
struct indexEntry * table, * entry;
char * charArray[2];