5 static char *
rcsid=
"@(#)$Id: pixword.c,v 1.1.1.1 2003/11/20 07:46:30 eus Exp $";
9 #pragma init (init_object_module) 19 {
register int size3, size1, s1, s3, offset;
20 byte *rgb, *r, *
g, *b;
32 if (n>=5) offset=ckintval(argv[4]);
else offset=0;
34 rgbp=argv[0]; rp=argv[1]; gp=argv[2]; bp=argv[3];
37 if (n==6) size3=ckintval(argv[5]);
38 else size3=vecsize(rgbp);
41 for (s1=0, s3=0; s1<size1; s1++) {
42 r[offset+s1]=rgb[s3++];
43 g[offset+s1]=rgb[s3++];
44 b[offset+s1]=rgb[s3++];}
51 {
register int size3, size1, s1, s3, offset;
52 byte *rgb, *r, *
g, *b;
61 size1=vecsize(argv[0]);
66 offset=ckintval(argv[4]);
67 size3=vecsize(argv[0]);
68 for (s1=0, s3=0; s3<size3; s1++) {
69 rgb[s3++]=r[s1+offset];
70 rgb[s3++]=g[s1+offset];
71 rgb[s3++]=b[s1+offset];}
static void init_object_module()
pointer SPLIT_RGB(context *ctx, int n, pointer *argv)
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
void add_module_initializer(char *, pointer(*)())
pointer error(enum errorcode ec,...) pointer error(va_alist) va_dcl
pointer MERGE_RGB(context *ctx, int n, pointer *argv)