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