CK_RV ArrayTemplate(char *bp, char *attributes)
ArrayTemplate(const char *bp, char *attributes)
CK_RV ArrayTemplate(char *bp, char *attributes){    char aname[512];    CK_ULONG attributeTypes[MAX_TEMPLATE];    CK_ATTRIBUTE *template;    Value *value; /* new Value */    char *ap;    int i, count = 0;    memcpy(aname,attributes,strlen(attributes)+1);    for (ap = aname, count = 0; ap && *ap && count < MAX_TEMPLATE; count++) {	char *cur = ap;	ConstType type;	ap = strchr(ap,',');	if (ap) {	    *ap++ = 0;	}	(void)constLookup(cur, &attributeTypes[count], &type);	if ((type != ConstAttribute) && (type != ConstNone)) {	   printf("Unknown Attribute %s\n", cur);	   return CKR_FUNCTION_FAILED;	}    }    value = NewValue(ArgAttribute, count);    template = (CK_ATTRIBUTE *)value->data;    for (i=0; i < count ; i++) {	template[i].type = attributeTypes[i];    }    (void) AddVariable(bp, &value);    return CKR_OK;}