/build/kati/ |
D | buf.go | 67 buf []byte member 72 b.buf = append(b.buf, data...) 77 b.buf = append(b.buf, c) 82 b.buf = append(b.buf, []byte(s)...) 86 func (b *buffer) Bytes() []byte { return b.buf } 87 func (b *buffer) Len() int { return len(b.buf) } 88 func (b *buffer) String() string { return string(b.buf) } 91 if b.buf == nil { 92 b.buf = b.bootstrap[:0] 94 b.buf = b.buf[:0] [all …]
|
D | func_test.go | 29 var buf evalBuffer 33 buf.Reset() 34 strip.Eval(&buf, ev) 48 var buf evalBuffer 52 buf.Reset() 53 sort.Eval(&buf, ev) 69 var buf evalBuffer 73 buf.Reset() 74 patsubst.Eval(&buf, ev)
|
D | strutil.go | 348 var buf []byte 362 if buf == nil { 363 buf = make([]byte, len(line)) 364 copy(buf, line) 365 line = buf 378 buf := []byte(line) 379 for i := 0; i < len(buf); i++ { 380 if buf[i] == '\n' && i+1 < len(buf) && buf[i+1] == '\t' { 381 copy(buf[i+1:], buf[i+2:]) 382 buf = buf[:len(buf)-1] [all …]
|
D | eval.go | 183 func (ev *Evaluator) args(buf *evalBuffer, args ...Value) ([][]byte, error) { 186 buf.resetSep() 187 err := arg.Eval(buf, ev) 191 pos = append(pos, buf.Len()) 193 v := buf.Bytes() 194 buf.args = buf.args[:0] 197 buf.args = append(buf.args, v[s:p]) 200 return buf.args, nil 229 buf := newEbuf() 230 err := v.Eval(buf, ev) [all …]
|
D | ninja.go | 199 var buf bytes.Buffer 241 buf.WriteRune(c) 243 return buf.String() 267 var buf bytes.Buffer 273 buf.WriteRune(c) 278 buf.WriteRune(c) 286 buf.WriteRune(c) 295 buf.WriteRune(c) 298 return buf.String(), true 304 var buf bytes.Buffer [all …]
|
/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() 255 if (buf[i] == 0x50 && in readCentralDir() 256 ZipEntry::getLongLE(&buf[i]) == EndOfCentralDir::kSignature) in readCentralDir() 269 result = mEOCD.readBuf(buf + i, readAmount - i); in readCentralDir() 343 delete[] buf; in readCentralDir() 678 void *buf = pSourceZip->uncompress(pSourceEntry); in addRecompress() local 679 if (buf == NULL) { in addRecompress() [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/ui/terminal/ |
D | status.go | 101 buf := &strings.Builder{} 105 buf.WriteByte(c) 111 buf.WriteByte(c) 118 buf.WriteByte(c) 120 fmt.Fprintf(buf, "%d", counts.StartedActions) 122 fmt.Fprintf(buf, "%d", counts.TotalActions) 124 fmt.Fprintf(buf, "%d", counts.RunningActions) 126 fmt.Fprintf(buf, "%d", counts.TotalActions-counts.StartedActions) 128 fmt.Fprintf(buf, "%d", counts.FinishedActions) 130 fmt.Fprintf(buf, "%.1f", float64(counts.FinishedActions)/time.Since(s.start).Seconds()) [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 { 164 var buf [directoryEndLen]byte [all …]
|
D | android.go | 58 var buf []byte 60 buf = make([]byte, dataDescriptor64Len) 62 buf = make([]byte, dataDescriptorLen) 64 b := writeBuf(buf) 74 _, err = w.cw.Write(buf) 206 var buf []byte 208 buf = make([]byte, dataDescriptor64Len) 210 buf = make([]byte, dataDescriptorLen) 212 b := writeBuf(buf) 222 _, err := w.zipw.Write(buf)
|
/build/soong/android/ |
D | expand.go | 28 buf := make([]byte, 0, 2*len(s)) 35 buf = append(buf, s[i:j]...) 40 buf = append(buf, value...) 45 return string(buf) + s[i:], nil
|
/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/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/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/java/ |
D | kotlin.go | 156 buf := &bytes.Buffer{} 158 binary.Write(buf, binary.BigEndian, uint32(len(options))) 160 binary.Write(buf, binary.BigEndian, uint16(len(option[0]))) 161 buf.WriteString(option[0]) 162 binary.Write(buf, binary.BigEndian, uint16(len(option[1]))) 163 buf.WriteString(option[1]) 169 if buf.Len() < 256 { 171 header.WriteByte(byte(buf.Len())) 174 binary.Write(header, binary.BigEndian, uint32(buf.Len())) 177 return base64.StdEncoding.EncodeToString(append(header.Bytes(), buf.Bytes()...))
|