#include #include "lx.h" #include "proto.h" #include "internal.h" void lx_PolySegment(LX_CONN *xc, LX_XID drawable, LX_XID gc, int nseg, const LX_SEGMENT *segs) { unsigned char *req; int i; int o; if ( (xc->flags & XCF_FAIL) || (nseg > ((65535-3)/2)) ) { lx__bad_call(xc,"lx_PolySegment"); return; } req = malloc(12+(8*nseg)); if (! req) { lx__nomem_fail(xc); return; } req[0] = XP_REQ_PolySegment; req[1] = 0; w_card16(&req[2],3+(2*nseg)); w_card32(&req[4],drawable); w_card32(&req[8],gc); o = 12; for (i=0;i