Lines Matching refs:count
55 # define print_first_N(fp,count,bytes) print_first_N(fp,count) argument
58 print_first_N(FILE *fp, unsigned long count, bool count_bytes) in print_first_N() argument
63 while (count) { in print_first_N()
68 --count; in print_first_N()
75 print_except_N_last_bytes(FILE *fp, unsigned count) in print_except_N_last_bytes() argument
77 unsigned char *circle = xmalloc(++count); in print_except_N_last_bytes()
85 if (head == count) in print_except_N_last_bytes()
90 if (head == count) in print_except_N_last_bytes()
104 print_except_N_last_lines(FILE *fp, unsigned count) in print_except_N_last_lines() argument
106 char **circle = xzalloc((++count) * sizeof(circle[0])); in print_except_N_last_lines()
114 if (head == count) in print_except_N_last_lines()
119 if (head == count) in print_except_N_last_lines()
132 if (head == count) in print_except_N_last_lines()
139 void print_except_N_last_bytes(FILE *fp, unsigned count);
140 void print_except_N_last_lines(FILE *fp, unsigned count);
170 unsigned long count = 10; in head_main() local
217 count = eat_num(&negative_N, p); in head_main()
238 if (count >= INT_MAX / sizeof(char*)) in head_main()
239 bb_error_msg("count is too big: %lu", count); in head_main()
253 print_except_N_last_bytes(fp, count); in head_main()
255 print_except_N_last_lines(fp, count); in head_main()
258 print_first_N(fp, count, count_bytes); in head_main()