/build/make/tools/ziptime/ |
D | ZipEntry.cpp | 86 uint8_t buf[kLFHLen]; in rewrite() local 88 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) in rewrite() 91 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in rewrite() 96 ZipEntry::putShortLE(&buf[0x0a], STATIC_TIME); in rewrite() 97 ZipEntry::putShortLE(&buf[0x0c], STATIC_DATE); in rewrite() 102 if (fwrite(buf, 1, kLFHLen, fp) != kLFHLen) in rewrite() 123 uint8_t buf[kCDELen]; in rewrite() local 126 if (fread(buf, 1, kCDELen, fp) != kCDELen) in rewrite() 129 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in rewrite() 134 ZipEntry::putShortLE(&buf[0x0c], STATIC_TIME); in rewrite() [all …]
|
D | ZipEntry.h | 53 static inline uint16_t getShortLE(const uint8_t* buf) { in getShortLE() argument 54 return buf[0] | (buf[1] << 8); in getShortLE() 56 static inline uint32_t getLongLE(const uint8_t* buf) { in getLongLE() argument 57 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); in getLongLE() 59 static inline void putShortLE(uint8_t* buf, uint16_t val) { in putShortLE() argument 60 buf[0] = (uint8_t) val; in putShortLE() 61 buf[1] = (uint8_t) (val >> 8); in putShortLE()
|
D | ZipFile.cpp | 99 uint8_t buf[EndOfCentralDir::kMaxEOCDSearch]; in rewriteCentralDir() local 100 if (fread(buf, 1, readAmount, mZipFp) != readAmount) { in rewriteCentralDir() 108 if (buf[i] == 0x50 && in rewriteCentralDir() 109 ZipEntry::getLongLE(&buf[i]) == EndOfCentralDir::kSignature) in rewriteCentralDir() 120 status_t result = mEOCD.readBuf(buf + i, readAmount - i); in rewriteCentralDir() 187 status_t ZipFile::EndOfCentralDir::readBuf(const uint8_t* buf, int len) in readBuf() argument 199 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) in readBuf() 202 diskNumber = ZipEntry::getShortLE(&buf[0x04]); in readBuf() 203 diskWithCentralDir = ZipEntry::getShortLE(&buf[0x06]); in readBuf() 204 numEntries = ZipEntry::getShortLE(&buf[0x08]); in readBuf() [all …]
|
/build/make/tools/aconfig/aconfig_storage_write_api/src/ |
D | flag_info_update.rs | 26 buf: &mut [u8], in get_flag_info_offset() 30 let interpreted_header = FlagInfoHeader::from_bytes(buf)?; in get_flag_info_offset() 54 buf: &mut [u8], in get_flag_attribute_and_offset() 58 let head = get_flag_info_offset(buf, flag_type, flag_index)?; in get_flag_attribute_and_offset() 60 let attribute = read_u8_from_bytes(buf, &mut pos)?; in get_flag_attribute_and_offset() 66 buf: &mut [u8], in update_flag_has_server_override() 71 let (attribute, head) = get_flag_attribute_and_offset(buf, flag_type, flag_index)?; in update_flag_has_server_override() 74 buf[head] = (attribute ^ FlagInfoBit::HasServerOverride as u8).to_le_bytes()[0]; in update_flag_has_server_override() 81 buf: &mut [u8], in update_flag_has_local_override() 86 let (attribute, head) = get_flag_attribute_and_offset(buf, flag_type, flag_index)?; in update_flag_has_local_override() [all …]
|
/build/blueprint/ |
D | levenshtein.go | 32 func levenshtein(a, b string, ai, bi, max int, buf [][]int) int { 42 if buf[bi][ai] != 0 { 43 return buf[bi][ai] 50 res = levenshtein(a, b, ai+1, bi+1, max, buf) 52 if c := levenshtein(a, b, ai+1, bi+1, max-1, buf); c < res { 55 if c := levenshtein(a, b, ai+1, bi, max-1, buf); c < res { 58 if c := levenshtein(a, b, ai, bi+1, max-1, buf); c < res { 63 buf[bi][ai] = res 78 buf := make([][]int, len(name)+kAllowedDifferences) 79 for i := range buf { [all …]
|
/build/make/tools/zipalign/ |
D | ZipEntry.cpp | 403 uint8_t buf[kLFHLen]; in read() local 408 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) { in read() 413 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in read() 419 mVersionToExtract = ZipEntry::getShortLE(&buf[0x04]); in read() 420 mGPBitFlag = ZipEntry::getShortLE(&buf[0x06]); in read() 421 mCompressionMethod = ZipEntry::getShortLE(&buf[0x08]); in read() 422 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0a]); in read() 423 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0c]); in read() 424 mCRC32 = ZipEntry::getLongLE(&buf[0x0e]); in read() 425 mCompressedSize = ZipEntry::getLongLE(&buf[0x12]); in read() [all …]
|
D | ZipEntry.h | 113 static inline uint16_t getShortLE(const uint8_t* buf) { in getShortLE() argument 114 return buf[0] | (buf[1] << 8); in getShortLE() 116 static inline uint32_t getLongLE(const uint8_t* buf) { in getLongLE() argument 117 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); in getLongLE() 119 static inline void putShortLE(uint8_t* buf, uint16_t val) { in putShortLE() argument 120 buf[0] = (uint8_t) val; in putShortLE() 121 buf[1] = (uint8_t) (val >> 8); in putShortLE() 123 static inline void putLongLE(uint8_t* buf, uint32_t val) { in putLongLE() argument 124 buf[0] = (uint8_t) val; in putLongLE() 125 buf[1] = (uint8_t) (val >> 8); in putLongLE() [all …]
|
D | ZipFile.cpp | 235 uint8_t buf[EndOfCentralDir::kMaxEOCDSearch]; in readCentralDir() local 236 if (fread(buf, 1, readAmount, mZipFp) != readAmount) { in readCentralDir() 248 if (buf[i] == 0x50 && in readCentralDir() 249 ZipEntry::getLongLE(&buf[i]) == EndOfCentralDir::kSignature) in readCentralDir() 261 status_t result = mEOCD.readBuf(buf + i, readAmount - i); in readCentralDir() 690 void *buf = pSourceZip->uncompress(pSourceEntry); in addRecompress() local 691 if (buf == NULL) { in addRecompress() 697 if (compressFpToFp(mZipFp, NULL, buf, uncompressedLen, &crc) != OK) { in addRecompress() 700 free(buf); in addRecompress() 706 free(buf); in addRecompress() [all …]
|
/build/soong/ui/terminal/ |
D | format.go | 72 buf := &strings.Builder{} 76 buf.WriteByte(c) 82 buf.WriteByte(c) 89 buf.WriteByte(c) 91 fmt.Fprintf(buf, "%d", counts.StartedActions) 93 fmt.Fprintf(buf, "%d", counts.TotalActions) 95 fmt.Fprintf(buf, "%d", counts.RunningActions) 97 fmt.Fprintf(buf, "%d", counts.TotalActions-counts.StartedActions) 99 fmt.Fprintf(buf, "%d", counts.FinishedActions) 101 fmt.Fprintf(buf, "%.1f", float64(counts.FinishedActions)/time.Since(s.start).Seconds()) [all …]
|
/build/soong/finder/fs/ |
D | readdir.go | 43 buf := make([]byte, blockSize) 47 n, errno := syscall.ReadDirent(fd, buf) 56 entries = parseDirent(buf[:n], entries) 81 func parseDirent(buf []byte, entries []*dirEntryInfo) []*dirEntryInfo { 82 for len(buf) > 0 { 83 reclen, ok := direntReclen(buf) 84 if !ok || reclen > uint64(len(buf)) { 87 rec := buf[:reclen] 88 buf = buf[reclen:] 125 func direntIno(buf []byte) (uint64, bool) { [all …]
|
/build/soong/third_party/zip/ |
D | zip_test.go | 25 buf := new(bytes.Buffer) 26 w := NewWriter(buf) 40 s := buf.String() 123 buf []repeatedByte member 127 if len(r.buf) == 0 { 130 last := &r.buf[len(r.buf)-1] 136 if len(r.buf) > 0 { 137 rp = &r.buf[len(r.buf)-1] 156 r.buf = append(r.buf, repeatedByte{r.Size(), b, 1}) 157 rp = &r.buf[len(r.buf)-1] [all …]
|
D | writer_test.go | 69 buf := new(bytes.Buffer) 70 w := NewWriter(buf) 81 r, err := NewReader(bytes.NewReader(buf.Bytes()), int64(buf.Len())) 101 buf := new(bytes.Buffer) 103 n, _ := buf.Write(existingData) 104 w := NewWriter(buf) 116 r, err := NewReader(bytes.NewReader(buf.Bytes()), int64(buf.Len())) 126 var buf bytes.Buffer 127 w := NewWriter(struct{ io.Writer }{&buf}) 132 if buf.Len() > 0 { [all …]
|
D | reader.go | 93 buf := bufio.NewReader(rs) 101 err = readDirectoryHeader(f, buf) 232 var buf [fileHeaderLen]byte 233 if _, err := f.zipr.ReadAt(buf[:], f.headerOffset); err != nil { 236 b := readBuf(buf[:]) 250 var buf [directoryHeaderLen]byte 251 if _, err := io.ReadFull(r, buf[:]); err != nil { 254 b := readBuf(buf[:]) 350 var buf [dataDescriptorLen]byte 362 if _, err := io.ReadFull(r, buf[:4]); err != nil { [all …]
|
D | writer.go | 71 var buf [directoryHeaderLen]byte 72 b := writeBuf(buf[:]) 89 var buf [28]byte // 2x uint16 + 3x uint64 90 eb := writeBuf(buf[:]) 96 h.Extra = append(h.Extra, buf[:]...) 111 if _, err := w.cw.Write(buf[:]); err != nil { 131 var buf [directory64EndLen + directory64LocLen]byte 132 b := writeBuf(buf[:]) 152 if _, err := w.cw.Write(buf[:]); err != nil { 179 var buf [directoryEndLen]byte [all …]
|
D | android.go | 72 var buf []byte 74 buf = make([]byte, dataDescriptor64Len) 76 buf = make([]byte, dataDescriptorLen) 78 b := writeBuf(buf) 88 _, err = w.cw.Write(buf) 220 var buf []byte 222 buf = make([]byte, dataDescriptor64Len) 224 buf = make([]byte, dataDescriptorLen) 226 b := writeBuf(buf) 236 _, err := w.zipw.Write(buf)
|
/build/soong/symbol_inject/ |
D | symbol_inject_test.go | 27 buf string 32 buf: "A", 37 buf: "B", 42 buf: "Z", 51 copyAndInject(in, out, testCase.offset, []byte(testCase.buf))
|
D | symbol_inject.go | 79 buf := make([]byte, size) 80 copy(buf, value) 82 return copyAndInject(file.r, w, offset, buf) 95 buf := make([]byte, 8) 96 binary.LittleEndian.PutUint64(buf, value) 98 return copyAndInject(file.r, w, offset, buf) 101 func copyAndInject(r io.ReaderAt, w io.Writer, offset uint64, buf []byte) (err error) { 107 _, err = w.Write(buf) 111 pos := int64(offset) + int64(len(buf))
|
/build/soong/android/ |
D | makevars.go | 360 buf := &bytes.Buffer{} 362 fmt.Fprint(buf, `# Autogenerated file 406 fmt.Fprintf(buf, "SOONG_%s := %s\n", v.name, v.value) 407 …fmt.Fprintf(buf, "$(eval $(call soong-compare-var,%s,%s,my_check_failed := true))\n\n", v.name, so… 410 fmt.Fprint(buf, ` 429 fmt.Fprintf(buf, "SOONG_%s := %s\n", v.name, v.value) 430 fmt.Fprintf(buf, "$(eval $(call soong-compare-var,%s,%s))\n\n", v.name, sort) 433 fmt.Fprintln(buf, "\nsoong-compare-var :=") 435 fmt.Fprintln(buf) 437 return buf.Bytes() [all …]
|
D | expand.go | 46 buf := make([]byte, 0, 2*len(s)) 53 buf = append(buf, s[i:j]...) 61 buf = append(buf, value...) 66 return string(buf) + s[i:], nil
|
/build/soong/cmd/extract_linker/ |
D | main_test.go | 56 buf := bytes.Buffer{} 57 bytesToAsm(&buf, testcase.in) 58 if buf.String() != testcase.out { 59 t.Errorf("input: %#v\n want: %q\n got: %q\n", testcase.in, testcase.out, buf.String())
|
/build/soong/cmd/diff_target_files/ |
D | compare.go | 59 buf := &bytes.Buffer{} 70 must(fmt.Fprintln(buf, "files modified:")) 72 …must(fmt.Fprintf(buf, " %v (%v bytes -> %v bytes)\n", f[0].Name, f[0].UncompressedSize64, f[1].U… 78 must(fmt.Fprintln(buf, "files removed:")) 80 must(fmt.Fprintf(buf, " - %v (%v bytes)\n", f.Name, f.UncompressedSize64)) 86 must(fmt.Fprintln(buf, "files added:")) 88 must(fmt.Fprintf(buf, " + %v (%v bytes)\n", f.Name, f.UncompressedSize64)) 94 must(fmt.Fprintf(buf, "total size change: %v bytes\n", sizeChange)) 97 return buf.String()
|
/build/soong/elf/ |
D | elf_test.go | 50 buf := bytes.NewReader([]byte(tt.contents)) 51 _, err := elfIdentifierFromReaderAt(buf, "<>", false) 55 _, err = elfIdentifierFromReaderAt(buf, "<>", true) 114 buf := &bytes.Buffer{} 115 binary.Write(buf, binary.LittleEndian, header) 116 return buf.String() 148 buf := &bytes.Buffer{} 149 binary.Write(buf, binary.LittleEndian, header) 150 binary.Write(buf, binary.LittleEndian, []byte{0}) 151 return buf.String()
|
/build/soong/ui/status/ |
D | kati.go | 39 buf strings.Builder member 55 Output: k.buf.String(), 59 k.buf.Reset() 104 k.buf.WriteString(line) 105 k.buf.WriteString("\n") 132 var buf strings.Builder 133 io.Copy(&buf, pipe) 135 st.Print(buf.String())
|
/build/blueprint/loadplugins/ |
D | loadplugins.go | 40 buf := &bytes.Buffer{} 42 err := pluginTmpl.Execute(buf, struct { 53 err = ioutil.WriteFile(*output, buf.Bytes(), 0666)
|
/build/soong/ui/tracer/ |
D | tracer.go | 62 buf bytes.Buffer member 107 t.w = nopCloser{&t.buf} 152 if _, err := io.Copy(t.w, &t.buf); err != nil { 155 t.buf = bytes.Buffer{} 264 buf := bytes.Buffer{} 265 buf.WriteRune('{') 271 buf.Write(name) 272 buf.WriteByte(':') 277 buf.Write(value) 279 buf.WriteRune(',') [all …]
|