Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 29) sorted by relevance

12

/coreutils/src/blake2/
Db2sum.c39 uint8_t *buffer = ( uint8_t * )malloc( buffer_length );
41 if( !buffer ) return -1;
51 n = fread( buffer + sum, 1, buffer_length - sum, stream );
69 blake2s_update( S, buffer, buffer_length );
74 if( sum > 0 ) blake2s_update( S, buffer, sum );
79 free( buffer );
90 uint8_t *buffer = ( uint8_t * )malloc( buffer_length ); in blake2b_stream() local
92 if( !buffer ) return -1; in blake2b_stream()
102 n = fread( buffer + sum, 1, buffer_length - sum, stream ); in blake2b_stream()
120 blake2b_update( S, buffer, buffer_length ); in blake2b_stream()
[all …]
Dblake2b-ref.c254 uint8_t buffer[BLAKE2B_OUTBYTES] = {0}; in blake2b_final() local
269 store64( buffer + sizeof( S->h[i] ) * i, S->h[i] ); in blake2b_final()
271 memcpy( out, buffer, S->outlen ); in blake2b_final()
272 secure_zero_memory(buffer, sizeof(buffer)); in blake2b_final()
/coreutils/gl/modules/
Dbuffer-lcm2 Compute a good buffer size for dealing with two files.
5 lib/buffer-lcm.c
6 lib/buffer-lcm.h
14 lib_SOURCES += buffer-lcm.c buffer-lcm.h
17 "buffer-lcm.h"
/coreutils/src/
Dsum.c47 uint8_t *buffer = malloc (buffer_length); in bsd_sum_stream() local
49 if (! buffer) in bsd_sum_stream()
60 n = fread (buffer + sum, 1, buffer_length - sum, stream); in bsd_sum_stream()
80 checksum += buffer[i]; in bsd_sum_stream()
96 checksum += buffer[i]; in bsd_sum_stream()
110 free (buffer); in bsd_sum_stream()
124 uint8_t *buffer = malloc (buffer_length); in sysv_sum_stream() local
126 if (! buffer) in sysv_sum_stream()
140 n = fread (buffer + sum, 1, buffer_length - sum, stream); in sysv_sum_stream()
158 s += buffer[i]; in sysv_sum_stream()
[all …]
Dhead.c179 xwrite_stdout (char const *buffer, size_t n_bytes) in xwrite_stdout() argument
181 if (n_bytes > 0 && fwrite (buffer, 1, n_bytes, stdout) < n_bytes) in xwrite_stdout()
503 char buffer[BUFSIZ + 1]; in elide_tail_lines_pipe() member
525 n_read = safe_read (fd, tmp->buffer, BUFSIZ); in elide_tail_lines_pipe()
532 xwrite_stdout (tmp->buffer, n_read); in elide_tail_lines_pipe()
542 char *buffer_end = tmp->buffer + n_read; in elide_tail_lines_pipe()
544 char const *p = tmp->buffer; in elide_tail_lines_pipe()
558 memcpy (&last->buffer[last->nbytes], tmp->buffer, tmp->nbytes); in elide_tail_lines_pipe()
573 xwrite_stdout (first->buffer, first->nbytes); in elide_tail_lines_pipe()
594 if (last->nbytes && last->buffer[last->nbytes - 1] != line_end) in elide_tail_lines_pipe()
[all …]
Dcomm.c198 fwrite (line->buffer, sizeof (char), line->length, stdout); in writeline()
229 order = xmemcoll (prev->buffer, prev->length - 1, in check_order()
230 current->buffer, current->length - 1); in check_order()
232 order = memcmp2 (prev->buffer, prev->length - 1, in check_order()
233 current->buffer, current->length - 1); in check_order()
318 order = xmemcoll (thisline[0]->buffer, thisline[0]->length - 1, in compare_files()
319 thisline[1]->buffer, thisline[1]->length - 1); in compare_files()
323 order = memcmp (thisline[0]->buffer, thisline[1]->buffer, len); in compare_files()
378 else if (all_line[i][alt[i][2]]->buffer) in compare_files()
Duniq.c258 char const *lp = line->buffer; in find_field()
272 return line->buffer + i; in find_field()
312 if (fwrite (line->buffer, sizeof (char), line->length, stdout) in writeline()
370 thislen = thisline->length - 1 - (thisfield - thisline->buffer); in check_file()
383 if (fwrite (thisline->buffer, sizeof (char), thisline->length, in check_file()
406 prevlen = prevline->length - 1 - (prevfield - prevline->buffer); in check_file()
420 thislen = thisline->length - 1 - (thisfield - thisline->buffer); in check_file()
467 free (lb1.buffer); in check_file()
468 free (lb2.buffer); in check_file()
Dtail.c417 xwrite_stdout (char const *buffer, size_t n_bytes) in xwrite_stdout() argument
419 if (n_bytes > 0 && fwrite (buffer, 1, n_bytes, stdout) < n_bytes) in xwrite_stdout()
442 char buffer[BUFSIZ]; in dump_remainder() local
444 size_t bytes_read = safe_read (fd, buffer, n); in dump_remainder()
459 xwrite_stdout (buffer, bytes_read); in dump_remainder()
521 char buffer[BUFSIZ]; in file_lines() local
537 bytes_read = safe_read (fd, buffer, bytes_read); in file_lines()
546 if (bytes_read && buffer[bytes_read - 1] != line_end) in file_lines()
557 nl = memrchr (buffer, line_end, n); in file_lines()
560 n = nl - buffer; in file_lines()
[all …]
Dnl.c260 regexp->buffer = nullptr; in build_type_arg()
367 switch (re_search (current_regex, line_buf.buffer, line_buf.length - 1, in proc_text()
382 fwrite (line_buf.buffer, sizeof (char), line_buf.length, stdout); in proc_text()
393 || memcmp (line_buf.buffer, section_del, 2)) in check_section()
396 && !memcmp (line_buf.buffer, header_del, header_del_len)) in check_section()
399 && !memcmp (line_buf.buffer, body_del, body_del_len)) in check_section()
402 && !memcmp (line_buf.buffer, footer_del, footer_del_len)) in check_section()
Dtee.c230 char buffer[BUFSIZ]; in tee_files() local
305 bytes_read = read (STDIN_FILENO, buffer, sizeof buffer); in tee_files()
315 && ! fwrite_wait (buffer, bytes_read, descriptors[i])) in tee_files()
Dtac.c148 static char buffer[WRITESIZE]; in output() local
155 fwrite (buffer, 1, bytes_in_buffer, stdout); in output()
163 memcpy (buffer + bytes_in_buffer, start, bytes_available); in output()
166 fwrite (buffer, 1, WRITESIZE, stdout); in output()
171 memcpy (buffer + bytes_in_buffer, start, bytes_to_add); in output()
530 compiled_separator.buffer = nullptr; in main()
Dchroot.c100 char *buffer = xstrdup (groups); in parse_additional_groups() local
104 for (tmp = strtok (buffer, ","); tmp; tmp = strtok (nullptr, ",")) in parse_additional_groups()
161 free (buffer); in parse_additional_groups()
Dsort.c184 struct buffer struct
1578 initbuf (struct buffer *buf, size_t line_bytes, size_t alloc) in initbuf()
1604 buffer_linelim (struct buffer const *buf) in buffer_linelim()
1762 fillbuf (struct buffer *buf, FILE *fp, char const *file) in fillbuf()
2902 struct buffer buf; /* Input buffer. */ in check()
3017 struct buffer *buffer = xnmalloc (nfiles, sizeof *buffer); in mergefps() local
3040 initbuf (&buffer[i], sizeof (struct line), in mergefps()
3042 if (fillbuf (&buffer[i], fps[i], files[i].name)) in mergefps()
3044 struct line const *linelim = buffer_linelim (&buffer[i]); in mergefps()
3046 base[i] = linelim - buffer[i].nlines; in mergefps()
[all …]
Dcsplit.c101 char *buffer; /* Data area. */ member
347 line_start = b->buffer; in record_line_starts()
398 free (buf->buffer); in free_buffer()
410 new_buffer->buffer = xpalloc (nullptr, &new_buffer->bytes_alloc, min_size, in get_new_buffer()
471 char *p = b->buffer; in load_buffer()
1108 p->re_compiled.buffer = nullptr; in extract_regexp()
Djoin.c274 char *ptr = line->buf.buffer; in xfields()
317 free (line->buf.buffer); in freeline()
318 line->buf.buffer = nullptr; in freeline()
409 if (0 < len && current->buf.buffer[len - 1] == '\n') in check_order()
420 (int) len, current->buf.buffer); in check_order()
Dbasenc.c1042 wrap_write (char const *buffer, idx_t len, in wrap_write() argument
1048 if (fwrite (buffer, 1, len, stdout) < len) in wrap_write()
1064 if (fwrite (buffer + written, 1, to_write, stdout) < to_write) in wrap_write()
Dtsort.c460 k = search_item (root, tokenbuffer.buffer); in tsort()
Dshuf.c243 if (fwrite (p->buffer, sizeof (char), p->length, stdout) != p->length) in write_permuted_output_reservoir()
Dexpr.c587 re_buffer.buffer = nullptr; in docolon()
Dfactor.c2594 ok &= print_factors (tokenbuffer.buffer); in do_stdin()
2596 free (tokenbuffer.buffer); in do_stdin()
/coreutils/gl/lib/
Drandread.c130 get_nonce (void *buffer, size_t bufsize) in get_nonce() argument
132 char *buf = buffer, *buflim = buf + bufsize; in get_nonce()
/coreutils/scripts/git-hooks/
Dcommit-msg81 # Given a $LOG_FILE name and a \@LINE buffer,
82 # read the contents of the file into the buffer and analyze it.
/coreutils/scripts/build-older-versions/
Dcoreutils-5.0-on-glibc-2.28.diff42 char buffer[BUFSIZ];
/coreutils/
DTODO142 pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
Dcfg.mk847 (^lib/buffer-lcm\.c|gl/lib/$(_gl_src)\.c|src/$(_src)\.c)$$

12