Allow C lang to be specified as "C" (as oppopsed to NULL).
CVS patchset: 1948
CVS date: 1998/01/11 16:40:08
}
if (!table && !entry) {
}
if (!table && !entry) {
+ if (!lang || (lang[0] == 'C' && lang[1] == '\0')) {
charArray[0] = "C";
if (!headerAddEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE,
&charArray, 1)) return 0;
charArray[0] = "C";
if (!headerAddEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE,
&charArray, 1)) return 0;
- strArray = alloca(sizeof(*strArray) * langNum);
+ strArray = alloca(sizeof(*strArray) * (langNum + 1));
for (i = 0; i < langNum; i++)
strArray[i] = "";
strArray[langNum] = string;
for (i = 0; i < langNum; i++)
strArray[i] = "";
strArray[langNum] = string;
int headerAddEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c);
int headerModifyEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c);
int headerAddEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c);
int headerModifyEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c);
-/* For the C locale, lang should be *NULL*. Here are the rules:
-
+/* A NULL lang is interpreted as the C locale. Here are the rules:
+
1) If the tag isn't in the Header, it's added with the passed string
as a version.
2) If the tag occurs multiple times in entry, which tag is affected
1) If the tag isn't in the Header, it's added with the passed string
as a version.
2) If the tag occurs multiple times in entry, which tag is affected