/external/toybox/toys/other/ |
D | hexedit.c | 48 tty_jump(0, TT.rows); 59 strcpy(TT.input, initial_value); in prompt() 61 tty_jump(0, TT.rows); in prompt() 63 printf("\e[1m%s: \e[0m%s", prompt, TT.input); in prompt() 67 key = scan_key(TT.keybuf, -1); in prompt() 75 if (len > 0) TT.input[--len] = 0; in prompt() 77 while (len > 0) TT.input[--len] = 0; in prompt() 78 } else if (key >= ' ' && key < 0x7f && len < sizeof(TT.input)) { in prompt() 79 TT.input[len++] = key; in prompt() 102 tty_jump(0, TT.rows); in draw_status() [all …]
|
D | timeout.c | 43 fprintf(stderr, "timeout pid %d signal %d\n", TT.pid, TT.nextsig); in handler() 45 toys.exitval = (TT.nextsig==9) ? 137 : 124; in handler() 46 kill(TT.pid, TT.nextsig); in handler() 47 if (TT.k) { in handler() 48 TT.k = 0; in handler() 49 TT.nextsig = SIGKILL; in handler() 51 TT.itv.it_value = TT.ktv; in handler() 52 setitimer(ITIMER_REAL, &TT.itv, (void *)toybuf); in handler() 70 xparsetimeval(*toys.optargs, &TT.itv.it_value); in timeout_main() 71 if (TT.k) xparsetimeval(TT.k, &TT.ktv); in timeout_main() [all …]
|
/external/toybox/toys/pending/ |
D | dd.c | 87 (TT.start.tv_sec * 1000000 + TT.start.tv_usec))/1000000.0; in status() 89 if (TT.show_records) in status() 91 TT.in_full, TT.in_part, TT.out_full, TT.out_part); in status() 93 if (TT.show_xfer) { in status() 94 human_readable(toybuf, TT.bytes, HR_SPACE|HR_B); in status() 95 fprintf(stderr, "%llu bytes (%s) copied, ", TT.bytes, toybuf); in status() 96 human_readable(toybuf, TT.bytes/seconds, HR_SPACE|HR_B); in status() 109 TT.out.bp = TT.out.buff; in write_out() 110 while (TT.out.count) { in write_out() 111 ssize_t nw = writeall(TT.out.fd, TT.out.bp, ((all)? TT.out.count : TT.out.sz)); in write_out() [all …]
|
D | vi.c | 90 if (*s == '\t') *width = TT.tabstop; in utf8_lnw() 170 struct slice_list *s = TT.slices; in insert_str() 179 TT.text = (struct block_list *)dlist_add((struct double_list **)&TT.text, in insert_str() 183 TT.slices = (struct slice_list *)dlist_add( in insert_str() 184 (struct double_list **)&TT.slices, in insert_str() 193 if (s == TT.slices) return -1; //error out of bounds in insert_str() 203 (struct double_list **)&TT.slices, in insert_str() 208 (struct double_list **)&TT.slices, in insert_str() 214 (struct double_list **)&TT.slices, in insert_str() 219 s = (struct slice_list *)dlist_add_after((struct double_list **)&TT.slices, in insert_str() [all …]
|
D | man.c | 42 if (TT.any) putchar('\n'); in newln() 43 if (TT.any && TT.cell != 2) putchar('\n'); // gawk alias in newln() 44 TT.any = TT.cell = 0; in newln() 49 while (*x && (TT.ex || *x != '\n')) TT.any = putchar(*x++); in put() 57 for (k = 0; TT.line[k]; k++) if (!strncmp(x, &TT.line[k], i)) { in s() 58 memmove(&TT.line[k], y, j); in s() 59 for (l = k += j; TT.line[l]; l++) TT.line[l] = TT.line[l + i - j]; in s() 66 return !strncmp(x, TT.line, strlen(x)); in start() 71 if (start(x)) while (*x++) TT.line++; in trim() 75 TT.k_done = 2; in k() [all …]
|
D | telnet.c | 49 tcsetattr(0, TCSADRAIN, raw ? &TT.raw_term : &TT.old_term); 54 TT.mode = line ? CM_OFF : CM_ON; in slc() 62 if (TT.echo) { in set_mode() 63 if (TT.mode == CM_TRY) slc(0); in set_mode() 64 } else if (TT.mode != CM_OFF) slc(1); in set_mode() 91 TT.mode = CM_TRY; in handle_esc() 92 TT.echo = TT.sga = 0; in handle_esc() 94 dprintf(TT.sock,"%c%c%c%c%c%c",IAC,DONT,TELOPT_ECHO,IAC,DONT,TELOPT_SGA); in handle_esc() 99 TT.mode = CM_TRY; in handle_esc() 100 TT.echo = TT.sga = 1; in handle_esc() [all …]
|
D | getty.c | 50 TT.sc = 0; in parse_speeds() 52 TT.speeds[TT.sc] = atolx_range(ptr, 0, INT_MAX); in parse_speeds() 53 if (TT.speeds[TT.sc] < 0) perror_exit("bad speed %s", ptr); in parse_speeds() 54 if (++TT.sc > 10) perror_exit("too many speeds, max is 10"); in parse_speeds() 61 if (strcmp(TT.tty_name, "-")) { in open_tty() 62 if (*(TT.tty_name) != '/') TT.tty_name = xmprintf("/dev/%s", TT.tty_name); in open_tty() 69 xopen_stdio(TT.tty_name, O_RDWR|O_NDELAY|O_CLOEXEC); in open_tty() 74 if (!isatty(0)) perror_exit("/dev/%s: not a tty", TT.tty_name); in open_tty() 75 chown(TT.tty_name, 0, 0); // change ownership, Hope login will change this in open_tty() 76 chmod(TT.tty_name, 0620); in open_tty() [all …]
|
D | dhcp6.c | 181 TT.length += 4; in fill_option() 186 uint8_t *tmp = &mesg.options[TT.length]; in fill_clientID() 195 get_mac(mac, TT.interface_name); in fill_clientID() 203 TT.length += sizeof(DUID); in fill_clientID() 209 uint8_t *tmp = &mesg.options[TT.length]; in fill_optionRequest() 214 TT.length += 4; in fill_optionRequest() 219 uint8_t *tmp = &mesg.options[TT.length]; in fill_elapsedTime() 223 TT.length += 2; in fill_elapsedTime() 229 uint8_t *tmp = &mesg.options[TT.length]; in fill_iaid() 236 TT.length += sizeof(IA_NA); in fill_iaid() [all …]
|
D | mke2fs.c | 254 uint32_t dblocks = (uint32_t)((size+(TT.blocksize-1))/TT.blocksize); in file_blocks_used() 255 uint32_t idx=TT.blocksize/4, iblocks=0, diblocks=0, tiblocks=0; in file_blocks_used() 311 TT.treeblocks += that->st.st_blocks; in check_treesize() 315 TT.treeblocks += blocks = file_blocks_used(*size, 0); in check_treesize() 316 TT.treeinodes++; in check_treesize() 364 temp = (inodes + TT.groups - 1) / TT.groups; in get_inodespg() 365 inodes = TT.blocksize/sizeof(struct ext2_inode); in get_inodespg() 377 for (temp = 0; temp < 4; temp++) if (TT.blocksize == 1024<<temp) break; in init_superblock() 383 sb->blocks_count = SWAP_LE32(TT.blocks); in init_superblock() 384 sb->free_blocks_count = SWAP_LE32(TT.freeblocks); in init_superblock() [all …]
|
D | readelf.c | 57 long long result = ((TT.endian == 2) ? peek_be : peek_le)(*p, len); in elf_get() 65 return elf_get(p, 4*(TT.bits+1)); in elf_long() 80 char *shdr = TT.elf+TT.shoff+i*TT.shentsize; in get_sh() 83 if (i >= TT.shnum || shdr > TT.elf+TT.size-TT.shentsize) { in get_sh() 100 if (s->offset>TT.size || s->size>TT.size || s->offset>TT.size-s->size) { in get_sh() 106 if (!TT.shstrtab) s->name = "?"; in get_sh() 108 s->name = TT.shstrtab + name_offset; in get_sh() 109 if (name_offset > TT.shstrtabsz || s->name >= TT.elf+TT.size) { in get_sh() 126 if (!errno && !*end && i < TT.shnum) return get_sh(i, s); in find_section() 129 for (i=0; i<TT.shnum; i++) { in find_section() [all …]
|
D | traceroute.c | 114 struct payload_s *send_data4 = (struct payload_s *)(TT.packet); in send_probe4() 115 struct icmp *send_icmp4 = (struct icmp *)(TT.packet); in send_probe4() 119 send_data4->ident = TT.ident; in send_probe4() 120 ((struct sockaddr_in *)&dest)->sin_port = TT.port + seq; in send_probe4() 124 send_icmp4->icmp_id = htons(TT.ident); in send_probe4() 127 send_icmp4->icmp_cksum = in_cksum((uint16_t *) send_icmp4, TT.msg_len); in send_probe4() 132 res = setsockopt(TT.snd_sock, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); in send_probe4() 135 len = TT.msg_len; in send_probe4() 136 res = sendto(TT.snd_sock, out, len, 0, (struct sockaddr *) &dest, in send_probe4() 145 struct payload_s *send_data6 = (struct payload_s *) (TT.packet); in send_probe6() [all …]
|
/external/toybox/toys/posix/ |
D | tar.c | 147 xwrite(TT.fd, &tmp, 512); in write_longname() 148 xwrite(TT.fd, name, sz); in write_longname() 149 if (sz%512) xwrite(TT.fd, toybuf, 512-(sz%512)); in write_longname() 166 if (lskip(TT.fd, len)) perror_exit("EOF"); in skippy() 177 xreadall(TT.fd, *b, len); in alloread() 192 if (TT.adev == st->st_dev && TT.aino == st->st_ino) { in add_to_tar() 202 if (filter(TT.excl, lnk)) { in add_to_tar() 225 if (TT.warn && hname != name) { in add_to_tar() 228 TT.warn = 0; in add_to_tar() 231 if (TT.owner) st->st_uid = TT.ouid; in add_to_tar() [all …]
|
D | patch.c | 69 TT.outnum++; in do_line() 70 if (TT.state>1) in do_line() 71 if (0>dprintf(TT.state==2 ? 2 : TT.fileout,"%s\n",dlist->data+(TT.state>3))) in do_line() 75 fprintf(stderr, "DO %d %ld: %s\n", TT.state, TT.outnum, dlist->data); in do_line() 82 if (TT.tempname) replace_tempfile(TT.filein, TT.fileout, &TT.tempname); in finish_oldfile() 83 TT.fileout = TT.filein = -1; in finish_oldfile() 88 if (!TT.current_hunk) return; in fail_hunk() 91 TT.hunknum, TT.oldline, TT.newline); in fail_hunk() 97 TT.state = 2; in fail_hunk() 98 llist_traverse(TT.current_hunk, do_line); in fail_hunk() [all …]
|
D | od.c | 58 char c = TT.buf[(*offset)++]; in od_out_t() 79 memcpy(&fdl, TT.buf+*offset, t->size); in od_out_t() 108 or = TT.buf[(*offset)++]; in od_out_t() 134 if (TT.leftover<TT.w) memset(TT.buf+TT.leftover, 0, TT.w-TT.leftover); in od_outline() 137 if (!(flags&FLAG_v) && TT.j != TT.pos && TT.leftover in od_outline() 138 && !memcmp(TT.bufs[0], TT.bufs[1], TT.w)) in od_outline() 140 if (!TT.star) { in od_outline() 142 TT.star++; in od_outline() 147 TT.star = 0; in od_outline() 150 xprintf(abases[TT.address_idx], (long long)TT.pos); in od_outline() [all …]
|
D | nl.c | 44 int match = *TT.b != 'n'; in do_nl() 49 if (*TT.b == 'p') match = !regexec((void *)(toybuf+16), line, 0, 0, 0); in do_nl() 50 if (TT.l || *TT.b == 't') in do_nl() 51 if (*line == '\n') match = TT.l && ++TT.lcount >= TT.l; in do_nl() 53 TT.lcount = 0; in do_nl() 54 printf(toybuf, TT.w, TT.v++, TT.s); in do_nl() 55 } else printf("%*c", (int)(TT.w+TT.slen), ' '); in do_nl() 63 if (!TT.s) TT.s = "\t"; in nl_main() 64 TT.slen = strlen(TT.s); in nl_main() 66 if (!TT.n || !strcmp(TT.n, "rn")); // default in nl_main() [all …]
|
D | xargs.c | 57 if (TT.delim) { 61 for (s = data; *s; TT.entries++) { 63 if (TT.n && TT.entries >= TT.n) return *s ? s : (char *)1; 68 if (!FLAG(s)) TT.bytes += sizeof(void *)+1; 70 if (++TT.bytes >= TT.s) return save; 74 if (TT.E && strstart(&ss, TT.E) && ss == s) return (char *)2; 76 entry[TT.entries] = save; 83 long bytes = TT.bytes+sizeof(char *)+strlen(data)+1; 85 if (bytes >= TT.s || (TT.n && TT.entries >= TT.n)) return data; 86 TT.bytes = bytes; [all …]
|
D | sed.c | 159 if (TT.noeol && !writeall(TT.fdout, "\n", 1)) return 1; in emit() 160 TT.noeol = !eol; in emit() 163 l = writeall(TT.fdout, line, len); in emit() 166 if (TT.fdout != 1) perror_msg("short write"); in emit() 194 if (!TT.lastregex) error_exit("no previous regex"); in get_regex() 195 return TT.lastregex; in get_regex() 198 return TT.lastregex = offset+(char *)command; in get_regex() 209 char *line = TT.nextline; in sed_line() 210 long len = TT.nextlen; in sed_line() 220 TT.nextline = 0; in sed_line() [all …]
|
D | grep.c | 89 printf("%s%ld%s%c", TT.green, num, TT.cyan, dash); in numdash() 97 if (name && FLAG(H)) printf("%s%s%s%c", TT.purple, name, TT.cyan, dash); in outline() 99 printf("%s%ld", TT.grey, lcount); in outline() 100 xputc(TT.outdelim); in outline() 104 if (FLAG(color)) xputsn(FLAG(o) ? TT.red : TT.grey); in outline() 107 xputc(TT.outdelim); in outline() 120 if (!FLAG(r)) TT.tried++; in do_grep() 156 ulen = len = getdelim(&line, &ulen, TT.indelim, file); in do_grep() 159 if (line[ulen-1] == TT.indelim) line[--ulen] = 0; in do_grep() 163 if (TT.reg) for (shoe = (void *)TT.reg; shoe; shoe = shoe->next) in do_grep() [all …]
|
/external/toybox/toys/net/ |
D | ping.c | 61 if (!FLAG(q) && TT.sent && TT.sa) { 62 printf("\n--- %s ping statistics ---\n", ntop(TT.sa)); 64 TT.sent, TT.recv, ((TT.sent-TT.recv)*100)/(TT.sent?TT.sent:1)); 65 if (TT.recv) 67 TT.min, TT.fugit/TT.recv, TT.max); 69 TT.sa = 0; 125 if (!FLAG(i)) TT.i = FLAG(f) ? 200 : 1000; in ping_main() 126 else if (TT.i<200 && getuid()) error_exit("need root for -i <200"); in ping_main() 127 if (!FLAG(s)) TT.s = 56; // 64-PHDR_LEN in ping_main() 128 if (FLAG(f) && !FLAG(c)) TT.c = 15; in ping_main() [all …]
|
/external/llvm-project/llvm/unittests/Object/ |
D | XCOFFObjectFileTest.cpp | 50 XCOFFTracebackTable TT = *TTOrErr; in TEST() local 52 EXPECT_EQ(TT.getVersion(), 0); in TEST() 54 EXPECT_EQ(TT.getLanguageID(), 0); in TEST() 56 EXPECT_FALSE(TT.isGlobalLinkage()); in TEST() 57 EXPECT_FALSE(TT.isOutOfLineEpilogOrPrologue()); in TEST() 58 EXPECT_TRUE(TT.hasTraceBackTableOffset()); in TEST() 59 EXPECT_FALSE(TT.isInternalProcedure()); in TEST() 60 EXPECT_FALSE(TT.hasControlledStorage()); in TEST() 61 EXPECT_FALSE(TT.isTOCless()); in TEST() 62 EXPECT_TRUE(TT.isFloatingPointPresent()); in TEST() [all …]
|
/external/toybox/toys/lsb/ |
D | killall.c | 42 if (pid == TT.cur_pid) return 0; 50 kill(pid, TT.signum); 52 struct int_list *new = xmalloc(sizeof(*TT.pids)); 54 new->next = TT.pids; 55 TT.pids = new; 58 if (TT.names[offset] == name) { 59 TT.err[offset] = errno; 66 printf("Killed %s(%d) with signal %d\n", name, pid, TT.signum); 75 TT.names = toys.optargs; in killall_main() 76 TT.signum = SIGTERM; in killall_main() [all …]
|
/external/toybox/android/device/generated/ |
D | flags.h | 3629 #ifndef TT 3630 #define TT this.acpi macro 3640 #ifndef TT 3641 #define TT this.arch macro 3646 #ifndef TT 3647 #define TT this.arp macro 3662 #ifndef TT 3663 #define TT this.arping macro 3678 #ifndef TT 3679 #define TT this.ascii macro [all …]
|
/external/toybox/android/mac/generated/ |
D | flags.h | 3629 #ifndef TT 3630 #define TT this.acpi macro 3640 #ifndef TT 3641 #define TT this.arch macro 3646 #ifndef TT 3647 #define TT this.arp macro 3662 #ifndef TT 3663 #define TT this.arping macro 3678 #ifndef TT 3679 #define TT this.ascii macro [all …]
|
/external/toybox/android/linux/generated/ |
D | flags.h | 3629 #ifndef TT 3630 #define TT this.acpi macro 3640 #ifndef TT 3641 #define TT this.arch macro 3646 #ifndef TT 3647 #define TT this.arp macro 3662 #ifndef TT 3663 #define TT this.arping macro 3678 #ifndef TT 3679 #define TT this.ascii macro [all …]
|
/external/llvm/lib/Target/X86/ |
D | X86TargetMachine.cpp | 46 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) { in createTLOF() argument 47 if (TT.isOSBinFormatMachO()) { in createTLOF() 48 if (TT.getArch() == Triple::x86_64) in createTLOF() 53 if (TT.isOSLinux() || TT.isOSNaCl()) in createTLOF() 55 if (TT.isOSBinFormatELF()) in createTLOF() 57 if (TT.isKnownWindowsMSVCEnvironment() || TT.isWindowsCoreCLREnvironment()) in createTLOF() 59 if (TT.isOSBinFormatCOFF()) in createTLOF() 64 static std::string computeDataLayout(const Triple &TT) { in computeDataLayout() argument 68 Ret += DataLayout::getManglingComponent(TT); in computeDataLayout() 70 if ((TT.isArch64Bit() && in computeDataLayout() [all …]
|