/coreutils/src/ |
D | nl.c | 390 size_t len = line_buf.length - 1; in check_section() local 392 if (len < 2 || footer_del_len < 2 in check_section() 395 if (len == header_del_len in check_section() 398 if (len == body_del_len in check_section() 401 if (len == footer_del_len in check_section() 479 size_t len; in main() local 560 len = strlen (optarg); in main() 561 if (len == 1 || len == 2) /* POSIX. */ in main() 582 len = strlen (section_del); in main() 584 header_del_len = len * 3; in main() [all …]
|
D | relpath.c | 88 relpath (char const *can_fname, char const *can_reldir, char *buf, size_t len) in relpath() argument 110 buf_err |= buffer_or_output ("..", &buf, &len); in relpath() 114 buf_err |= buffer_or_output ("/..", &buf, &len); in relpath() 119 buf_err |= buffer_or_output ("/", &buf, &len); in relpath() 120 buf_err |= buffer_or_output (fname_suffix, &buf, &len); in relpath() 126 &buf, &len); in relpath()
|
D | mktemp.c | 105 count_consecutive_X_s (char const *s, size_t len) in count_consecutive_X_s() argument 108 for ( ; len && s[len - 1] == 'X'; len--) in count_consecutive_X_s() 224 size_t len = strlen (template); in main() local 225 if (!len || template[len - 1] != 'X') in main() 232 dest_name = xcharalloc (len + suffix_len + 1); in main() 233 memcpy (dest_name, template, len); in main() 234 memcpy (dest_name + len, suffix, suffix_len + 1); in main() 236 suffix = dest_name + len; in main()
|
D | dirname.c | 82 size_t len; in main() local 122 len = dir_len (result); in main() 124 if (! len) in main() 127 len = 1; in main() 130 fwrite (result, 1, len, stdout); in main()
|
D | pathchk.c | 221 size_t len; in component_len() local 222 for (len = 1; f[len] != '/' && f[len]; len++) in component_len() 224 return len; in component_len() 370 long int len; in validate_file_name() local 375 len = pathconf (dir, _PC_NAME_MAX); in validate_file_name() 377 if (0 <= len) in validate_file_name() 378 name_max = MIN (len, MIN (SSIZE_MAX, IDX_MAX)); in validate_file_name()
|
D | ls.c | 244 size_t len; /* Number of bytes */ member 1461 size_t len = color_indicator[type].len; in is_colored() local 1463 return ! (len == 0 in is_colored() 1464 || (len == 1 && STRNCMP_LIT (s, "0") == 0) in is_colored() 1465 || (len == 2 && STRNCMP_LIT (s, "00") == 0)); in is_colored() 1833 if (!(color_indicator[C_LEFT].len == 2 in main() 1835 && color_indicator[C_RIGHT].len == 1 in main() 2790 state = (get_funky_string (&buf, &p, true, &ext->ext.len) in parse_ls_color() 2825 &color_indicator[ind_no].len) in parse_ls_color() 2839 state = (get_funky_string (&buf, &p, false, &ext->seq.len) in parse_ls_color() [all …]
|
D | tr.c | 186 size_t len; member 433 size_t len = strlen (s); in unquote() local 435 es->s = xmalloc (len); in unquote() 436 es->escaped = xcalloc (len, sizeof es->escaped[0]); in unquote() 534 es->len = j; in unquote() 543 look_up_char_class (char const *class_str, size_t len) in look_up_char_class() argument 548 if (STREQ_LEN (class_str, char_class_name[i], len) in look_up_char_class() 549 && strlen (char_class_name[i]) == len) in look_up_char_class() 582 make_printable_str (char const *s, size_t len) in make_printable_str() argument 586 char *printable_buf = xnmalloc (len + 1, 4); in make_printable_str() [all …]
|
D | join.c | 67 idx_t len; /* The length of the field. */ member 259 extract_field (struct line *line, char *field, idx_t len) in extract_field() argument 265 line->fields[line->nfields].len = len; in extract_field() 341 len1 = line1->fields[jf_1].len; in keycmp() 352 len2 = line2->fields[jf_2].len; in keycmp() 408 idx_t len = current->buf.length; in check_order() local 409 if (0 < len && current->buf.buffer[len - 1] == '\n') in check_order() 410 --len; in check_order() 414 len = MIN (INT_MAX, len); in check_order() 420 (int) len, current->buf.buffer); in check_order() [all …]
|
D | basenc.c | 178 base32_required_padding (int len) in base32_required_padding() argument 180 int partial = len % 8; in base32_required_padding() 187 base64_required_padding (int len) in base64_required_padding() argument 189 int partial = len % 4; in base64_required_padding() 196 no_required_padding (int len) in no_required_padding() argument 296 base64_length_wrapper (int len) in base64_length_wrapper() argument 298 return BASE64_LENGTH (len); in base64_length_wrapper() 402 base32_length_wrapper (int len) in base32_length_wrapper() argument 404 return BASE32_LENGTH (len); in base32_length_wrapper() 621 base16_length (int len) in base16_length() argument [all …]
|
D | fmt.c | 164 static COST line_cost (WORD *next, int len); 862 int len; in fmt_paragraph() local 873 len = start == word ? first_indent : other_indent; in fmt_paragraph() 878 len += w->length; in fmt_paragraph() 885 wcost = line_cost (w, len) + w->best_cost; in fmt_paragraph() 887 wcost += RAGGED_COST (len - last_line_length); in fmt_paragraph() 892 start->line_length = len; in fmt_paragraph() 902 len += (w - 1)->space + w->length; /* w > start >= word */ in fmt_paragraph() 904 while (len < max_width); in fmt_paragraph() 953 line_cost (WORD *next, int len) in line_cost() argument [all …]
|
D | shred.c | 986 incname (char *name, size_t len) in incname() argument 988 while (len--) in incname() 990 char const *p = strchr (nameset, name[len]); in incname() 998 name[len] = p[1]; in incname() 1003 name[len] = nameset[0]; in incname() 1053 for (size_t len = base_len (base); len != 0; len--) in wipename() local 1055 memset (base, nameset[0], len); in wipename() 1056 base[len] = 0; in wipename() 1061 && errno == EEXIST && incname (base, len)) in wipename() 1078 memcpy (oldname + (base - newname), base, len + 1); in wipename()
|
D | relpath.h | 23 relpath (char const *can_fname, char const *can_reldir, char *buf, size_t len);
|
D | expr.c | 129 if (g.len == 1) in mbs_logical_cspn() 140 a += h.len; in mbs_logical_cspn() 142 p += g.len; in mbs_logical_cspn() 166 mbs_logical_substr (char const *s, size_t pos, size_t len) in mbs_logical_substr() argument 172 size_t vlen = MIN (len, pos <= llen ? llen - pos + 1 : 0); in mbs_logical_substr() 176 if (pos == 0 || len == SIZE_MAX) in mbs_logical_substr() 188 idx_t char_bytes = mcel_scanz (s).len; in mbs_logical_substr() 219 for (size_t d = 0; d < ofs && s[d]; d += mcel_scanz (s + d).len) in mbs_offset_to_chars() 742 size_t len = getsize (i2->u.i); in eval6() local 744 char *s = mbs_logical_substr (l->u.s, pos, len); in eval6()
|
D | kill.c | 127 idx_t len = strlen (signame); in list_signals() local 128 if (name_width < len) in list_signals() 129 name_width = len; in list_signals()
|
D | df.c | 933 size_t len = strlen (s); in has_uuid_suffix() local 934 return (36 < len in has_uuid_suffix() 935 && strspn (s + len - 36, "-0123456789abcdefABCDEF") == 36); in has_uuid_suffix() 1317 size_t len = strlen (me->me_mountdir); in get_device() local 1320 && (! best_match_accessible || len < best_match_len)) in get_device() 1329 || (! best_match_accessible && len < best_match_len)) in get_device() 1332 if (len == 1) /* Traditional root. */ in get_device() 1339 best_match_len = len; in get_device() 1393 size_t len = strlen (me->me_mountdir); in get_point() local 1394 if (best_match_len <= len && len <= resolved_len in get_point() [all …]
|
D | shuf.c | 307 size_t len = p[1] - p[0]; in write_permuted_lines() local 308 if (fwrite (p[0], sizeof *p[0], len, stdout) != len) in write_permuted_lines() 360 size_t len = p[1] - p[0]; in write_random_lines() local 361 if (fwrite (p[0], sizeof *p[0], len, stdout) != len) in write_random_lines()
|
D | expand-common.c | 198 size_t len = strspn (num_start, "0123456789"); in parse_tab_stops() local 199 char *bad_num = ximemdup0 (num_start, len); in parse_tab_stops() 203 stops = num_start + len - 1; in parse_tab_stops()
|
D | cut.c | 305 ssize_t len; in cut_fields() local 308 len = getndelim2 (&field_1_buffer, &field_1_bufsize, 0, in cut_fields() 310 if (len < 0) in cut_fields() 319 n_bytes = len; in cut_fields()
|
D | csplit.c | 76 idx_t len; member 323 l->starts[l->insert_index].len = line_len; in keep_new_line() 782 line_len = line->len; in process_regexp() 822 line_len = line->len; in process_regexp() 1006 idx_t l = fwrite (line->str, sizeof (char), line->len, output_stream); in save_line_to_file() 1007 if (l != line->len) in save_line_to_file() 1013 bytes_written += line->len; in save_line_to_file() 1091 idx_t len; /* Number of bytes in this regexp. */ in extract_regexp() local 1102 len = closing_delim - str - 1; in extract_regexp() 1114 err = re_compile_pattern (str + 1, len, &p->re_compiled); in extract_regexp()
|
D | dd.c | 1007 cache_round (int fd, off_t len) in cache_round() argument 1012 if (len) in cache_round() 1015 if (ckd_add (&c_pending, *pending, len)) in cache_round() 1019 len = c_pending - *pending; in cache_round() 1021 len = 0; in cache_round() 1024 len = *pending; in cache_round() 1026 return len; in cache_round() 1034 invalidate_cache (int fd, off_t len) in invalidate_cache() argument 1041 off_t clen = cache_round (fd, len); in invalidate_cache() 1042 if (len && !clen) in invalidate_cache() [all …]
|
/coreutils/tests/od/ |
D | od.pl | 33 my $len = 0; 38 $len += length $line; 41 my $proc_file_byte_count = $len;
|
/coreutils/gl/lib/ |
D | fadvise.c | 31 fdadvise (int fd, off_t offset, off_t len, fadvice_t advice) in fdadvise() argument 34 ignore_value (posix_fadvise (fd, offset, len, advice)); in fdadvise()
|
D | fadvise.h | 70 void fdadvise (int fd, off_t offset, off_t len, fadvice_t advice);
|
/coreutils/tests/truncate/ |
D | truncate-overflow.sh | 25 truncate -s-1 create-zero-len-file || fail=1
|
/coreutils/tests/basenc/ |
D | base64.pl | 161 my $len = length $t; 162 foreach my $i (0..$len)
|