Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GETPTYPE(3)		     MBK UTILITY FUNCTIONS		   GETPTYPE(3)

NAME
       getptype	- retrieve a ptype from	a ptype_list

SYNOPSYS
       #include	"mut.h"
       ptype_list *getptype(pthead,type)
       ptype_list *pthead;
       long type;

PARAMETERS
       pthead		   Pointer to a	ptype list

       type		   Flag	indicating the pointer owner

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

RETURN VALUE
       getptype	 returns a pointer to the ptype	that match the type.  Be care-
       ful, it is not the ptype-_DATA that is returned.	 If no ptype  has  the
       given type, then	NULL is	returned.

EXAMPLE
       #include	"mut.h"
       #include	"mph.h"
       void get_corner(ptfig, name, x2,	y2)
       phfig_list *ptfig;
       char *name;
       int *x2,	*y2;
       {
       phins_list *i = getphins(ptfig, name);
       ptype_list *p = getptype(i->USER, (long)PLACEABOX);
	  *x2 =	(num_list *)(p->DATA)->DATA;
	  *y2 =	(num_list *)(p->DATA)->NEXT->DATA;
       }

SEE ALSO
       mbk(1), ptype(3), addptype(3), freeptype(3), delptype(3).

ASIM/LIP6			October	1, 1997			   GETPTYPE(3)

NAME | SYNOPSYS | PARAMETERS | DESCRIPTION | RETURN VALUE | EXAMPLE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=getptype&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help