[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeutils/okteta/kasten/gui/io/streamencoder/srec
From: Friedrich W. H. Kossebau <kossebau () kde ! org>
Date: 2010-01-29 21:28:25
Message-ID: 1264800505.994235.17267.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1082166 by kossebau:
fixed: block end record needs to use same address size as data records
M +7 -4 bytearraysrecstreamencoder.cpp
--- trunk/KDE/kdeutils/okteta/kasten/gui/io/streamencoder/srec/bytearraysrecstreamencoder.cpp \
#1082165:1082166 @@ -126,10 +126,11 @@
void streamRecordCount( QTextStream& textStream, unsigned char* line,
quint16 recordCount )
{
- static const int recordCountByteCount = 3;
+ static const int recordCountLineSize = 2;
+ static const int recordCountByteCount = byteCountLineSize + recordCountLineSize;
line[byteCountLineOffset] = recordCountByteCount;
- writeBigEndian( &line[addressLineOffset], recordCount, 2 );
+ writeBigEndian( &line[addressLineOffset], recordCount, recordCountLineSize );
streamLine( textStream, RecordCount, line );
}
@@ -144,14 +145,16 @@
// fication encountered in the object module input will be used. There is no code/
// data field.
+// TODO: recordType is not limited to valid values, also brings recalculation of \
addressLineSize static inline
void streamBlockEnd( QTextStream& textStream, unsigned char* line,
RecordType recordType, quint32 startAddress = 0 ) // TODO: make \
address {
- static const int blockEndByteCount = 5;
+ const int addressLineSize = 11 - recordType;
+ const int blockEndByteCount = byteCountLineSize + addressLineSize;
line[byteCountLineOffset] = blockEndByteCount;
- writeBigEndian( &line[addressLineOffset], startAddress, 4 );
+ writeBigEndian( &line[addressLineOffset], startAddress, addressLineSize );
streamLine( textStream, recordType, line );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic