Add MMP files to build libOpenVG_sw.lib which uses LINKAS to redirect to libOpenVG.dll (and
the same for libEGL_sw.lib and libOpenVGU_sw.lib).
Only the libEGL_sw.lib redirection isn't activated - this can't happen until there is a merged
libEGL.dll which supports the OpenWF synchronisation and also implements the graphical support functions.
The overall aim is to eliminate the *_sw.dll implementations, at least as a compile-time way of choosing
a software-only implementation.The correct way to choose is to put the right set of libraries into a ROM
with suitable renaming, and in the emulator to use the "switching DLL" technique to pick the right set.
As the Symbian Foundation doesn't have any alternative implementations, we don't need the switching DLLs
and we can build directly to the correct name.
/* Copyright (c) 2009 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
#ifdef __cplusplus
extern "C"
{
#endif
#include <string.h>
#include <stdlib.h>
#include "owfmemory.h"
#include "owflinkedlist.h"
#include "owftypes.h"
#include "owfpool.h"
OWF_API_CALL OWF_NODE*
OWF_Node_Create(OWF_POOL* pool, void* data)
{
OWF_NODE* node;
node = (OWF_NODE*)OWF_Pool_GetObject(pool);
if (node)
{
node->data = data;
}
return node;
}
OWF_API_CALL void
OWF_Node_Destroy(OWF_NODE* node)
{
OWF_Pool_PutObject(node);
}
OWF_API_CALL OWF_NODE*
OWF_List_Tail(OWF_NODE* root)
{
if (root)
{
while (root->next)
{
root = root->next;
}
}
return root;
}
OWF_API_CALL OWF_NODE*
OWF_List_Append(OWF_NODE* root, OWF_NODE* node)
{
OWF_NODE* tail;
tail = OWF_List_Tail(root);
if (tail)
{
tail->next = node;
}
else
{
root = node;
}
return root;
}
OWF_API_CALL OWF_NODE*
OWF_List_Insert(OWF_NODE* root, OWF_NODE* node)
{
if (root)
{
node->next = root;
}
root = node;
return root;
}
OWF_API_CALL void
OWF_List_InsertAfter(OWF_NODE* pred, OWF_NODE* succ)
{
if (pred && succ)
{
succ->next = pred->next;
pred->next = succ;
}
}
OWF_API_CALL OWF_NODE*
OWF_List_Contains(OWF_NODE* root, void* data)
{
while (root)
{
if (root->data == data)
{
break;
}
root = root->next;
}
return root;
}
OWF_API_CALL OWF_NODE*
OWF_List_Remove(OWF_NODE* root, OWF_NODE* node)
{
OWF_NODE* iter = NULL;
if (root)
{
if (node != root)
{
iter = root;
while (iter)
{
if (iter->next == node)
{
iter->next = node->next;
break;
}
iter = iter->next;
}
}
else
{
root = root->next;
}
}
return root;
}
OWF_API_CALL OWF_NODE*
OWF_List_Clear(OWF_NODE* root)
{
OWF_NODE* next = NULL;
while (root)
{
next = root->next;
OWF_Node_Destroy(root);
root = next;
}
return root;
}
OWF_API_CALL void
OWF_List_ForEach(OWF_NODE* root, NODEITERFUNC func, void* data)
{
while (root) {
if (!func(root->data, data)) {
return;
}
root = root->next;
}
}
OWF_API_CALL OWF_NODE*
OWF_List_Find(OWF_NODE* root, NODECMPFUNC func, void* data)
{
while (root) {
if (func(root->data, data)) {
break;
}
root = root->next;
}
return root;
}
#ifdef __cplusplus
}
#endif