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