/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/internal/ |
D | itoa.h | 39 inline char* u32toa(uint32_t value, char* buffer) { in u32toa() argument 47 *buffer++ = cDigitsLut[d1]; in u32toa() 49 *buffer++ = cDigitsLut[d1 + 1]; in u32toa() 51 *buffer++ = cDigitsLut[d2]; in u32toa() 52 *buffer++ = cDigitsLut[d2 + 1]; in u32toa() 66 *buffer++ = cDigitsLut[d1]; in u32toa() 68 *buffer++ = cDigitsLut[d1 + 1]; in u32toa() 70 *buffer++ = cDigitsLut[d2]; in u32toa() 71 *buffer++ = cDigitsLut[d2 + 1]; in u32toa() 73 *buffer++ = cDigitsLut[d3]; in u32toa() [all …]
|
D | dtoa.h | 34 inline void GrisuRound(char* buffer, int len, uint64_t delta, uint64_t rest, uint64_t ten_kappa, ui… in GrisuRound() argument 38 buffer[len - 1]--; in GrisuRound() 59 inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* … in DigitGen() argument 83 buffer[(*len)++] = static_cast<char>('0' + static_cast<char>(d)); in DigitGen() 88 … GrisuRound(buffer, *len, delta, tmp, static_cast<uint64_t>(kPow10[kappa]) << -one.e, wp_w.f); in DigitGen() 99 buffer[(*len)++] = static_cast<char>('0' + d); in DigitGen() 104 GrisuRound(buffer, *len, delta, p2, one.f, wp_w.f * kPow10[-static_cast<int>(kappa)]); in DigitGen() 110 inline void Grisu2(double value, char* buffer, int* length, int* K) { in Grisu2() argument 121 DigitGen(W, Wp, Wp.f - Wm.f, buffer, length, K); in Grisu2() 124 inline char* WriteExponent(int K, char* buffer) { in WriteExponent() argument [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | byte_array_utils.h | 36 static AK_FORCE_INLINE void writeUintAndAdvancePosition(uint8_t *const buffer, in writeUintAndAdvancePosition() argument 42 ByteArrayUtils::writeUint8AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition() 45 ByteArrayUtils::writeUint16AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition() 48 ByteArrayUtils::writeUint24AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition() 51 ByteArrayUtils::writeUint32AndAdvancePosition(buffer, data, pos); in writeUintAndAdvancePosition() 63 static AK_FORCE_INLINE uint32_t readUint32(const uint8_t *const buffer, const int pos) { in readUint32() argument 64 return (buffer[pos] << 24) ^ (buffer[pos + 1] << 16) in readUint32() 65 ^ (buffer[pos + 2] << 8) ^ buffer[pos + 3]; in readUint32() 68 static AK_FORCE_INLINE uint32_t readUint24(const uint8_t *const buffer, const int pos) { in readUint24() argument 69 return (buffer[pos] << 16) ^ (buffer[pos + 1] << 8) ^ buffer[pos + 2]; in readUint24() [all …]
|
D | dict_file_writing_utils.cpp | 83 const char *const suffix, const BufferWithExtendableBuffer *const buffer) { in flushBufferToFileWithSuffix() argument 87 return flushBufferToFile(filePath, buffer); in flushBufferToFileWithSuffix() 91 const BufferWithExtendableBuffer *const buffer) { in writeBufferToFileTail() argument 94 ByteArrayUtils::writeUintAndAdvancePosition(bufferSize, buffer->getTailPosition(), in writeBufferToFileTail() 99 return writeBufferToFile(file, buffer); in writeBufferToFileTail() 103 const BufferWithExtendableBuffer *const buffer) { in flushBufferToFile() argument 116 if (!writeBufferToFile(file, buffer)) { in flushBufferToFile() 120 buffer->getTailPosition()); in flushBufferToFile() 130 const BufferWithExtendableBuffer *const buffer) { in writeBufferToFile() argument 131 const int originalBufSize = buffer->getOriginalBufferSize(); in writeBufferToFile() [all …]
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/util/ |
D | StatusTextUtils.java | 49 StringBuffer buffer = new StringBuffer(); in getStatusWarningInHTML() local 61 buffer.append(String.format(Locale.US, "<font color=%s>", audioPositionColor)); in getStatusWarningInHTML() 62 buffer.append( in getStatusWarningInHTML() 68 buffer.append("</font>\n"); in getStatusWarningInHTML() 69 buffer.append("<font color=" + COLOR_GRAY + ">"); in getStatusWarningInHTML() 70 buffer.append( in getStatusWarningInHTML() 77 buffer.append( in getStatusWarningInHTML() 84 buffer.append("</font>\n"); in getStatusWarningInHTML() 86 appendStatusLine(buffer, "KbytesInQueue", bytesInQueue / 1000, 1, 10); in getStatusWarningInHTML() 87 buffer.append("<br/>"); in getStatusWarningInHTML() [all …]
|
D | ByteArrayBuffer.java | 40 private byte[] buffer; field in ByteArrayBuffer 48 this.buffer = new byte[capacity]; in ByteArrayBuffer() 52 byte newbuffer[] = new byte[Math.max(this.buffer.length << 1, newlen)]; in expand() 53 System.arraycopy(this.buffer, 0, newbuffer, 0, this.len); in expand() 54 this.buffer = newbuffer; in expand() 72 if (newlen > this.buffer.length) { in append() 75 System.arraycopy(b, off, this.buffer, this.len, len); in append() 81 if (newlen > this.buffer.length) { in append() 84 this.buffer[this.len] = (byte) b; in append() 104 if (newlen > this.buffer.length) { in append() [all …]
|
/packages/inputmethods/LatinIME/native/jni/tests/dictionary/utils/ |
D | byte_array_utils_test.cpp | 28 const uint8_t buffer[] = { 0x20u, 0x21u, 0x00u, 0x01u, 0x00u }; in TEST() local 31 EXPECT_EQ(0x6f, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST() 33 EXPECT_EQ(0x6b, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST() 36 EXPECT_EQ(0x100, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); in TEST() 40 const uint8_t buffer[] = { 0x1u, 0x8Au, 0x0u, 0xAAu }; in TEST() local 42 EXPECT_EQ(0x01u, ByteArrayUtils::readUint8(buffer, 0)); in TEST() 43 EXPECT_EQ(0x8Au, ByteArrayUtils::readUint8(buffer, 1)); in TEST() 44 EXPECT_EQ(0x0u, ByteArrayUtils::readUint8(buffer, 2)); in TEST() 45 EXPECT_EQ(0xAAu, ByteArrayUtils::readUint8(buffer, 3)); in TEST() 47 EXPECT_EQ(0x018Au, ByteArrayUtils::readUint16(buffer, 0)); in TEST() [all …]
|
D | format_utils_test.cpp | 34 std::vector<uint8_t> buffer; in getBuffer() local 35 buffer.push_back(magicNumber >> 24); in getBuffer() 36 buffer.push_back(magicNumber >> 16); in getBuffer() 37 buffer.push_back(magicNumber >> 8); in getBuffer() 38 buffer.push_back(magicNumber); in getBuffer() 40 buffer.push_back(version >> 8); in getBuffer() 41 buffer.push_back(version); in getBuffer() 43 buffer.push_back(flags >> 8); in getBuffer() 44 buffer.push_back(flags); in getBuffer() 46 buffer.push_back(headerSize >> 24); in getBuffer() [all …]
|
D | buffer_with_extendable_buffer_test.cpp | 27 BufferWithExtendableBuffer buffer(DEFAULT_MAX_BUFFER_SIZE); in TEST() local 31 EXPECT_TRUE(buffer.writeUint(data_1, 1 /* size */, pos)); in TEST() 32 EXPECT_EQ(data_1, buffer.readUint(1, pos)); in TEST() 36 EXPECT_TRUE(buffer.writeUint(data_2, 2 /* size */, pos)); in TEST() 37 EXPECT_EQ(data_2, buffer.readUint(2, pos)); in TEST() 41 EXPECT_TRUE(buffer.writeUint(data_3, 3 /* size */, pos)); in TEST() 42 EXPECT_EQ(data_3, buffer.readUint(3, pos)); in TEST() 46 EXPECT_TRUE(buffer.writeUint(data_4, 4 /* size */, pos)); in TEST() 47 EXPECT_EQ(data_4, buffer.readUint(4, pos)); in TEST() 51 BufferWithExtendableBuffer buffer(DEFAULT_MAX_BUFFER_SIZE); in TEST() local [all …]
|
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/ |
D | writertest.cpp | 26 StringBuffer buffer; in TEST() local 27 Writer<StringBuffer> writer(buffer); in TEST() 28 buffer.ShrinkToFit(); in TEST() 31 …d\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3]}", buffer.GetString()); in TEST() 32 EXPECT_EQ(77u, buffer.GetSize()); in TEST() 40 StringBuffer buffer; \ 41 Writer<StringBuffer> writer(buffer); \ 44 EXPECT_STREQ(json, buffer.GetString()); \ 89 StringBuffer buffer; in TEST() local 90 Writer<StringBuffer> writer(buffer); in TEST() [all …]
|
D | stringbuffertest.cpp | 22 StringBuffer buffer; in TEST() local 23 EXPECT_EQ(0u, buffer.GetSize()); in TEST() 24 EXPECT_STREQ("", buffer.GetString()); in TEST() 28 StringBuffer buffer; in TEST() local 29 buffer.Put('A'); in TEST() 31 EXPECT_EQ(1u, buffer.GetSize()); in TEST() 32 EXPECT_STREQ("A", buffer.GetString()); in TEST() 36 StringBuffer buffer; in TEST() local 37 buffer.Put('A'); in TEST() 38 buffer.Put('B'); in TEST() [all …]
|
D | prettywritertest.cpp | 43 StringBuffer buffer; in TEST() local 44 PrettyWriter<StringBuffer> writer(buffer); in TEST() 48 EXPECT_STREQ(kPrettyJson, buffer.GetString()); in TEST() 52 StringBuffer buffer; in TEST() local 53 PrettyWriter<StringBuffer> writer(buffer); in TEST() 75 buffer.GetString()); in TEST() 79 StringBuffer buffer; in TEST() local 80 PrettyWriter<StringBuffer> writer(buffer); in TEST() 84 EXPECT_STREQ("[\n \"Hello\\n\"\n]", buffer.GetString()); in TEST() 89 StringBuffer buffer; in TEST() local [all …]
|
D | encodedstreamtest.cpp | 51 char buffer[1024]; in Open() local 53 sprintf(buffer, paths[i], filename); in Open() 54 FILE *fp = fopen(buffer, "rb"); in Open() 72 char* buffer = (char*)malloc(*outLength + 1); in ReadFile() local 73 size_t readLength = fread(buffer, 1, *outLength, fp); in ReadFile() 74 buffer[readLength] = '\0'; in ReadFile() 76 return buffer; in ReadFile() 83 char buffer[16]; in TestEncodedInputStream() local 86 FileReadStream fs(fp, buffer, sizeof(buffer)); in TestEncodedInputStream() 123 char buffer[16]; in TestAutoUTFInputStream() local [all …]
|
/packages/apps/Test/connectivity/sl4n/rapidjson/test/perftest/ |
D | misctest.cpp | 376 char buffer[10]; in WriteUint() local 377 char *p = buffer; in WriteUint() 386 } while (p != buffer); in WriteUint() 400 char buffer[20]; in WriteUint64() local 401 char *p = buffer; in WriteUint64() 410 } while (p != buffer); in WriteUint64() 420 char buffer[10]; in WriteUint() local 421 char* p = buffer; in WriteUint() 427 char* d = os_->Push(p - buffer); in WriteUint() 431 } while (p != buffer); in WriteUint() [all …]
|
/packages/modules/IPsec/src/java/com/android/internal/net/eap/message/mschapv2/ |
D | EapMsChapV2TypeData.java | 111 EapMsChapV2ChallengeRequest(ByteBuffer buffer) throws EapMsChapV2ParsingException { in EapMsChapV2ChallengeRequest() argument 114 Byte.toUnsignedInt(buffer.get()), in EapMsChapV2ChallengeRequest() 115 Short.toUnsignedInt(buffer.getShort())); in EapMsChapV2ChallengeRequest() 117 int valueSize = Byte.toUnsignedInt(buffer.get()); in EapMsChapV2ChallengeRequest() 121 buffer.get(challenge); in EapMsChapV2ChallengeRequest() 129 buffer.get(name); in EapMsChapV2ChallengeRequest() 186 ByteBuffer buffer = ByteBuffer.allocate(msLength); in encode() local 187 buffer.put((byte) EAP_MSCHAP_V2_RESPONSE); in encode() 188 buffer.put((byte) msChapV2Id); in encode() 189 buffer.putShort((short) msLength); in encode() [all …]
|
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/ |
D | writer.h | 205 char buffer[11]; in WriteInt() local 206 const char* end = internal::i32toa(i, buffer); in WriteInt() 207 for (const char* p = buffer; p != end; ++p) in WriteInt() 213 char buffer[10]; in WriteUint() local 214 const char* end = internal::u32toa(u, buffer); in WriteUint() 215 for (const char* p = buffer; p != end; ++p) in WriteUint() 221 char buffer[21]; in WriteInt64() local 222 const char* end = internal::i64toa(i64, buffer); in WriteInt64() 223 for (const char* p = buffer; p != end; ++p) in WriteInt64() 229 char buffer[20]; in WriteUint64() local [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/ |
D | patricia_trie_reading_utils.cpp | 48 const uint8_t *const buffer, int *const pos) { in getPtNodeArraySizeAndAdvancePosition() argument 49 const uint8_t firstByte = ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); in getPtNodeArraySizeAndAdvancePosition() 54 buffer, pos); in getPtNodeArraySizeAndAdvancePosition() 59 const uint8_t *const buffer, int *const pos) { in getFlagsAndAdvancePosition() argument 60 return ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); in getFlagsAndAdvancePosition() 63 /* static */ int PtReadingUtils::getCodePointAndAdvancePosition(const uint8_t *const buffer, in getCodePointAndAdvancePosition() argument 65 return ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, pos); in getCodePointAndAdvancePosition() 69 /* static */ int PtReadingUtils::getCharsAndAdvancePosition(const uint8_t *const buffer, in getCharsAndAdvancePosition() argument 74 length = ByteArrayUtils::readStringAndAdvancePosition(buffer, maxLength, codePointTable, in getCharsAndAdvancePosition() 77 const int codePoint = getCodePointAndAdvancePosition(buffer, codePointTable, pos); in getCharsAndAdvancePosition() [all …]
|
D | dynamic_pt_writing_utils.cpp | 39 BufferWithExtendableBuffer *const buffer, const int rootPos) { in writeEmptyDictionary() argument 41 if (!writePtNodeArraySizeAndAdvancePosition(buffer, 0 /* arraySize */, &writingPos)) { in writeEmptyDictionary() 44 return writeForwardLinkPositionAndAdvancePosition(buffer, NOT_A_DICT_POS /* forwardLinkPos */, in writeEmptyDictionary() 49 BufferWithExtendableBuffer *const buffer, const int forwardLinkPos, in writeForwardLinkPositionAndAdvancePosition() argument 51 return writeDictOffset(buffer, forwardLinkPos, (*forwardLinkFieldPos), forwardLinkFieldPos); in writeForwardLinkPositionAndAdvancePosition() 55 BufferWithExtendableBuffer *const buffer, const size_t arraySize, in writePtNodeArraySizeAndAdvancePosition() argument 66 return buffer->writeUintAndAdvancePosition(data, LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE, in writePtNodeArraySizeAndAdvancePosition() 77 BufferWithExtendableBuffer *const buffer, in writeFlagsAndAdvancePosition() argument 79 return buffer->writeUintAndAdvancePosition(nodeFlags, NODE_FLAG_FIELD_SIZE, nodeFlagsFieldPos); in writeFlagsAndAdvancePosition() 84 BufferWithExtendableBuffer *const buffer, const int parentPos, const int basePos, in writeParentPosOffsetAndAdvancePosition() argument [all …]
|
/packages/modules/DnsResolver/tests/dns_responder/ |
D | dns_responder.cpp | 56 std::string str2hex(const char* buffer, size_t len) { in str2hex() argument 60 uint8_t c = buffer[i]; in str2hex() 156 const char* DNSName::read(const char* buffer, const char* buffer_end) { in read() argument 157 const char* cur = buffer; in read() 169 char* DNSName::write(char* buffer, const char* buffer_end) const { in write() argument 170 char* buffer_cur = buffer; in write() 198 const char* DNSName::parseField(const char* buffer, const char* buffer_end, bool* last) { in parseField() argument 199 if (buffer + sizeof(uint8_t) > buffer_end) { in parseField() 203 unsigned field_type = *buffer >> 6; in parseField() 204 unsigned ofs = *buffer & 0x3F; in parseField() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | ImageCacheService.java | 58 public boolean getImageData(Path path, long timeModified, int type, BytesBuffer buffer) { in getImageData() argument 64 request.buffer = buffer.data; in getImageData() 68 if (isSameKey(key, request.buffer)) { in getImageData() 69 buffer.data = request.buffer; in getImageData() 70 buffer.offset = key.length; in getImageData() 71 buffer.length = request.length - buffer.offset; in getImageData() 83 ByteBuffer buffer = ByteBuffer.allocate(key.length + value.length); in putImageData() local 84 buffer.put(key); in putImageData() 85 buffer.put(value); in putImageData() 88 mCache.insert(cacheKey, buffer.array()); in putImageData() [all …]
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/ |
D | MpegTsSampleExtractor.java | 23 import com.android.tv.tuner.exoplayer.buffer.BufferManager; 24 import com.android.tv.tuner.exoplayer.buffer.PlaybackBufferListener; 25 import com.android.tv.tuner.exoplayer.buffer.SamplePool; 261 abstract void mayParseClosedCaption(ByteBuffer buffer, long presentationTimeUs); in mayParseClosedCaption() argument 263 protected int parseClosedCaption(ByteBuffer buffer, int offset, long presentationTimeUs) { in parseClosedCaption() argument 266 if (pos + 2 >= buffer.position()) { in parseClosedCaption() 269 boolean processCcDataFlag = (buffer.get(pos) & 64) != 0; in parseClosedCaption() 270 int ccCount = buffer.get(pos) & 0x1f; in parseClosedCaption() 272 if (!processCcDataFlag || pos + 3 * ccCount >= buffer.position() || ccCount == 0) { in parseClosedCaption() 277 holder.data.put(buffer.get(pos++)); in parseClosedCaption() [all …]
|
/packages/apps/Nfc/nci/jni/extns/pn54x/src/mifare/ |
D | phNxpExtns_MifareStd.cpp | 59 static NFCSTATUS phLibNfc_GetKeyNumberMFC(uint8_t* buffer, uint8_t* bKey); 119 if (NdefMap->pTransceiveInfo->sSendData.buffer != NULL) { in phNxpExtns_MfcModuleDeInit() 120 free(NdefMap->pTransceiveInfo->sSendData.buffer); in phNxpExtns_MfcModuleDeInit() 121 NdefMap->pTransceiveInfo->sSendData.buffer = NULL; in phNxpExtns_MfcModuleDeInit() 123 if (NdefMap->pTransceiveInfo->sRecvData.buffer != NULL) { in phNxpExtns_MfcModuleDeInit() 124 free(NdefMap->pTransceiveInfo->sRecvData.buffer); in phNxpExtns_MfcModuleDeInit() 125 NdefMap->pTransceiveInfo->sRecvData.buffer = NULL; in phNxpExtns_MfcModuleDeInit() 155 if (NULL != gAuthCmdBuf.pauth_cmd->buffer) { in phNxpExtns_MfcModuleDeInit() 156 free(gAuthCmdBuf.pauth_cmd->buffer); in phNxpExtns_MfcModuleDeInit() 157 gAuthCmdBuf.pauth_cmd->buffer = NULL; in phNxpExtns_MfcModuleDeInit() [all …]
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/hdhomerun/ |
D | HdHomeRunUtils.java | 124 ByteBuffer buffer = ByteBuffer.wrap(data); in openFrame() local 125 short resultType = buffer.getShort(); in openFrame() 126 int dataLength = buffer.getShort() & 0xffff; in openFrame() 133 buffer.get(result); in openFrame() 136 buffer.get(packetCrc); in openFrame() 148 ByteBuffer buffer = ByteBuffer.wrap(result); in sealFrame() local 149 buffer.putShort(frameType); in sealFrame() 150 buffer.putShort((short) data.length); in sealFrame() 151 buffer.put(data); in sealFrame() 152 buffer.put(getCrcFromBytes(Arrays.copyOfRange(result, 0, data.length + 4))); in sealFrame() [all …]
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer2/ |
D | MpegTsSampleExtractor.java | 24 import com.android.tv.tuner.exoplayer2.buffer.BufferManager; 25 import com.android.tv.tuner.exoplayer2.buffer.InputBufferPool; 26 import com.android.tv.tuner.exoplayer2.buffer.PlaybackBufferListener; 273 abstract void mayParseClosedCaption(ByteBuffer buffer, long presentationTimeUs); in mayParseClosedCaption() argument 275 int parseClosedCaption(ByteBuffer buffer, int offset, long presentationTimeUs) { in parseClosedCaption() argument 278 if (pos + 2 >= buffer.position()) { in parseClosedCaption() 281 boolean processCcDataFlag = (buffer.get(pos) & 64) != 0; in parseClosedCaption() 282 int ccCount = buffer.get(pos) & 0x1f; in parseClosedCaption() 284 if (!processCcDataFlag || pos + 3 * ccCount >= buffer.position() || ccCount == 0) { in parseClosedCaption() 289 holder.data.put(buffer.get(pos++)); in parseClosedCaption() [all …]
|
/packages/apps/SecureElement/src/com/android/se/security/arf/PKCS15/ |
D | EF.java | 117 byte[] buffer = null; in decodeUSIMFileProps() 124 buffer = der.getTLVData(); in decodeUSIMFileProps() 125 if ((buffer != null) && (buffer.length >= 2)) { in decodeUSIMFileProps() 126 mFileSize = ((buffer[0] & 0xFF) << 8) | (buffer[1] & 0xFF); in decodeUSIMFileProps() 130 buffer = der.getTLVData(); in decodeUSIMFileProps() 131 if ((buffer != null) && (buffer.length >= 2)) { in decodeUSIMFileProps() 132 if ((short) (buffer[0] & 0x07) == (short) 0x01) { in decodeUSIMFileProps() 134 } else if ((short) (buffer[0] & 0x07) == (short) 0x02) { in decodeUSIMFileProps() 143 if ((short) (buffer[0] & 0x38) == (short) 0x38) { in decodeUSIMFileProps() 148 if (buffer.length == 5) { in decodeUSIMFileProps() [all …]
|