/build/make/tools/ziptime/ |
D | ZipEntry.cpp | 89 uint8_t buf[kLFHLen]; in rewrite() local 91 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) in rewrite() 94 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in rewrite() 99 ZipEntry::putShortLE(&buf[0x0a], STATIC_TIME); in rewrite() 100 ZipEntry::putShortLE(&buf[0x0c], STATIC_DATE); in rewrite() 105 if (fwrite(buf, 1, kLFHLen, fp) != kLFHLen) in rewrite() 126 uint8_t buf[kCDELen]; in rewrite() local 129 if (fread(buf, 1, kCDELen, fp) != kCDELen) in rewrite() 132 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in rewrite() 137 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 | 76 uint8_t* buf = NULL; in rewriteCentralDir() local 92 buf = new uint8_t[EndOfCentralDir::kMaxEOCDSearch]; in rewriteCentralDir() 93 if (buf == NULL) { in rewriteCentralDir() 114 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) { in rewriteCentralDir() 122 if (buf[i] == 0x50 && in rewriteCentralDir() 123 ZipEntry::getLongLE(&buf[i]) == EndOfCentralDir::kSignature) in rewriteCentralDir() 135 result = mEOCD.readBuf(buf + i, readAmount - i); in rewriteCentralDir() 196 delete[] buf; in rewriteCentralDir() 212 status_t ZipFile::EndOfCentralDir::readBuf(const uint8_t* buf, int len) in readBuf() argument 224 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) in readBuf() [all …]
|
/build/make/tools/zipalign/ |
D | ZipEntry.cpp | 407 uint8_t buf[kLFHLen]; in read() local 412 if (fread(buf, 1, kLFHLen, fp) != kLFHLen) { in read() 417 if (ZipEntry::getLongLE(&buf[0x00]) != kSignature) { in read() 423 mVersionToExtract = ZipEntry::getShortLE(&buf[0x04]); in read() 424 mGPBitFlag = ZipEntry::getShortLE(&buf[0x06]); in read() 425 mCompressionMethod = ZipEntry::getShortLE(&buf[0x08]); in read() 426 mLastModFileTime = ZipEntry::getShortLE(&buf[0x0a]); in read() 427 mLastModFileDate = ZipEntry::getShortLE(&buf[0x0c]); in read() 428 mCRC32 = ZipEntry::getLongLE(&buf[0x0e]); in read() 429 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 | 209 uint8_t* buf = NULL; in readCentralDir() local 225 buf = new uint8_t[EndOfCentralDir::kMaxEOCDSearch]; in readCentralDir() 226 if (buf == NULL) { in readCentralDir() 247 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) { in readCentralDir() 259 if (buf[i] == 0x50 && in readCentralDir() 260 ZipEntry::getLongLE(&buf[i]) == EndOfCentralDir::kSignature) in readCentralDir() 273 result = mEOCD.readBuf(buf + i, readAmount - i); in readCentralDir() 351 delete[] buf; in readCentralDir() 711 void *buf = pSourceZip->uncompress(pSourceEntry); in addRecompress() local 712 if (buf == NULL) { in addRecompress() [all …]
|
/build/soong/ui/terminal/ |
D | format.go | 59 buf := &strings.Builder{} 63 buf.WriteByte(c) 69 buf.WriteByte(c) 76 buf.WriteByte(c) 78 fmt.Fprintf(buf, "%d", counts.StartedActions) 80 fmt.Fprintf(buf, "%d", counts.TotalActions) 82 fmt.Fprintf(buf, "%d", counts.RunningActions) 84 fmt.Fprintf(buf, "%d", counts.TotalActions-counts.StartedActions) 86 fmt.Fprintf(buf, "%d", counts.FinishedActions) 88 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 { 171 var buf [directoryEndLen]byte [all …]
|
D | android.go | 67 var buf []byte 69 buf = make([]byte, dataDescriptor64Len) 71 buf = make([]byte, dataDescriptorLen) 73 b := writeBuf(buf) 83 _, err = w.cw.Write(buf) 215 var buf []byte 217 buf = make([]byte, dataDescriptor64Len) 219 buf = make([]byte, dataDescriptorLen) 221 b := writeBuf(buf) 231 _, err := w.zipw.Write(buf)
|
D | example_test.go | 19 buf := new(bytes.Buffer) 22 w := zip.NewWriter(buf) 82 buf := new(bytes.Buffer) 85 w := zip.NewWriter(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/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/android/ |
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
|
D | util.go | 39 var buf strings.Builder 40 buf.WriteString(prefix) 41 buf.WriteString(strs[0]) 43 buf.WriteString(" ") 44 buf.WriteString(prefix) 45 buf.WriteString(strs[i]) 47 return buf.String() 57 var buf strings.Builder 58 buf.WriteString(strs[0]) 59 buf.WriteString(suffix) [all …]
|
D | makevars.go | 303 buf := &bytes.Buffer{} 305 fmt.Fprint(buf, `# Autogenerated file 349 fmt.Fprintf(buf, "SOONG_%s := %s\n", v.name, v.value) 350 …fmt.Fprintf(buf, "$(eval $(call soong-compare-var,%s,%s,my_check_failed := true))\n\n", v.name, so… 353 fmt.Fprint(buf, ` 372 fmt.Fprintf(buf, "SOONG_%s := %s\n", v.name, v.value) 373 fmt.Fprintf(buf, "$(eval $(call soong-compare-var,%s,%s))\n\n", v.name, sort) 376 fmt.Fprintln(buf, "\nsoong-compare-var :=") 378 fmt.Fprintln(buf) 380 return buf.Bytes() [all …]
|
/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/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/response/ |
D | response_test.go | 113 buf := &bytes.Buffer{} 114 err := WriteRspFile(buf, testCase.in) 118 if buf.String() != testCase.out { 119 t.Errorf("expected %q got %q", testCase.out, buf.String())
|
/build/make/tools/product_config/src/com/android/build/config/ |
D | CsvParser.java | 116 char[] buf = new char[CHUNK_SIZE]; in parse() local 200 if (pos >= buf.length) { in parse() 201 char[] old = buf; in parse() 202 buf = new char[old.length + CHUNK_SIZE]; in parse() 203 System.arraycopy(old, 0, buf, 0, old.length); in parse() 206 buf[pos] = (char)c; in parse() 214 String field = new String(buf, 0, pos); in parse()
|
/build/blueprint/loadplugins/ |
D | loadplugins.go | 40 buf := &bytes.Buffer{} 42 err := pluginTmpl.Execute(buf, struct { 53 err = ioutil.WriteFile(*output, buf.Bytes(), 0666)
|