/third_party/toybox/toys/posix/ |
H A D | tar.c | 141 xwrite(TT.fd, &tmp, 512); in write_longname() 142 xwrite(TT.fd, name, sz); in write_longname() 143 if (sz%512) xwrite(TT.fd, toybuf, 512-(sz%512)); in write_longname() 160 if (lskip(TT.fd, len)) perror_exit("EOF"); in skippy() 163 // allocate and read data from TT.fd 171 xreadall(TT.fd, *b, len); in alloread() 186 if (TT.adev == st->st_dev && TT.aino == st->st_ino) { in add_to_tar() 196 if (filter(TT.excl, lnk)) goto done; in add_to_tar() 215 if (TT in add_to_tar() [all...] |
H A D | patch.c | 72 if (TT.state>1 && *dlist->data != TT.state) { in do_line() 73 char *s = dlist->data+(TT.state>3); in do_line() 74 int i = TT.state == 2 ? 2 : TT.fileout; in do_line() 80 if (FLAG(x)) fprintf(stderr, "DO %d: %s\n", TT.state, dlist->data); in do_line() 88 if (TT.tempname) replace_tempfile(TT.filein, TT.fileout, &TT in finish_oldfile() [all...] |
H A 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 in od_outline() [all...] |
H A 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 in do_nl() [all...] |
H A D | xargs.c | 47 // If !entry count TT.bytes and TT.entries, stopping at max. 57 if (TT.delim) { in handle_entries() 67 if (TT.n && TT.entries >= TT.n) in handle_entries() 73 // We ought to add sizeof(char *) to TT.bytes to be correct, but we don't in handle_entries() 77 if (++TT.bytes >= TT.s && TT in handle_entries() [all...] |
H A D | grep.c | 90 printf("%s%ld%s%c", TT.green, num, TT.cyan, dash); in numdash() 98 if (name && FLAG(H)) printf("%s%s%s%c", TT.purple, name, TT.cyan, dash); in outline() 100 printf("%s%ld", TT.grey, lcount); in outline() 101 xputc(TT.outdelim); in outline() 105 if (FLAG(color)) xputsn(FLAG(o) ? TT.red : TT.grey); in outline() 108 xputc(TT.outdelim); in outline() 121 if (!FLAG(r)) TT in do_grep() [all...] |
H A D | ps.c | 12 * the same field should be called "TT" which is _INSANE_ and I'm not doing it. 306 * We record active columns in TT.bits, ala: 308 * if (TT.bits & _PS_NAME) printf("-o included PS_NAME"); 463 {&TT.gg, SLOT_gid}, {&TT.GG, SLOT_rgid}, {&TT.pp, SLOT_pid}, in shared_match_process() 464 {&TT.PP, SLOT_ppid}, {&TT.ss, SLOT_sid}, {&TT.tt, SLOT_ttynr}, in shared_match_process() 465 {&TT in shared_match_process() [all...] |
H A D | sed.c | 212 if (TT.noeol && !writeall(TT.fdout, "\n", 1)) return 1; in emit() 213 TT.noeol = !eol; in emit() 216 l = writeall(TT.fdout, line, len); in emit() 219 if (TT.fdout != 1) perror_msg("short write"); in emit() 247 if (!TT.lastregex) error_exit("no previous regex"); in get_regex() 248 return TT.lastregex; in get_regex() 251 return TT.lastregex = offset+(char *)command; in get_regex() 262 char *line = TT.nextline; in sed_line() 263 long len = TT in sed_line() [all...] |
/third_party/toybox/toys/pending/ |
H A D | hexdump.c | 70 TT.fn++; // keep track of how many files have been printed. in do_hexdump() 72 if (FLAG(s) && (TT.s-TT.pos>0)) { in do_hexdump() 75 if (fs < TT.s) { in do_hexdump() 76 TT.pos += fs; in do_hexdump() 77 TT.ppos += fs; in do_hexdump() 79 xlseek(fd, TT.s-TT.pos, SEEK_SET); in do_hexdump() 80 TT.ppos = TT in do_hexdump() [all...] |
H A D | dd.c | 88 (TT.start.tv_sec * 1000000 + TT.start.tv_usec))/1000000.0; in status() 90 if (TT.show_records) in status() 92 TT.in_full, TT.in_part, TT.out_full, TT.out_part); in status() 94 if (TT.show_xfer) { in status() 95 human_readable(toybuf, TT.bytes, HR_SPACE|HR_B); in status() 96 fprintf(stderr, "%llu bytes (%s) copied, ", TT in status() [all...] |
H A D | telnet.c | 55 if (TT.flags & UF_ECHO) { in set_mode() 56 if (TT.term_mode == CM_TRY) { in set_mode() 57 TT.term_mode = CM_ON; in set_mode() 59 if (TT.term_ok) tcsetattr(0, TCSADRAIN, &TT.raw_term); in set_mode() 62 if (TT.term_mode != CM_OFF) { in set_mode() 63 TT.term_mode = CM_OFF; in set_mode() 65 if (TT.term_ok) tcsetattr(0, TCSADRAIN, &TT.def_term); in set_mode() 73 int wlen = write(TT in flush_iac() [all...] |
H A 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 in insert_str() [all...] |
H A 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 in s() [all...] |
H A 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 in fill_iaid() [all...] |
H A 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() 298 // Writes total block count to TT.treeblocks and inode count to TT.treeinodes. 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 in get_inodespg() [all...] |
H A D | getty.c | 98 TT.sc = 0; in get_speed() 100 TT.speeds[TT.sc] = encode(ptr); in get_speed() 101 if (TT.speeds[TT.sc] < 0) perror_exit("bad speed"); in get_speed() 102 if (++TT.sc > 10) perror_exit("too many speeds, max is 10"); in get_speed() 111 if (*++toys.optargs) TT.tty_name = xmprintf("%s", *toys.optargs); in parse_arguments() 113 TT.tty_name = xmprintf("%s", *toys.optargs); in parse_arguments() 122 if (strcmp(TT.tty_name, "-")) { in open_tty() 123 if (*(TT in open_tty() [all...] |
H A 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 in send_probe6() [all...] |
H A D | wget.c | 79 #define WGET_IS_HTTP (strncmp(TT.url, "http://", 7) == 0) 80 #define WGET_IS_HTTPS (WGET_SSL && (strncmp(TT.url, "https://", 8) == 0)) 137 TT.sock = xconnectany(a); in wget_connect() 142 if ((TT.tls = tls_client()) == NULL) in wget_connect() 143 error_exit("tls_client: %s", tls_error(TT.tls)); in wget_connect() 150 if (tls_configure(TT.tls, cfg) != 0) in wget_connect() 151 error_exit("tls_configure: %s", tls_error(TT.tls)); in wget_connect() 154 if (tls_connect(TT.tls, host, port) != 0) in wget_connect() 155 error_exit("tls_connect: %s", tls_error(TT.tls)); in wget_connect() 162 TT in wget_connect() [all...] |
H A D | awk.c | 251 #define GLOBAL ((struct symtab_slot *)TT.globals_table.base) 252 #define LOCAL ((struct symtab_slot *)TT.locals_table.base) 253 #define FUNC_DEF ((struct functab_slot *)TT.func_def_table.base) 255 #define LITERAL ((struct zvalue *)TT.literals.base) 256 #define STACK ((struct zvalue *)TT.stack.base) 257 #define FIELD ((struct zvalue *)TT.fields.base) 259 #define ZCODE ((int *)TT.zcode.base) 347 fprintf(stderr, "%s: ", TT.progname); in zzerr() 353 fprintf(stderr, "file %s line %d: ", TT.scs->filename, TT in zzerr() [all...] |
/third_party/toybox/toys/other/ |
H A D | hexedit.c | 63 tty_jump(0, TT.height); in draw_tail() 73 yy = (TT.base+yy)*16; in draw_line() 74 if (yy+xx>=TT.len) xx = TT.len-yy; in draw_line() 76 if (yy<TT.len) { in draw_line() 77 printf("\r%0*llX ", TT.numlen, yy); in draw_line() 78 for (x=0; x<xx; x++) printf(" %02X", TT.data[yy+x]); in draw_line() 80 for (x=0; x<xx; x++) draw_char(stdout, TT.data[yy+x]); in draw_line() 91 for (y = 0; y<TT.height; y++) { in draw_page() 101 char cc = TT in highlight() [all...] |
/third_party/toybox/toys/net/ |
H A D | ping.c | 61 if (!FLAG(q) && TT.sent && TT.sa) { in summary() 62 printf("\n--- %s ping statistics ---\n", ntop(TT.sa)); in summary() 64 TT.sent, TT.recv, ((TT.sent-TT.recv)*100)/(TT.sent?TT.sent:1)); in summary() 65 if (TT in summary() [all...] |
H A D | ftpget.c | 74 if (TT.fd >= 0) { in xread2line() 75 xclose(TT.fd); in xread2line() 77 if (TT.datafd >= 0) { in xread2line() 78 xclose(TT.datafd); in xread2line() 80 if (TT.filefd >= 0) { in xread2line() 81 xclose(TT.filefd); in xread2line() 100 dprintf(TT.fd, s, cmd, arg); in ftp_line() 103 xread2line(TT.fd, toybuf, sizeof(toybuf)); in ftp_line() 107 if (TT.fd >= 0) { in ftp_line() 108 xclose(TT in ftp_line() [all...] |
/third_party/toybox/porting/liteos_a/toys/net/ |
H A D | ping.c | 56 lostret = TT.sent > TT.recv ? ((TT.sent-TT.recv)*100)/(TT.sent?TT.sent:1) : 0; in summary() 57 if (!(toys.optflags&FLAG_q) && TT.sent && TT.sa) { in summary() 58 printf("\n--- %s ping statistics ---\n", ntop(TT.sa)); in summary() 60 TT in summary() [all...] |
/third_party/toybox/generated/ |
H A D | flags.h | 3478 #ifndef TT 3479 #define TT this.awk macro 3489 #ifndef TT 3490 #define TT this.acpi macro 3500 #ifndef TT 3501 #define TT this.arch macro 3506 #ifndef TT 3507 #define TT this.arp macro 3522 #ifndef TT 3523 #define TT thi macro 3539 #define TT global() macro 3545 #define TT global() macro 3554 #define TT global() macro 3563 #define TT global() macro 3571 #define TT global() macro 3582 #define TT global() macro 3591 #define TT global() macro 3610 #define TT global() macro 3616 #define TT global() macro 3622 #define TT global() macro 3633 #define TT global() macro 3639 #define TT global() macro 3645 #define TT global() macro 3655 #define TT global() macro 3664 #define TT global() macro 3670 #define TT global() macro 3676 #define TT global() macro 3685 #define TT global() macro 3698 #define TT global() macro 3707 #define TT global() macro 3713 #define TT global() macro 3727 #define TT global() macro 3734 #define TT global() macro 3740 #define TT global() macro 3751 #define TT global() macro 3757 #define TT global() macro 3765 #define TT global() macro 3774 #define TT global() macro 3780 #define TT global() macro 3803 #define TT global() macro 3821 #define TT global() macro 3827 #define TT global() macro 3840 #define TT global() macro 3851 #define TT global() macro 3867 #define TT global() macro 3877 #define TT global() macro 3883 #define TT global() macro 3889 #define TT global() macro 3947 #define TT global() macro 3958 #define TT global() macro 3964 #define TT global() macro 3970 #define TT global() macro 3976 #define TT global() macro 3989 #define TT global() macro 4018 #define TT global() macro 4038 #define TT global() macro 4050 #define TT global() macro 4074 #define TT global() macro 4080 #define TT global() macro 4095 #define TT global() macro 4101 #define TT global() macro 4107 #define TT global() macro 4126 #define TT global() macro 4135 #define TT global() macro 4144 #define TT global() macro 4153 #define TT global() macro 4162 #define TT global() macro 4168 #define TT global() macro 4175 #define TT global() macro 4181 #define TT global() macro 4187 #define TT global() macro 4195 #define TT global() macro 4201 #define TT global() macro 4213 #define TT global() macro 4223 #define TT global() macro 4231 #define TT global() macro 4241 #define TT global() macro 4248 #define TT global() macro 4258 #define TT global() macro 4270 #define TT global() macro 4276 #define TT global() macro 4291 #define TT global() macro 4299 #define TT global() macro 4305 #define TT global() macro 4312 #define TT global() macro 4331 #define TT global() macro 4339 #define TT global() macro 4345 #define TT global() macro 4355 #define TT global() macro 4367 #define TT global() macro 4384 #define TT global() macro 4422 #define TT global() macro 4430 #define TT global() macro 4436 #define TT global() macro 4442 #define TT global() macro 4461 #define TT global() macro 4481 #define TT global() macro 4491 #define TT global() macro 4497 #define TT global() macro 4505 #define TT global() macro 4520 #define TT global() macro 4527 #define TT global() macro 4536 #define TT global() macro 4542 #define TT global() macro 4553 #define TT global() macro 4567 #define TT global() macro 4579 #define TT global() macro 4587 #define TT global() macro 4595 #define TT global() macro 4603 #define TT global() macro 4613 #define TT global() macro 4625 #define TT global() macro 4633 #define TT global() macro 4639 #define TT global() macro 4645 #define TT global() macro 4651 #define TT global() macro 4666 #define TT global() macro 4676 #define TT global() macro 4682 #define TT global() macro 4703 #define TT global() macro 4709 #define TT global() macro 4721 #define TT global() macro 4737 #define TT global() macro 4745 #define TT global() macro 4757 #define TT global() macro 4766 #define TT global() macro 4774 #define TT global() macro 4782 #define TT global() macro 4788 #define TT global() macro 4800 #define TT global() macro 4806 #define TT global() macro 4814 #define TT global() macro 4823 #define TT global() macro 4832 #define TT global() macro 4838 #define TT global() macro 4844 #define TT global() macro 4860 #define TT global() macro 4898 #define TT global() macro 4909 #define TT global() macro 4915 #define TT global() macro 4924 #define TT global() macro 4935 #define TT global() macro 4941 #define TT global() macro 4948 #define TT global() macro 4956 #define TT global() macro 4964 #define TT global() macro 4973 #define TT global() macro 4980 #define TT global() macro 4988 #define TT global() macro 4998 #define TT global() macro 5008 #define TT global() macro 5022 #define TT global() macro 5030 #define TT global() macro 5038 #define TT global() macro 5047 #define TT global() macro 5054 #define TT global() macro 5066 #define TT global() macro 5076 #define TT global() macro 5091 #define TT global() macro 5097 #define TT global() macro 5112 #define TT global() macro 5121 #define TT global() macro 5132 #define TT global() macro 5140 #define TT global() macro 5160 #define TT global() macro 5177 #define TT global() macro 5184 #define TT global() macro 5197 #define TT global() macro 5203 #define TT global() macro 5210 #define TT global() macro 5224 #define TT global() macro 5242 #define TT global() macro 5252 #define TT global() macro 5261 #define TT global() macro 5267 #define TT global() macro 5277 #define TT global() macro 5285 #define TT global() macro 5303 #define TT global() macro 5325 #define TT global() macro 5334 #define TT global() macro 5352 #define TT global() macro 5358 #define TT global() macro 5378 #define TT global() macro 5386 #define TT global() macro 5394 #define TT global() macro 5400 #define TT global() macro 5428 #define TT global() macro 5436 #define TT global() macro 5443 #define TT global() macro 5461 #define TT global() macro 5467 #define TT global() macro 5478 #define TT global() macro 5484 #define TT global() macro 5492 #define TT global() macro 5502 #define TT global() macro 5508 #define TT global() macro 5520 #define TT global() macro 5526 #define TT global() macro 5532 #define TT global() macro 5543 #define TT global() macro 5551 #define TT global() macro 5559 #define TT global() macro 5568 #define TT global() macro 5574 #define TT global() macro 5589 #define TT global() macro 5595 #define TT global() macro 5604 #define TT global() macro 5610 #define TT global() macro 5620 #define TT global() macro 5627 #define TT global() macro 5635 #define TT global() macro 5644 #define TT global() macro 5653 #define TT global() macro 5666 #define TT global() macro 5680 #define TT global() macro 5689 #define TT global() macro 5695 #define TT global() macro 5711 #define TT global() macro 5737 #define TT global() macro 5747 #define TT global() macro 5757 #define TT global() macro 5766 #define TT global() macro 5777 #define TT global() macro 5786 #define TT global() macro 5799 #define TT global() macro 5806 #define TT global() macro 5812 #define TT global() macro 5820 #define TT global() macro 5828 #define TT global() macro 5834 #define TT global() macro 5848 #define TT global() macro 5868 #define TT global() macro 5874 #define TT global() macro 5883 #define TT global() macro 5920 #define TT global() macro 5928 #define TT global() macro 5942 #define TT global() macro 5950 #define TT global() macro 5956 #define TT global() macro 5971 #define TT global() macro 5977 #define TT global() macro 5988 #define TT global() macro 5998 #define TT global() macro 6006 #define TT global() macro 6017 #define TT global() macro 6035 #define TT global() macro 6049 #define TT global() macro 6055 #define TT global() macro 6065 #define TT global() macro 6091 #define TT global() macro 6097 #define TT global() macro 6105 #define TT global() macro 6112 #define TT global() macro 6122 #define TT global() macro 6148 #define TT global() macro 6164 #define TT global() macro 6177 #define TT global() macro 6191 #define TT global() macro 6197 #define TT global() macro 6203 #define TT global() macro 6217 #define TT global() macro 6225 #define TT global() macro 6239 #define TT global() macro 6246 #define TT global() macro 6252 #define TT global() macro 6259 #define TT global() macro 6266 #define TT global() macro 6273 #define TT global() macro 6279 #define TT global() macro 6285 #define TT global() macro 6292 #define TT global() macro 6298 #define TT global() macro 6309 #define TT global() macro 6319 #define TT global() macro 6329 #define TT global() macro 6336 #define TT global() macro 6343 #define TT global() macro 6358 #define TT global() macro 6372 #define TT global() macro 6378 #define TT global() macro 6384 #define TT global() macro [all...] |
/third_party/toybox/toys/lsb/ |
H A D | killall.c | 42 if (pid == TT.cur_pid) return 0; in kill_process() 50 kill(pid, TT.signum); in kill_process() 52 struct int_list *new = xmalloc(sizeof(*TT.pids)); in kill_process() 54 new->next = TT.pids; in kill_process() 55 TT.pids = new; in kill_process() 58 if (TT.names[offset] == name) { in kill_process() 59 TT.err[offset] = errno; in kill_process() 66 printf("Killed %s(%d) with signal %d\n", name, pid, TT.signum); in kill_process() 75 TT.names = toys.optargs; in killall_main() 76 TT in killall_main() [all...] |