Remove legacy langNum interface.l

CVS patchset: 3249
CVS date: 1999/08/24 14:10:58
This commit is contained in:
jbj 1999-08-24 14:10:58 +00:00
parent 5c4a3b51ce
commit e04da27415
5 changed files with 52 additions and 108 deletions

View File

@ -69,7 +69,7 @@ int packageSources(Spec spec)
return rc;
}
static int copyTags[] = {
static int_32 copyTags[] = {
RPMTAG_CHANGELOGTIME,
RPMTAG_CHANGELOGNAME,
RPMTAG_CHANGELOGTEXT,

View File

@ -4,7 +4,7 @@
#include "popt/popt.h"
static int copyTagsDuringParse[] = {
static int_32 copyTagsDuringParse[] = {
RPMTAG_EPOCH,
RPMTAG_VERSION,
RPMTAG_RELEASE,

View File

@ -41,7 +41,6 @@ struct headerToken {
int indexAlloced;
int sorted;
int langNum;
int usageCount;
};
@ -327,7 +326,6 @@ Header headerLoad(void *pv)
/* This assumes you only headerLoad() something you headerUnload()-ed */
h->sorted = 1;
h->langNum = -1;
pe = (struct entryInfo *) p;
dataStart = (char *) (pe + h->indexUsed);
@ -896,55 +894,6 @@ static char *headerFindI18NString(Header h, struct indexEntry *entry)
return entry->data;
}
void headerSetLangPath(Header h, const char * lang)
{
const char *l, *le;
struct indexEntry * table;
if (lang == NULL ||
(table = findEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE)) == NULL) {
h->langNum = -1;
return;
}
for (l = lang; *l; l = le) {
const char *td;
int langNum;
while (*l && *l == ':') /* skip leading colons */
l++;
if (*l == '\0')
break;
for (le = l; *le && *le != ':'; le++) /* find end of this locale */
;
for (langNum = 0, td = table->data;
langNum < table->info.count;
langNum++, td += strlen(td) + 1) {
if (headerMatchLocale(td, l, le)) {
h->langNum = langNum;
return;
}
}
}
h->langNum = -1;
}
void headerResetLang(Header h)
{
const char * str;
if ((str = getenv("LANGUAGE"))) {
headerSetLangPath(h, str);
return;
}
headerSetLangPath(h, getenv("LANG"));
}
static int intGetEntry(Header h, int_32 tag, int_32 *type, void **p, int_32 *c,
int minMem)
{
@ -999,7 +948,6 @@ Header headerNew()
h->indexUsed = 0;
h->sorted = 0;
h->langNum = -1;
h->usageCount = 1;
return (Header) h;

View File

@ -153,19 +153,11 @@ int headerNextIterator(HeaderIterator iter,
int_32 *tag, int_32 *type, void **p, int_32 *c);
void headerFreeIterator(/*@only@*/ HeaderIterator iter);
/* reexamines LANGUAGE and LANG settings to set a new language for the
header; this only needs to be called if LANGUAGE or LANG may have changed
since the first headerGetEntry() on the header */
void headerResetLang(Header h);
/* sets the language path for the header; this doesn't need to be done if
the LANGUAGE or LANG enivronment variable are correct */
void headerSetLangPath(Header h, const char * lang);
Header headerCopy(Header h);
void headerSort(Header h);
Header headerLink(Header h);
void headerCopyTags(Header headerFrom, Header headerTo, int *tagstocopy);
void headerCopyTags(Header headerFrom, Header headerTo, int_32 *tagstocopy);
/* Entry Types */

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-08-21 23:33-0400\n"
"POT-Creation-Date: 1999-08-24 10:09-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1127,96 +1127,100 @@ msgid ""
"--nomd5 may only be used during signature checking and package verification"
msgstr ""
#: ../rpm.c:1059
#: ../rpm.c:1057
msgid "no files to sign\n"
msgstr ""
#: ../rpm.c:1062
#, c-format
msgid "cannot access file %s\n"
msgstr ""
#: ../rpm.c:1076
#: ../rpm.c:1079
msgid "pgp not found: "
msgstr ""
#: ../rpm.c:1079
#: ../rpm.c:1082
msgid "Use `%%_signature pgp5' instead of `%%_signature pgp' in macro file.\n"
msgstr ""
#: ../rpm.c:1086
#: ../rpm.c:1089
msgid "pgp version 5 not found: "
msgstr ""
#: ../rpm.c:1089
#: ../rpm.c:1092
msgid "Use `%%_signature pgp' instead of `%%_signature pgp5' in macro file.\n"
msgstr ""
#: ../rpm.c:1095
#: ../rpm.c:1098
msgid "Enter pass phrase: "
msgstr ""
#: ../rpm.c:1096
#: ../rpm.c:1099
msgid "Pass phrase check failed\n"
msgstr ""
#: ../rpm.c:1099
#: ../rpm.c:1102
msgid "Pass phrase is good.\n"
msgstr ""
#: ../rpm.c:1106
#: ../rpm.c:1109
msgid "Invalid %%_signature spec in macro file.\n"
msgstr ""
#: ../rpm.c:1111
#: ../rpm.c:1114
msgid "--sign may only be used during package building"
msgstr ""
#: ../rpm.c:1128
#: ../rpm.c:1131
msgid "exec failed\n"
msgstr ""
#: ../rpm.c:1147
#: ../rpm.c:1150
msgid "unexpected arguments to --querytags "
msgstr ""
#: ../rpm.c:1158
#: ../rpm.c:1161
msgid "no packages given for signature check"
msgstr ""
#: ../rpm.c:1170
#: ../rpm.c:1173
msgid "no packages given for signing"
msgstr ""
#: ../rpm.c:1183
#: ../rpm.c:1186
msgid "no packages files given for rebuild"
msgstr ""
#: ../rpm.c:1240
#: ../rpm.c:1243
msgid "no spec files given for build"
msgstr ""
#: ../rpm.c:1242
#: ../rpm.c:1245
msgid "no tar files given for build"
msgstr ""
#: ../rpm.c:1254
#: ../rpm.c:1257
msgid "no packages given for uninstall"
msgstr ""
#: ../rpm.c:1303
#: ../rpm.c:1306
msgid "no packages given for install"
msgstr ""
#: ../rpm.c:1326
#: ../rpm.c:1329
msgid "extra arguments given for query of all packages"
msgstr ""
#: ../rpm.c:1331
#: ../rpm.c:1334
msgid "no arguments given for query"
msgstr ""
#: ../rpm.c:1348
#: ../rpm.c:1351
msgid "extra arguments given for verify of all packages"
msgstr ""
#: ../rpm.c:1352
#: ../rpm.c:1355
msgid "no arguments given for verify"
msgstr ""
@ -2016,8 +2020,8 @@ msgid ""
msgstr ""
#: ../lib/formats.c:65 ../lib/formats.c:83 ../lib/formats.c:104
#: ../lib/formats.c:137 ../lib/header.c:2105 ../lib/header.c:2122
#: ../lib/header.c:2142
#: ../lib/formats.c:137 ../lib/header.c:2058 ../lib/header.c:2075
#: ../lib/header.c:2095
msgid "(not a number)"
msgstr ""
@ -2094,83 +2098,83 @@ msgid "Unknown or unexpected error"
msgstr ""
#. This should not be allowed
#: ../lib/header.c:163
#: ../lib/header.c:162
msgid "grabData() RPM_STRING_TYPE count must be 1.\n"
msgstr ""
#: ../lib/header.c:193
#: ../lib/header.c:192
#, c-format
msgid "Data type %d not supported\n"
msgstr ""
#: ../lib/header.c:716
#: ../lib/header.c:714
#, c-format
msgid "Data type %d not supprted\n"
msgstr ""
#: ../lib/header.c:1105
#: ../lib/header.c:1058
#, c-format
msgid "Bad count for headerAddEntry(): %d\n"
msgstr ""
#: ../lib/header.c:1505
#: ../lib/header.c:1458
#, c-format
msgid "missing { after %"
msgstr ""
#: ../lib/header.c:1533
#: ../lib/header.c:1486
msgid "missing } after %{"
msgstr ""
#: ../lib/header.c:1545
#: ../lib/header.c:1498
msgid "empty tag format"
msgstr ""
#: ../lib/header.c:1555
#: ../lib/header.c:1508
msgid "empty tag name"
msgstr ""
#: ../lib/header.c:1570
#: ../lib/header.c:1523
msgid "unknown tag"
msgstr ""
#: ../lib/header.c:1596
#: ../lib/header.c:1549
msgid "] expected at end of array"
msgstr ""
#: ../lib/header.c:1612
#: ../lib/header.c:1565
msgid "unexpected ]"
msgstr ""
#: ../lib/header.c:1614
#: ../lib/header.c:1567
msgid "unexpected }"
msgstr ""
#: ../lib/header.c:1666
#: ../lib/header.c:1619
msgid "? expected in expression"
msgstr ""
#: ../lib/header.c:1673
#: ../lib/header.c:1626
msgid "{ expected after ? in expression"
msgstr ""
#: ../lib/header.c:1683 ../lib/header.c:1715
#: ../lib/header.c:1636 ../lib/header.c:1668
msgid "} expected in expression"
msgstr ""
#: ../lib/header.c:1690
#: ../lib/header.c:1643
msgid ": expected following ? subexpression"
msgstr ""
#: ../lib/header.c:1703
#: ../lib/header.c:1656
msgid "{ expected after : in expression"
msgstr ""
#: ../lib/header.c:1722
#: ../lib/header.c:1675
msgid "| expected at end of expression"
msgstr ""
#: ../lib/header.c:1889
#: ../lib/header.c:1842
msgid "(unknown type)"
msgstr ""