49 int entrySize = 8 + n * 4 * 2;
50 if (base + entrySize > len)
52 *basePos += entrySize;
54 uint8_t* p = buf + base;
62 for (
int i = 0; i < n; ++i)
67 printf(
_(
"Length too large for name record %d.\n"), i);
77 for (
int i = 0; i < n; ++i)
82 printf(
_(
"Position/length too large for name record %d.\n"), i);
87 printf(
_(
"Name %d (for %s) is %.*s\n"),
93 m_names[i] =
new uint8_t[nlen + 1];
98 printf(
_(
"%d .. %d (%d bytes): Name records\n"), base, base + size, size);
SisRC fillFrom(uint8_t *buf, int *base, off_t len, SISFile *sisFile)
Populate the fields.
int m_nameCount
The number of names, so we know how much to delete.
uint32_t getLastEnd()
Find out the end position for the last name in the file.
uint8_t ** m_names
The extracted names, as zero terminated strings.
virtual ~SISComponentNameRecord()
uint8_t * getName(int no)
Return the name for the given language.
The top level container of a SIS file.
int getLanguage()
Return the currently selected installation language.
uint32_t read32(uint8_t *p)