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/dmesg.c
43
44 struct dmesg_data {
45   long level;
46   long size;
47
48   int color;
49 };
50
51 // toys/lsb/hostname.c
52
53 struct hostname_data {
54   char *fname;
55 };
56
57 // toys/lsb/killall.c
58
59 struct killall_data {
60   char *sig;
61
62   int signum;
63   pid_t cur_pid;
64   char **names;
65   short *err;
66 };
67
68 // toys/lsb/md5sum.c
69
70 struct md5sum_data {
71   struct arg_list *c;
72
73   int sawline;
74
75   // Crypto variables blanked after summing
76   unsigned state[5];
77   unsigned oldstate[5];
78   uint64_t count;
79   union {
80     char c[64];
81     unsigned i[16];
82   } buffer;
83 };
84
85 // toys/lsb/mknod.c
86
87 struct mknod_data {
88   char *arg_context;
89   char *m;
90 };
91
92 // toys/lsb/mktemp.c
93
94 struct mktemp_data {
95   char *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 *algo;
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 *sep;
126   char *fmt;
127 };
128
129 // toys/lsb/su.c
130
131 struct su_data {
132   char *s;
133   char *c;
134 };
135
136 // toys/lsb/umount.c
137
138 struct umount_data {
139   struct arg_list *t;
140
141   char *types;
142 };
143
144 // toys/net/ftpget.c
145
146 struct ftpget_data {
147   char *user;
148   char *port;
149   char *password;
150
151   int fd;
152 };
153
154 // toys/net/ifconfig.c
155
156 struct ifconfig_data {
157   int sockfd;
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/dumpleases.c
553
554 struct dumpleases_data {
555     char *file;
556 };
557
558 // toys/pending/expr.c
559
560 struct expr_data {
561   char **tok; // current token, not on the stack since recursive calls mutate it
562
563   char *refree;
564 };
565
566 // toys/pending/fdisk.c
567
568 struct fdisk_data {
569   long sect_sz;
570   long sectors;
571   long heads;
572   long cylinders;
573 };
574
575 // toys/pending/fold.c
576
577 struct fold_data {
578   int width;
579 };
580
581 // toys/pending/fsck.c
582
583 struct fsck_data {
584   int fd_num;
585   char *t_list;
586
587   struct double_list *devices;
588   char *arr_flag;
589   char **arr_type;
590   int negate;
591   int sum_status;
592   int nr_run;
593   int sig_num;
594   long max_nr_run;
595 };
596
597 // toys/pending/getfattr.c
598
599 struct getfattr_data {
600   char *n;
601 };
602
603 // toys/pending/getty.c
604
605 struct getty_data {
606   char *issue_str;
607   char *login_str;
608   char *init_str;
609   char *host_str; 
610   long timeout;
611   
612   char *tty_name;  
613   int  speeds[20];
614   int  sc;              
615   struct termios termios;
616   char buff[128];
617 };
618
619 // toys/pending/groupadd.c
620
621 struct groupadd_data {
622   long gid;
623 };
624
625 // toys/pending/host.c
626
627 struct host_data {
628   char *type_str;
629 };
630
631 // toys/pending/iconv.c
632
633 struct iconv_data {
634   char *from;
635   char *to;
636
637   void *ic;
638 };
639
640 // toys/pending/ip.c
641
642 struct ip_data {
643   char stats, singleline, flush, *filter_dev, gbuf[8192];
644   int sockfd, connected, from_ok, route_cmd;
645   int8_t addressfamily, is_addr;
646 };
647
648 // toys/pending/ipcrm.c
649
650 struct ipcrm_data {
651   struct arg_list *qkey;
652   struct arg_list *qid;
653   struct arg_list *skey;
654   struct arg_list *sid;
655   struct arg_list *mkey;
656   struct arg_list *mid;
657 };
658
659 // toys/pending/ipcs.c
660
661 struct ipcs_data {
662   int id;
663 };
664
665 // toys/pending/klogd.c
666
667 struct klogd_data {
668   long level;
669
670   int fd;
671 };
672
673 // toys/pending/last.c
674
675 struct last_data {
676   char *file;
677
678   struct arg_list *list;
679 };
680
681 // toys/pending/logger.c
682
683 struct logger_data {
684   char *priority_arg;
685   char *ident;
686 };
687
688 // toys/pending/lsof.c
689
690 struct lsof_data {
691   struct arg_list *p;
692
693   struct stat *sought_files;
694
695   struct double_list *all_sockets;
696   struct double_list *files;
697   int last_shown_pid;
698   int shown_header;
699 };
700
701 // toys/pending/microcom.c
702
703 struct microcom_data {
704   char *speed;
705
706   int fd;
707   struct termios original_stdin_state, original_fd_state;
708 };
709
710 // toys/pending/mke2fs.c
711
712 struct mke2fs_data {
713   // Command line arguments.
714   long blocksize;
715   long bytes_per_inode;
716   long inodes;           // Total inodes in filesystem.
717   long reserved_percent; // Integer precent of space to reserve for root.
718   char *gendir;          // Where to read dirtree from.
719
720   // Internal data.
721   struct dirtree *dt;    // Tree of files to copy into the new filesystem.
722   unsigned treeblocks;   // Blocks used by dt
723   unsigned treeinodes;   // Inodes used by dt
724
725   unsigned blocks;       // Total blocks in the filesystem.
726   unsigned freeblocks;   // Free blocks in the filesystem.
727   unsigned inodespg;     // Inodes per group
728   unsigned groups;       // Total number of block groups.
729   unsigned blockbits;    // Bits per block.  (Also blocks per group.)
730
731   // For gene2fs
732   unsigned nextblock;    // Next data block to allocate
733   unsigned nextgroup;    // Next group we'll be allocating from
734   int fsfd;              // File descriptor of filesystem (to output to).
735
736   struct ext2_superblock sb;
737 };
738
739 // toys/pending/modprobe.c
740
741 struct modprobe_data {
742   struct arg_list *probes;
743   struct arg_list *dbase[256];
744   char *cmdopts;
745   int nudeps;
746   uint8_t symreq;
747   void (*dbg)(char *format, ...);
748 };
749
750 // toys/pending/more.c
751
752 struct more_data {
753   struct termios inf;
754   int cin_fd;
755 };
756
757 // toys/pending/openvt.c
758
759 struct openvt_data {
760   unsigned long vt_num;
761 };
762
763 // toys/pending/ping.c
764
765 struct ping_data {
766   long wait_exit;
767   long wait_resp;
768   char *iface;
769   long size;
770   long count;
771   long ttl;
772
773   int sock;
774 };
775
776 // toys/pending/route.c
777
778 struct route_data {
779   char *family;
780 };
781
782 // toys/pending/setfattr.c
783
784 struct setfattr_data {
785   char *x, *v, *n;
786 };
787
788 // toys/pending/sh.c
789
790 struct sh_data {
791   char *command;
792
793   long lineno;
794 };
795
796 // toys/pending/sulogin.c
797
798 struct sulogin_data {
799   long timeout;
800   struct termios crntio;
801 };
802
803 // toys/pending/syslogd.c
804
805 struct syslogd_data {
806   char *socket;
807   char *config_file;
808   char *unix_socket;
809   char *logfile;
810   long interval;
811   long rot_size;
812   long rot_count;
813   char *remote_log;
814   long log_prio;
815
816   struct unsocks *lsocks;  // list of listen sockets
817   struct logfile *lfiles;  // list of write logfiles
818   int sigfd[2];
819 };
820
821 // toys/pending/tar.c
822
823 struct tar_data {
824   char *fname;
825   char *dir;
826   struct arg_list *inc_file;
827   struct arg_list *exc_file;
828   char *tocmd;
829   struct arg_list *exc;
830
831   struct arg_list *inc, *pass;
832   void *inodes, *handle;
833 };
834
835 // toys/pending/tcpsvd.c
836
837 struct tcpsvd_data {
838   char *name;
839   char *user;
840   long bn;
841   char *nmsg;
842   long cn;
843
844   int maxc;
845   int count_all;
846   int udp;
847 };
848
849 // toys/pending/telnet.c
850
851 struct telnet_data {
852   int port;
853   int sfd;
854   char buff[128];
855   int pbuff;
856   char iac[256];
857   int piac;
858   char *ttype;
859   struct termios def_term;
860   struct termios raw_term;
861   uint8_t term_ok;
862   uint8_t term_mode;
863   uint8_t flags;
864   unsigned win_width;
865   unsigned win_height;
866 };
867
868 // toys/pending/telnetd.c
869
870 struct telnetd_data {
871     char *login_path;
872     char *issue_path;
873     int port;
874     char *host_addr;
875     long w_sec;
876
877     int gmax_fd;
878     pid_t fork_pid;
879 };
880
881 // toys/pending/tftp.c
882
883 struct tftp_data {
884   char *local_file;
885   char *remote_file;
886   long block_size;
887
888   struct sockaddr_storage inaddr;
889   int af;
890 };
891
892 // toys/pending/tftpd.c
893
894 struct tftpd_data {
895   char *user;
896
897   long sfd;
898   struct passwd *pw;
899 };
900
901 // toys/pending/tr.c
902
903 struct tr_data {
904   short map[256]; //map of chars
905   int len1, len2;
906 };
907
908 // toys/pending/traceroute.c
909
910 struct traceroute_data {
911   long max_ttl;
912   long port;
913   long ttl_probes;
914   char *src_ip;
915   long tos;
916   long wait_time;
917   struct arg_list *loose_source;
918   long pause_time;
919   long first_ttl;
920   char *iface;
921
922   uint32_t gw_list[9];
923   int recv_sock;
924   int snd_sock;
925   unsigned msg_len;
926   char *packet;
927   uint32_t ident;
928   int istraceroute6;
929 };
930
931 // toys/pending/useradd.c
932
933 struct useradd_data {
934   char *dir;
935   char *gecos;
936   char *shell;
937   char *u_grp;
938   long uid;
939
940   long gid;
941 };
942
943 // toys/pending/vi.c
944
945 struct vi_data {
946   struct linestack *ls;
947   char *statline;
948 };
949
950 // toys/pending/watch.c
951
952 struct watch_data {
953   int interval;
954 };
955
956 // toys/pending/wget.c
957
958 struct wget_data {
959   char *filename;
960 };
961
962 // toys/posix/chgrp.c
963
964 struct chgrp_data {
965   uid_t owner;
966   gid_t group;
967   char *owner_name, *group_name;
968   int symfollow;
969 };
970
971 // toys/posix/chmod.c
972
973 struct chmod_data {
974   char *mode;
975 };
976
977 // toys/posix/cksum.c
978
979 struct cksum_data {
980   unsigned crc_table[256];
981 };
982
983 // toys/posix/cmp.c
984
985 struct cmp_data {
986   int fd;
987   char *name;
988 };
989
990 // toys/posix/cp.c
991
992 struct cp_data {
993   union {
994     struct {
995       // install's options
996       char *group;
997       char *user;
998       char *mode;
999     } i;
1000     struct {
1001       char *preserve;
1002     } c;
1003   };
1004
1005   char *destname;
1006   struct stat top;
1007   int (*callback)(struct dirtree *try);
1008   uid_t uid;
1009   gid_t gid;
1010   int pflags;
1011 };
1012
1013 // toys/posix/cpio.c
1014
1015 struct cpio_data {
1016   char *archive;
1017   char *pass;
1018   char *fmt;
1019 };
1020
1021 // toys/posix/cut.c
1022
1023 struct cut_data {
1024   char *delim;
1025   char *flist;
1026   char *clist;
1027   char *blist;
1028
1029   void *slist_head;
1030   unsigned nelem;
1031   void (*do_cut)(int fd);
1032 };
1033
1034 // toys/posix/date.c
1035
1036 struct date_data {
1037   char *file;
1038   char *setfmt;
1039   char *showdate;
1040
1041   char *tz;
1042   unsigned nano;
1043 };
1044
1045 // toys/posix/df.c
1046
1047 struct df_data {
1048   struct arg_list *fstype;
1049
1050   long units;
1051   int column_widths[5];
1052   int header_shown;
1053 };
1054
1055 // toys/posix/du.c
1056
1057 struct du_data {
1058   long maxdepth;
1059
1060   unsigned long depth, total;
1061   dev_t st_dev;
1062   void *inodes;
1063 };
1064
1065 // toys/posix/env.c
1066
1067 struct env_data {
1068   struct arg_list *u;
1069 };;
1070
1071 // toys/posix/expand.c
1072
1073 struct expand_data {
1074   struct arg_list *tabs;
1075
1076   unsigned tabcount, *tab;
1077 };
1078
1079 // toys/posix/file.c
1080
1081 struct file_data {
1082   int max_name_len;
1083 };
1084
1085 // toys/posix/find.c
1086
1087 struct find_data {
1088   char **filter;
1089   struct double_list *argdata;
1090   int topdir, xdev, depth;
1091   time_t now;
1092 };
1093
1094 // toys/posix/grep.c
1095
1096 struct grep_data {
1097   long m;
1098   struct arg_list *f;
1099   struct arg_list *e;
1100   long a;
1101   long b;
1102   long c;
1103
1104   char indelim, outdelim;
1105 };
1106
1107 // toys/posix/head.c
1108
1109 struct head_data {
1110   long lines;
1111   int file_no;
1112 };
1113
1114 // toys/posix/id.c
1115
1116 struct id_data {
1117   int is_groups;
1118 };
1119
1120 // toys/posix/kill.c
1121
1122 struct kill_data {
1123   char *signame;
1124   struct arg_list *olist;
1125 };
1126
1127 // toys/posix/ls.c
1128
1129 struct ls_data {
1130   char *color;
1131
1132   struct dirtree *files, *singledir;
1133
1134   unsigned screen_width;
1135   int nl_title;
1136   char *escmore;
1137 };
1138
1139 // toys/posix/mkdir.c
1140
1141 struct mkdir_data {
1142   char *arg_mode;
1143   char *arg_context;
1144 };
1145
1146 // toys/posix/mkfifo.c
1147
1148 struct mkfifo_data {
1149   char *m_string;
1150   char *Z;
1151
1152   mode_t mode;
1153 };
1154
1155 // toys/posix/nice.c
1156
1157 struct nice_data {
1158   long priority;
1159 };
1160
1161 // toys/posix/nl.c
1162
1163 struct nl_data {
1164   long w;
1165   char *s;
1166   char *n;
1167   char *b;
1168   long l;
1169   long v;
1170
1171   // Count of consecutive blank lines for -l has to persist between files
1172   long lcount;
1173 };
1174
1175 // toys/posix/od.c
1176
1177 struct od_data {
1178   struct arg_list *output_base;
1179   char *address_base;
1180   long max_count;
1181   long width;
1182   long jump_bytes;
1183
1184   int address_idx;
1185   unsigned types, leftover, star;
1186   char *buf; // Points to buffers[0] or buffers[1].
1187   char *bufs[2]; // Used to detect duplicate lines.
1188   off_t pos;
1189 };
1190
1191 // toys/posix/paste.c
1192
1193 struct paste_data {
1194   char *delim;
1195 };
1196
1197 // toys/posix/patch.c
1198
1199 struct patch_data {
1200   char *infile;
1201   long prefix;
1202   char *dir;
1203
1204   struct double_list *current_hunk;
1205   long oldline, oldlen, newline, newlen;
1206   long linenum;
1207   int context, state, filein, fileout, filepatch, hunknum;
1208   char *tempname;
1209 };
1210
1211 // toys/posix/ps.c
1212
1213 struct ps_data {
1214   union {
1215     struct {
1216       struct arg_list *G;
1217       struct arg_list *g;
1218       struct arg_list *U;
1219       struct arg_list *u;
1220       struct arg_list *t;
1221       struct arg_list *s;
1222       struct arg_list *p;
1223       struct arg_list *O;
1224       struct arg_list *o;
1225       struct arg_list *P;
1226       struct arg_list *k;
1227     } ps;
1228     struct {
1229       long n;
1230       long d;
1231       long s;
1232       struct arg_list *u;
1233       struct arg_list *p;
1234       struct arg_list *o;
1235       struct arg_list *k;
1236       struct arg_list *O;
1237     } top;
1238     struct {
1239       char *L;
1240       struct arg_list *G;
1241       struct arg_list *g;
1242       struct arg_list *P;
1243       struct arg_list *s;
1244       struct arg_list *t;
1245       struct arg_list *U;
1246       struct arg_list *u;
1247       char *d;
1248
1249       void *regexes, *snapshot;
1250       int signal;
1251       pid_t self, match;
1252     } pgrep;
1253   };
1254
1255   struct sysinfo si;
1256   struct ptr_len gg, GG, pp, PP, ss, tt, uu, UU;
1257   struct dirtree *threadparent;
1258   unsigned width, height;
1259   dev_t tty;
1260   void *fields, *kfields;
1261   long long ticks, bits, time;
1262   int kcount, forcek, sortpos;
1263   int (*match_process)(long long *slot);
1264   void (*show_process)(void *tb);
1265 };
1266
1267 // toys/posix/renice.c
1268
1269 struct renice_data {
1270   long nArgu;
1271 };
1272
1273 // toys/posix/sed.c
1274
1275 struct sed_data {
1276   struct arg_list *f;
1277   struct arg_list *e;
1278
1279   // processed pattern list
1280   struct double_list *pattern;
1281
1282   char *nextline, *remember;
1283   void *restart, *lastregex;
1284   long nextlen, rememberlen, count;
1285   int fdout, noeol;
1286   unsigned xx;
1287 };
1288
1289 // toys/posix/sort.c
1290
1291 struct sort_data {
1292   char *key_separator;
1293   struct arg_list *raw_keys;
1294   char *outfile;
1295   char *ignore1, ignore2;   // GNU compatability NOPs for -S and -T.
1296
1297   void *key_list;
1298   int linecount;
1299   char **lines;
1300 };
1301
1302 // toys/posix/split.c
1303
1304 struct split_data {
1305   long lines;
1306   long bytes;
1307   long suflen;
1308
1309   char *outfile;
1310 };
1311
1312 // toys/posix/strings.c
1313
1314 struct strings_data {
1315   long num;
1316 };
1317
1318 // toys/posix/tail.c
1319
1320 struct tail_data {
1321   long lines;
1322   long bytes;
1323
1324   int file_no, ffd, *files;
1325 };
1326
1327 // toys/posix/tee.c
1328
1329 struct tee_data {
1330   void *outputs;
1331 };
1332
1333 // toys/posix/touch.c
1334
1335 struct touch_data {
1336   char *time;
1337   char *file;
1338   char *date;
1339 };
1340
1341 // toys/posix/ulimit.c
1342
1343 struct ulimit_data {
1344   long pid;
1345 };
1346
1347 // toys/posix/uniq.c
1348
1349 struct uniq_data {
1350   long maxchars;
1351   long nchars;
1352   long nfields;
1353   long repeats;
1354 };
1355
1356 // toys/posix/uudecode.c
1357
1358 struct uudecode_data {
1359   char *o;
1360 };
1361
1362 // toys/posix/wc.c
1363
1364 struct wc_data {
1365   unsigned long totals[4];
1366 };
1367
1368 // toys/posix/xargs.c
1369
1370 struct xargs_data {
1371   long max_bytes;
1372   long max_entries;
1373   long L;
1374   char *eofstr;
1375   char *I;
1376
1377   long entries, bytes;
1378   char delim;
1379 };
1380
1381 extern union global_union {
1382         struct getprop_data getprop;
1383         struct log_data log;
1384         struct hello_data hello;
1385         struct skeleton_data skeleton;
1386         struct dmesg_data dmesg;
1387         struct hostname_data hostname;
1388         struct killall_data killall;
1389         struct md5sum_data md5sum;
1390         struct mknod_data mknod;
1391         struct mktemp_data mktemp;
1392         struct mount_data mount;
1393         struct passwd_data passwd;
1394         struct pidof_data pidof;
1395         struct seq_data seq;
1396         struct su_data su;
1397         struct umount_data umount;
1398         struct ftpget_data ftpget;
1399         struct ifconfig_data ifconfig;
1400         struct netcat_data netcat;
1401         struct netstat_data netstat;
1402         struct tunctl_data tunctl;
1403         struct acpi_data acpi;
1404         struct base64_data base64;
1405         struct blockdev_data blockdev;
1406         struct dos2unix_data dos2unix;
1407         struct fallocate_data fallocate;
1408         struct free_data free;
1409         struct hexedit_data hexedit;
1410         struct hwclock_data hwclock;
1411         struct ionice_data ionice;
1412         struct login_data login;
1413         struct losetup_data losetup;
1414         struct lspci_data lspci;
1415         struct makedevs_data makedevs;
1416         struct mix_data mix;
1417         struct mkpasswd_data mkpasswd;
1418         struct mkswap_data mkswap;
1419         struct modinfo_data modinfo;
1420         struct nsenter_data nsenter;
1421         struct oneit_data oneit;
1422         struct shred_data shred;
1423         struct stat_data stat;
1424         struct swapon_data swapon;
1425         struct switch_root_data switch_root;
1426         struct timeout_data timeout;
1427         struct truncate_data truncate;
1428         struct xxd_data xxd;
1429         struct arp_data arp;
1430         struct arping_data arping;
1431         struct bootchartd_data bootchartd;
1432         struct brctl_data brctl;
1433         struct chrt_data chrt;
1434         struct compress_data compress;
1435         struct crond_data crond;
1436         struct crontab_data crontab;
1437         struct dd_data dd;
1438         struct dhcp_data dhcp;
1439         struct dhcp6_data dhcp6;
1440         struct dhcpd_data dhcpd;
1441         struct diff_data diff;
1442         struct dumpleases_data dumpleases;
1443         struct expr_data expr;
1444         struct fdisk_data fdisk;
1445         struct fold_data fold;
1446         struct fsck_data fsck;
1447         struct getfattr_data getfattr;
1448         struct getty_data getty;
1449         struct groupadd_data groupadd;
1450         struct host_data host;
1451         struct iconv_data iconv;
1452         struct ip_data ip;
1453         struct ipcrm_data ipcrm;
1454         struct ipcs_data ipcs;
1455         struct klogd_data klogd;
1456         struct last_data last;
1457         struct logger_data logger;
1458         struct lsof_data lsof;
1459         struct microcom_data microcom;
1460         struct mke2fs_data mke2fs;
1461         struct modprobe_data modprobe;
1462         struct more_data more;
1463         struct openvt_data openvt;
1464         struct ping_data ping;
1465         struct route_data route;
1466         struct setfattr_data setfattr;
1467         struct sh_data sh;
1468         struct sulogin_data sulogin;
1469         struct syslogd_data syslogd;
1470         struct tar_data tar;
1471         struct tcpsvd_data tcpsvd;
1472         struct telnet_data telnet;
1473         struct telnetd_data telnetd;
1474         struct tftp_data tftp;
1475         struct tftpd_data tftpd;
1476         struct tr_data tr;
1477         struct traceroute_data traceroute;
1478         struct useradd_data useradd;
1479         struct vi_data vi;
1480         struct watch_data watch;
1481         struct wget_data wget;
1482         struct chgrp_data chgrp;
1483         struct chmod_data chmod;
1484         struct cksum_data cksum;
1485         struct cmp_data cmp;
1486         struct cp_data cp;
1487         struct cpio_data cpio;
1488         struct cut_data cut;
1489         struct date_data date;
1490         struct df_data df;
1491         struct du_data du;
1492         struct env_data env;
1493         struct expand_data expand;
1494         struct file_data file;
1495         struct find_data find;
1496         struct grep_data grep;
1497         struct head_data head;
1498         struct id_data id;
1499         struct kill_data kill;
1500         struct ls_data ls;
1501         struct mkdir_data mkdir;
1502         struct mkfifo_data mkfifo;
1503         struct nice_data nice;
1504         struct nl_data nl;
1505         struct od_data od;
1506         struct paste_data paste;
1507         struct patch_data patch;
1508         struct ps_data ps;
1509         struct renice_data renice;
1510         struct sed_data sed;
1511         struct sort_data sort;
1512         struct split_data split;
1513         struct strings_data strings;
1514         struct tail_data tail;
1515         struct tee_data tee;
1516         struct touch_data touch;
1517         struct ulimit_data ulimit;
1518         struct uniq_data uniq;
1519         struct uudecode_data uudecode;
1520         struct wc_data wc;
1521         struct xargs_data xargs;
1522 } this;