static char *SccsId = "@(#)dmatscan.c 3.2 (TU-Delft) 03/26/91";
/**********************************************************

Name/Version      : The Design Data Management Project

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000/S500

Author(s)         : S. de Graaf
                    A. van der Hoeven
                    T.G.R. van Leuken
                    N. van der Meijs
		    T. Vogel
		    P. van der Wolf
		    A.J. van Genderen
Creation date     : 18-May-1988


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1985-1988, All rights reserved
**********************************************************/
# include "dmstd.h"

#undef NULL
#define NULL 0

char * dmAttrScan (attr, par, val)
char * attr;
char ** par;
char ** val;
{
    register char * p = attr;

    if (p == NULL || *p == '\0')
	return (NULL);

    *par = p;

    while (*p != '=' && *p != ';' && *p != '\0') p++;

    if (*p == '=') {
	*p = '\0';
	*val = ++p;

	while (*p != ';' && *p != '\0') p++;

	if (*p == ';') {
	    *p++ = '\0';
	}
    }
    else if (*p == ';') {
	*p = '\0';
	p++;
	*val = NULL;
    }
    else if (*p == '\0') {
	*val = NULL;
    }

    return (p);   /* return the remaining part of 'attr' */
}
