Lines Matching +defs:range +defs:list
36 "list of positive numbers and ranges. Ranges can be of three "
50 "[b:bytes]:[list?\bcut\b based on a list of byte counts.]"
51 "[c:characters]:[list?\bcut\b based on a list of character counts.]"
54 "[f:fields]:[list?\bcut\b based on fields separated by the delimiter "
100 int list[2]; /* NOTE: must be last member */
136 register int range = 0;
160 lp = cut->list;
171 if(range)
173 --range;
174 if((n = (n ? (n-range) : (HUGE-1))) < 0)
175 error(ERROR_exit(1),"invalid range for c/f option");
176 *lp++ = range;
188 n = 1 + (lp-cut->list)/2;
189 qsort(lp=cut->list,n,2*sizeof(*lp),mycomp);
191 for(n=0,range= -2,dp=lp; *lp!=HUGE; lp+=2)
193 if(lp[0] <= range)
200 if((c = lp[0]+lp[1]-range)>0)
202 range += c;
208 range = *dp++ = lp[0];
214 range += (*dp++ = lp[1]);
218 lp = cut->list;
228 n = range = 0;
232 if(range)
233 error(ERROR_exit(1),"bad list for c/f option");
234 range = n?n:1;
240 error(ERROR_exit(1),"bad list for c/f option");
248 * cut each line of file <fdin> and put results to <fdout> using list <list>
257 register const int* lp = cut->list;
273 if (!(ncol = skip = *(lp = cut->list)))
359 * cut each line of file <fdin> and put results to <fdout> using list <list>
370 register const int *lp = cut->list;
395 if (nfields = *(lp = cut->list))