//printf("ReadLine `%s'\n",buf);
if (strncmp(buf,"rect",4)==0)
{
// obtain the url and the coordinates in the order used by graphviz-1.5
sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y2,&x2,&y1);
// later versions of graphviz corrected the y coordinate order
// the rule is that y2>=y1, so test and switch if needed
if (y2<y1)
int temp=y2;
y2=y1;
y1=temp;
}
// there shouldn't be any need for this for known versions of graphviz
// but it can't do any harm to check that x follows the rules as well
if (x2<x1)
int temp=x2;
x2=x1;
x1=temp;
char *refPtr = url;
char *urlPtr = strchr(url,'$');
//printf("url=`%s'\n",url);