You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
943 B
C++

2 years ago
//#include <util/util.h>
#include <stdlib.h>
#include <malloc.h>
#include "confrw_errno.h"
#include "confrw.h"
#include "_confrw.h"
#include "Profile_Hash.h"
/*
* ,
2 years ago
*
*
* pszfname -- ( char [MAX_PATH])
* ppvhandle -- , ()
2 years ago
*
*
* SUCCESS -- ,
* --
2 years ago
*
*/
int conf_open ( const char * pszfname, void ** ppvhandle )
{
int ret = SUCCESS;
if ( NULL == pszfname || NULL == ppvhandle )
return ERROR_POINTER;
int handle = -1;
ret = create_profile_cache ( (char *)pszfname, &handle );
if ( SUCCESS != ret )
{
*ppvhandle = NULL;
return ret;
}
else
{
*ppvhandle = calloc ( 1, sizeof(long) );
*((int *)*ppvhandle) = handle;
return SUCCESS;
}
}