Common System Definitions

For increased portability and convenience, Vermont Views #defines many data types and constants. Some of the most commonly used definitions are presented in Tables 3.4 and 3.5. You may use these data types and constants in your own code.

A more extensive listing of system-defined data types and #defines can be found in the Function Reference and the header files vv_sys.h.

Table 3.4: System-Defined Data Types

#define Equivalent Common Uses
UCHAR unsigned char Characters, video attributes
UINT unsigned int Bit flags, buffer sizes
PTR void * User pointers,
  UCHAR *1 generic pointers


1 For compilers that do not support void * in the ANSI standard way

Other #defined values commonly used in the system are listed in Table 3.5.

Table 3.5: Commonly Used #defines in Vermont Views

#define Equivalent
TRUE 1
FALSE 0
ON 1
OFF 0
YES 1
NO 0
NULLP (PTR) 0
NULLFP (PFI) 0
NULLPARM 0
SPACE ' '
NEWLINE '\n'
TAB '\t'
BACKSPACE '\b'

For the null definitions, NULLP is a null pointer and indicates to the system that no pointer is being passed where expected. NULLFP is a null function pointer and indicates to the system that no pointer to a function is being passed.

Note: According to the ANSI standard, any pointer can be assigned as PTR without generating a compiler warning since this indicates that the variable is a pointer and not of any specific data type. Vermont Views uses this convention.


Home Contents Previous Next