/* r e a d O Q P d i m e n s i o n s  */
BEGIN_NAMESPACE_QPOASES returnValue readOQPdimensions(const char *path, int *nQP, int *nV, int *nC, int *nEC)
/* r e a d O Q P d i m e n s i o n s  */
BEGIN_NAMESPACE_QPOASES returnValue readOQPdimensions(const char *path, int *nQP, int *nV, int *nC, int *nEC)
{
	int dims[4];
	char filename[QPOASES_MAX_STRING_LENGTH];
	snprintf( filename,QPOASES_MAX_STRING_LENGTH,"%sdims.oqp",path );
	if ( qpOASES_readFromFileI( dims,4,filename ) != SUCCESSFUL_RETURN )
		return THROWERROR( RET_UNABLE_TO_READ_FILE );
	*nQP = dims[0];
	*nV  = dims[1];
	*nC  = dims[2];
	*nEC = dims[3];
	if ( ( *nQP <= 0 ) || ( *nV <= 0 ) || ( *nC < 0 ) || ( *nEC < 0 ) )
		return THROWERROR( RET_FILEDATA_INCONSISTENT );
	if ( ( *nV > NVMAX ) || ( *nC > NCMAX ) || ( *nQP > NQPMAX ) )
		return THROWERROR( RET_UNABLE_TO_READ_BENCHMARK );
	return SUCCESSFUL_RETURN;
}