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