cursor/printOurCommonChildrenNames.c
static RDM_RETCODE printOurCommonChildrenNames (
RDM_CURSOR mother,
RDM_CURSOR father)
{
char name[32];
RDM_CURSOR mothersChildren = NULL;
RDM_CURSOR fathersChildren = NULL;
mother, REF_MOTHERS_CHILDREN,
&mothersChildren);
if (rc == sOKAY)
{
father, REF_FATHERS_CHILDREN, &fathersChildren);
}
if (rc == sOKAY)
{
rc = rdm_cursorMoveToNext (mothersChildren);
}
/* Iterate over all mothers children */
while (rc == sOKAY)
{
rc = rdm_cursorMoveToPosition (fathersChildren, mothersChildren);
if (rc == eNOTINCURSOR)
{
rc = sOKAY;
}
else if (rc == sOKAY)
{
mothersChildren, COL_CHILD_CHILD_NAME, name, sizeof (name),
NULL);
if (rc == sOKAY)
{
printf ("Common child: %s\n", name);
}
}
if (rc == sOKAY)
{
rc = rdm_cursorMoveToNext (mothersChildren);
}
}
if (rc == eNOTOWNER || rc == sENDOFCURSOR)
rc = sOKAY;
rdm_cursorFree (mothersChildren);
rdm_cursorFree (fathersChildren);
return rc;
}