| 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 | #include <config.h> |
| 15 | #include "ini.h" |
| 16 | |
| 17 | int iniProperty( HINI hIni, char *pszProperty ) |
| 18 | { |
| 19 | /* SANITY CHECKS */ |
| 20 | if ( hIni == NULL ) |
| 21 | return INI_ERROR; |
| 22 | |
| 23 | if ( hIni->hCurObject == NULL ) |
| 24 | return INI_NO_DATA; |
| 25 | |
| 26 | if ( hIni->hCurProperty == NULL ) |
| 27 | return INI_NO_DATA; |
| 28 | |
| 29 | /* Ok */ |
| 30 | strncpy( pszProperty, hIni->hCurProperty->szName, INI_MAX_PROPERTY_NAME ); |
| 31 | |
| 32 | return INI_SUCCESS; |
| 33 | } |
| 34 | |
| 35 | |
| 36 | |
| 37 | |