2007-03-27 17:47:10 +00:00
|
|
|
/*
|
|
|
|
* CiderPress
|
|
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
|
|
* See the file LICENSE for distribution terms.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
* Reformat "generic" GWP and Teach files.
|
|
|
|
*/
|
|
|
|
#include "StdAfx.h"
|
|
|
|
#include "Teach.h"
|
|
|
|
#include "ResourceFork.h"
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ==========================================================================
|
2014-11-04 00:26:53 +00:00
|
|
|
* ReformatGWP
|
2007-03-27 17:47:10 +00:00
|
|
|
* ==========================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Decide whether or not we want to treat this file as a "generic" IIgs
|
|
|
|
* document. Possibly useful for converting the special characters. We'll
|
|
|
|
* activate it for any GWP file other than the two known types.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
void ReformatGWP::Examine(ReformatHolder* pHolder)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
ReformatHolder::ReformatApplies applies = ReformatHolder::kApplicNot;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
if (pHolder->GetFileType() == kTypeGWP &&
|
|
|
|
(pHolder->GetAuxType() != 0x5445 && pHolder->GetAuxType() != 0x8010))
|
|
|
|
{
|
|
|
|
applies = ReformatHolder::kApplicProbably;
|
|
|
|
}
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
pHolder->SetApplic(ReformatHolder::kReformatGWP, applies,
|
|
|
|
ReformatHolder::kApplicNot, ReformatHolder::kApplicNot);
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Convert GWP into formatted text.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
int ReformatGWP::Process(const ReformatHolder* pHolder,
|
2014-11-04 00:26:53 +00:00
|
|
|
ReformatHolder::ReformatID id, ReformatHolder::ReformatPart part,
|
|
|
|
ReformatOutput* pOutput)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-21 02:10:18 +00:00
|
|
|
const uint8_t* srcBuf = pHolder->GetSourceBuf(part);
|
2014-11-04 00:26:53 +00:00
|
|
|
long srcLen = pHolder->GetSourceLen(part);
|
|
|
|
fUseRTF = false;
|
|
|
|
|
2015-01-15 18:22:08 +00:00
|
|
|
Charset::CheckGSCharConv();
|
2014-11-04 00:26:53 +00:00
|
|
|
RTFBegin();
|
|
|
|
|
|
|
|
/* convert EOL markers and IIgs characters */
|
2014-11-21 02:10:18 +00:00
|
|
|
uint8_t ch;
|
2014-11-04 00:26:53 +00:00
|
|
|
while (srcLen) {
|
|
|
|
ch = *srcBuf++;
|
|
|
|
srcLen--;
|
|
|
|
|
|
|
|
if (ch == '\r') {
|
|
|
|
/* got CR, check for CRLF -- not really expected on IIgs */
|
|
|
|
if (srcLen != 0 && *srcBuf == '\n') {
|
|
|
|
srcBuf++;
|
|
|
|
srcLen--;
|
|
|
|
}
|
|
|
|
BufPrintf("\r\n");
|
|
|
|
} else if (ch == '\n') {
|
|
|
|
BufPrintf("\r\n");
|
|
|
|
} else {
|
|
|
|
// RTF is always off, so just use BufPrintf
|
2015-01-15 18:22:08 +00:00
|
|
|
BufPrintf("%c", Charset::ConvertMacRomanTo1252(ch));
|
2014-11-04 00:26:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RTFEnd();
|
|
|
|
|
|
|
|
SetResultBuffer(pOutput);
|
|
|
|
return 0;
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ==========================================================================
|
2014-11-04 00:26:53 +00:00
|
|
|
* ReformatTeach
|
2007-03-27 17:47:10 +00:00
|
|
|
* ==========================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Decide whether or not we want to handle this file.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
void ReformatTeach::Examine(ReformatHolder* pHolder)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
ReformatHolder::ReformatApplies applies = ReformatHolder::kApplicNot;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
if (pHolder->GetFileType() == kTypeGWP && pHolder->GetAuxType() == 0x5445)
|
|
|
|
applies = ReformatHolder::kApplicYes;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
pHolder->SetApplic(ReformatHolder::kReformatTeach, applies,
|
|
|
|
ReformatHolder::kApplicNot, ReformatHolder::kApplicNot);
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Convert Teach Text into formatted text.
|
|
|
|
*
|
|
|
|
* The text is in the data fork and the formatting is in the resource fork.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
int ReformatTeach::Process(const ReformatHolder* pHolder,
|
2014-11-04 00:26:53 +00:00
|
|
|
ReformatHolder::ReformatID id, ReformatHolder::ReformatPart part,
|
|
|
|
ReformatOutput* pOutput)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-21 02:10:18 +00:00
|
|
|
const uint8_t* dataBuf;
|
|
|
|
const uint8_t* rsrcBuf;
|
2014-11-04 00:26:53 +00:00
|
|
|
long dataLen, rsrcLen;
|
2014-11-21 02:10:18 +00:00
|
|
|
const uint8_t* styleBlock;
|
2014-11-04 00:26:53 +00:00
|
|
|
long styleLen;
|
|
|
|
|
|
|
|
if (part != ReformatHolder::kPartData)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
dataBuf = pHolder->GetSourceBuf(ReformatHolder::kPartData);
|
|
|
|
dataLen = pHolder->GetSourceLen(ReformatHolder::kPartData);
|
|
|
|
rsrcBuf = pHolder->GetSourceBuf(ReformatHolder::kPartRsrc);
|
|
|
|
rsrcLen = pHolder->GetSourceLen(ReformatHolder::kPartRsrc);
|
2014-11-18 05:13:13 +00:00
|
|
|
if (dataBuf == NULL || rsrcBuf == NULL || dataLen <= 0 || rsrcLen <= 0) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Teach reformatter missing one fork of the file");
|
2014-11-04 00:26:53 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2015-01-15 18:22:08 +00:00
|
|
|
Charset::CheckGSCharConv();
|
2014-11-04 00:26:53 +00:00
|
|
|
|
|
|
|
/* find the rStyleBlock */
|
|
|
|
if (!ReformatResourceFork::GetResource(rsrcBuf, rsrcLen, 0x8012, 0x0001,
|
|
|
|
&styleBlock, &styleLen))
|
|
|
|
{
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Resource fork of Teach Text file not found");
|
2014-11-04 00:26:53 +00:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
RStyleBlock rStyleBlock;
|
|
|
|
if (!rStyleBlock.Create(styleBlock, styleLen)) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Unable to unpack rStyleBlock");
|
2014-11-04 00:26:53 +00:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
fUseRTF = true;
|
|
|
|
RTFBegin();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Configure ruler options. The format allows us to have more than one
|
|
|
|
* ruler, but doesn't provide a way to select between them, so we have
|
|
|
|
* to assume that the first ruler is global.
|
|
|
|
*
|
|
|
|
* In practice, the Teach application doesn't provide a way to set
|
|
|
|
* margins or tab stops, so there's really not much to do. It seems to
|
|
|
|
* create tab stops with 64-pixel widths, which translates to 10 tab
|
|
|
|
* stops per page. WordPad seems to default to 12, so I figure there's
|
|
|
|
* not much point in futzing with it since the fonts are all different
|
|
|
|
* anyway.
|
|
|
|
*/
|
|
|
|
RStyleBlock::TERuler* pRuler = rStyleBlock.GetRuler(0);
|
2014-11-18 05:13:13 +00:00
|
|
|
assert(pRuler != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
if (pRuler->GetJustification() != RStyleBlock::TERuler::kJustLeft) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("WARNING: not using left justified Teach text");
|
2014-11-04 00:26:53 +00:00
|
|
|
/* ignore it */
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int style = 0; style < rStyleBlock.GetNumStyleItems(); style++) {
|
|
|
|
RStyleBlock::StyleItem* pStyleItem;
|
|
|
|
RStyleBlock::TEStyle* pStyle;
|
|
|
|
int numBytes;
|
|
|
|
|
|
|
|
/* set up the style */
|
|
|
|
pStyleItem = rStyleBlock.GetStyleItem(style);
|
2014-11-18 05:13:13 +00:00
|
|
|
assert(pStyleItem != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
if (pStyleItem->GetLength() == RStyleBlock::StyleItem::kUnusedItem)
|
|
|
|
continue;
|
|
|
|
numBytes = pStyleItem->GetLength();
|
|
|
|
pStyle = rStyleBlock.GetStyle(pStyleItem->GetStyleIndex());
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set the font first; that defines the point size multiplier. Set
|
|
|
|
* the size second, because the point size determines whether we
|
|
|
|
* show underline. Set the style last.
|
|
|
|
*/
|
|
|
|
RTFSetGSFont(pStyle->GetFontFamily());
|
|
|
|
RTFSetGSFontSize(pStyle->GetFontSize());
|
|
|
|
RTFSetGSFontStyle(pStyle->GetTextStyle());
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The Teach app doesn't let you set text colors, but it appears
|
|
|
|
* there's a way to do it, since the SpyHunterGS Read.Me file has
|
|
|
|
* a bit of red in it.
|
|
|
|
*/
|
|
|
|
if (pStyle->GetTextColor() != 0) {
|
|
|
|
// do something with color, someday
|
|
|
|
}
|
|
|
|
|
|
|
|
/* output the characters */
|
2014-11-21 02:10:18 +00:00
|
|
|
uint8_t uch;
|
2014-11-04 00:26:53 +00:00
|
|
|
while (numBytes--) {
|
|
|
|
if (!dataLen) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("WARNING: Teach underrun (%ld wanted)", numBytes);
|
2014-11-04 00:26:53 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
uch = *dataBuf;
|
|
|
|
if (uch == '\r') {
|
|
|
|
RTFNewPara();
|
|
|
|
} else if (uch == '\t') {
|
|
|
|
RTFTab();
|
|
|
|
} else {
|
2015-01-15 18:22:08 +00:00
|
|
|
RTFPrintUTF16Char(Charset::ConvertMacRomanToUTF16(uch));
|
2014-11-04 00:26:53 +00:00
|
|
|
}
|
|
|
|
dataBuf++;
|
|
|
|
dataLen--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (dataLen) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("WARNING: Teach overrun (%ld remain)", dataLen);
|
2014-11-04 00:26:53 +00:00
|
|
|
/* no big deal */
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
RTFEnd();
|
|
|
|
|
|
|
|
SetResultBuffer(pOutput, true);
|
|
|
|
return 0;
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* ==========================================================================
|
2014-11-04 00:26:53 +00:00
|
|
|
* RStyleBlock functions
|
2007-03-27 17:47:10 +00:00
|
|
|
* ==========================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Unpack an rStyleBlock resource.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
bool RStyleBlock::Create(const uint8_t* buf, long len)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-21 02:10:18 +00:00
|
|
|
uint16_t version;
|
|
|
|
uint32_t partLen;
|
2014-11-04 00:26:53 +00:00
|
|
|
int i;
|
|
|
|
|
2014-11-18 05:13:13 +00:00
|
|
|
assert(buf != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
if (len < kMinLen) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Too short to be rStyleBlock (%d)", len);
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
version = Reformat::Read16(&buf, &len);
|
|
|
|
if (version != kExpectedVersion) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Bad rStyleBlock version (%d)", version);
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* extract ruler(s) */
|
|
|
|
partLen = Reformat::Read32(&buf, &len);
|
2014-11-21 02:10:18 +00:00
|
|
|
if (partLen > (uint32_t) (len+8)) {
|
2014-11-04 00:26:53 +00:00
|
|
|
/* not enough to satisfy data + two more counts */
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Invalid part1 length (%d vs %d)", partLen, len);
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
fNumRulers = 1;
|
|
|
|
fpRulers = new TERuler[fNumRulers];
|
2014-11-18 05:13:13 +00:00
|
|
|
if (fpRulers == NULL)
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
if (fpRulers->Create(buf, partLen) <= 0)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
buf += partLen;
|
|
|
|
len -= partLen;
|
|
|
|
|
|
|
|
/* extract TEStyles */
|
|
|
|
partLen = Reformat::Read32(&buf, &len);
|
2014-11-21 02:10:18 +00:00
|
|
|
if (partLen > (uint32_t) (len + 4)) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Invalid part2 length (%d vs %d)", partLen, len);
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if ((partLen % TEStyle::kDataLen) != 0) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Invalid part2 length (%d mod %d)",
|
2014-11-04 00:26:53 +00:00
|
|
|
partLen, TEStyle::kDataLen);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
fNumStyles = partLen / TEStyle::kDataLen;
|
|
|
|
fpStyles = new TEStyle[fNumStyles];
|
2014-11-18 05:13:13 +00:00
|
|
|
if (fpStyles == NULL)
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
for (i = 0; i < fNumStyles; i++) {
|
|
|
|
fpStyles[i].Create(buf);
|
|
|
|
buf += TEStyle::kDataLen;
|
|
|
|
len -= TEStyle::kDataLen;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* extract StyleItems */
|
|
|
|
fNumStyleItems = (int) Reformat::Read32(&buf, &len);
|
2014-11-21 02:10:18 +00:00
|
|
|
partLen = fNumStyleItems * StyleItem::kItemDataLen;
|
|
|
|
if (partLen > (uint32_t) len) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Invalid part3 length (%d vs %d)", partLen, len);
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
fpStyleItems = new StyleItem[fNumStyleItems];
|
2014-11-18 05:13:13 +00:00
|
|
|
if (fpStyleItems == NULL)
|
2014-11-04 00:26:53 +00:00
|
|
|
return false;
|
|
|
|
for (i = 0; i < fNumStyleItems; i++) {
|
|
|
|
fpStyleItems[i].Create(buf);
|
|
|
|
if ((fpStyleItems[i].GetOffset() % TEStyle::kDataLen) != 0) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Invalid offset %d (mod %d)",
|
2014-11-04 00:26:53 +00:00
|
|
|
fpStyleItems[i].GetOffset(), TEStyle::kDataLen);
|
|
|
|
return false;
|
|
|
|
}
|
2014-11-21 02:10:18 +00:00
|
|
|
buf += StyleItem::kItemDataLen;
|
|
|
|
len -= StyleItem::kItemDataLen;
|
2014-11-04 00:26:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (len != 0) {
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("WARNING: at end of rStyleBlock, len is %ld", len);
|
2014-11-04 00:26:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Construct a TERuler from a chunk of data.
|
|
|
|
*
|
|
|
|
* Returns the #of bytes consumed, or -1 on failure.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
int RStyleBlock::TERuler::Create(const uint8_t* buf, long len)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
long origLen = len;
|
|
|
|
|
|
|
|
if (len < kMinLen)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
fLeftMargin = Reformat::Get16LE(buf);
|
|
|
|
fLeftIndent = Reformat::Get16LE(buf + 2);
|
|
|
|
fRightMargin = Reformat::Get16LE(buf + 4);
|
|
|
|
fJust = Reformat::Get16LE(buf + 6);
|
|
|
|
fExtraLS = Reformat::Get16LE(buf + 8);
|
|
|
|
fFlags = Reformat::Get16LE(buf + 10);
|
|
|
|
fUserData = Reformat::Get32LE(buf + 12);
|
|
|
|
fTabType = Reformat::Get16LE(buf + 16);
|
|
|
|
buf += 18;
|
|
|
|
len -= 18;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* What we do now depends on the value of fTabType:
|
|
|
|
* 0: no tabs are set, there's nothing else to read.
|
|
|
|
* 1: regularly-spaced tabs; spacing defined by fTabTerminator field.
|
|
|
|
* 2: irregular tabs, defined by array terminated by 0xffff in the
|
|
|
|
* fTabTerminator field.
|
|
|
|
*
|
|
|
|
* At present we're just throwing the tab array out.
|
|
|
|
*/
|
|
|
|
switch (fTabType) {
|
|
|
|
case 0:
|
|
|
|
fTabTerminator = 0;
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
fTabTerminator = Reformat::Get16LE(buf);
|
|
|
|
buf += 2;
|
|
|
|
len -= 2;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
while (len >= 2) {
|
|
|
|
TabItem tabItem;
|
|
|
|
tabItem.tabKind = Reformat::Get16LE(buf);
|
|
|
|
buf += 2;
|
|
|
|
len -= 2;
|
|
|
|
|
|
|
|
if (tabItem.tabKind == kTabArrayEnd || len < 2)
|
|
|
|
break;
|
|
|
|
tabItem.tabData = Reformat::Get16LE(buf);
|
|
|
|
buf += 2;
|
|
|
|
len -= 2;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("Invalid tab type %d", fTabType);
|
2014-11-04 00:26:53 +00:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI("TERuler consumed %ld bytes (%ld left over)", origLen - len, len);
|
2014-11-04 00:26:53 +00:00
|
|
|
return origLen - len;
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Extract a TEStyle object from the buffer.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
void RStyleBlock::TEStyle::Create(const uint8_t* buf)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
fFontID = Reformat::Get32LE(buf);
|
|
|
|
fForeColor = Reformat::Get16LE(buf + 4);
|
|
|
|
fBackColor = Reformat::Get16LE(buf + 6);
|
|
|
|
fUserData = Reformat::Get32LE(buf + 8);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI(" TEStyle: font fam=0x%04x size=%-2d style=0x%02x fore=0x%04x",
|
2014-11-04 00:26:53 +00:00
|
|
|
GetFontFamily(), GetFontSize(), GetTextStyle(), fForeColor);
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Extract a StyleItem object from the buffer.
|
|
|
|
*/
|
2014-11-25 22:34:14 +00:00
|
|
|
void RStyleBlock::StyleItem::Create(const uint8_t* buf)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
fLength = Reformat::Get32LE(buf);
|
|
|
|
fOffset = Reformat::Get32LE(buf + 4);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-18 21:05:15 +00:00
|
|
|
LOGI(" StyleItem: len=%ld off=%ld", fLength, fOffset);
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|