/* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/bpo_l_024.c,v $ * $Author: mpoole $ * $Date: 2002/10/07 09:37:36 $ * $Revision: 1.2 $ * ******************************************************************************* * * Change History * * $Log: bpo_l_024.c,v $ * Revision 1.2 2002/10/07 09:37:36 mpoole * Initial checkin of mplib1-3.1.0 * * Revision 1.1 2002/10/07 09:36:53 mpoole * Initial checkin of mplib1-3.1.0 * * ******************************************************************************* */ #ident "$Header: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/bpo_l_024.c,v 1.2 2002/10/07 09:37:36 mpoole Exp $" /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Code starts here ------------------------------------------------------------------ */ int bpo_Transfer_Lists( bpo_List_t *fl_ptr, bpo_List_t *tl_ptr ) { bpo_Node_t *n_ptr, *np2=NULL; void *base; int rv=0; /* Ensure both list are in same segment */ if ( (base=Get_SODB_Base( fl_ptr )) && (base == Get_SODB_Base( tl_ptr )) ) { while( (n_ptr=bpo_Remove_Head( fl_ptr )) ) { if (np2==n_ptr) break; /* Problem with list */ /* remember where we came from in case of loop */ np2=n_ptr; /* And put the item on the to list */ bpo_Add_Tail_Raw( tl_ptr, base, n_ptr ); rv++; } } return(rv); } /* -- End of File -- */