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_LH1(int, iniObjectDelete
,
23 AROS_LHA(HINI
, hIni
, D0
),
26 struct Library
*, inifileBase
, 20, inifile
)
46 *****************************************************************************/
55 if ( hIni
->hCurObject
== NULL
)
58 hObject
= hIni
->hCurObject
;
60 /* REMOVE ALL SUBORDINATE INFO */
61 hIni
->hCurProperty
= hObject
->hFirstProperty
;
62 while ( iniPropertyDelete( hIni
) == INI_SUCCESS
)
66 /* REMOVE FROM LIST */
67 if ( hIni
->hFirstObject
== hObject
)
68 hIni
->hFirstObject
= hObject
->pNext
;
69 if ( hIni
->hLastObject
== hObject
)
70 hIni
->hLastObject
= hObject
->pPrev
;
72 hIni
->hCurObject
= NULL
;
75 hObject
->pNext
->pPrev
= hObject
->pPrev
;
76 hIni
->hCurObject
= hObject
->pNext
;
80 hObject
->pPrev
->pNext
= hObject
->pNext
;
81 hIni
->hCurObject
= hObject
->pPrev
;
88 iniPropertyFirst( hIni
);
93 } /* iniObjectDelete */