File:  [Plan 9 NeXT] / lucent / sys / src / libgnot / gaddr.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:01:05 2018 UTC (8 years, 1 month ago) by root
Branches: lucent, MAIN
CVS tags: plan9, HEAD
Plan 9 NeXT

#include <u.h>
#include <libg.h>
#include <gnot.h>

ulong *
gaddr(GBitmap *b, Point p)
{
	return b->base+b->zero+(p.y*b->width)+(p.x>>(5-b->ldepth));
}

uchar *
gbaddr(GBitmap *b, Point p)
{
	return (uchar*)(b->base+b->zero+(p.y*b->width))+(p.x>>(3-b->ldepth));
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.