OSDN Git Service

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