Rip unused and useless headerGetLangs()
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 10 Sep 2009 11:05:08 +0000 (14:05 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 10 Sep 2009 11:05:08 +0000 (14:05 +0300)
- nothing in the world uses it and the info is available through
  regular headerGet() anyway

lib/header_internal.c
lib/header_internal.h

index 415748c..44673ed 100644 (file)
@@ -17,26 +17,6 @@ uint64_t htonll( uint64_t n ) {
     return n;
 }
 
-char ** headerGetLangs(Header h)
-{
-    char **s, *e, **table;
-    rpmTagType type;
-    rpm_count_t i, count;
-
-    if (!headerGetRawEntry(h, HEADER_I18NTABLE, &type, (rpm_data_t)&s, &count))
-       return NULL;
-
-    /* XXX xcalloc never returns NULL. */
-    if ((table = (char **)xcalloc((count+1), sizeof(char *))) == NULL)
-       return NULL;
-
-    for (i = 0, e = *s; i < count; i++, e += strlen(e)+1)
-       table[i] = e;
-    table[count] = NULL;
-
-    return table;
-}
-
 void headerDump(Header h, FILE *f, int flags)
 {
     int i;
index e65830e..c9cecf1 100644 (file)
@@ -108,14 +108,6 @@ RPM_GNUC_INTERNAL
 void headerSetInstance(Header h, unsigned int instance);
 
 /** \ingroup header
- * Return array of locales found in header.
- * The array is terminated with a NULL sentinel.
- * @param h            header
- * @return             array of locales (or NULL on error)
- */
-char ** headerGetLangs(Header h);
-
-/** \ingroup header
  * Retrieve tag value with type match.
  * If *type is RPM_NULL_TYPE any type will match, otherwise only *type will
  * match.