[5635] in Athena Bugs

home help back first fref pref prev next nref lref last post

rt 7.0F: head

daemon@ATHENA.MIT.EDU (sethf@ATHENA.MIT.EDU)
Tue Jul 31 07:24:09 1990

From: sethf@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Tue, 31 Jul 90 07:23:56 EDT

System name:		frumious-bandersnatch
Type and version:	RTPC-ROMPC 7.0F
Display type:		apa16

What were you trying to do?
	Select portions of a large file using head and tail. The file
contained many 2250 character long lines of hexadecimal data.

What's wrong:
	Head apparently believes a line has a maximum length of
~1023 chars.
	A check of some sources I can access shows these lines (in
head.c) as the likely culprit:

copyout(cnt)
        register int cnt;
{
        register int c;
        char lbuf[BUFSIZ];

What should have happened:
	Either line limits should be documented, or head and tail should
adjust to lines of arbitrary length. If the latter causes efficiency
problems, it could be made an option to the programs.
	At least increase BUFSIZ in the above. Tail apparently changes
it from 1024 to 8192.

Please describe any relevant documentation references:
	head(1), tail(1)



home help back first fref pref prev next nref lref last post