USG_PG3/usr/source/sccscommon/sinit.c

Compare this file to the similar file:
Show the results in this format:

# include "../sccshead/sfile.h"
# include "../sccshead/sint.h"
# include "../sccshead/statbuf.h"

char sinit____[] "~|^`sinit.c	3.2";
/*
	Does initialization for sccs files and packet.
*/

sinit(pkt,file,linktest)
register struct Packet *pkt;
register char *file;
{
	struct Statbuf sb;

	zero(pkt,sizeof(*pkt));
	if (size(file) > SIZEOFPfile)
		fatal("too long (205)");
	copy(file,pkt->Pfile);
	opnr(&pkt->Pibuf,pkt->Pfile);
	if (linktest) {
		fstat(pkt->Pibuf.Ifildes,&sb);
		if (sb.nlinks > 1) fatal("more than one link (325)");
	}
	pkt->Pwrttn = 1;
}