|
|
1.1 root 1: /* seq_del.c - delete a member from a sequence */
2:
3: #ifndef lint
4: static char *rcsid = "$Header: /f/osi/psap/RCS/seq_del.c,v 7.0 89/11/23 22:13:37 mrose Rel $";
5: #endif
6:
7: /*
8: * $Header: /f/osi/psap/RCS/seq_del.c,v 7.0 89/11/23 22:13:37 mrose Rel $
9: *
10: *
11: * $Log: seq_del.c,v $
12: * Revision 7.0 89/11/23 22:13:37 mrose
13: * Release 6.0
14: *
15: */
16:
17: /*
18: * NOTICE
19: *
20: * Acquisition, use, and distribution of this module and related
21: * materials are subject to the restrictions of a license agreement.
22: * Consult the Preface in the User's Manual for the full terms of
23: * this agreement.
24: *
25: */
26:
27:
28: /* LINTLIBRARY */
29:
30: #include <stdio.h>
31: #include "psap.h"
32:
33: /* */
34:
35: int seq_del (pe, i)
36: register PE pe;
37: register int i;
38: {
39: int offset;
40: register PE *p,
41: q;
42:
43: for (p = &pe -> pe_cons, offset = 0;
44: q = *p;
45: p = &q -> pe_next, offset = q -> pe_offset)
46: if (q -> pe_offset == i) {
47: if (((*p) = q -> pe_next) == NULLPE)
48: pe -> pe_cardinal = offset + 1;
49: pe_free (q);
50: return OK;
51: }
52: else
53: if (q -> pe_offset > i)
54: break;
55:
56: return pe_seterr (pe, PE_ERR_MBER, NOTOK);
57: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.