1 /**********************************************************************************
4 * Dump contents to hStream.
6 * - iniCommit calls this. You can bypass iniCommit restrictions to get some debugging information by calling directly.
7 * - Make sure the stream is open before calling.
8 * - leaves list position at iniObjectFirst()
9 * - always returns true
11 **************************************************
12 * This code was created by Peter Harvey @ CodeByDesign.
13 * Released under LGPL 28.JAN.99
15 * Contributions from...
16 * -----------------------------------------------
17 * Peter Harvey - pharvey@codebydesign.com
18 **************************************************/
20 #include "inifile_intern.h"
24 int _iniDump( HINI hIni
, FILE *hStream
, struct Library
*inifileBase
)
35 iniObjectFirst( hIni
);
36 while ( iniObjectEOL( hIni
) == FALSE
)
38 fprintf( hStream
, "%c%s%c\n", hIni
->cLeftBracket
, hIni
->hCurObject
->szName
, hIni
->cRightBracket
);
39 iniPropertyFirst( hIni
);
40 while ( iniPropertyEOL( hIni
) == FALSE
)
42 fprintf( hStream
, "%s\t\t%c %s\n", hIni
->hCurProperty
->szName
, hIni
->cEqual
, hIni
->hCurProperty
->szValue
);
43 iniPropertyNext( hIni
);
45 fprintf( hStream
, "\n" );
46 iniPropertyFirst( hIni
);
47 iniObjectNext( hIni
);
49 iniObjectFirst( hIni
);