xref: /aosp_15_r20/external/toybox/android/mac/generated/globals.h (revision cf5a6c84e2b8763fc1a7db14496fd4742913b199)
1 struct gzip_data {
2   int level;
3 };
4 
5 struct hostname_data {
6   char *F;
7 };
8 
9 struct md5sum_data {
10   int sawline;
11 };
12 
13 struct mktemp_data {
14   char *p, *tmpdir;
15 };
16 
17 struct seq_data {
18   char *s, *f;
19 
20   int precision, buflen;
21 };
22 
23 struct microcom_data {
24   long s;
25 
26   int fd, stok;
27   struct termios old_stdin, old_fd;
28 };
29 
30 struct dos2unix_data {
31   char *tempfile;
32 };
33 
34 struct getopt_data {
35   struct arg_list *l;
36   char *o, *n;
37 };
38 
39 struct realpath_data {
40   char *R, *relative_base;
41 };
42 
43 struct setsid_data {
44   long c;
45 };
46 
47 struct stat_data {
48   char *c;
49 
50   union {
51     struct stat st;
52     struct statfs sf;
53   } stat;
54   char *file, *pattern;
55   int patlen;
56 };
57 
58 struct timeout_data {
59   char *s, *k;
60 
61   struct pollfd pfd;
62   sigjmp_buf sj;
63   int fds[2], pid, rc;
64 };
65 
66 struct truncate_data {
67   char *s;
68 
69   long long size;
70   int type;
71 };
72 
73 struct xxd_data {
74   long s, g, o, l, c;
75 };
76 
77 struct diff_data {
78   long U;
79   struct arg_list *L;
80   char *F, *S, *new_line_format, *old_line_format, *unchanged_line_format;
81 
82   int dir_num, size, is_binary, is_symlink, differ, change, len[2], *offset[2];
83   struct stat st[2];
84   struct {
85     char **list;
86     int nr_elm;
87   } dir[2];
88   struct {
89     FILE *fp;
90     int len;
91   } file[2];
92   struct {
93     char *name;
94     int len;
95   } link[2];
96 };
97 
98 struct expr_data {
99   char **tok, *delete;
100 };
101 
102 struct tr_data {
103   short *map;
104   int len1, len2;
105 };
106 
107 struct basename_data {
108   char *s;
109 };
110 
111 struct chmod_data {
112   char *mode;
113 };
114 
115 struct cmp_data {
116   long n;
117 
118   int fd;
119   char *name;
120 };
121 
122 struct cp_data {
123   union {
124     // install's options
125     struct {
126       char *g, *o, *m, *t;
127     } i;
128     // cp's options
129     struct {
130       char *t, *preserve;
131     } c;
132   };
133 
134   char *destname;
135   struct stat top;
136   int (*callback)(struct dirtree *try);
137   uid_t uid;
138   gid_t gid;
139   int pflags;
140 };
141 
142 struct cpio_data {
143   char *F, *H, *R;
144 };
145 
146 struct cut_data {
147   char *d, *O;
148   struct arg_list *select[5]; // we treat them the same, so loop through
149 
150   unsigned line;
151   int pairs;
152   regex_t reg;
153 };
154 
155 struct date_data {
156   char *s, *r, *I, *D, *d;
157 
158   unsigned nano;
159 };
160 
161 struct dd_data {
162   // Display fields
163   int show_xfer, show_records;
164   unsigned long long bytes, in_full, in_part, out_full, out_part, start;
165 };
166 
167 struct du_data {
168   long d;
169 
170   unsigned long depth, total;
171   dev_t st_dev;
172   void *inodes;
173 };
174 
175 struct env_data {
176   struct arg_list *u;
177   char *e;
178 };
179 
180 struct file_data {
181   int max_name_len;
182   off_t len;
183 };
184 
185 struct find_data {
186   char **filter;
187   struct double_list *argdata;
188   int topdir, xdev, depth;
189   time_t now;
190   long max_bytes;
191   char *start;
192 };
193 
194 struct grep_data {
195   long m, A, B, C;
196   struct arg_list *f, *e, *M, *S, *exclude_dir;
197   char *color;
198 
199   char *purple, *cyan, *red, *green, *grey;
200   struct double_list *reg;
201   int found, tried, delim;
202   struct arg_list **fixed;
203 };
204 
205 struct head_data {
206   long c, n;
207 
208   int file_no;
209 };
210 
211 struct id_data {
212   int is_groups;
213 };
214 
215 struct ln_data {
216   char *t;
217 };
218 
219 struct ls_data {
220   long w, l, block_size;
221   char *color, *sort;
222 
223   struct dirtree *files, *singledir;
224   unsigned screen_width;
225   int nl_title;
226   char *escmore;
227 };
228 
229 struct mkdir_data {
230   char *m, *Z;
231 };
232 
233 struct nl_data {
234   char *s, *n, *b;
235   long w, l, v;
236 
237   // Count of consecutive blank lines for -l has to persist between files
238   long lcount, slen;
239 };
240 
241 struct od_data {
242   struct arg_list *t;
243   char *A;
244   long N, w, j;
245 
246   int address_idx;
247   unsigned types, leftover, star;
248   char *buf; // Points to buffers[0] or buffers[1].
249   char *bufs[2]; // Used to detect duplicate lines.
250   off_t pos;
251 };
252 
253 struct paste_data {
254   char *d;
255 
256   int files;
257 };
258 
259 struct patch_data {
260   char *i, *d;
261   long v, p, g, F;
262 
263   void *current_hunk;
264   long oldline, oldlen, newline, newlen, linenum, outnum;
265   int context, state, filein, fileout, filepatch, hunknum;
266   char *tempname;
267 };
268 
269 struct sed_data {
270   char *i;
271   struct arg_list *f, *e;
272 
273   // processed pattern list
274   struct double_list *pattern;
275 
276   char *nextline, *remember, *tarxform;
277   void *restart, *lastregex;
278   long nextlen, rememberlen, count;
279   int fdout, noeol;
280   unsigned xx, tarxlen, xflags;
281   char delim, xftype;
282 };
283 
284 struct sort_data {
285   char *t;
286   struct arg_list *k;
287   char *o, *T, S;
288 
289   void *key_list;
290   unsigned linecount;
291   char **lines, *name;
292 };
293 
294 struct tail_data {
295   long n, c;
296   char *s;
297 
298   int file_no, last_fd, ss;
299   struct xnotify *not;
300   struct {
301     char *path;
302     int fd;
303     struct dev_ino di;
304   } *F;
305 };
306 
307 struct tar_data {
308   char *f, *C, *I;
309   struct arg_list *T, *X, *xform;
310   long strip;
311   char *to_command, *owner, *group, *mtime, *mode, *sort;
312   struct arg_list *exclude;
313 
314   struct double_list *incl, *excl, *seen;
315   struct string_list *dirs;
316   char *cwd, **xfsed;
317   int fd, ouid, ggid, hlc, warn, sparselen, pid, xfpipe[2];
318   struct dev_ino archive_di;
319   long long *sparse;
320   time_t mtt;
321 
322   // hardlinks seen so far (hlc many)
323   struct {
324     char *arg;
325     struct dev_ino di;
326   } *hlx;
327 
328   // Parsed information about a tar header.
329   struct tar_header {
330     char *name, *link_target, *uname, *gname;
331     long long size, ssize, oldsparse;
332     uid_t uid;
333     gid_t gid;
334     mode_t mode;
335     time_t mtime;
336     dev_t device;
337   } hdr;
338 };
339 
340 struct tee_data {
341   void *outputs;
342   int out;
343 };
344 
345 struct touch_data {
346   char *t, *r, *d;
347 };
348 
349 struct uniq_data {
350   long w, s, f;
351 
352   long repeats;
353 };
354 
355 struct wc_data {
356   unsigned long totals[5];
357 };
358 
359 struct xargs_data {
360   long s, n, P;
361   char *E;
362 
363   long entries, bytes, np;
364   char delim;
365   FILE *tty;
366 };
367 extern union global_union {
368 	struct gzip_data gzip;
369 	struct hostname_data hostname;
370 	struct md5sum_data md5sum;
371 	struct mktemp_data mktemp;
372 	struct seq_data seq;
373 	struct microcom_data microcom;
374 	struct dos2unix_data dos2unix;
375 	struct getopt_data getopt;
376 	struct realpath_data realpath;
377 	struct setsid_data setsid;
378 	struct stat_data stat;
379 	struct timeout_data timeout;
380 	struct truncate_data truncate;
381 	struct xxd_data xxd;
382 	struct diff_data diff;
383 	struct expr_data expr;
384 	struct tr_data tr;
385 	struct basename_data basename;
386 	struct chmod_data chmod;
387 	struct cmp_data cmp;
388 	struct cp_data cp;
389 	struct cpio_data cpio;
390 	struct cut_data cut;
391 	struct date_data date;
392 	struct dd_data dd;
393 	struct du_data du;
394 	struct env_data env;
395 	struct file_data file;
396 	struct find_data find;
397 	struct grep_data grep;
398 	struct head_data head;
399 	struct id_data id;
400 	struct ln_data ln;
401 	struct ls_data ls;
402 	struct mkdir_data mkdir;
403 	struct nl_data nl;
404 	struct od_data od;
405 	struct paste_data paste;
406 	struct patch_data patch;
407 	struct sed_data sed;
408 	struct sort_data sort;
409 	struct tail_data tail;
410 	struct tar_data tar;
411 	struct tee_data tee;
412 	struct touch_data touch;
413 	struct uniq_data uniq;
414 	struct wc_data wc;
415 	struct xargs_data xargs;
416 } this;
417