Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 135) sorted by relevance

123456

/coreutils/src/
Dcomm.c279 int i, j; in compare_files() local
282 for (i = 0; i < 2; i++) in compare_files()
286 initbuffer (&lba[i][j]); in compare_files()
287 all_line[i][j] = &lba[i][j]; in compare_files()
289 alt[i][0] = 0; in compare_files()
290 alt[i][1] = 0; in compare_files()
291 alt[i][2] = 0; in compare_files()
292 streams[i] = (STREQ (infiles[i], "-") ? stdin : fopen (infiles[i], "r")); in compare_files()
293 if (!streams[i]) in compare_files()
294 error (EXIT_FAILURE, errno, "%s", quotef (infiles[i])); in compare_files()
[all …]
Dtac-pipe.c31 size_t i; member
128 for (size_t i = 0; i < x->n_bufs; i++) in buf_free() local
129 free (x->p[i].start); in buf_free()
138 if (lp->ptr > x->p[lp->i].start) in line_ptr_decrement()
140 lp_new.i = lp->i; in line_ptr_decrement()
145 affirm (lp->i > 0); in line_ptr_decrement()
146 lp_new.i = lp->i - 1; in line_ptr_decrement()
147 lp_new.ptr = ONE_PAST_END (x, lp->i - 1) - 1; in line_ptr_decrement()
157 affirm (lp->ptr <= ONE_PAST_END (x, lp->i) - 1); in line_ptr_increment()
158 if (lp->ptr < ONE_PAST_END (x, lp->i) - 1) in line_ptr_increment()
[all …]
Dtr.c192 es_match (struct E_string const *es, size_t i, char c) in es_match() argument
194 return es->s[i] == c && !es->escaped[i]; in es_match()
439 for (unsigned int i = 0; s[i]; i++) in unquote() local
444 switch (s[i]) in unquote()
448 switch (s[i + 1]) in unquote()
482 c = s[i + 1] - '0'; in unquote()
483 oct_digit = s[i + 2] - '0'; in unquote()
487 ++i; in unquote()
488 oct_digit = s[i + 2] - '0'; in unquote()
494 ++i; in unquote()
[all …]
Dcksum.c71 for (int i = 1; i < 8; i++) in fill_r() local
72 r[i] = (r[i - 1] << 1) ^ ((r[i - 1] & SBIT) ? GEN : 0); in fill_r()
80 for (int i = 0; i < 8; i++) in crc_remainder() local
81 if (BIT (i) & m) in crc_remainder()
82 rem ^= r[i]; in crc_remainder()
90 int i; in main() local
95 for (i = 0; i < 256; i++) in main()
97 crctab[0][i] = crc_remainder (i); in main()
107 for (i = 0; i < 256; i++) in main()
111 crc = (crc << 8) ^ crctab[0][((crc >> 24) ^ (i & 0xFF)) & 0xFF]; in main()
[all …]
Dtee.c201 fail_output (FILE **descriptors, char **files, int i) in fail_output() argument
207 if (descriptors[i] == stdout) in fail_output()
213 w_errno, "%s", quotef (files[i])); in fail_output()
215 descriptors[i] = nullptr; in fail_output()
232 int i; in tee_files() local
258 for (i = 1; i <= nfiles; i++) in tee_files()
261 descriptors[i] = fopen (files[i], mode_string); in tee_files()
262 if (descriptors[i] == nullptr) in tee_files()
265 out_pollable[i] = false; in tee_files()
268 errno, "%s", quotef (files[i])); in tee_files()
[all …]
Denv.c177 for (idx_t i = 0; i < usvars_used; ++i) in unset_envvars() local
179 devmsg ("unset: %s\n", usvars[i]); in unset_envvars()
181 if (unsetenv (usvars[i])) in unset_envvars()
183 quote (usvars[i])); in unset_envvars()
216 idx_t i; in extract_varname() local
224 i = p - str - 2; in extract_varname()
226 if (i >= vnlen) in extract_varname()
228 vnlen = i + 1; in extract_varname()
232 memcpy (varname, str + 2, i); in extract_varname()
233 varname[i] = 0; in extract_varname()
[all …]
Dmake-prime-list.c121 unsigned i; in output_primes() local
136 for (i = 0, p = 2; i < nprimes; i++) in output_primes()
138 unsigned int d8 = i + 8 < nprimes ? primes[i + 8].p - primes[i].p : 0xff; in output_primes()
141 printf ("P (%u, %u,\n (", primes[i].p - p, d8); in output_primes()
142 print_wide_uint (primes[i].pinv, 0, wide_uint_bits); in output_primes()
143 printf ("),\n UINTMAX_MAX / %u)\n", primes[i].p); in output_primes()
144 p = primes[i].p; in output_primes()
153 for (i = 0, is_prime = 1; is_prime; i++) in output_primes()
155 if (primes[i].p * primes[i].p > p) in output_primes()
157 if (p * primes[i].pinv <= primes[i].lim) in output_primes()
[all …]
Ddigest.c591 for (size_t i = 0; i < s_len; i++) in filename_unescape() local
593 switch (s[i]) in filename_unescape()
596 if (i == s_len - 1) in filename_unescape()
601 ++i; in filename_unescape()
602 switch (s[i]) in filename_unescape()
624 *dst++ = s[i]; in filename_unescape()
643 size_t i; in valid_digits() local
644 for (i = 0; i < len - digest_length % 3; i++) in valid_digits()
650 for ( ; i < len; i++) in valid_digits()
661 for (idx_t i = 0; i < digest_hex_bytes; i++) in valid_digits() local
[all …]
Dshuf.c117 int i; in input_from_argv() local
119 for (i = 0; i < n_operands; i++) in input_from_argv()
120 size += strlen (operand[i]); in input_from_argv()
123 for (i = 0; i < n_operands; i++) in input_from_argv()
125 char *p1 = stpcpy (p, operand[i]); in input_from_argv()
126 operand[i] = p; in input_from_argv()
240 for (size_t i = 0; i < n_lines; i++) in write_permuted_output_reservoir() local
242 const struct linebuffer *p = &lines[permutation[i]]; in write_permuted_output_reservoir()
290 for (size_t i = 1; i <= n_lines; i++) in read_input() local
291 line[i] = p = next_line (p, eolbyte); in read_input()
[all …]
Dtail.c754 size_t i; /* Index into buffers. */ in pipe_bytes() local
821 i = total_bytes - n_bytes; in pipe_bytes()
823 i = 0; in pipe_bytes()
824 xwrite_stdout (&tmp->buffer[i], tmp->nbytes - i); in pipe_bytes()
1103 for (size_t i = 0; i < n_files; i++) in any_live_files() local
1105 if (0 <= f[i].fd) in any_live_files()
1109 if (! f[i].ignore && reopen_inaccessible_files) in any_live_files()
1127 for (int i = 0; i < nbpids; i++) in writers_are_dead() local
1129 if (kill (pids[i], 0) == 0 || errno == EPERM) in writers_are_dead()
1156 size_t i; in tail_forever() local
[all …]
Dsum.c77 for (size_t i = 0; i < sum; i++) in bsd_sum_stream() local
80 checksum += buffer[i]; in bsd_sum_stream()
93 for (size_t i = 0; i < sum; i++) in bsd_sum_stream() local
96 checksum += buffer[i]; in bsd_sum_stream()
157 for (size_t i = 0; i < sum; i++) in sysv_sum_stream() local
158 s += buffer[i]; in sysv_sum_stream()
169 for (size_t i = 0; i < sum; i++) in sysv_sum_stream() local
170 s += buffer[i]; in sysv_sum_stream()
Dstty.c1120 int i; in apply_settings() local
1135 for (i = 0; mode_info[i].name != nullptr; ++i) in apply_settings()
1137 if (STREQ (arg, mode_info[i].name)) in apply_settings()
1139 if ((mode_info[i].flags & NO_SETATTR) == 0) in apply_settings()
1141 match_found = set_mode (&mode_info[i], reversed, mode); in apply_settings()
1156 for (i = 0; control_info[i].name != nullptr; ++i) in apply_settings()
1158 if (STREQ (arg, control_info[i].name)) in apply_settings()
1163 set_control_char (&control_info[i], settings[k], mode); in apply_settings()
1449 for (unsigned int i = 0; i < sizeof (new_mode); i++) in main() local
1451 unsigned int newc = *(((unsigned char *) &new_mode) + i); in main()
[all …]
Dod.c436 uintmax_t i; \
438 for (i = fields; blank < i; i--) \
440 int next_pad = pad * (i - 1) / fields; \
491 for (size_t i = n_bytes; i > 0; i--) in PRINT_TYPE() local
506 uintmax_t i; in print_named_ascii() local
508 for (i = fields; blank < i; i--) in print_named_ascii()
510 int next_pad = pad * (i - 1) / fields; in print_named_ascii()
537 uintmax_t i; in print_ascii() local
539 for (i = fields; blank < i; i--) in print_ascii()
541 int next_pad = pad * (i - 1) / fields; in print_ascii()
[all …]
Dnice.c106 int i; in main() local
117 for (i = 1; i < argc; /* empty */) in main()
119 char const *s = argv[i]; in main()
124 ++i; in main()
129 int fake_argc = argc - (i - 1); in main()
130 char **fake_argv = argv + (i - 1); in main()
139 i += optind - 1; in main()
177 if (i == argc) in main()
215 execvp (argv[i], &argv[i]); in main()
218 error (0, errno, "%s", quote (argv[i])); in main()
Dusers.c48 idx_t i; in list_entries_users() local
67 for (i = 0; i < n_entries; i++) in list_entries_users()
69 char c = (i < n_entries - 1 ? ' ' : '\n'); in list_entries_users()
70 fputs (u[i], stdout); in list_entries_users()
74 for (i = 0; i < n_entries; i++) in list_entries_users()
75 free (u[i]); in list_entries_users()
Dset-fields.c81 for (size_t i = 1; i < n; ++i) in complement_rp() local
83 if (c[i - 1].hi + 1 == c[i].lo) in complement_rp()
86 add_range_pair (c[i - 1].hi + 1, c[i].lo - 1); in complement_rp()
283 for (size_t i = 0; i < n_frp; ++i) in set_fields() local
285 for (size_t j = i + 1; j < n_frp; ++j) in set_fields()
287 if (frp[j].lo <= frp[i].hi) in set_fields()
289 frp[i].hi = MAX (frp[j].hi, frp[i].hi); in set_fields()
/coreutils/src/blake2/
Dblake2b-ref.c78 size_t i; in blake2b_init0() local
81 for( i = 0; i < 8; ++i ) S->h[i] = blake2b_IV[i]; in blake2b_init0()
88 size_t i; in blake2b_init_param() local
93 for( i = 0; i < 8; ++i ) in blake2b_init_param()
94 S->h[i] ^= load64( p + sizeof( S->h[i] ) * i ); in blake2b_init_param()
157 #define G(r,i,a,b,c,d) \ argument
159 a = a + b + m[blake2b_sigma[r][2 * i + 0]]; \
163 a = a + b + m[blake2b_sigma[r][2 * i + 1]]; \
185 size_t i; in blake2b_compress() local
187 for( i = 0; i < 16; ++i ) { in blake2b_compress()
[all …]
/coreutils/tests/
Dfilefrag-extent-compare28 foreach my $i (0..@A/2-1) { $a[$i] = { L_BLK => $A[2*$i], LEN => $A[2*$i+1] } };
29 foreach my $i (0..@B/2-1) { $b[$i] = { L_BLK => $B[2*$i], LEN => $B[2*$i+1] } };
36 my $i = 0;
39 !defined $e->[$i+1]
41 $e->[$i]->{L_BLK} + $e->[$i]->{LEN} != $e->[$i+1]->{L_BLK}
42 and ++$i, next;
44 $e->[$i]->{LEN} += $e->[$i+1]->{LEN};
45 # Remove $e->[$i+1]
46 splice @$e, $i+1, 1;
56 my $i = 0;
[all …]
/coreutils/tests/mv/
Ddup-source.sh29 for i in cp; do
33 $i a a d/ 2> out || fail=1
35 $i ./a a d/ 2>> out || fail=1
40 $i -a ./b b d/ 2>> out || fail=1
42 returns_ 1 $i -a ./b b b/ 2>> out || fail=1
46 $i --backup=numbered a a d/ 2>> out || fail=1
50 returns_ 1 $i --backup a a d/ 2>> out || fail=1
53 $i: warning: source file 'a' specified more than once
54 $i: warning: source file 'a' specified more than once
55 $i: warning: source directory 'b' specified more than once
[all …]
/coreutils/gl/lib/
Drand-isaac.c107 #define ISAAC_STEP(i, off, mix) \ in isaac_refill() argument
110 a = (IF32 (a, 0) ^ (mix)) + m[off + (i)]; \ in isaac_refill()
111 x = m[i]; \ in isaac_refill()
112 m[i] = y = ind (s->m, x) + a + b; \ in isaac_refill()
113 r[i] = b = just (ind (s->m, y >> ISAAC_WORDS_LOG) + x); \ in isaac_refill()
175 int i; \
177 for (i = 0; i < ISAAC_WORDS; i += 8) \
179 a += seed[i]; \
180 b += seed[i + 1]; \
181 c += seed[i + 2]; \
[all …]
Drandperm.c70 swap (size_t *v, size_t i, size_t j) in swap() argument
72 size_t t = v[i]; in swap()
73 v[i] = v[j]; in swap()
120 sparse_swap (sparse_map *sv, size_t *v, size_t i, size_t j) in sparse_swap() argument
122 struct sparse_ent_ *v1 = hash_remove (sv, &(struct sparse_ent_) {i,0}); in sparse_swap()
129 v1->index = v1->val = i; in sparse_swap()
145 v[i] = v1->val; in sparse_swap()
206 size_t i; in randperm_new() local
220 for (i = 0; i < n; i++) in randperm_new()
221 v[i] = i; in randperm_new()
[all …]
/coreutils/tests/cksum/
Dmd5sum-bsd.sh29 for i in 'a' ' b' '*c' 'dd' ' '; do
30 echo "$i" > "$i"
31 md5sum --text "$i" >> check.md5sum || fail=1
67 for i in 'a' ' b' '*c' 'dd' ' '; do
68 echo "$i" > "$i"
69 md5sum --tag "$i" >> check.md5 || fail=1
80 for i in 'a\b' 'a\' '\a' "a${nl}b" "a${t}b"; do
/coreutils/tests/nproc/
Dnproc-positive.sh27 for i in -1000 0 1 1000; do
28 procs=$(OMP_NUM_THREADS=$i nproc)
32 for i in 0 ' 1' 1000; do
33 procs=$(nproc --ignore="$i")
37 for i in -1 N; do
38 returns_ 1 nproc --ignore=$i || fail=1
/coreutils/tests/help/
Dhelp-version.sh62 for i in $built_programs; do
63 v=$(env $i --version | sed -n '1s/.* //p;q')
71 for i in $built_programs; do
74 test $i = test && continue
78 test $i = false || test $i = true && continue
81 test $i = install && i=ginstall
84 env $i --help >/dev/null || fail=1
85 env $i --version >/dev/null || fail=1
90 test $i = [ && prog=lbracket || prog=$(echo $i|sed "s/$EXEEXT$//")
94 returns_ $expected env $i --help >/dev/full 2>/dev/null &&
[all …]
/coreutils/tests/cp/
Dabuse.sh31 for i in dangling-dest existing-dest; do
32 test $i = existing-dest && echo i > t
33 test $i = dangling-dest && rm -f t
41 test $i = dangling-dest \
46 test $i = existing-dest \

123456