Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

portal(5) [hpux man page]

portal(5)							File Formats Manual							 portal(5)

NAME
portal - a "window to the future" for applications SYNOPSIS
DESCRIPTION
This header file is a "window to the future" for applications. It will help you to: o Write code that is portable across 32-bit and 64-bit systems, o Avoid undocumented assumptions about sizes of integral types, o Write portable code that needs to be explicit about the sizes of integral types, o Write code that is portable to a platform which has different sizes of integral types, and o Share frequently used macros that are portable across 32-bit and 64-bit systems. In addition to the macros defined in this file, it includes the header files (see limits(5)) and (see inttypes(5)). The following macros are defined in This macro can be used to create a mask that has one bit set. bit_num is the position of the bit to set, and type is the data type of the mask. A -1 is returned in the case of overflow or underflow. This macro can be used to set a bit in a mask. mask is the current value of the mask, bit_num is the position of the bit to set, and type is the data type of the mask. This macro can be used to return the bit position of the sign bit for the specified data type. type is the data type for which to return the position of the sign bit. This macro can be used to return a mask for the sign bit for the specified data type. type is the data type for which to return the sign bit mask. This macro can be used to do a sign extension from one data type to another. value is the current value that is to be sign-extended. old_type is the current data type of value and new_type is the new data type of value. This macro can be used to check if code has been compiled big or little endian. endian is an integer in which the result will be returned. The following macros can be used for print formatting and scan formatting of values of data types that can change in size based upon the compilation flag Examples of such data types are off_t and fpos_t. EXAMPLES
The macro in the following example will turn on the high bit in a 64-bit integer. The macro in the following example will be used to turn on all bits except the sign bit in a 32-bit integer. The macro in the following example will turn on the three least significant bits of the maximum integer. The macro in the following example will return the position of the sign bit in a 32-bit integer. The macro in the following example will return a sign bit mask for a 32-bit integer. The macro in the following example will convert the 8-bit integer stored in a char data type to a 64-bit integer and correctly extend the sign. The macro in the following example will store a 1 in endian if the compilation was big endian; otherwise, it will store a 0 in endian. AUTHOR
was developed by HP. FILES
SEE ALSO
inttypes(5), limits(5), printf(3S), scanf(3S). portal(5)

Check Out this Related Man Page

stdint(5)							File Formats Manual							 stdint(5)

NAME
stdint - integer types SYNOPSIS
DESCRIPTION
This header file defines sets of integer types having specified widths and corresponding sets of macros. It also defines macros that spec- ify limits of integer types corresponding to types defined in other standard headers. Since not all implementations are required to support all of the integer sizes defined in this manual page, the proper way to see if a par- ticular size of an integer is supported on the current implementation is to test the symbol that defines its maximum value. For example, if tests false, then that implementation does not support 64-bit unsigned signed integers. This header file defines the following integer data types for 8, 16, 32, and 64 bits. largest signed integer data type supported by implementation 8-bit signed integer 16-bit signed integer 32-bit signed integer 64-bit signed integer largest unsigned integer data type supported by implementation 8-bit unsigned integer 16-bit unsigned integer 32-bit unsigned integer 64-bit unsigned integer The following two data types are signed and unsigned integer data types that are large enough to hold a pointer. A pointer can be moved to or from these data types without corruption. signed integer type that is large enough to hold a pointer unsigned integer type that is large enough to hold a pointer This header file defines the following integer data types for determining the most efficient data types to use for integer values on a par- ticular implementation. most efficient signed integer data type supported by implementation most efficient signed integer of at least 8 bits most efficient signed integer of at least 16 bits most efficient signed integer of at least 32 bits most efficient signed integer of at least 64 bits most efficient unsigned integer data type supported by implementation most efficient unsigned integer of at least 8 bits most efficient unsigned integer of at least 16 bits most efficient unsigned integer of at least 32 bits most efficient unsigned integer of at least 64 bits This header file defines the following integer data types for compatibility with systems that do not fit the 16-bit or 32-bit word size model. These data types define the signed and unsigned integers of at least 8, 16, 32, and 64 bits. smallest signed integer of at least 8 bits smallest signed integer of at least 16 bits smallest signed integer of at least 32 bits smallest signed integer of at least 64 bits smallest unsigned integer of at least 8 bits smallest unsigned integer of at least 16 bits smallest unsigned integer of at least 32 bits smallest unsigned integer of at least 64 bits The following macros define the minimum and maximum values that can be stored in the above data types. minimum value that can be stored in the largest integer data type maximum value that can be stored in the largest signed integer data type maximum value that can be stored in the largest unsigned integer data type minimum value that can be stored in the most efficient integer data type maximum value that can be stored in the most efficient signed integer data type maximum value that can be stored in the most efficient unsigned integer data type minimum value that can be stored in an data type minimum value that can be stored in an data type minimum value that can be stored in an data type minimum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type" minimum value that can be stored in an data type minimum value that can be stored in an data type" minimum value that can be stored in an data type minimum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type minimum value that can be stored in an data type minimum value that can be stored in an data type minimum value that can be stored in an data type minimum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type maximum value that can be stored in an data type The following macros specify the maximum and minimum limits of integer types corresponding to types defined in other standard headers. All these values are implementation defined. minimum value that can be stored in data type maximum value that can be stored in data type minimum value that can be stored in data type maximum value that can be stored in data type maximum value that can be stored in data type minimum value that can be stored in data type maximum value that can be stored in data type minimum value that can be stored in data type maximum value that can be stored in data type The following macros expand to integer constant expressions suitable for initializing objects that have integer types corresponding to types defined in header. Macros For Minimum-Width Integer Constant Expressions The macro expands to an integer constant expression corresponding to the type The macro expands to an integer constant expression corresponding to the type For example, if is a name for the type then might expand to the integer constant Macros For Greatest-Width Integer Constant Expressions The following macro expands to an integer constant expression having the value specified by its argument and the type The following macro expands to an integer constant expression having the value specified by its argument and the type FILES
SEE ALSO
inttypes(5), standards(5), <stddef.h>, <wchar.h>, <signal.h>. stdint(5)
Man Page