pr_impl_util.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Pixrect implementation utilities
*/
#ifndef _SYS_PR_IMPL_UTIL_H
#define _SYS_PR_IMPL_UTIL_H
#pragma ident "%Z%%M% %I% %E% SMI" /* SunOS 1.10 */
#ifdef __cplusplus
extern "C" {
#endif
/* Reiser cpp concatenation macros (which don't work in ANSI-C) */
#if defined(__STDC__) && !defined(__LIBCPP__)
#ifndef _CAT
#define _CAT(a, b) a##b
#endif
#else /* __STDC__ */
#ifndef _CAT
#define _IDENT(x) x
#endif
#endif /* __STDC__ */
/* code selection macros */
#define IFTRUE(a, b) a
#define IFFALSE(a, b) b
/* and together multiple options */
#ifdef _KERNEL
#else
#endif
/* lint */
#ifdef __lint
int _ZERO_; /* "constant in conditional context" workaround */
int _loop; /* "_loop redefinition hides earlier one" */
#else /* __lint */
#define _ZERO_ 0
#define _ONE_ 1
#endif /* __lint */
/* portability aids */
#ifdef mc68000
typedef short LOOP_T; /* loop variable (for dbra loops) */
#else /* mc68000 */
typedef int INT_T;
typedef int LOOP_T;
#endif /* mc68000 */
#if defined(__sparc)
#else
#endif
/* true if we can make 32 bit accesses on 16 bit boundaries */
#ifndef SHORT_ALIGN
#define SHORT_ALIGN (!defined(__sparc))
#endif
#if SHORT_ALIGN
#define IFSHORT_ALIGN IFTRUE
#else
#define IFSHORT_ALIGN IFFALSE
#endif
#ifndef LITTLE_ENDIAN
#endif
#if LITTLE_ENDIAN
#else
#endif
/*
* SunOS release number
* warning: these tests are fragile
*/
#ifdef _sys_types_h
#define SUNOS 41
#else /* _sys_types_h */
#ifdef NFDBITS
#define SUNOS 40
#else /* NFDBITS */
#define SUNOS 35
#endif /* NFDBITS */
#endif /* _sys_types_h */
#endif
#if SUNOS >= 40
#else
#endif
#if SUNOS >= 41
#else
#endif
/*
* misc. macros
*/
/* statement macro */
/* loop macros */
)
)
/* pointer manipulation */
/* unshifted pixrect op codes */
#define PIX_OPSRC (12)
#define PIX_OPDST (10)
#define PIX_OPCLR (0)
#define PIX_OPSET (15)
/* extract color and op code fields */
/* reverse video src or dst */
/* determine if op needs src or dst */
/* misc. data types */
typedef short MPR_T; /* type used for memory pixrect data */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PR_IMPL_UTIL_H */