/* * FILL.C */ #include "defs.h" void RuneSysCall_xFillRect(void *args, int *res) { struct { int32_t xid; int32_t gcid; int32_t sx; int32_t sy; int32_t w; int32_t h; } *rhs; pthread_mutex_t *mtx; rhs = args; if (rhs->w < 0) { rhs->sx += rhs->w; rhs->w = -rhs->w; } if (rhs->h < 0) { rhs->sy += rhs->h; rhs->h = -rhs->h; } *res = XFillRectangle(SaveDisplay, rhs->xid, hashLookup(rhs->gcid, HASH_GC, &mtx), rhs->sx, rhs->sy, rhs->w, rhs->h); threadMutexUnlock(mtx); }