Use NList class instead of Zune class (big speed improvement).
[AROS-Contrib.git] / libini / iniObjectSeekSure.c
blob656fd733ad260bfd4ad8d3a4a6dc7234a24bd266
1 /**********************************************************************************
2 * .
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 * PAH 06.MAR.99 Added this func
15 **************************************************/
17 #include "inifile_intern.h"
18 #include "ini.h"
19 #include <aros/libcall.h>
21 /*****************************************************************************
22 NAME */
23 AROS_LH2(int, iniObjectSeekSure,
25 /* SYNOPSIS */
26 AROS_LHA(HINI, hIni, D0),
27 AROS_LHA(char *, pszObject, A0),
29 /* LOCATION */
30 struct Library *, inifileBase, 27, inifile)
32 /* FUNCTION
34 INPUTS
36 RESULT
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
46 INTERNALS
48 HISTORY
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 int nReturn;
56 /* SANITY CHECKS */
57 if ( hIni == NULL )
58 return INI_ERROR;
59 if ( !pszObject )
60 return INI_ERROR;
62 if ( (nReturn = iniObjectSeek( hIni, pszObject )) == INI_NO_DATA )
63 return iniObjectInsert( hIni, pszObject );
65 return nReturn;
67 AROS_LIBFUNC_EXIT
68 } /* iniObjectSeekSure */