DOKK / manpages / debian 10 / alliance / getptype.3.en
GETPTYPE(3) MBK UTILITY FUNCTIONS GETPTYPE(3)

getptype - retrieve a ptype from a ptype_list

See the file buster/alliance/alc_origin.1.en.gz.

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

Pointer to a ptype list
Flag indicating the pointer owner

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

getptype returns a pointer to the ptype that match the type. Be careful, it is not the ptype->DATA that is returned. If no ptype has the given type, then NULL is returned.

#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;
}	

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

See the file buster/alliance/alc_bug_report.1.en.gz.

October 1, 1997 ASIM/LIP6