Added "libdir=$(AROS_LIB)" to extraoptions to prevent
[AROS-Contrib.git] / libini / _iniPropertyRead.c
blob0a698b9c036fb45eae04a941eb92ee8e6b71ba2e
1 /**********************************************************************************
2 * _iniPropertyRead
6 **************************************************
7 * This code was created by Peter Harvey @ CodeByDesign.
8 * Released under LGPL 28.JAN.99
10 * Contributions from...
11 * -----------------------------------------------
12 * Peter Harvey - pharvey@codebydesign.com
13 **************************************************/
15 #include "inifile_intern.h"
16 #include "ini.h"
18 #undef _iniPropertyRead
19 int _iniPropertyRead( HINI hIni, char *szLine, char *pszPropertyName, char *pszPropertyValue, struct Library *inifileBase )
22 /* SANITY CHECKS */
23 if ( hIni == NULL )
24 return INI_ERROR;
25 if ( hIni->hCurObject == NULL )
26 return INI_ERROR;
28 /* SCAN LINE TO EXTRACT PROPERTY NAME AND VALUE WITH NO TRAILING SPACES */
29 strcpy( pszPropertyName, "" );
30 strcpy( pszPropertyValue, "" );
32 iniElement( szLine, '=', '\0', 0, pszPropertyName, INI_MAX_PROPERTY_NAME );
33 iniElementToEnd( szLine, '=', '\0', 1, pszPropertyValue, INI_MAX_PROPERTY_VALUE );
34 iniAllTrim( pszPropertyName );
35 iniAllTrim( pszPropertyValue );
37 return INI_SUCCESS;