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 | * Peter Harvey - pharvey@codebydesign.com |
12 | * ----------------------------------------------- |
13 | * |
14 | * PAH 06.MAR.99 Added this func |
15 | **************************************************/ |
16 | |
17 | #include <config.h> |
18 | #include "ini.h" |
19 | |
20 | int iniObjectSeekSure( HINI hIni, char *pszObject ) |
21 | { |
22 | int nReturn; |
23 | |
24 | /* SANITY CHECKS */ |
25 | if ( hIni == NULL ) |
26 | return INI_ERROR; |
27 | if ( !pszObject ) |
28 | return INI_ERROR; |
29 | |
30 | if ( (nReturn = iniObjectSeek( hIni, pszObject )) == INI_NO_DATA ) |
31 | return iniObjectInsert( hIni, pszObject ); |
32 | |
33 | return nReturn; |
34 | } |
35 | |
36 | |
37 | |