#ifndef lint
static char *RCSid = "$Header: /usr/brule/guest/empire/empire/emprcs/lib/gen/atopi.c,v 2.0 1995/07/27 05:56:17 empire Exp $";
#endif

#include "misc.h"

/*
 * atopi.c
 *
 * from PSL Empire, 1985
 */

int
atopi(p)
	s_char	*p;
{
	register int r11;

	if (p) {
		r11 = atoi(p);
		if (r11 < 0)
			r11 = -r11;
		return r11;
	} else {
		return (0);
	}
}
