Lines Matching refs:numChars
84 testable int calcSegmentBitLength(enum qrcodegen_Mode mode, size_t numChars);
155 seg.numChars = (int)textLen;
177 seg.numChars = (int)dataLen;
236 appendBitsToBuffer((unsigned int)seg->numChars, numCharCountBits(seg->mode, version), qrcode, &bitLen);
832 size_t qrcodegen_calcSegmentBufferSize(enum qrcodegen_Mode mode, size_t numChars) {
833 int temp = calcSegmentBitLength(mode, numChars);
843 // - Returns -1 on failure, i.e. numChars > INT16_MAX or
846 // - For byte mode, numChars measures the number of bytes, not Unicode code points.
847 // - For ECI mode, numChars must be 0, and the worst-case number of bits is returned.
849 testable int calcSegmentBitLength(enum qrcodegen_Mode mode, size_t numChars) {
851 if (numChars > (unsigned int)INT16_MAX)
853 long result = (long)numChars;
862 else if (mode == qrcodegen_Mode_ECI && numChars == 0)
882 result.numChars = (int)len;
898 result.numChars = (int)len;
932 result.numChars = (int)len;
962 result.numChars = 0;
992 int numChars = segs[i].numChars;
994 assert(0 <= numChars && numChars <= INT16_MAX);
998 if (numChars >= (1L << ccbits))