Harlequin RIP SDK
swvalues.h File Reference

This header file simply defines some value limits. More...

#include "hqtypes.h"

Macros

#define BIGGEST_INTEGER   (( SYSTEMVALUE ) 2147483648.0 )
 
#define intrange(val)   (( -BIGGEST_INTEGER - 1.0 < (val)) && ((val) < BIGGEST_INTEGER ))
 
#define BIGGEST_REAL   3.402823466e+38F
 
#define SMALLEST_REAL   1.175494351e-38F
 
#define realrange(val)   (( -BIGGEST_REAL < (val)) && ((val) < BIGGEST_REAL ))
 
#define realprecision(val)   (!(( -SMALLEST_REAL < (val)) && ((val) < SMALLEST_REAL )))
 
#define CAST_SYSTEMVALUE_TO_USERVALUE(sval)   (realprecision(sval) ? (USERVALUE)(sval) : 0.0f)
 
#define LONGESTFILENAME   2048
 

Typedefs

typedef float USERVALUE
 
typedef double SYSTEMVALUE
 

Detailed Description

This header file simply defines some value limits.

Copyright (C) 2019 Global Graphics Software Ltd. All rights reserved. Global Graphics Software Ltd. Confidential Information.

Macro Definition Documentation

◆ BIGGEST_INTEGER

#define BIGGEST_INTEGER   (( SYSTEMVALUE ) 2147483648.0 )

The range macros and values in this file refer to the range of integers and reals representable in a PostScript object, not in any underlying system type. These definitions should only be changed if the ranges representable in PostScript change.

◆ BIGGEST_REAL

#define BIGGEST_REAL   3.402823466e+38F

The largest number representable in a USERVALUE.

◆ CAST_SYSTEMVALUE_TO_USERVALUE

#define CAST_SYSTEMVALUE_TO_USERVALUE (   sval)    (realprecision(sval) ? (USERVALUE)(sval) : 0.0f)

Check for underflow casting to USERVALUE.

◆ intrange

#define intrange (   val)    (( -BIGGEST_INTEGER - 1.0 < (val)) && ((val) < BIGGEST_INTEGER ))

Predicate for the range of values representable in an int32, tested using real values.

◆ LONGESTFILENAME

#define LONGESTFILENAME   2048

This is the longest file name allowed by the Core RIP. If the operating system on which the RIP is running does not support filenames this long, then filename mapping ought to be supported. It is this big because not all devices map onto a real file system (for example SOAR's host device).

◆ realprecision

#define realprecision (   val)    (!(( -SMALLEST_REAL < (val)) && ((val) < SMALLEST_REAL )))

Predicate to determine if a value will is denormalise, raise an exception, or round to zero if stored in a USERVALUE.

◆ realrange

#define realrange (   val)    (( -BIGGEST_REAL < (val)) && ((val) < BIGGEST_REAL ))

Predicate to determine if a value is in the range for USERVALUE.

◆ SMALLEST_REAL

#define SMALLEST_REAL   1.175494351e-38F

The smallest normal number representable in a USERVALUE.

Typedef Documentation

◆ SYSTEMVALUE

typedef double SYSTEMVALUE

SYSTEMVALUEs are for internal calculations performed by the RIP. They must be able to represent values at least as large and as precisely as both integers and reals derived from the PostScript world (i.e. int32 and USERVALUE).

◆ USERVALUE

typedef float USERVALUE

USERVALUEs are for values stored in, and derived from, PostScript objects (i.e. they came from the user). The definitions here for the range of USERVALUE assume the use of the IEEE format for (4 byte) floats.