/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ident	"$Header: setop.h 1.3 89/10/10 $@(#)graf:include/setop.h	1.2"
#include "ctype.h"

#define SETINT(x,p)	x = atoi(p);\
			for(; isdigit(*p); p++)
#define SETSINT(x,p)	x = atoi(p);\
			for(; isdigit(*p)||*p=='-'; p++)
#define SETDOUB(x,p)	x = atof(p);\
			for(; ISDOUB(*p); p++)
#define SETSIGN(x,p)	x=(*p=='-'?(p++,-1):1);\
			if(*p=='+')p++
#define SETSTR(s,p,e)	{int j=0;\
			for(;*p!='\0' && *p!=',';p++)\
			 s[j<e-1?j++:j] = *p!='\\'?*p:*++p;\
			s[j]='\0';}

#define SETFILE(fd,p)	{char *q=p;\
 if(*p=='-')fd=stdin;else{\
  for(;*q!=' '&&*q!=','&&*q!='\0';q++);\
  if(*q=='\0')--q; else *q='\0';\
  if(!(fd=fopen(p,"r")))\
   fprintf(stderr,"!!  %s: cannot open %s\n",nodename,p);\
  }p=q+1;}
double atof();
