]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp: refactor src/copy.c
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Aug 2025 19:47:16 +0000 (12:47 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 16 Sep 2025 06:17:34 +0000 (23:17 -0700)
commit12bacad85b753b75fe79c70fc7aa37877e995dbb
tree650c909f4062f1f84d344bd7952d0fefcc414179
parente33bfb5886f3e4c0e45b833289a210d673947e49
cp: refactor src/copy.c

This is in preparation for splitting this large module.
* src/copy.c (sparse_copy, lseek_copy): New arg DEBUG, used to
identify copy debug info instead of using a static var.  All
callers changed.
(lseek_copy, infer_scantype): New args SRC_POS and POS.
Callers changed.
(copy_file_data): New function, with contents taken from copy.
(copy_reg): Call it.
src/copy.c