first commit
This commit is contained in:
16
closet/trunk/common/ContentManagement/source/Content.c
Normal file
16
closet/trunk/common/ContentManagement/source/Content.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "ContentManagement/Content.h"
|
||||
|
||||
|
||||
/*!
|
||||
\brief Initialize a Content item to defaults
|
||||
*/
|
||||
CKG_CM_Item *CKG_CM_InitItem(CKG_CM_Item *item)
|
||||
{
|
||||
if (item)
|
||||
{
|
||||
memset(item, 0x00, sizeof(*item));
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#include "ContentManagement/ContentManagement.h"
|
||||
#include "ContentManagement/Error.h"
|
||||
|
||||
int CKG_CM_AddItemToList(CKG_CM_List **list, CKG_CM_List *itemToAdd)
|
||||
{
|
||||
if (list && itemToAdd)
|
||||
{
|
||||
CKG_CM_List *oldHead;
|
||||
|
||||
oldHead = *list;
|
||||
*list = itemToAdd;
|
||||
itemToAdd->next = oldHead;
|
||||
|
||||
return CKG_CM_OK;
|
||||
}
|
||||
|
||||
return CKG_CM_INVALIDARG;
|
||||
}
|
||||
|
||||
int CKG_CM_RemoveItemFromList(CKG_CM_List **list, CKG_CM_List *itemToRemove)
|
||||
{
|
||||
if (list && itemToRemove)
|
||||
{
|
||||
CKG_CM_List *current = *list;
|
||||
|
||||
//whole (current)
|
||||
}
|
||||
|
||||
return CKG_CM_INVALIDARG;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user