OSDN Git Service

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