/* exit -- end runcom */

main(argc, argv)
	char **argv;
	{
	seek(0, 0, 2);
	exit(--argc<=0? 0: atob(argv[1]));
}

atob(ptr)
	char *ptr;
	{
	register char *p;
	register n, base;
	static char base0;

	n = 0;
	p = ptr;
	base = 10;
	if(*p == '-')
		p++;
	if(*p == '0') {
		base = 8;
		p++;
	}
	base0 = base + '0';

	while(*p >= '0' && base0 > *p) {
		n =* base;
		n =+ *p++;
		n =- '0';
	}
	if(*ptr == '-')
		n = -n;
	return(n);
}
