🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.v7
Article #113

split(1) vs big split sizes

#113
From: utzoohenry
Date: Thu, 13 Jan 1983 22:20
20 lines
796 bytes
Split(1) as distributed does odd things if the line count given as an
option exceeds 32767.  Guess why.  The fix is roughly as follows (the
line numbers may not exactly match those of the distributed one):

	3c7
	< unsigned count = 1000;
	---
	> long count = 1000L;
	14a19
	> 	register long nbytes;
	15a21
	> 	extern long atol();
	35c41
	< 				count = atoi(argv[i]+1);
	---
	> 				count = atol(argv[i]+1);
	56c62
	< 	for(i=0; i<count; i++)
	---
	> 	for(nbytes=0L; nbytes<count; nbytes++)
Technical Details
Message-ID: <bnews.utzoo.2748>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
From: utzoo!henry
Newsgroups: net.bugs.v7
Title: split(1) vs big split sizes 
Article-I.D.: utzoo.2748
Posted: Thu Jan 13 22:20:34 1983
Received: Thu Jan 13 22:20:34 1983
Subject: split(1) vs big split sizes
Date: Thu, 13 Jan 1983 22:20:34 +0000
Message-ID: <bnews.utzoo.2748>