1 struct gzip_data { 2 int level; 3 }; 4 5 struct realpath_data { 6 char *R, *relative_base; 7 }; 8 9 struct tr_data { 10 short *map; 11 int len1, len2; 12 }; 13 14 struct basename_data { 15 char *s; 16 }; 17 18 struct chmod_data { 19 char *mode; 20 }; 21 22 struct cmp_data { 23 long n; 24 25 int fd; 26 char *name; 27 }; 28 29 struct fold_data { 30 long w; 31 }; 32 33 struct grep_data { 34 long m, A, B, C; 35 struct arg_list *f, *e, *M, *S, *exclude_dir; 36 char *color; 37 38 char *purple, *cyan, *red, *green, *grey; 39 struct double_list *reg; 40 int found, tried, delim; 41 struct arg_list **fixed; 42 }; 43 44 struct head_data { 45 long c, n; 46 47 int file_no; 48 }; 49 50 struct ln_data { 51 char *t; 52 }; 53 54 struct ls_data { 55 long w, l, block_size; 56 char *color, *sort; 57 58 struct dirtree *files, *singledir; 59 unsigned screen_width; 60 int nl_title; 61 char *escmore; 62 }; 63 64 struct mkdir_data { 65 char *m, *Z; 66 }; 67 68 struct od_data { 69 struct arg_list *t; 70 char *A; 71 long N, w, j; 72 73 int address_idx; 74 unsigned types, leftover, star; 75 char *buf; // Points to buffers[0] or buffers[1]. 76 char *bufs[2]; // Used to detect duplicate lines. 77 off_t pos; 78 }; 79 80 struct sed_data { 81 char *i; 82 struct arg_list *f, *e; 83 84 // processed pattern list 85 struct double_list *pattern; 86 87 char *nextline, *remember, *tarxform; 88 void *restart, *lastregex; 89 long nextlen, rememberlen, count; 90 int fdout, noeol; 91 unsigned xx, tarxlen, xflags; 92 char delim, xftype; 93 }; 94 95 struct sort_data { 96 char *t; 97 struct arg_list *k; 98 char *o, *T, S; 99 100 void *key_list; 101 unsigned linecount; 102 char **lines, *name; 103 }; 104 105 struct tail_data { 106 long n, c; 107 char *s; 108 109 int file_no, last_fd, ss; 110 struct xnotify *not; 111 struct { 112 char *path; 113 int fd; 114 struct dev_ino di; 115 } *F; 116 }; 117 118 struct tee_data { 119 void *outputs; 120 int out; 121 }; 122 123 struct wc_data { 124 unsigned long totals[5]; 125 }; 126 127 struct xargs_data { 128 long s, n, P; 129 char *E; 130 131 long entries, bytes, np; 132 char delim; 133 FILE *tty; 134 }; 135 extern union global_union { 136 struct gzip_data gzip; 137 struct realpath_data realpath; 138 struct tr_data tr; 139 struct basename_data basename; 140 struct chmod_data chmod; 141 struct cmp_data cmp; 142 struct fold_data fold; 143 struct grep_data grep; 144 struct head_data head; 145 struct ln_data ln; 146 struct ls_data ls; 147 struct mkdir_data mkdir; 148 struct od_data od; 149 struct sed_data sed; 150 struct sort_data sort; 151 struct tail_data tail; 152 struct tee_data tee; 153 struct wc_data wc; 154 struct xargs_data xargs; 155 } this; 156