2 /* ###--------------------------------------------------------------### */
4 /* file : beh_rmvbeder.c */
5 /* date : Mar 22 1995 */
7 /* authors : Laurent VUILLEMIN */
8 /* content : low-level function */
10 /* ###--------------------------------------------------------------### */
17 /* ###--------------------------------------------------------------### */
18 /* function : beh_rmvbeder */
19 /* description : delete a BERIN structure and return the pointer of */
20 /* the next object. */
21 /* called func. : mbkfree */
22 /* ###--------------------------------------------------------------### */
24 beder_list
*beh_rmvbeder (listbeder
, bederindex
)
26 beder_list
*listbeder
; /* list of beder containing the object */
27 short bederindex
; /* index of the BEDER to be deleted */
31 struct beder
*ptlastder
;
32 struct beder
*ptbeder
;
34 if (listbeder
!= NULL
)
37 /* ###------------------------------------------------------### */
38 /* Search the object to be deleted */
39 /* ###------------------------------------------------------### */
41 headder
.NEXT
= listbeder
;
44 while ((ptbeder
!= NULL
) && (ptbeder
->INDEX
!= bederindex
))
47 ptbeder
= ptbeder
->NEXT
;
53 /* ###------------------------------------------------------### */
54 /* If the object doesn't exist return the list without */
56 /* ###------------------------------------------------------### */
59 ptlastder
->NEXT
= ptbeder
->NEXT
;
63 listbeder
= headder
.NEXT
;