liberscribble/src/scbxml.c File Reference

#include "scbxml.h"
#include "scblog.h"
#include <glib.h>

Go to the source code of this file.

Functions

ScbXmlPtr scb_xml_clone (const ScbXmlPtr src)
void scb_xml_free (ScbXmlPtr ptr)


Function Documentation

ScbXmlPtr scb_xml_clone ( const ScbXmlPtr  src  ) 

Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.

Definition at line 27 of file scbxml.c.

00028 {
00029     if (NULL == src)
00030     {
00031         SCB_ERROR("Invalid src pointer!");
00032         return NULL;            
00033     }
00034 
00035     ScbXmlPtr ret = g_new0(ScbXml, 1);
00036     if (NULL == ret)
00037     {
00038         SCB_ERROR("Not enough memory!");
00039         return NULL;
00040     }
00041     // add ref
00042     ret->handle.pDoc = src->handle.pDoc;
00043     ret->handle.pPathCtx = src->handle.pPathCtx;
00044     strncpy(ret->xPath, src->xPath, SCB_MAX_XML_PATH);
00045     ret->index = src->index;
00046     return ret;
00047 }

void scb_xml_free ( ScbXmlPtr  ptr  ) 

Definition at line 49 of file scbxml.c.

00050 {
00051     g_free(ptr);
00052 }


Generated on Sun Dec 14 17:15:12 2008 by  doxygen 1.5.6