76 }
else if (v0 < 128) {
140 if (symbolRemaining > 0) {
148 while (symbolRemaining > 0) {
166 streamAscii = *stream;
170 streamAscii.
reason = NULL;
173 streamAscii.
output = &output;
206 int pseudoRandom, tmp;
208 pseudoRandom = ((149 * cwPosition) % 253) + 1;
209 tmp = cwValue + pseudoRandom;
libdmtx - Data Matrix Encoding/Decoding Library Copyright 2008, 2009 Mike Laughton.
DmtxBoolean dmtxByteListHasCapacity(DmtxByteList *list)
DmtxByteList dmtxByteListBuild(DmtxByte *storage, int capacity)
static void completeIfDoneAscii(DmtxEncodeStream *stream, int sizeIdxRequest)
static DmtxByte randomize253State(DmtxByte cwValue, int cwPosition)
Randomize 253 state.
static void padRemainingInAscii(DmtxEncodeStream *stream, int sizeIdx)
Can we just receive a length to pad here? I don't like receiving sizeIdxRequest (or sizeIdx) this lat...
static void encodeNextChunkAscii(DmtxEncodeStream *stream, int option)
Simple single scheme encoding uses "Normal" The optimizer needs to track "Expanded" and "Compact" str...
static DmtxByteList encodeTmpRemainingInAscii(DmtxEncodeStream *stream, DmtxByte *storage, int capacity, DmtxPassFail *passFail)
consider receiving instantiated DmtxByteList instead of the output components
static void appendValueAscii(DmtxEncodeStream *stream, DmtxByte value)
this code is separated from encodeNextChunkAscii() because it needs to be called directly elsewhere
libdmtx - Data Matrix Encoding/Decoding Library Copyright 2008, 2009 Mike Laughton.
static DmtxByte streamInputAdvanceNext(DmtxEncodeStream *stream)
static void streamOutputChainAppend(DmtxEncodeStream *stream, DmtxByte value)
#define DmtxValueAsciiPad
@ DmtxErrorCantCompactNonDigits
static void streamMarkInvalid(DmtxEncodeStream *stream, int reasonIdx)
static DmtxByte streamInputPeekNext(DmtxEncodeStream *stream)
static int findSymbolSize(int dataWords, int sizeIdxRequest)
static void streamMarkComplete(DmtxEncodeStream *stream, int sizeIdx)
static int getRemainingSymbolCapacity(int outputLength, int sizeIdx)
#define DmtxValueAsciiUpperShift
static DmtxBoolean streamInputHasNext(DmtxEncodeStream *stream)
DmtxByteList Use signed int for length fields instead of size_t to play nicely with RS arithmetic.
int outputChainValueCount