8 #ifndef _MISCRW_DEFINED
10 #define _MISCRW_DEFINED
13 #if defined( INC_ALL )
49 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
54 RETVAL STDC_NONNULL_ARG( ( 1, 2 ) ) \
56 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
58 RETVAL STDC_NONNULL_ARG( ( 1, 2 ) ) \
60 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
65 #define sizeofString32( string, stringLength ) \
66 ( ( stringLength > 0 ) ? ( UINT32_SIZE + stringLength ) : \
67 ( UINT32_SIZE + strlen( string ) ) )
87 const int bufferMaxLength,
101 #define sizeofInteger16U( integerLength ) ( UINT16_SIZE + integerLength )
102 #define sizeofInteger32( integer, integerLength ) \
103 ( UINT32_SIZE + ( ( ( ( BYTE * ) integer )[ 0 ] & 0x80 ) ? 1 : 0 ) + \
171 int readBignumInteger16Ubits(
INOUT STREAM *stream,
177 int writeBignumInteger16Ubits(
INOUT STREAM *stream,
180 int sizeofBignumInteger32(
const void *bignum );
181 RETVAL STDC_NONNULL_ARG( ( 1, 2 ) ) \
187 RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
196 int readBignumInteger16UChecked(
INOUT STREAM *stream,
201 int readBignumInteger16UbitsChecked(
INOUT STREAM *stream,
206 int readBignumInteger32Checked(
INOUT STREAM *stream,
241 #define pgpSizeofLength( length ) \
242 ( ( length < 0 ) ? length : \
243 ( length <= 191 ) ? 1 : \
244 ( length <= 8383 ) ? 2 : 4 )