1#include <config.h>
2#include "lst.h"
3
4void *lstSet( HLST hLst, void *pData )
5{
6 HLSTITEM hItem;
7 HLST hLstRoot;
8
9 if ( !hLst )
10 return NULL;
11
12 if ( !hLst->hCurrent )
13 return NULL;
14
15
16 if ( hLst->hLstBase )
17 hItem = (HLSTITEM)hLst->hCurrent->pData;
18 else
19 hItem = hLst->hCurrent;
20
21 hLstRoot = (HLST)hItem->hLst;
22
23 /**************************
24 * SET VALUE
25 **************************/
26 if ( hItem->pData && hLstRoot->pFree )
27 hLstRoot->pFree( hItem->pData );
28
29 hItem->pData = pData;
30
31 return pData;
32}
33
34
35
36