Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 8 of 8) sorted by relevance

/build/tools/zipalign/
DZipEntry.cpp405 unsigned char buf[kLFHLen]; in read() local
410 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) { in read()
415 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in read()
421 mVersionToExtract = ZipEntry::getShortLE(&buf[0x04]); in read()
422 mGPBitFlag = ZipEntry::getShortLE(&buf[0x06]); in read()
423 mCompressionMethod = ZipEntry::getShortLE(&buf[0x08]); in read()
424 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0a]); in read()
425 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0c]); in read()
426 mCRC32 = ZipEntry::getLongLE(&buf[0x0e]); in read()
427 mCompressedSize = ZipEntry::getLongLE(&buf[0x12]); in read()
[all …]
DZipEntry.h111 static inline unsigned short getShortLE(const unsigned char* buf) { in getShortLE() argument
112 return buf[0] | (buf[1] << 8); in getShortLE()
114 static inline unsigned long getLongLE(const unsigned char* buf) { in getLongLE() argument
115 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); in getLongLE()
117 static inline void putShortLE(unsigned char* buf, short val) { in putShortLE() argument
118 buf[0] = (unsigned char) val; in putShortLE()
119 buf[1] = (unsigned char) (val >> 8); in putShortLE()
121 static inline void putLongLE(unsigned char* buf, long val) { in putLongLE() argument
122 buf[0] = (unsigned char) val; in putLongLE()
123 buf[1] = (unsigned char) (val >> 8); in putLongLE()
[all …]
DZipFile.cpp207 unsigned char* buf = NULL; in readCentralDir() local
223 buf = new unsigned char[EndOfCentralDir::kMaxEOCDSearch]; in readCentralDir()
224 if (buf == NULL) { in readCentralDir()
245 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) { in readCentralDir()
253 if (buf[i] == 0x50 && in readCentralDir()
254 ZipEntry::getLongLE(&buf[i]) == EndOfCentralDir::kSignature) in readCentralDir()
267 result = mEOCD.readBuf(buf + i, readAmount - i); in readCentralDir()
341 delete[] buf; in readCentralDir()
1144 bool ZipFile::uncompress(const ZipEntry* pEntry, void* buf) const
1156 void* buf = malloc(unlen); in uncompress() local
[all …]
DZipFile.h188 status_t readBuf(const unsigned char* buf, int len);
/build/tools/bin2asm/
Dicudata.c10 unsigned char buf[4096]; in main() local
49 amt = fread(buf, 1, sizeof(buf), stdin); in main()
54 printf("0x%02x", buf[i]); in main()
Ddata10 unsigned char buf[4096];
38 amt = fread(buf, 1, sizeof(buf), stdin);
40 printf((col == 0) ? ".byte %3d" : ",%3d", buf[i]);
/build/tools/atree/
Dfiles.cpp186 char* buf = NULL; in read_list_file() local
216 buf = (char*)malloc(size+1); in read_list_file()
217 if (buf == NULL) { in read_list_file()
224 if (1 != fread(buf, size, 1, f)) { in read_list_file()
232 p = buf; in read_list_file()
233 q = buf+size; in read_list_file()
244 p = buf; in read_list_file()
320 if (buf != NULL) { in read_list_file()
321 free(buf); in read_list_file()
/build/libs/host/
DCopyFile.c118 unsigned char buf[8192]; in copyFileContents() local
125 readCount = read(srcFd, buf, sizeof(buf)); in copyFileContents()
133 writeCount = write(dstFd, buf, readCount); in copyFileContents()
146 if (readCount < (ssize_t) sizeof(buf)) in copyFileContents()