2 /* ###--------------------------------------------------------------### */
4 /* file : beh_rmvbepor.c */
5 /* date : Sep 3 1993 */
7 /* authors : Pirouz BAZARGAN SABET */
8 /* content : low-level function */
10 /* ###--------------------------------------------------------------### */
17 /* ###--------------------------------------------------------------### */
18 /* function : beh_rmvbepor */
19 /* description : delete a BEPOR structure and return the pointer of */
20 /* the next object. */
21 /* called func. : mbkfree */
22 /* ###--------------------------------------------------------------### */
24 struct bepor
*beh_rmvbepor (listbepor
, beporname
)
26 struct bepor
*listbepor
; /* list of bepor containing the object */
27 char *beporname
; /* name of the BEPOR to be deleted */
31 struct bepor
*ptlastpor
;
32 struct bepor
*ptbepor
;
34 if (listbepor
!= NULL
)
37 /* ###------------------------------------------------------### */
38 /* Search the object to be deleted */
39 /* ###------------------------------------------------------### */
41 headpor
.NEXT
= listbepor
;
44 while ((ptbepor
!= NULL
) && (ptbepor
->NAME
!= beporname
))
47 ptbepor
= ptbepor
->NEXT
;
53 /* ###------------------------------------------------------### */
54 /* If the object doesn't exist return the list without */
56 /* ###------------------------------------------------------### */
58 ptlastpor
->NEXT
= ptbepor
->NEXT
;
62 listbepor
= headpor
.NEXT
;