Home | History | Annotate | Download | only in generated
      1 // toys/android/getprop.c
      2 
      3 struct getprop_data {
      4   size_t size;
      5   char **nv; // name/value pairs: even=name, odd=value
      6   struct selabel_handle *handle;
      7 };
      8 
      9 // toys/android/log.c
     10 
     11 struct log_data {
     12   char *t, *p;
     13 };
     14 
     15 // toys/example/hello.c
     16 
     17 struct hello_data {
     18   int unused;
     19 };
     20 
     21 // toys/example/skeleton.c
     22 
     23 struct skeleton_data {
     24   union {
     25     struct {
     26       char *b;
     27       long c;
     28       struct arg_list *d;
     29       long e;
     30       char *also, *blubber;
     31     } s;
     32     struct {
     33       long b;
     34     } a;
     35   };
     36 
     37   int more_globals;
     38 };
     39 
     40 // toys/lsb/dmesg.c
     41 
     42 struct dmesg_data {
     43   long n, s;
     44 
     45   int use_color;
     46   time_t tea;
     47 };
     48 
     49 // toys/lsb/hostname.c
     50 
     51 struct hostname_data {
     52   char *F;
     53 };
     54 
     55 // toys/lsb/killall.c
     56 
     57 struct killall_data {
     58   char *s;
     59 
     60   int signum;
     61   pid_t cur_pid;
     62   char **names;
     63   short *err;
     64 };
     65 
     66 // toys/lsb/md5sum.c
     67 
     68 struct md5sum_data {
     69   int sawline;
     70 
     71   // Crypto variables blanked after summing
     72   unsigned state[5];
     73   unsigned oldstate[5];
     74   uint64_t count;
     75   union {
     76     char c[64];
     77     unsigned i[16];
     78   } buffer;
     79 };
     80 
     81 // toys/lsb/mknod.c
     82 
     83 struct mknod_data {
     84   char *Z, *m;
     85 };
     86 
     87 // toys/lsb/mktemp.c
     88 
     89 struct mktemp_data {
     90   char *p;
     91 };
     92 
     93 // toys/lsb/mount.c
     94 
     95 struct mount_data {
     96   struct arg_list *optlist;
     97   char *type;
     98   char *bigO;
     99 
    100   unsigned long flags;
    101   char *opts;
    102   int okuser;
    103 };
    104 
    105 // toys/lsb/passwd.c
    106 
    107 struct passwd_data {
    108   char *a;
    109 };
    110 
    111 // toys/lsb/pidof.c
    112 
    113 struct pidof_data {
    114   char *omit;
    115 };
    116 
    117 // toys/lsb/seq.c
    118 
    119 struct seq_data {
    120   char *s, *f;
    121 
    122   int precision;
    123 };
    124 
    125 // toys/lsb/su.c
    126 
    127 struct su_data {
    128   char *s;
    129   char *c;
    130 };
    131 
    132 // toys/lsb/umount.c
    133 
    134 struct umount_data {
    135   struct arg_list *t;
    136 
    137   char *types;
    138 };
    139 
    140 // toys/net/ftpget.c
    141 
    142 struct ftpget_data {
    143   char *u, *p, *P;
    144 
    145   int fd;
    146 };
    147 
    148 // toys/net/ifconfig.c
    149 
    150 struct ifconfig_data {
    151   int sockfd;
    152 };
    153 
    154 // toys/net/microcom.c
    155 
    156 struct microcom_data {
    157   char *s;
    158 
    159   int fd;
    160   struct termios original_stdin_state, original_fd_state;
    161 };
    162 
    163 // toys/net/netcat.c
    164 
    165 struct netcat_data {
    166   char *f, *s;
    167   long q, p, W, w;
    168 };
    169 
    170 // toys/net/netstat.c
    171 
    172 struct netstat_data {
    173   struct num_cache *inodes;
    174   int wpad;
    175 };;
    176 
    177 // toys/net/ping.c
    178 
    179 struct ping_data {
    180   char *I;
    181   long w, W, i, s, c, t, m;
    182 
    183   struct sockaddr *sa;
    184   int sock;
    185   unsigned long sent, recv, fugit, min, max;
    186 };
    187 
    188 // toys/net/sntp.c
    189 
    190 struct sntp_data {
    191   long r;
    192   char *p, *m, *M;
    193 };
    194 
    195 // toys/net/tunctl.c
    196 
    197 struct tunctl_data {
    198   char *u;
    199 };
    200 
    201 // toys/other/acpi.c
    202 
    203 struct acpi_data {
    204   int ac, bat, therm, cool;
    205   char *cpath;
    206 };
    207 
    208 // toys/other/base64.c
    209 
    210 struct base64_data {
    211   long w;
    212 
    213   unsigned total;
    214 };
    215 
    216 // toys/other/blockdev.c
    217 
    218 struct blockdev_data {
    219   long setbsz, setra;
    220 };
    221 
    222 // toys/other/chrt.c
    223 
    224 struct chrt_data {
    225   long p;
    226 };
    227 
    228 // toys/other/dos2unix.c
    229 
    230 struct dos2unix_data {
    231   char *tempfile;
    232 };
    233 
    234 // toys/other/fallocate.c
    235 
    236 struct fallocate_data {
    237   long offset;
    238   long size;
    239 };
    240 
    241 // toys/other/fmt.c
    242 
    243 struct fmt_data {
    244   int width;
    245 
    246   int level, pos;
    247 };
    248 
    249 // toys/other/free.c
    250 
    251 struct free_data {
    252   unsigned bits;
    253   unsigned long long units;
    254   char *buf;
    255 };
    256 
    257 // toys/other/hexedit.c
    258 
    259 struct hexedit_data {
    260   char *data;
    261   long long len, base;
    262   int numlen, undo, undolen;
    263   unsigned height;
    264 };
    265 
    266 // toys/other/hwclock.c
    267 
    268 struct hwclock_data {
    269   char *f;
    270 
    271   int utc;
    272 };
    273 
    274 // toys/other/ionice.c
    275 
    276 struct ionice_data {
    277   long pid;
    278   long level;
    279   long class;
    280 };
    281 
    282 // toys/other/login.c
    283 
    284 struct login_data {
    285   char *h, *f;
    286 
    287   int login_timeout, login_fail_timeout;
    288 };
    289 
    290 // toys/other/losetup.c
    291 
    292 struct losetup_data {
    293   char *j;
    294   long o, S;
    295 
    296   int openflags;
    297   dev_t jdev;
    298   ino_t jino;
    299 };
    300 
    301 // toys/other/lspci.c
    302 
    303 struct lspci_data {
    304   char *i;
    305   long n;
    306 
    307   FILE *db;
    308 };
    309 
    310 // toys/other/makedevs.c
    311 
    312 struct makedevs_data {
    313   char *fname;
    314 };
    315 
    316 // toys/other/mix.c
    317 
    318 struct mix_data {
    319    long r, l;
    320    char *d, *c;
    321 };
    322 
    323 // toys/other/mkpasswd.c
    324 
    325 struct mkpasswd_data {
    326   long P;
    327   char *m, *S;
    328 };
    329 
    330 // toys/other/mkswap.c
    331 
    332 struct mkswap_data {
    333   char *L;
    334 };
    335 
    336 // toys/other/modinfo.c
    337 
    338 struct modinfo_data {
    339   char *F, *k, *b;
    340 
    341   long mod;
    342 };
    343 
    344 // toys/other/nsenter.c
    345 
    346 struct nsenter_data {
    347   char *Uupnmi[6];
    348   long t;
    349 };
    350 
    351 // toys/other/oneit.c
    352 
    353 struct oneit_data {
    354   char *c;
    355 };
    356 
    357 // toys/other/setfattr.c
    358 
    359 struct setfattr_data {
    360   char *x, *v, *n;
    361 };
    362 
    363 // toys/other/shred.c
    364 
    365 struct shred_data {
    366   long o, n, s;
    367 };
    368 
    369 // toys/other/stat.c
    370 
    371 struct stat_data {
    372   char *c;
    373 
    374   union {
    375     struct stat st;
    376     struct statfs sf;
    377   } stat;
    378   char *file, *pattern;
    379   int patlen;
    380 };
    381 
    382 // toys/other/swapon.c
    383 
    384 struct swapon_data {
    385   long p;
    386 };
    387 
    388 // toys/other/switch_root.c
    389 
    390 struct switch_root_data {
    391   char *c;
    392 
    393   dev_t rootdev;
    394 };
    395 
    396 // toys/other/timeout.c
    397 
    398 struct timeout_data {
    399   char *s, *k;
    400 
    401   int nextsig;
    402   pid_t pid;
    403   struct timeval ktv;
    404   struct itimerval itv;
    405 };
    406 
    407 // toys/other/truncate.c
    408 
    409 struct truncate_data {
    410   char *s;
    411 
    412   long size;
    413   int type;
    414 };
    415 
    416 // toys/other/watch.c
    417 
    418 struct watch_data {
    419   int n;
    420 
    421   pid_t pid, oldpid;
    422 };
    423 
    424 // toys/other/xxd.c
    425 
    426 struct xxd_data {
    427   long s, g, o, l, c;
    428 };
    429 
    430 // toys/pending/arp.c
    431 
    432 struct arp_data {
    433     char *hw_type;
    434     char *af_type_A;
    435     char *af_type_p;
    436     char *interface;
    437 
    438     int sockfd;
    439     char *device;
    440 };
    441 
    442 // toys/pending/arping.c
    443 
    444 struct arping_data {
    445     long count;
    446     unsigned long time_out;
    447     char *iface;
    448     char *src_ip;
    449 
    450     int sockfd;
    451     unsigned long start, end;
    452     unsigned sent_at, sent_nr, rcvd_nr, brd_sent, rcvd_req, brd_rcv,
    453              unicast_flag;
    454 };
    455 
    456 // toys/pending/bc.c
    457 
    458 struct bc_data {
    459   // This actually needs to be a BcVm*, but the toybox build
    460   // system complains if I make it so. Instead, we'll just cast.
    461   char *vm;
    462 
    463   size_t nchars;
    464   char *file, sig, max_ibase;
    465   uint16_t line_len;
    466 };
    467 
    468 // toys/pending/bootchartd.c
    469 
    470 struct bootchartd_data {
    471   char buf[32];
    472   long smpl_period_usec;
    473   int proc_accounting;
    474   int is_login;
    475 
    476   void *head;
    477 };
    478 
    479 // toys/pending/brctl.c
    480 
    481 struct brctl_data {
    482     int sockfd;
    483 };
    484 
    485 // toys/pending/crond.c
    486 
    487 struct crond_data {
    488   char *crontabs_dir;
    489   char *logfile;
    490   int loglevel_d;
    491   int loglevel;
    492 
    493   time_t crontabs_dir_mtime;
    494   uint8_t flagd;
    495 };
    496 
    497 // toys/pending/crontab.c
    498 
    499 struct crontab_data {
    500   char *user;
    501   char *cdir;
    502 };
    503 
    504 // toys/pending/dd.c
    505 
    506 struct dd_data {
    507   int show_xfer, show_records;
    508   unsigned long long bytes, c_count, in_full, in_part, out_full, out_part;
    509   struct timeval start;
    510   struct {
    511     char *name;
    512     int fd;
    513     unsigned char *buff, *bp;
    514     long sz, count;
    515     unsigned long long offset;
    516   } in, out;
    517 };;
    518 
    519 // toys/pending/dhcp.c
    520 
    521 struct dhcp_data {
    522     char *iface;
    523     char *pidfile;
    524     char *script;
    525     long retries;
    526     long timeout;
    527     long tryagain;
    528     struct arg_list *req_opt;
    529     char *req_ip;
    530     struct arg_list *pkt_opt;
    531     char *fdn_name;
    532     char *hostname;
    533     char *vendor_cls;
    534 };
    535 
    536 // toys/pending/dhcp6.c
    537 
    538 struct dhcp6_data {
    539   char *interface_name, *pidfile, *script;
    540   long retry, timeout, errortimeout;
    541   char *req_ip;
    542   int length, state, request_length, sock, sock1, status, retval, retries;
    543   struct timeval tv;
    544   uint8_t transction_id[3];
    545   struct sockaddr_in6 input_socket6;
    546 };
    547 
    548 // toys/pending/dhcpd.c
    549 
    550 struct dhcpd_data {
    551     char *iface;
    552     long port;
    553 };;
    554 
    555 // toys/pending/diff.c
    556 
    557 struct diff_data {
    558   long ct;
    559   char *start;
    560   struct arg_list *L_list;
    561 
    562   int dir_num, size, is_binary, status, change, len[2];
    563   int *offset[2];
    564   struct stat st[2];
    565 };
    566 
    567 // toys/pending/dumpleases.c
    568 
    569 struct dumpleases_data {
    570     char *file;
    571 };
    572 
    573 // toys/pending/expr.c
    574 
    575 struct expr_data {
    576   char **tok; // current token, not on the stack since recursive calls mutate it
    577 
    578   char *refree;
    579 };
    580 
    581 // toys/pending/fdisk.c
    582 
    583 struct fdisk_data {
    584   long sect_sz;
    585   long sectors;
    586   long heads;
    587   long cylinders;
    588 };
    589 
    590 // toys/pending/fold.c
    591 
    592 struct fold_data {
    593   int width;
    594 };
    595 
    596 // toys/pending/fsck.c
    597 
    598 struct fsck_data {
    599   int fd_num;
    600   char *t_list;
    601 
    602   struct double_list *devices;
    603   char *arr_flag;
    604   char **arr_type;
    605   int negate;
    606   int sum_status;
    607   int nr_run;
    608   int sig_num;
    609   long max_nr_run;
    610 };
    611 
    612 // toys/pending/getfattr.c
    613 
    614 struct getfattr_data {
    615   char *n;
    616 };
    617 
    618 // toys/pending/getty.c
    619 
    620 struct getty_data {
    621   char *issue_str;
    622   char *login_str;
    623   char *init_str;
    624   char *host_str;
    625   long timeout;
    626 
    627   char *tty_name;
    628   int  speeds[20];
    629   int  sc;
    630   struct termios termios;
    631   char buff[128];
    632 };
    633 
    634 // toys/pending/groupadd.c
    635 
    636 struct groupadd_data {
    637   long gid;
    638 };
    639 
    640 // toys/pending/gzip.c
    641 
    642 struct gzip_data {
    643   int level;
    644 };
    645 
    646 // toys/pending/host.c
    647 
    648 struct host_data {
    649   char *type_str;
    650 };
    651 
    652 // toys/pending/ip.c
    653 
    654 struct ip_data {
    655   char stats, singleline, flush, *filter_dev, gbuf[8192];
    656   int sockfd, connected, from_ok, route_cmd;
    657   int8_t addressfamily, is_addr;
    658 };
    659 
    660 // toys/pending/ipcrm.c
    661 
    662 struct ipcrm_data {
    663   struct arg_list *qkey;
    664   struct arg_list *qid;
    665   struct arg_list *skey;
    666   struct arg_list *sid;
    667   struct arg_list *mkey;
    668   struct arg_list *mid;
    669 };
    670 
    671 // toys/pending/ipcs.c
    672 
    673 struct ipcs_data {
    674   int id;
    675 };
    676 
    677 // toys/pending/klogd.c
    678 
    679 struct klogd_data {
    680   long level;
    681 
    682   int fd;
    683 };
    684 
    685 // toys/pending/last.c
    686 
    687 struct last_data {
    688   char *file;
    689 
    690   struct arg_list *list;
    691 };
    692 
    693 // toys/pending/lsof.c
    694 
    695 struct lsof_data {
    696   struct arg_list *p;
    697 
    698   struct stat *sought_files;
    699   struct double_list *all_sockets, *files;
    700   int last_shown_pid, shown_header;
    701 };
    702 
    703 // toys/pending/mke2fs.c
    704 
    705 struct mke2fs_data {
    706   // Command line arguments.
    707   long blocksize;
    708   long bytes_per_inode;
    709   long inodes;           // Total inodes in filesystem.
    710   long reserved_percent; // Integer precent of space to reserve for root.
    711   char *gendir;          // Where to read dirtree from.
    712 
    713   // Internal data.
    714   struct dirtree *dt;    // Tree of files to copy into the new filesystem.
    715   unsigned treeblocks;   // Blocks used by dt
    716   unsigned treeinodes;   // Inodes used by dt
    717 
    718   unsigned blocks;       // Total blocks in the filesystem.
    719   unsigned freeblocks;   // Free blocks in the filesystem.
    720   unsigned inodespg;     // Inodes per group
    721   unsigned groups;       // Total number of block groups.
    722   unsigned blockbits;    // Bits per block.  (Also blocks per group.)
    723 
    724   // For gene2fs
    725   unsigned nextblock;    // Next data block to allocate
    726   unsigned nextgroup;    // Next group we'll be allocating from
    727   int fsfd;              // File descriptor of filesystem (to output to).
    728 };
    729 
    730 // toys/pending/modprobe.c
    731 
    732 struct modprobe_data {
    733   struct arg_list *dirs;
    734 
    735   struct arg_list *probes;
    736   struct arg_list *dbase[256];
    737   char *cmdopts;
    738   int nudeps;
    739   uint8_t symreq;
    740 };
    741 
    742 // toys/pending/more.c
    743 
    744 struct more_data {
    745   struct termios inf;
    746   int cin_fd;
    747 };
    748 
    749 // toys/pending/openvt.c
    750 
    751 struct openvt_data {
    752   unsigned long vt_num;
    753 };
    754 
    755 // toys/pending/route.c
    756 
    757 struct route_data {
    758   char *family;
    759 };
    760 
    761 // toys/pending/sh.c
    762 
    763 struct sh_data {
    764   char *command;
    765 
    766   long lineno;
    767 };
    768 
    769 // toys/pending/stty.c
    770 
    771 struct stty_data {
    772   char *device;
    773 
    774   int fd, col;
    775   unsigned output_cols;
    776 };
    777 
    778 // toys/pending/sulogin.c
    779 
    780 struct sulogin_data {
    781   long timeout;
    782   struct termios crntio;
    783 };
    784 
    785 // toys/pending/syslogd.c
    786 
    787 struct syslogd_data {
    788   char *socket;
    789   char *config_file;
    790   char *unix_socket;
    791   char *logfile;
    792   long interval;
    793   long rot_size;
    794   long rot_count;
    795   char *remote_log;
    796   long log_prio;
    797 
    798   struct unsocks *lsocks;  // list of listen sockets
    799   struct logfile *lfiles;  // list of write logfiles
    800   int sigfd[2];
    801 };
    802 
    803 // toys/pending/tar.c
    804 
    805 struct tar_data {
    806   char *fname;
    807   char *dir;
    808   struct arg_list *inc_file;
    809   struct arg_list *exc_file;
    810   char *tocmd;
    811   struct arg_list *exc;
    812 
    813   struct arg_list *inc, *pass;
    814   void *inodes, *handle;
    815 };
    816 
    817 // toys/pending/tcpsvd.c
    818 
    819 struct tcpsvd_data {
    820   char *name;
    821   char *user;
    822   long bn;
    823   char *nmsg;
    824   long cn;
    825 
    826   int maxc;
    827   int count_all;
    828   int udp;
    829 };
    830 
    831 // toys/pending/telnet.c
    832 
    833 struct telnet_data {
    834   int port;
    835   int sfd;
    836   char buff[128];
    837   int pbuff;
    838   char iac[256];
    839   int piac;
    840   char *ttype;
    841   struct termios def_term;
    842   struct termios raw_term;
    843   uint8_t term_ok;
    844   uint8_t term_mode;
    845   uint8_t flags;
    846   unsigned win_width;
    847   unsigned win_height;
    848 };
    849 
    850 // toys/pending/telnetd.c
    851 
    852 struct telnetd_data {
    853     char *login_path;
    854     char *issue_path;
    855     int port;
    856     char *host_addr;
    857     long w_sec;
    858 
    859     int gmax_fd;
    860     pid_t fork_pid;
    861 };
    862 
    863 // toys/pending/tftp.c
    864 
    865 struct tftp_data {
    866   char *local_file;
    867   char *remote_file;
    868   long block_size;
    869 
    870   struct sockaddr_storage inaddr;
    871   int af;
    872 };
    873 
    874 // toys/pending/tftpd.c
    875 
    876 struct tftpd_data {
    877   char *user;
    878 
    879   long sfd;
    880   struct passwd *pw;
    881 };
    882 
    883 // toys/pending/tr.c
    884 
    885 struct tr_data {
    886   short map[256]; //map of chars
    887   int len1, len2;
    888 };
    889 
    890 // toys/pending/traceroute.c
    891 
    892 struct traceroute_data {
    893   long max_ttl;
    894   long port;
    895   long ttl_probes;
    896   char *src_ip;
    897   long tos;
    898   long wait_time;
    899   struct arg_list *loose_source;
    900   long pause_time;
    901   long first_ttl;
    902   char *iface;
    903 
    904   uint32_t gw_list[9];
    905   int recv_sock;
    906   int snd_sock;
    907   unsigned msg_len;
    908   char *packet;
    909   uint32_t ident;
    910   int istraceroute6;
    911 };
    912 
    913 // toys/pending/useradd.c
    914 
    915 struct useradd_data {
    916   char *dir;
    917   char *gecos;
    918   char *shell;
    919   char *u_grp;
    920   long uid;
    921 
    922   long gid;
    923 };
    924 
    925 // toys/pending/vi.c
    926 
    927 struct vi_data {
    928     int cur_col;
    929     int cur_row;
    930     unsigned screen_height;
    931     unsigned screen_width;
    932     int vi_mode;
    933 };
    934 
    935 // toys/pending/wget.c
    936 
    937 struct wget_data {
    938   char *filename;
    939 };
    940 
    941 // toys/posix/basename.c
    942 
    943 struct basename_data {
    944   char *s;
    945 };
    946 
    947 // toys/posix/chgrp.c
    948 
    949 struct chgrp_data {
    950   uid_t owner;
    951   gid_t group;
    952   char *owner_name, *group_name;
    953   int symfollow;
    954 };
    955 
    956 // toys/posix/chmod.c
    957 
    958 struct chmod_data {
    959   char *mode;
    960 };
    961 
    962 // toys/posix/cksum.c
    963 
    964 struct cksum_data {
    965   unsigned crc_table[256];
    966 };
    967 
    968 // toys/posix/cmp.c
    969 
    970 struct cmp_data {
    971   int fd;
    972   char *name;
    973 };
    974 
    975 // toys/posix/cp.c
    976 
    977 struct cp_data {
    978   union {
    979     // install's options
    980     struct {
    981       char *g, *o, *m;
    982     } i;
    983     // cp's options
    984     struct {
    985       char *preserve;
    986     } c;
    987   };
    988 
    989   char *destname;
    990   struct stat top;
    991   int (*callback)(struct dirtree *try);
    992   uid_t uid;
    993   gid_t gid;
    994   int pflags;
    995 };
    996 
    997 // toys/posix/cpio.c
    998 
    999 struct cpio_data {
   1000   char *F, *p, *H;
   1001 };
   1002 
   1003 // toys/posix/cut.c
   1004 
   1005 struct cut_data {
   1006   char *d, *O;
   1007   struct arg_list *select[5]; // we treat them the same, so loop through
   1008 
   1009   int pairs;
   1010   regex_t reg;
   1011 };
   1012 
   1013 // toys/posix/date.c
   1014 
   1015 struct date_data {
   1016   char *r, *D, *d;
   1017 
   1018   unsigned nano;
   1019 };
   1020 
   1021 // toys/posix/df.c
   1022 
   1023 struct df_data {
   1024   struct arg_list *t;
   1025 
   1026   long units;
   1027   int column_widths[5];
   1028   int header_shown;
   1029 };
   1030 
   1031 // toys/posix/du.c
   1032 
   1033 struct du_data {
   1034   long d;
   1035 
   1036   unsigned long depth, total;
   1037   dev_t st_dev;
   1038   void *inodes;
   1039 };
   1040 
   1041 // toys/posix/env.c
   1042 
   1043 struct env_data {
   1044   struct arg_list *u;
   1045 };;
   1046 
   1047 // toys/posix/expand.c
   1048 
   1049 struct expand_data {
   1050   struct arg_list *t;
   1051 
   1052   unsigned tabcount, *tab;
   1053 };
   1054 
   1055 // toys/posix/file.c
   1056 
   1057 struct file_data {
   1058   int max_name_len;
   1059 
   1060   off_t len;
   1061 };
   1062 
   1063 // toys/posix/find.c
   1064 
   1065 struct find_data {
   1066   char **filter;
   1067   struct double_list *argdata;
   1068   int topdir, xdev, depth;
   1069   time_t now;
   1070   long max_bytes;
   1071 };
   1072 
   1073 // toys/posix/grep.c
   1074 
   1075 struct grep_data {
   1076   long m, A, B, C;
   1077   struct arg_list *f, *e, *M, *S;
   1078   char *color;
   1079 
   1080   char *purple, *cyan, *red, *green, *grey;
   1081   struct double_list *reg;
   1082   char indelim, outdelim;
   1083   int found, tried;
   1084 };
   1085 
   1086 // toys/posix/head.c
   1087 
   1088 struct head_data {
   1089   long c, n;
   1090 
   1091   int file_no;
   1092 };
   1093 
   1094 // toys/posix/iconv.c
   1095 
   1096 struct iconv_data {
   1097   char *f, *t;
   1098 
   1099   void *ic;
   1100 };
   1101 
   1102 // toys/posix/id.c
   1103 
   1104 struct id_data {
   1105   int is_groups;
   1106 };
   1107 
   1108 // toys/posix/kill.c
   1109 
   1110 struct kill_data {
   1111   char *s;
   1112   struct arg_list *o;
   1113 };
   1114 
   1115 // toys/posix/logger.c
   1116 
   1117 struct logger_data {
   1118   char *p, *t;
   1119 };
   1120 
   1121 // toys/posix/ls.c
   1122 
   1123 struct ls_data {
   1124   long l;
   1125   char *color;
   1126 
   1127   struct dirtree *files, *singledir;
   1128   unsigned screen_width;
   1129   int nl_title;
   1130   char *escmore;
   1131 };
   1132 
   1133 // toys/posix/mkdir.c
   1134 
   1135 struct mkdir_data {
   1136   char *m, *Z;
   1137 };
   1138 
   1139 // toys/posix/mkfifo.c
   1140 
   1141 struct mkfifo_data {
   1142   char *m;
   1143   char *Z;
   1144 
   1145   mode_t mode;
   1146 };
   1147 
   1148 // toys/posix/nice.c
   1149 
   1150 struct nice_data {
   1151   long n;
   1152 };
   1153 
   1154 // toys/posix/nl.c
   1155 
   1156 struct nl_data {
   1157   char *s, *n, *b;
   1158   long w, l, v;
   1159 
   1160   // Count of consecutive blank lines for -l has to persist between files
   1161   long lcount;
   1162 };
   1163 
   1164 // toys/posix/od.c
   1165 
   1166 struct od_data {
   1167   struct arg_list *t;
   1168   char *A;
   1169   long N, w, j;
   1170 
   1171   int address_idx;
   1172   unsigned types, leftover, star;
   1173   char *buf; // Points to buffers[0] or buffers[1].
   1174   char *bufs[2]; // Used to detect duplicate lines.
   1175   off_t pos;
   1176 };
   1177 
   1178 // toys/posix/paste.c
   1179 
   1180 struct paste_data {
   1181   char *d;
   1182 
   1183   int files;
   1184 };
   1185 
   1186 // toys/posix/patch.c
   1187 
   1188 struct patch_data {
   1189   char *i, *d;
   1190   long p;
   1191 
   1192   struct double_list *current_hunk;
   1193   long oldline, oldlen, newline, newlen;
   1194   long linenum;
   1195   int context, state, filein, fileout, filepatch, hunknum;
   1196   char *tempname;
   1197 };
   1198 
   1199 // toys/posix/ps.c
   1200 
   1201 struct ps_data {
   1202   union {
   1203     struct {
   1204       struct arg_list *G, *g, *U, *u, *t, *s, *p, *O, *o, *P, *k;
   1205     } ps;
   1206     struct {
   1207       long n, m, d, s;
   1208       struct arg_list *u, *p, *o, *k, *O;
   1209     } top;
   1210     struct {
   1211       char *L;
   1212       struct arg_list *G, *g, *P, *s, *t, *U, *u;
   1213       char *d;
   1214 
   1215       void *regexes, *snapshot;
   1216       int signal;
   1217       pid_t self, match;
   1218     } pgrep;
   1219   };
   1220 
   1221   struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU;
   1222   struct dirtree *threadparent;
   1223   unsigned width, height;
   1224   dev_t tty;
   1225   void *fields, *kfields;
   1226   long long ticks, bits, time;
   1227   int kcount, forcek, sortpos;
   1228   int (*match_process)(long long *slot);
   1229   void (*show_process)(void *tb);
   1230 };
   1231 
   1232 // toys/posix/renice.c
   1233 
   1234 struct renice_data {
   1235   long n;
   1236 };
   1237 
   1238 // toys/posix/sed.c
   1239 
   1240 struct sed_data {
   1241   char *i;
   1242   struct arg_list *f, *e;
   1243 
   1244   // processed pattern list
   1245   struct double_list *pattern;
   1246 
   1247   char *nextline, *remember;
   1248   void *restart, *lastregex;
   1249   long nextlen, rememberlen, count;
   1250   int fdout, noeol;
   1251   unsigned xx;
   1252   char delim;
   1253 };
   1254 
   1255 // toys/posix/sort.c
   1256 
   1257 struct sort_data {
   1258   char *t;
   1259   struct arg_list *k;
   1260   char *o, *T, S;
   1261 
   1262   void *key_list;
   1263   int linecount;
   1264   char **lines;
   1265 };
   1266 
   1267 // toys/posix/split.c
   1268 
   1269 struct split_data {
   1270   long l, b, a;
   1271 
   1272   char *outfile;
   1273 };
   1274 
   1275 // toys/posix/strings.c
   1276 
   1277 struct strings_data {
   1278   long n;
   1279   char *t;
   1280 };
   1281 
   1282 // toys/posix/tail.c
   1283 
   1284 struct tail_data {
   1285   long n, c;
   1286 
   1287   int file_no, ffd, *files;
   1288 };
   1289 
   1290 // toys/posix/tee.c
   1291 
   1292 struct tee_data {
   1293   void *outputs;
   1294 };
   1295 
   1296 // toys/posix/touch.c
   1297 
   1298 struct touch_data {
   1299   char *t, *r, *d;
   1300 };
   1301 
   1302 // toys/posix/ulimit.c
   1303 
   1304 struct ulimit_data {
   1305   long P;
   1306 };
   1307 
   1308 // toys/posix/uniq.c
   1309 
   1310 struct uniq_data {
   1311   long w, s, f;
   1312 
   1313   long repeats;
   1314 };
   1315 
   1316 // toys/posix/uudecode.c
   1317 
   1318 struct uudecode_data {
   1319   char *o;
   1320 };
   1321 
   1322 // toys/posix/wc.c
   1323 
   1324 struct wc_data {
   1325   unsigned long totals[4];
   1326 };
   1327 
   1328 // toys/posix/xargs.c
   1329 
   1330 struct xargs_data {
   1331   long s, n;
   1332   char *E, *I;
   1333 
   1334   long entries, bytes;
   1335   char delim;
   1336 };
   1337 
   1338 extern union global_union {
   1339 	struct getprop_data getprop;
   1340 	struct log_data log;
   1341 	struct hello_data hello;
   1342 	struct skeleton_data skeleton;
   1343 	struct dmesg_data dmesg;
   1344 	struct hostname_data hostname;
   1345 	struct killall_data killall;
   1346 	struct md5sum_data md5sum;
   1347 	struct mknod_data mknod;
   1348 	struct mktemp_data mktemp;
   1349 	struct mount_data mount;
   1350 	struct passwd_data passwd;
   1351 	struct pidof_data pidof;
   1352 	struct seq_data seq;
   1353 	struct su_data su;
   1354 	struct umount_data umount;
   1355 	struct ftpget_data ftpget;
   1356 	struct ifconfig_data ifconfig;
   1357 	struct microcom_data microcom;
   1358 	struct netcat_data netcat;
   1359 	struct netstat_data netstat;
   1360 	struct ping_data ping;
   1361 	struct sntp_data sntp;
   1362 	struct tunctl_data tunctl;
   1363 	struct acpi_data acpi;
   1364 	struct base64_data base64;
   1365 	struct blockdev_data blockdev;
   1366 	struct chrt_data chrt;
   1367 	struct dos2unix_data dos2unix;
   1368 	struct fallocate_data fallocate;
   1369 	struct fmt_data fmt;
   1370 	struct free_data free;
   1371 	struct hexedit_data hexedit;
   1372 	struct hwclock_data hwclock;
   1373 	struct ionice_data ionice;
   1374 	struct login_data login;
   1375 	struct losetup_data losetup;
   1376 	struct lspci_data lspci;
   1377 	struct makedevs_data makedevs;
   1378 	struct mix_data mix;
   1379 	struct mkpasswd_data mkpasswd;
   1380 	struct mkswap_data mkswap;
   1381 	struct modinfo_data modinfo;
   1382 	struct nsenter_data nsenter;
   1383 	struct oneit_data oneit;
   1384 	struct setfattr_data setfattr;
   1385 	struct shred_data shred;
   1386 	struct stat_data stat;
   1387 	struct swapon_data swapon;
   1388 	struct switch_root_data switch_root;
   1389 	struct timeout_data timeout;
   1390 	struct truncate_data truncate;
   1391 	struct watch_data watch;
   1392 	struct xxd_data xxd;
   1393 	struct arp_data arp;
   1394 	struct arping_data arping;
   1395 	struct bc_data bc;
   1396 	struct bootchartd_data bootchartd;
   1397 	struct brctl_data brctl;
   1398 	struct crond_data crond;
   1399 	struct crontab_data crontab;
   1400 	struct dd_data dd;
   1401 	struct dhcp_data dhcp;
   1402 	struct dhcp6_data dhcp6;
   1403 	struct dhcpd_data dhcpd;
   1404 	struct diff_data diff;
   1405 	struct dumpleases_data dumpleases;
   1406 	struct expr_data expr;
   1407 	struct fdisk_data fdisk;
   1408 	struct fold_data fold;
   1409 	struct fsck_data fsck;
   1410 	struct getfattr_data getfattr;
   1411 	struct getty_data getty;
   1412 	struct groupadd_data groupadd;
   1413 	struct gzip_data gzip;
   1414 	struct host_data host;
   1415 	struct ip_data ip;
   1416 	struct ipcrm_data ipcrm;
   1417 	struct ipcs_data ipcs;
   1418 	struct klogd_data klogd;
   1419 	struct last_data last;
   1420 	struct lsof_data lsof;
   1421 	struct mke2fs_data mke2fs;
   1422 	struct modprobe_data modprobe;
   1423 	struct more_data more;
   1424 	struct openvt_data openvt;
   1425 	struct route_data route;
   1426 	struct sh_data sh;
   1427 	struct stty_data stty;
   1428 	struct sulogin_data sulogin;
   1429 	struct syslogd_data syslogd;
   1430 	struct tar_data tar;
   1431 	struct tcpsvd_data tcpsvd;
   1432 	struct telnet_data telnet;
   1433 	struct telnetd_data telnetd;
   1434 	struct tftp_data tftp;
   1435 	struct tftpd_data tftpd;
   1436 	struct tr_data tr;
   1437 	struct traceroute_data traceroute;
   1438 	struct useradd_data useradd;
   1439 	struct vi_data vi;
   1440 	struct wget_data wget;
   1441 	struct basename_data basename;
   1442 	struct chgrp_data chgrp;
   1443 	struct chmod_data chmod;
   1444 	struct cksum_data cksum;
   1445 	struct cmp_data cmp;
   1446 	struct cp_data cp;
   1447 	struct cpio_data cpio;
   1448 	struct cut_data cut;
   1449 	struct date_data date;
   1450 	struct df_data df;
   1451 	struct du_data du;
   1452 	struct env_data env;
   1453 	struct expand_data expand;
   1454 	struct file_data file;
   1455 	struct find_data find;
   1456 	struct grep_data grep;
   1457 	struct head_data head;
   1458 	struct iconv_data iconv;
   1459 	struct id_data id;
   1460 	struct kill_data kill;
   1461 	struct logger_data logger;
   1462 	struct ls_data ls;
   1463 	struct mkdir_data mkdir;
   1464 	struct mkfifo_data mkfifo;
   1465 	struct nice_data nice;
   1466 	struct nl_data nl;
   1467 	struct od_data od;
   1468 	struct paste_data paste;
   1469 	struct patch_data patch;
   1470 	struct ps_data ps;
   1471 	struct renice_data renice;
   1472 	struct sed_data sed;
   1473 	struct sort_data sort;
   1474 	struct split_data split;
   1475 	struct strings_data strings;
   1476 	struct tail_data tail;
   1477 	struct tee_data tee;
   1478 	struct touch_data touch;
   1479 	struct ulimit_data ulimit;
   1480 	struct uniq_data uniq;
   1481 	struct uudecode_data uudecode;
   1482 	struct wc_data wc;
   1483 	struct xargs_data xargs;
   1484 } this;
   1485