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

char dor__[] "~|^`dor.c:	3.3";
/*
	Processes r keyword.  Second arg points to char after the r.
*/

dor(rp,lp,s)
int *rp, *lp;
register char *s;
{
	char number[5];
	register char *num;
	int i;

	num = number;
	i = 4;
	while(*s != '\0' && *s != '.') {
		*num++ = *s++;
		if(--i < 0) fatal("release too big (217)");
	}

	*num = '\0';
	if((*rp = patoi(number)) < 0) fatal("release not numeric (63)");

	if(*rp == 0) fatal("zero release (71)");

	if(*s == '\0') {
		*lp = -1;
		return;
	}

	++s;
	num = number;
	i = 4;
	while(*s != '\0') {
		*num++ = *s++;
		if(--i < 0) fatal("level too big (48)");
	}

	*num = '\0';
	if((*lp = patoi(number)) < 0) fatal("level not numeric (47)");
}
