1 /**********************************************************************************
5 **************************************************
6 * This code was created by Peter Harvey @ CodeByDesign.
7 * Released under LGPL 28.JAN.99
9 * Contributions from...
10 * -----------------------------------------------
11 * Peter Harvey - pharvey@codebydesign.com
12 **************************************************/
14 #include "inifile_intern.h"
16 #include <aros/libcall.h>
18 /*****************************************************************************
20 AROS_LH4(int, iniPropertySeek
,
23 AROS_LHA(HINI
, hIni
, D0
),
24 AROS_LHA(char *, pszObject
, A0
),
25 AROS_LHA(char *, pszProperty
, A1
),
26 AROS_LHA(char *, pszValue
, A2
),
29 struct Library
*, inifileBase
, 37, inifile
)
49 *****************************************************************************/
58 iniObjectFirst( hIni
);
59 while ( iniObjectEOL( hIni
) != TRUE
)
61 if ( pszObject
[0] == '\0' || strcasecmp( pszObject
, hIni
->hCurObject
->szName
) == 0 )
63 /* EITHER THE OBJECT HAS BEEN FOUND OR THE OBJECT DOES NOT MATTER */
64 /* IN ANYCASE LETS SCAN FOR PROPERTY */
65 iniPropertyFirst( hIni
);
66 while ( iniPropertyEOL( hIni
) != TRUE
)
68 if ( pszProperty
[0] == '\0' || strcasecmp( pszProperty
, hIni
->hCurProperty
->szName
) == 0 )
70 if ( pszValue
[0] == '\0' || strcasecmp( pszValue
, hIni
->hCurProperty
->szValue
) == 0 )
76 iniPropertyNext( hIni
);
78 if ( pszObject
[0] != '\0' )
80 hIni
->hCurObject
= NULL
;
84 iniObjectNext( hIni
);
90 } /* iniPropertySeek */