1GETPTYPE(3)                  MBK UTILITY FUNCTIONS                 GETPTYPE(3)
2
3
4

NAME

6       getptype - retrieve a ptype from a ptype_list
7

SYNOPSIS

9       #include "mut.h"
10       ptype_list ∗getptype(pthead,type)
11       ptype_list ∗pthead;
12       long type;
13

PARAMETERS

15       pthead              Pointer to a ptype list
16
17       type                Flag indicating the pointer owner
18

DESCRIPTION

20       getptype looks for a ptype element in the list pointed to by pthead.
21

RETURN VALUE

23       getptype  returns a pointer to the ptype that match the type.  Be care‐
24       ful, it is not the ptype->DATA that is returned.  If no ptype  has  the
25       given type, then NULL is returned.
26

EXAMPLE

28       #include "mut.h"
29       #include "mph.h"
30       void get_corner(ptfig, name, x2, y2)
31       phfig_list ∗ptfig;
32       char ∗name;
33       int ∗x2, ∗y2;
34       {
35       phins_list ∗i = getphins(ptfig, name);
36       ptype_list ∗p = getptype(i->USER, (long)PLACEABOX);
37          ∗x2 = (num_list ∗)(p->DATA)->DATA;
38          ∗y2 = (num_list ∗)(p->DATA)->NEXT->DATA;
39       }
40

SEE ALSO

42       mbk(1), ptype(3), addptype(3), freeptype(3), delptype(3).
43
44
45
46
47
48
49ASIM/LIP6                       October 1, 1997                    GETPTYPE(3)
Impressum