[5527] in Athena Bugs
'split' is inconsistant
daemon@ATHENA.MIT.EDU (akagerry@ATHENA.MIT.EDU)
Thu Jul 12 17:47:46 1990
From: akagerry@ATHENA.MIT.EDU
Date: Thu, 12 Jul 90 17:47:34 -0400
To: bugs@ATHENA.MIT.EDU
I ported /usr/bin/split to the PS/2 today, and it didn't act as
expected. I expected that when I use the command:
split -N filename
where filename is a binary file and N is a numeric argument, that it
would split the file into exactly N*K chunks (K = 1024), but it didn't
it split the file into 4*N*K chunks. It turns out that the program
uses the formula:
chunk_size = N * BUFSIZ
where BUFSIZ is as defined in <stdio.h>, see
/source/bsd-4.3/common/usr.bin/split.c, thus for a VAX BUFSIZ is 1024,
but for a PS/2 BUFSIZ is 4096.
Using a machine dependant value in this code is in my opinion a bug.
--Jerry