| 1 | /********************************************************************************** |
| 2 | * . |
| 3 | * |
| 4 | * |
| 5 | ************************************************** |
| 6 | * This code was created by Peter Harvey @ CodeByDesign. |
| 7 | * Released under LGPL 28.JAN.99 |
| 8 | * |
| 9 | * Contributions from... |
| 10 | * ----------------------------------------------- |
| 11 | * PAH = Peter Harvey - pharvey@codebydesign.com |
| 12 | * ----------------------------------------------- |
| 13 | * |
| 14 | * PAH 19.MAR.99 Now sets hCurProperty to hFirstProperty when found |
| 15 | **************************************************/ |
| 16 | |
| 17 | #include <config.h> |
| 18 | #include "ini.h" |
| 19 | |
| 20 | int iniObjectSeek( HINI hIni, char *pszObject ) |
| 21 | { |
| 22 | /* SANITY CHECKS */ |
| 23 | if ( hIni == NULL ) |
| 24 | return INI_ERROR; |
| 25 | |
| 26 | iniObjectFirst( hIni ); |
| 27 | while ( iniObjectEOL( hIni ) == FALSE ) |
| 28 | { |
| 29 | if ( strcasecmp( pszObject, hIni->hCurObject->szName ) == 0 ) |
| 30 | return INI_SUCCESS; |
| 31 | iniObjectNext( hIni ); |
| 32 | } |
| 33 | |
| 34 | return INI_NO_DATA; |
| 35 | } |
| 36 | |
| 37 | |
| 38 | |