USG_PG3/usr/source/sccscommon/rdrec.c

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

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

char rdrec__[] "~|^`rdrec.c:	2.3";
/*
	Routine to read a record into the packet.  The main reason for
	it is to make sure that pkt->Pwrttn gets turned off,
	and to increment pkt->Precno.
*/

rdrec(pkt)
register struct Packet *pkt;
{
	register int n;

	if(pkt->Pwrttn==0) wrtrec(pkt,0,0);
	if((n=getr(&pkt->Pibuf)) != 1) {
		pkt->Precno++;
		pkt->Pwrttn = 0;
	}
	return(n);
}