1 /**********************************************************************************
5 * see iniElement instead
6 **********************************************************************************/
8 #include "inifile_intern.h"
10 #include <aros/libcall.h>
12 /*****************************************************************************
14 AROS_LH5(int, iniPropertyValue
,
17 AROS_LHA(char *, pszString
, A0
),
18 AROS_LHA(char *, pszProperty
, A1
),
19 AROS_LHA(char *, pszValue
, A2
),
20 AROS_LHA(char, cEqual
, D0
),
21 AROS_LHA(char, cPropertySep
, D1
),
24 struct Library
*, inifileBase
, 40, inifile
)
44 *****************************************************************************/
48 char szBuffer
[INI_MAX_LINE
+1];
50 char szPropertySep
[2];
57 szPropertySep
[0] = cPropertySep
;
58 szPropertySep
[1] = '\0';
60 strcpy( pszValue
, "" );
61 strncpy( szBuffer
, pszString
, INI_MAX_LINE
);
63 /* find pszProperty */
66 pProperty
= (char *)strtok( szBuffer
, (const char *)szPropertySep
);
67 if ( pProperty
== NULL
)
71 /* extract pszValue */
72 if ( strncmp( pProperty
, pszProperty
, strlen(pszProperty
) ) == 0 )
74 pValue
= (char *)strtok( szBuffer
, (const char *)szEqual
);
77 /* truncate any other data */
78 pValueLastChar
= (char *)strchr( pValue
, (int)szPropertySep
);
80 pValueLastChar
[0] = '\0';
82 strncpy( pszValue
, pValue
, INI_MAX_PROPERTY_VALUE
);
83 iniAllTrim( pszValue
);
93 } /* iniPropertyValue */