freerdp: change uint8, sint8, uint16, sint16 to BYTE, INT8, UINT16, INT16
authorMarc-André Moreau <marcandre.moreau@gmail.com>
Tue, 9 Oct 2012 07:01:37 +0000 (03:01 -0400)
committerMarc-André Moreau <marcandre.moreau@gmail.com>
Tue, 9 Oct 2012 07:01:37 +0000 (03:01 -0400)
287 files changed:
channels/audin/client/alsa/audin_alsa.c
channels/audin/client/audin_main.c
channels/audin/client/audin_main.h
channels/audin/client/pulse/audin_pulse.c
channels/audin/server/audin.c
channels/cliprdr/client/cliprdr_format.c
channels/cliprdr/client/cliprdr_format.h
channels/cliprdr/client/cliprdr_main.c
channels/cliprdr/client/cliprdr_main.h
channels/disk/client/disk_file.c
channels/disk/client/disk_file.h
channels/disk/client/disk_main.c
channels/drdynvc/client/drdynvc_main.c
channels/drdynvc/client/drdynvc_main.h
channels/drdynvc/client/dvcman.c
channels/drdynvc/client/dvcman.h
channels/parallel/client/parallel_main.c
channels/printer/client/printer_cups.c
channels/printer/client/printer_main.c
channels/printer/client/printer_main.h
channels/printer/client/printer_win.c
channels/rail/client/rail_main.c
channels/rail/client/rail_main.h
channels/rail/client/rail_orders.c
channels/rdpdr/client/irp.c
channels/rdpdr/client/rdpdr_capabilities.c
channels/rdpdr/client/rdpdr_main.c
channels/rdpdr/client/rdpdr_main.h
channels/rdpsnd/client/MacAudio/rdpsnd_audio_q.c
channels/rdpsnd/client/alsa/rdpsnd_alsa.c
channels/rdpsnd/client/pulse/rdpsnd_pulse.c
channels/rdpsnd/client/rdpsnd_main.c
channels/rdpsnd/client/rdpsnd_main.h
channels/rdpsnd/server/rdpsnd.c
channels/serial/client/serial_main.c
channels/serial/client/serial_tty.c
channels/serial/client/serial_tty.h
channels/smartcard/client/scard_main.c
channels/smartcard/client/scard_operations.c
channels/tsmf/client/alsa/tsmf_alsa.c
channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
channels/tsmf/client/gstreamer/tsmf_gstreamer.c
channels/tsmf/client/pulse/tsmf_pulse.c
channels/tsmf/client/tsmf_audio.h
channels/tsmf/client/tsmf_codec.c
channels/tsmf/client/tsmf_decoder.h
channels/tsmf/client/tsmf_ifman.c
channels/tsmf/client/tsmf_ifman.h
channels/tsmf/client/tsmf_main.c
channels/tsmf/client/tsmf_media.c
channels/tsmf/client/tsmf_media.h
channels/tsmf/client/tsmf_types.h
channels/urbdrc/client/data_transfer.c
channels/urbdrc/client/isoch_queue.h
channels/urbdrc/client/searchman.c
channels/urbdrc/client/searchman.h
channels/urbdrc/client/urbdrc_main.c
channels/urbdrc/client/urbdrc_main.h
channels/urbdrc/libusb/libusb_udevice.c
channels/urbdrc/libusb/libusb_udevice.h
channels/urbdrc/libusb/libusb_udevman.c
channels/urbdrc/libusb/request_queue.c
channels/urbdrc/libusb/request_queue.h
client/DirectFB/df_event.c
client/DirectFB/df_graphics.c
client/DirectFB/dfreerdp.c
client/Mac/MRDPCursor.h
client/Mac/MRDPRailView.h
client/Mac/MRDPView.h
client/Sample/freerdp.c
client/Windows/wf_event.c
client/Windows/wf_gdi.c
client/Windows/wf_gdi.h
client/Windows/wf_graphics.c
client/Windows/wf_graphics.h
client/Windows/wf_rail.c
client/Windows/wf_rail.h
client/Windows/wfreerdp.c
client/Windows/wfreerdp.h
client/X11/xf_cliprdr.c
client/X11/xf_event.c
client/X11/xf_gdi.c
client/X11/xf_graphics.c
client/X11/xf_keyboard.c
client/X11/xf_keyboard.h
client/X11/xf_rail.c
client/X11/xf_rail.h
client/X11/xf_tsmf.c
client/X11/xf_window.c
client/X11/xf_window.h
client/X11/xfreerdp.c
client/X11/xfreerdp.h
cunit/test_bitmap.c
cunit/test_cliprdr.c
cunit/test_color.c
cunit/test_drdynvc.c
cunit/test_freerdp.c
cunit/test_freerdp.h
cunit/test_gcc.c
cunit/test_gdi.c
cunit/test_license.c
cunit/test_mcs.c
cunit/test_mppc.c
cunit/test_mppc_enc.c
cunit/test_nsc.c
cunit/test_ntlm.c
cunit/test_orders.c
cunit/test_pcap.c
cunit/test_rail.c
cunit/test_rfx.c
include/freerdp/altsec.h
include/freerdp/channels/rdpsnd.h
include/freerdp/channels/wtsvc.h
include/freerdp/client/cliprdr.h
include/freerdp/client/tsmf.h
include/freerdp/codec/bitmap.h
include/freerdp/codec/color.h
include/freerdp/codec/jpeg.h
include/freerdp/codec/mppc_dec.h
include/freerdp/codec/mppc_enc.h
include/freerdp/codec/nsc.h
include/freerdp/codec/rfx.h
include/freerdp/crypto/ber.h
include/freerdp/crypto/crypto.h
include/freerdp/crypto/der.h
include/freerdp/crypto/er.h
include/freerdp/crypto/per.h
include/freerdp/crypto/tls.h
include/freerdp/dvc.h
include/freerdp/freerdp.h
include/freerdp/gdi/16bpp.h
include/freerdp/gdi/8bpp.h
include/freerdp/gdi/bitmap.h
include/freerdp/gdi/gdi.h
include/freerdp/gdi/pen.h
include/freerdp/graphics.h
include/freerdp/input.h
include/freerdp/listener.h
include/freerdp/peer.h
include/freerdp/pointer.h
include/freerdp/primary.h
include/freerdp/rail.h
include/freerdp/rail/icon.h
include/freerdp/rail/rail.h
include/freerdp/rail/window.h
include/freerdp/scancode.h
include/freerdp/secondary.h
include/freerdp/settings.h
include/freerdp/types.h
include/freerdp/update.h
include/freerdp/utils/dsp.h
include/freerdp/utils/event.h
include/freerdp/utils/hexdump.h
include/freerdp/utils/msusb.h
include/freerdp/utils/pcap.h
include/freerdp/utils/rail.h
include/freerdp/utils/stream.h
include/freerdp/utils/tcp.h
include/freerdp/window.h
libfreerdp/cache/bitmap.c
libfreerdp/cache/brush.c
libfreerdp/cache/glyph.c
libfreerdp/cache/offscreen.c
libfreerdp/channels/wtsvc.c
libfreerdp/channels/wtsvc.h
libfreerdp/codec/bitmap.c
libfreerdp/codec/color.c
libfreerdp/codec/include/bitmap.c
libfreerdp/codec/jpeg.c
libfreerdp/codec/mppc_dec.c
libfreerdp/codec/mppc_enc.c
libfreerdp/codec/nsc.c
libfreerdp/codec/nsc_encode.c
libfreerdp/codec/nsc_encode.h
libfreerdp/codec/nsc_sse2.c
libfreerdp/codec/nsc_types.h
libfreerdp/codec/rfx.c
libfreerdp/codec/rfx_bitstream.h
libfreerdp/codec/rfx_decode.c
libfreerdp/codec/rfx_decode.h
libfreerdp/codec/rfx_differential.c
libfreerdp/codec/rfx_differential.h
libfreerdp/codec/rfx_dwt.c
libfreerdp/codec/rfx_dwt.h
libfreerdp/codec/rfx_encode.c
libfreerdp/codec/rfx_encode.h
libfreerdp/codec/rfx_neon.c
libfreerdp/codec/rfx_pool.c
libfreerdp/codec/rfx_quantization.c
libfreerdp/codec/rfx_quantization.h
libfreerdp/codec/rfx_rlgr.c
libfreerdp/codec/rfx_rlgr.h
libfreerdp/codec/rfx_sse2.c
libfreerdp/codec/rfx_types.h
libfreerdp/core/activation.c
libfreerdp/core/activation.h
libfreerdp/core/capabilities.c
libfreerdp/core/certificate.c
libfreerdp/core/certificate.h
libfreerdp/core/channel.c
libfreerdp/core/channel.h
libfreerdp/core/connection.c
libfreerdp/core/fastpath.c
libfreerdp/core/fastpath.h
libfreerdp/core/freerdp.c
libfreerdp/core/gcc.c
libfreerdp/core/gcc.h
libfreerdp/core/graphics.c
libfreerdp/core/http.c
libfreerdp/core/info.c
libfreerdp/core/input.c
libfreerdp/core/input.h
libfreerdp/core/license.c
libfreerdp/core/license.h
libfreerdp/core/listener.c
libfreerdp/core/mcs.c
libfreerdp/core/mcs.h
libfreerdp/core/nego.c
libfreerdp/core/nego.h
libfreerdp/core/orders.c
libfreerdp/core/orders.h
libfreerdp/core/peer.c
libfreerdp/core/rdp.c
libfreerdp/core/rdp.h
libfreerdp/core/redirection.c
libfreerdp/core/rpc.c
libfreerdp/core/rpc.h
libfreerdp/core/rts.c
libfreerdp/core/rts.h
libfreerdp/core/security.c
libfreerdp/core/security.h
libfreerdp/core/surface.c
libfreerdp/core/surface.h
libfreerdp/core/tcp.c
libfreerdp/core/tcp.h
libfreerdp/core/timezone.c
libfreerdp/core/tpdu.c
libfreerdp/core/tpdu.h
libfreerdp/core/tpkt.c
libfreerdp/core/tpkt.h
libfreerdp/core/transport.c
libfreerdp/core/transport.h
libfreerdp/core/tsg.c
libfreerdp/core/tsg.h
libfreerdp/core/update.c
libfreerdp/core/window.c
libfreerdp/crypto/ber.c
libfreerdp/crypto/crypto.c
libfreerdp/crypto/der.c
libfreerdp/crypto/er.c
libfreerdp/crypto/nla.c
libfreerdp/crypto/per.c
libfreerdp/crypto/tls.c
libfreerdp/gdi/16bpp.c
libfreerdp/gdi/32bpp.c
libfreerdp/gdi/8bpp.c
libfreerdp/gdi/bitmap.c
libfreerdp/gdi/gdi.c
libfreerdp/gdi/gdi.h
libfreerdp/gdi/graphics.c
libfreerdp/gdi/graphics.h
libfreerdp/gdi/pen.c
libfreerdp/gdi/shape.c
libfreerdp/locale/timezone.c
libfreerdp/rail/icon.c
libfreerdp/utils/args.c
libfreerdp/utils/bitmap.c
libfreerdp/utils/dsp.c
libfreerdp/utils/event.c
libfreerdp/utils/hexdump.c
libfreerdp/utils/msusb.c
libfreerdp/utils/rail.c
libfreerdp/utils/stream.c
libfreerdp/utils/tcp.c
scripts/LECHash.c
scripts/LOMHash.c
server/Sample/sfreerdp.c
server/Sample/sfreerdp.h
server/Windows/wf_info.c
server/Windows/wf_info.h
server/Windows/wf_input.c
server/Windows/wf_input.h
server/Windows/wf_interface.c
server/Windows/wf_update.c
server/X11/xf_input.c
server/X11/xf_input.h
server/X11/xf_peer.c

index 2e71da3..baeec2e 100644 (file)
@@ -51,7 +51,7 @@ typedef struct _AudinALSADevice
 
        freerdp_thread* thread;
 
-       uint8* buffer;
+       BYTE* buffer;
        int buffer_frames;
 
        AudinReceive receive;
@@ -93,13 +93,13 @@ static BOOL audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_hand
        return TRUE;
 }
 
-static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int size)
+static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src, int size)
 {
        int frames;
        int cframes;
        int ret = 0;
        int encoded_size;
-       uint8* encoded_data;
+       BYTE* encoded_data;
        int rbytes_per_frame;
        int tbytes_per_frame;
 
@@ -173,7 +173,7 @@ static BOOL audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int siz
 static void* audin_alsa_thread_func(void* arg)
 {
        int error;
-       uint8* buffer;
+       BYTE* buffer;
        int rbytes_per_frame;
        int tbytes_per_frame;
        snd_pcm_t* capture_handle = NULL;
@@ -183,9 +183,9 @@ static void* audin_alsa_thread_func(void* arg)
 
        rbytes_per_frame = alsa->actual_channels * alsa->bytes_per_channel;
        tbytes_per_frame = alsa->target_channels * alsa->bytes_per_channel;
-       alsa->buffer = (uint8*) xzalloc(tbytes_per_frame * alsa->frames_per_packet);
+       alsa->buffer = (BYTE*) xzalloc(tbytes_per_frame * alsa->frames_per_packet);
        alsa->buffer_frames = 0;
-       buffer = (uint8*) xzalloc(rbytes_per_frame * alsa->frames_per_packet);
+       buffer = (BYTE*) xzalloc(rbytes_per_frame * alsa->frames_per_packet);
        freerdp_dsp_context_reset_adpcm(alsa->dsp_context);
        do
        {
index d0da0f9..6d6f397 100644 (file)
@@ -74,8 +74,8 @@ struct _AUDIN_PLUGIN
        AUDIN_LISTENER_CALLBACK* listener_callback;
 
        /* Parsed plugin data */
-       uint16 fixed_format;
-       uint16 fixed_channel;   
+       UINT16 fixed_format;
+       UINT16 fixed_channel;   
        uint32 fixed_rate;
 
        /* Device interface */
@@ -94,7 +94,7 @@ static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, S
        DEBUG_DVC("Version=%d", Version);
 
        out = stream_new(5);
-       stream_write_uint8(out, MSG_SNDIN_VERSION);
+       stream_write_BYTE(out, MSG_SNDIN_VERSION);
        stream_write_uint32(out, Version);
        error = callback->channel->Write(callback->channel, stream_get_length(s), stream_get_head(s), NULL);
        stream_free(out);
@@ -104,7 +104,7 @@ static int audin_process_version(IWTSVirtualChannelCallback* pChannelCallback, S
 
 static int audin_send_incoming_data_pdu(IWTSVirtualChannelCallback* pChannelCallback)
 {
-       uint8 out_data[1];
+       BYTE out_data[1];
        AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
 
        out_data[0] = MSG_SNDIN_DATA_INCOMING;
@@ -116,7 +116,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S
        AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
        AUDIN_PLUGIN* audin = (AUDIN_PLUGIN*) callback->plugin;
        uint32 i;
-       uint8* fm;
+       BYTE* fm;
        int error;
        STREAM* out;
        uint32 NumFormats;
@@ -141,13 +141,13 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S
        for (i = 0; i < NumFormats; i++)
        {
                stream_get_mark(s, fm);
-               stream_read_uint16(s, format.wFormatTag);
-               stream_read_uint16(s, format.nChannels);
+               stream_read_UINT16(s, format.wFormatTag);
+               stream_read_UINT16(s, format.nChannels);
                stream_read_uint32(s, format.nSamplesPerSec);
                stream_seek_uint32(s); /* nAvgBytesPerSec */
-               stream_read_uint16(s, format.nBlockAlign);
-               stream_read_uint16(s, format.wBitsPerSample);
-               stream_read_uint16(s, format.cbSize);
+               stream_read_UINT16(s, format.nBlockAlign);
+               stream_read_UINT16(s, format.wBitsPerSample);
+               stream_read_UINT16(s, format.cbSize);
                format.data = stream_get_tail(s);
                stream_seek(s, format.cbSize);
                
@@ -179,7 +179,7 @@ static int audin_process_formats(IWTSVirtualChannelCallback* pChannelCallback, S
        cbSizeFormatsPacket = stream_get_pos(out);
        stream_set_pos(out, 0);
 
-       stream_write_uint8(out, MSG_SNDIN_FORMATS); /* Header (1 byte) */
+       stream_write_BYTE(out, MSG_SNDIN_FORMATS); /* Header (1 byte) */
        stream_write_uint32(out, callback->formats_count); /* NumFormats (4 bytes) */
        stream_write_uint32(out, cbSizeFormatsPacket); /* cbSizeFormatsPacket (4 bytes) */
 
@@ -196,7 +196,7 @@ static int audin_send_format_change_pdu(IWTSVirtualChannelCallback* pChannelCall
        AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
 
        out = stream_new(5);
-       stream_write_uint8(out, MSG_SNDIN_FORMATCHANGE);
+       stream_write_BYTE(out, MSG_SNDIN_FORMATCHANGE);
        stream_write_uint32(out, NewFormat);
        error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL);
        stream_free(out);
@@ -211,7 +211,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac
        AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) pChannelCallback;
 
        out = stream_new(5);
-       stream_write_uint8(out, MSG_SNDIN_OPEN_REPLY);
+       stream_write_BYTE(out, MSG_SNDIN_OPEN_REPLY);
        stream_write_uint32(out, Result);
        error = callback->channel->Write(callback->channel, 5, stream_get_head(out), NULL);
        stream_free(out);
@@ -219,7 +219,7 @@ static int audin_send_open_reply_pdu(IWTSVirtualChannelCallback* pChannelCallbac
        return error;
 }
 
-static BOOL audin_receive_wave_data(uint8* data, int size, void* user_data)
+static BOOL audin_receive_wave_data(BYTE* data, int size, void* user_data)
 {
        int error;
        STREAM* out;
@@ -231,7 +231,7 @@ static BOOL audin_receive_wave_data(uint8* data, int size, void* user_data)
                return FALSE;
 
        out = stream_new(size + 1);
-       stream_write_uint8(out, MSG_SNDIN_DATA);
+       stream_write_BYTE(out, MSG_SNDIN_DATA);
        stream_write(out, data, size);
        error = callback->channel->Write(callback->channel, stream_get_length(out), stream_get_head(out), NULL);
        stream_free(out);
@@ -305,16 +305,16 @@ static int audin_process_format_change(IWTSVirtualChannelCallback* pChannelCallb
        return 0;
 }
 
-static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, uint8* pBuffer)
+static int audin_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* pBuffer)
 {
        int error;
        STREAM* s;
-       uint8 MessageId;
+       BYTE MessageId;
 
        s = stream_new(0);
        stream_attach(s, pBuffer, cbSize);
 
-       stream_read_uint8(s, MessageId);
+       stream_read_BYTE(s, MessageId);
 
        DEBUG_DVC("MessageId=0x%x", MessageId);
 
@@ -365,7 +365,7 @@ static int audin_on_close(IWTSVirtualChannelCallback* pChannelCallback)
 }
 
 static int audin_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
-       IWTSVirtualChannel* pChannel, uint8* Data, int* pbAccept,
+       IWTSVirtualChannel* pChannel, BYTE* Data, int* pbAccept,
        IWTSVirtualChannelCallback** ppCallback)
 {
        AUDIN_CHANNEL_CALLBACK* callback;
index 7510058..60bfbcd 100644 (file)
 #define DEBUG_DVC(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
 #endif
 
-typedef BOOL (*AudinReceive) (uint8* data, int size, void* user_data);
+typedef BOOL (*AudinReceive) (BYTE* data, int size, void* user_data);
 
 typedef struct audin_format audinFormat;
 struct audin_format
 {
-       uint16 wFormatTag;
-       uint16 nChannels;
+       UINT16 wFormatTag;
+       UINT16 nChannels;
        uint32 nSamplesPerSec;
-       uint16 nBlockAlign;
-       uint16 wBitsPerSample;
-       uint16 cbSize;
-       uint8* data;
+       UINT16 nBlockAlign;
+       UINT16 wBitsPerSample;
+       UINT16 cbSize;
+       BYTE* data;
 };
 
 typedef struct _IAudinDevice IAudinDevice;
index 0c74f49..3b86afa 100644 (file)
@@ -48,7 +48,7 @@ typedef struct _AudinPulseDevice
        FREERDP_DSP_CONTEXT* dsp_context;
 
        int bytes_per_frame;
-       uint8* buffer;
+       BYTE* buffer;
        int buffer_frames;
 
        AudinReceive receive;
@@ -281,9 +281,9 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length
        int cframes;
        BOOL ret;
        const void* data;
-       const uint8* src;
+       const BYTE* src;
        int encoded_size;
-       uint8* encoded_data;
+       BYTE* encoded_data;
        AudinPulseDevice* pulse = (AudinPulseDevice*) userdata;
 
        pa_stream_peek(stream, &data, &length);
@@ -291,7 +291,7 @@ static void audin_pulse_stream_request_callback(pa_stream* stream, size_t length
 
        DEBUG_DVC("length %d frames %d", (int) length, frames);
 
-       src = (const uint8*) data;
+       src = (const BYTE*) data;
        while (frames > 0)
        {
                cframes = pulse->frames_per_packet - pulse->buffer_frames;
index 8d14abe..9298790 100644 (file)
@@ -68,7 +68,7 @@ static void audin_server_select_format(audin_server_context* context, int client
 
 static void audin_server_send_version(audin_server* audin, STREAM* s)
 {
-       stream_write_uint8(s, MSG_SNDIN_VERSION);
+       stream_write_BYTE(s, MSG_SNDIN_VERSION);
        stream_write_uint32(s, 1); /* Version (4 bytes) */
        WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL);
 }
@@ -92,7 +92,7 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s)
        uint32 nAvgBytesPerSec;
 
        stream_set_pos(s, 0);
-       stream_write_uint8(s, MSG_SNDIN_FORMATS);
+       stream_write_BYTE(s, MSG_SNDIN_FORMATS);
        stream_write_uint32(s, audin->context.num_server_formats); /* NumFormats (4 bytes) */
        stream_write_uint32(s, 0); /* cbSizeFormatsPacket (4 bytes), client-to-server only */
 
@@ -102,13 +102,13 @@ static void audin_server_send_formats(audin_server* audin, STREAM* s)
                        audin->context.server_formats[i].nChannels *
                        audin->context.server_formats[i].wBitsPerSample / 8;
                stream_check_size(s, 18);
-               stream_write_uint16(s, audin->context.server_formats[i].wFormatTag);
-               stream_write_uint16(s, audin->context.server_formats[i].nChannels);
+               stream_write_UINT16(s, audin->context.server_formats[i].wFormatTag);
+               stream_write_UINT16(s, audin->context.server_formats[i].nChannels);
                stream_write_uint32(s, audin->context.server_formats[i].nSamplesPerSec);
                stream_write_uint32(s, nAvgBytesPerSec);
-               stream_write_uint16(s, audin->context.server_formats[i].nBlockAlign);
-               stream_write_uint16(s, audin->context.server_formats[i].wBitsPerSample);
-               stream_write_uint16(s, audin->context.server_formats[i].cbSize);
+               stream_write_UINT16(s, audin->context.server_formats[i].nBlockAlign);
+               stream_write_UINT16(s, audin->context.server_formats[i].wBitsPerSample);
+               stream_write_UINT16(s, audin->context.server_formats[i].cbSize);
                if (audin->context.server_formats[i].cbSize)
                {
                        stream_check_size(s, audin->context.server_formats[i].cbSize);
@@ -144,13 +144,13 @@ static BOOL audin_server_recv_formats(audin_server* audin, STREAM* s, uint32 len
                        return FALSE;
                }
 
-               stream_read_uint16(s, audin->context.client_formats[i].wFormatTag);
-               stream_read_uint16(s, audin->context.client_formats[i].nChannels);
+               stream_read_UINT16(s, audin->context.client_formats[i].wFormatTag);
+               stream_read_UINT16(s, audin->context.client_formats[i].nChannels);
                stream_read_uint32(s, audin->context.client_formats[i].nSamplesPerSec);
                stream_seek_uint32(s); /* nAvgBytesPerSec */
-               stream_read_uint16(s, audin->context.client_formats[i].nBlockAlign);
-               stream_read_uint16(s, audin->context.client_formats[i].wBitsPerSample);
-               stream_read_uint16(s, audin->context.client_formats[i].cbSize);
+               stream_read_UINT16(s, audin->context.client_formats[i].nBlockAlign);
+               stream_read_UINT16(s, audin->context.client_formats[i].wBitsPerSample);
+               stream_read_UINT16(s, audin->context.client_formats[i].cbSize);
                if (audin->context.client_formats[i].cbSize > 0)
                {
                        stream_seek(s, audin->context.client_formats[i].cbSize);
@@ -170,7 +170,7 @@ static void audin_server_send_open(audin_server* audin, STREAM* s)
        audin->opened = TRUE;
 
        stream_set_pos(s, 0);
-       stream_write_uint8(s, MSG_SNDIN_OPEN);
+       stream_write_BYTE(s, MSG_SNDIN_OPEN);
        stream_write_uint32(s, audin->context.frames_per_packet); /* FramesPerPacket (4 bytes) */
        stream_write_uint32(s, audin->context.selected_client_format); /* initialFormat (4 bytes) */
        /*
@@ -178,13 +178,13 @@ static void audin_server_send_open(audin_server* audin, STREAM* s)
         * The second format specify the format that SHOULD be used to capture data from
         * the actual audio input device.
         */
-       stream_write_uint16(s, 1); /* wFormatTag = PCM */
-       stream_write_uint16(s, 2); /* nChannels */
+       stream_write_UINT16(s, 1); /* wFormatTag = PCM */
+       stream_write_UINT16(s, 2); /* nChannels */
        stream_write_uint32(s, 44100); /* nSamplesPerSec */
        stream_write_uint32(s, 44100 * 2 * 2); /* nAvgBytesPerSec */
-       stream_write_uint16(s, 4); /* nBlockAlign */
-       stream_write_uint16(s, 16); /* wBitsPerSample */
-       stream_write_uint16(s, 0); /* cbSize */
+       stream_write_UINT16(s, 4); /* nBlockAlign */
+       stream_write_UINT16(s, 16); /* wBitsPerSample */
+       stream_write_UINT16(s, 0); /* cbSize */
 
        WTSVirtualChannelWrite(audin->audin_channel, stream_get_head(s), stream_get_length(s), NULL);
 }
@@ -207,7 +207,7 @@ static BOOL audin_server_recv_data(audin_server* audin, STREAM* s, uint32 length
        rdpsndFormat* format;
        int sbytes_per_sample;
        int sbytes_per_frame;
-       uint8* src;
+       BYTE* src;
        int size;
        int frames;
 
@@ -265,7 +265,7 @@ static void* audin_server_thread_func(void* arg)
        void* fd;
        STREAM* s;
        void* buffer;
-       uint8 MessageId;
+       BYTE MessageId;
        BOOL ready = FALSE;
        uint32 bytes_returned = 0;
        audin_server* audin = (audin_server*) arg;
@@ -324,7 +324,7 @@ static void* audin_server_thread_func(void* arg)
                if (bytes_returned < 1)
                        continue;
 
-               stream_read_uint8(s, MessageId);
+               stream_read_BYTE(s, MessageId);
                bytes_returned--;
                switch (MessageId)
                {
index f60a46c..d079dee 100644 (file)
@@ -109,7 +109,7 @@ static void cliprdr_send_format_list_response(cliprdrPlugin* cliprdr)
        cliprdr_packet_send(cliprdr, s);
 }
 
-void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, uint16 flags)
+void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags)
 {
        int i;
        BOOL ascii;
@@ -153,10 +153,10 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3
        }
 }
 
-void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, uint16 flags)
+void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32 length, UINT16 flags)
 {
        int allocated_formats = 8;
-       uint8* end_mark;
+       BYTE* end_mark;
        CLIPRDR_FORMAT_NAME* format_name;
        
        stream_get_mark(s, end_mark);
@@ -167,7 +167,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32
 
        while (stream_get_left(s) >= 6)
        {
-               uint8* p;
+               BYTE* p;
                int name_len;
                
                if (cliprdr->num_format_names >= allocated_formats)
@@ -194,7 +194,7 @@ void cliprdr_process_long_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint32
        }
 }
 
-void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
+void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
 {
        int i;
        uint32 format;
@@ -207,7 +207,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL
 
        if (dataLen > 0)
        {
-               cb_event->raw_format_data = (uint8*) malloc(dataLen);
+               cb_event->raw_format_data = (BYTE*) malloc(dataLen);
                memcpy(cb_event->raw_format_data, stream_get_tail(s), dataLen);
                cb_event->raw_format_data_size = dataLen;
        }
@@ -286,7 +286,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL
        cliprdr_send_format_list_response(cliprdr);
 }
 
-void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
+void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
 {
        /* where is this documented? */
 #if 0
@@ -300,7 +300,7 @@ void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uin
 #endif
 }
 
-void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
+void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
 {
        RDP_CB_DATA_REQUEST_EVENT* cb_event;
 
@@ -341,7 +341,7 @@ void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DA
        cliprdr_packet_send(cliprdr, s);
 }
 
-void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags)
+void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags)
 {
        RDP_CB_DATA_RESPONSE_EVENT* cb_event;
 
@@ -351,7 +351,7 @@ void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uin
        if (dataLen > 0)
        {
                cb_event->size = dataLen;
-               cb_event->data = (uint8*) malloc(dataLen);
+               cb_event->data = (BYTE*) malloc(dataLen);
                memcpy(cb_event->data, stream_get_tail(s), dataLen);
        }
 
index e4580a8..df04240 100644 (file)
 #define __CLIPRDR_FORMAT_H
 
 void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIST_EVENT* cb_event);
-void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
-void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
+void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
+void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
 
-void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
+void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
 void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event);
 
 void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_REQUEST_EVENT* cb_event);
-void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags);
+void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, UINT16 msgFlags);
 
 #endif /* __CLIPRDR_FORMAT_H */
index e59a7c5..101c2fa 100644 (file)
@@ -55,13 +55,13 @@ static const char* const CB_MSG_TYPE_STRINGS[] =
        "CB_UNLOCK_CLIPDATA"
 };
 
-STREAM* cliprdr_packet_new(uint16 msgType, uint16 msgFlags, uint32 dataLen)
+STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen)
 {
        STREAM* s;
 
        s = stream_new(dataLen + 8);
-       stream_write_uint16(s, msgType);
-       stream_write_uint16(s, msgFlags);
+       stream_write_UINT16(s, msgType);
+       stream_write_UINT16(s, msgFlags);
        /* Write actual length after the entire packet has been constructed. */
        stream_seek(s, 4);
 
@@ -132,22 +132,22 @@ static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, STREAM* s
        cliprdr->received_caps = TRUE;
 }
 
-static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, uint16 length, uint16 flags)
+static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags)
 {
        int i;
-       uint16 lengthCapability;
-       uint16 cCapabilitiesSets;
-       uint16 capabilitySetType;
+       UINT16 lengthCapability;
+       UINT16 cCapabilitiesSets;
+       UINT16 capabilitySetType;
 
-       stream_read_uint16(s, cCapabilitiesSets); /* cCapabilitiesSets (2 bytes) */
-       stream_seek_uint16(s); /* pad1 (2 bytes) */
+       stream_read_UINT16(s, cCapabilitiesSets); /* cCapabilitiesSets (2 bytes) */
+       stream_seek_UINT16(s); /* pad1 (2 bytes) */
 
        DEBUG_CLIPRDR("cCapabilitiesSets %d", cCapabilitiesSets);
 
        for (i = 0; i < cCapabilitiesSets; i++)
        {
-               stream_read_uint16(s, capabilitySetType); /* capabilitySetType (2 bytes) */
-               stream_read_uint16(s, lengthCapability); /* lengthCapability (2 bytes) */
+               stream_read_UINT16(s, capabilitySetType); /* capabilitySetType (2 bytes) */
+               stream_read_UINT16(s, lengthCapability); /* lengthCapability (2 bytes) */
 
                switch (capabilitySetType)
                {
@@ -173,17 +173,17 @@ static void cliprdr_send_clip_caps(cliprdrPlugin* cliprdr)
 
        flags = CB_USE_LONG_FORMAT_NAMES;
 
-       stream_write_uint16(s, 1); /* cCapabilitiesSets */
-       stream_write_uint16(s, 0); /* pad1 */
-       stream_write_uint16(s, CB_CAPSTYPE_GENERAL); /* capabilitySetType */
-       stream_write_uint16(s, CB_CAPSTYPE_GENERAL_LEN); /* lengthCapability */
+       stream_write_UINT16(s, 1); /* cCapabilitiesSets */
+       stream_write_UINT16(s, 0); /* pad1 */
+       stream_write_UINT16(s, CB_CAPSTYPE_GENERAL); /* capabilitySetType */
+       stream_write_UINT16(s, CB_CAPSTYPE_GENERAL_LEN); /* lengthCapability */
        stream_write_uint32(s, CB_CAPS_VERSION_2); /* version */
        stream_write_uint32(s, flags); /* generalFlags */
 
        cliprdr_packet_send(cliprdr, s);
 }
 
-static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, uint16 length, uint16 flags)
+static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, UINT16 length, UINT16 flags)
 {
        RDP_EVENT* event;
 
@@ -196,13 +196,13 @@ static void cliprdr_process_monitor_ready(cliprdrPlugin* cliprdr, STREAM* s, uin
 
 static void cliprdr_process_receive(rdpSvcPlugin* plugin, STREAM* s)
 {
-       uint16 msgType;
-       uint16 msgFlags;
+       UINT16 msgType;
+       UINT16 msgFlags;
        uint32 dataLen;
        cliprdrPlugin* cliprdr = (cliprdrPlugin*) plugin;
 
-       stream_read_uint16(s, msgType);
-       stream_read_uint16(s, msgFlags);
+       stream_read_UINT16(s, msgType);
+       stream_read_UINT16(s, msgFlags);
        stream_read_uint32(s, dataLen);
 
        DEBUG_CLIPRDR("msgType: %s (%d), msgFlags: %d dataLen: %d",
index 42d6420..6daf7d4 100644 (file)
@@ -45,7 +45,7 @@ struct cliprdr_plugin
 };
 typedef struct cliprdr_plugin cliprdrPlugin;
 
-STREAM* cliprdr_packet_new(uint16 msgType, uint16 msgFlags, uint32 dataLen);
+STREAM* cliprdr_packet_new(UINT16 msgType, UINT16 msgFlags, uint32 dataLen);
 void cliprdr_packet_send(cliprdrPlugin* cliprdr, STREAM* data_out);
 
 #ifdef WITH_DEBUG_CLIPRDR
index 38c77f1..f513c22 100644 (file)
@@ -357,7 +357,7 @@ BOOL disk_file_seek(DISK_FILE* file, uint64 Offset)
        return TRUE;
 }
 
-BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length)
+BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length)
 {
        ssize_t r;
 
@@ -372,7 +372,7 @@ BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length)
        return TRUE;
 }
 
-BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length)
+BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length)
 {
        ssize_t r;
 
@@ -421,8 +421,8 @@ BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STR
                        stream_write_uint64(output, st.st_size); /* AllocationSize */
                        stream_write_uint64(output, st.st_size); /* EndOfFile */
                        stream_write_uint32(output, st.st_nlink); /* NumberOfLinks */
-                       stream_write_uint8(output, file->delete_pending ? 1 : 0); /* DeletePending */
-                       stream_write_uint8(output, file->is_dir ? 1 : 0); /* Directory */
+                       stream_write_BYTE(output, file->delete_pending ? 1 : 0); /* DeletePending */
+                       stream_write_BYTE(output, file->is_dir ? 1 : 0); /* Directory */
                        /* Reserved(2), MUST NOT be added! */
                        break;
 
@@ -502,15 +502,15 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3
                        /* http://msdn.microsoft.com/en-us/library/cc232098.aspx */
                        /* http://msdn.microsoft.com/en-us/library/cc241371.aspx */
                        if (Length)
-                               stream_read_uint8(input, file->delete_pending);
+                               stream_read_BYTE(input, file->delete_pending);
                        else
                                file->delete_pending = 1;
                        break;
 
                case FileRenameInformation:
                        /* http://msdn.microsoft.com/en-us/library/cc232085.aspx */
-                       stream_seek_uint8(input); /* ReplaceIfExists */
-                       stream_seek_uint8(input); /* RootDirectory */
+                       stream_seek_BYTE(input); /* ReplaceIfExists */
+                       stream_seek_BYTE(input); /* RootDirectory */
                        stream_read_uint32(input, FileNameLength);
 
                        freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(input), &s, FileNameLength / 2);
@@ -541,7 +541,7 @@ BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint3
        return TRUE;
 }
 
-BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery,
+BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery,
        const char* path, STREAM* output)
 {
        int length;
@@ -555,7 +555,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
        if (!file->dir)
        {
                stream_write_uint32(output, 0); /* Length */
-               stream_write_uint8(output, 0); /* Padding */
+               stream_write_BYTE(output, 0); /* Padding */
                return FALSE;
        }
 
@@ -592,7 +592,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
        {
                DEBUG_SVC("  pattern %s not found.", file->pattern);
                stream_write_uint32(output, 0); /* Length */
-               stream_write_uint8(output, 0); /* Padding */
+               stream_write_BYTE(output, 0); /* Padding */
                return FALSE;
        }
 
@@ -664,7 +664,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
                        stream_write_uint32(output, FILE_ATTR_SYSTEM_TO_RDP(file, st)); /* FileAttributes */
                        stream_write_uint32(output, length); /* FileNameLength */
                        stream_write_uint32(output, 0); /* EaSize */
-                       stream_write_uint8(output, 0); /* ShortNameLength */
+                       stream_write_BYTE(output, 0); /* ShortNameLength */
                        /* Reserved(1), MUST NOT be added! */
                        stream_write_zero(output, 24); /* ShortName */
                        stream_write(output, ent_path, length);
@@ -682,7 +682,7 @@ BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8
 
                default:
                        stream_write_uint32(output, 0); /* Length */
-                       stream_write_uint8(output, 0); /* Padding */
+                       stream_write_BYTE(output, 0); /* Padding */
                        DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass);
                        ret = FALSE;
                        break;
index 6539592..b0c9a4e 100644 (file)
@@ -100,11 +100,11 @@ DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id,
 void disk_file_free(DISK_FILE* file);
 
 BOOL disk_file_seek(DISK_FILE* file, uint64 Offset);
-BOOL disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length);
-BOOL disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length);
+BOOL disk_file_read(DISK_FILE* file, BYTE* buffer, uint32* Length);
+BOOL disk_file_write(DISK_FILE* file, BYTE* buffer, uint32 Length);
 BOOL disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output);
 BOOL disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input);
-BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery,
+BOOL disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, BYTE InitialQuery,
        const char* path, STREAM* output);
 
 #endif /* __DISK_FILE_H */
index 73b9065..0a13571 100644 (file)
@@ -122,7 +122,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp)
        char* path;
        uint32 FileId;
        DISK_FILE* file;
-       uint8 Information;
+       BYTE Information;
        uint32 DesiredAccess;
        uint32 CreateDisposition;
        uint32 CreateOptions;
@@ -184,7 +184,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp)
        }
 
        stream_write_uint32(irp->output, FileId);
-       stream_write_uint8(irp->output, Information);
+       stream_write_BYTE(irp->output, Information);
 
        free(path);
 
@@ -221,7 +221,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp)
        DISK_FILE* file;
        uint32 Length;
        uint64 Offset;
-       uint8* buffer = NULL;
+       BYTE* buffer = NULL;
 
        stream_read_uint32(irp->input, Length);
        stream_read_uint64(irp->input, Offset);
@@ -244,7 +244,7 @@ static void disk_process_irp_read(DISK_DEVICE* disk, IRP* irp)
        }
        else
        {
-               buffer = (uint8*) malloc(Length);
+               buffer = (BYTE*) malloc(Length);
                if (!disk_file_read(file, buffer, &Length))
                {
                        irp->IoStatus = STATUS_UNSUCCESSFUL;
@@ -312,7 +312,7 @@ static void disk_process_irp_write(DISK_DEVICE* disk, IRP* irp)
        }
 
        stream_write_uint32(irp->output, Length);
-       stream_write_uint8(irp->output, 0); /* Padding */
+       stream_write_BYTE(irp->output, 0); /* Padding */
 
        irp->Complete(irp);
 }
@@ -406,7 +406,7 @@ static void disk_process_irp_query_volume_information(DISK_DEVICE* disk, IRP* ir
                        stream_write_uint64(output, FILE_TIME_SYSTEM_TO_RDP(st.st_ctime)); /* VolumeCreationTime */
                        stream_write_uint32(output, svfst.f_fsid); /* VolumeSerialNumber */
                        stream_write_uint32(output, length); /* VolumeLabelLength */
-                       stream_write_uint8(output, 0); /* SupportsObjects */
+                       stream_write_BYTE(output, 0); /* SupportsObjects */
                        /* Reserved(1), MUST NOT be added! */
                        stream_write(output, outStr, length); /* VolumeLabel (Unicode) */
                        free(outStr);
@@ -470,12 +470,12 @@ static void disk_process_irp_query_directory(DISK_DEVICE* disk, IRP* irp)
 {
        char* path;
        DISK_FILE* file;
-       uint8 InitialQuery;
+       BYTE InitialQuery;
        uint32 PathLength;
        uint32 FsInformationClass;
 
        stream_read_uint32(irp->input, FsInformationClass);
-       stream_read_uint8(irp->input, InitialQuery);
+       stream_read_BYTE(irp->input, InitialQuery);
        stream_read_uint32(irp->input, PathLength);
        stream_seek(irp->input, 23); /* Padding */
 
@@ -675,7 +675,7 @@ void disk_register_disk_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, char* na
                disk->device.data = stream_new(length + 1);
 
                for (i = 0; i <= length; i++)
-                       stream_write_uint8(disk->device.data, name[i] < 0 ? '_' : name[i]);
+                       stream_write_BYTE(disk->device.data, name[i] < 0 ? '_' : name[i]);
 
                disk->path = path;
                disk->files = list_new();
index c1cca1e..692f28a 100644 (file)
@@ -64,12 +64,12 @@ static int drdynvc_write_variable_uint(STREAM* stream, uint32 val)
        if (val <= 0xFF)
        {
                cb = 0;
-               stream_write_uint8(stream, val);
+               stream_write_BYTE(stream, val);
        }
        else if (val <= 0xFFFF)
        {
                cb = 1;
-               stream_write_uint16(stream, val);
+               stream_write_UINT16(stream, val);
        }
        else
        {
@@ -79,7 +79,7 @@ static int drdynvc_write_variable_uint(STREAM* stream, uint32 val)
        return cb;
 }
 
-int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, uint32 data_size)
+int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, BYTE* data, uint32 data_size)
 {
        STREAM* data_out;
        uint32 pos = 0;
@@ -101,7 +101,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
        {
                pos = stream_get_pos(data_out);
                stream_set_pos(data_out, 0);
-               stream_write_uint8(data_out, 0x40 | cbChId);
+               stream_write_BYTE(data_out, 0x40 | cbChId);
                stream_set_pos(data_out, pos);
                error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out);
        }
@@ -109,7 +109,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
        {
                pos = stream_get_pos(data_out);
                stream_set_pos(data_out, 0);
-               stream_write_uint8(data_out, 0x30 | cbChId);
+               stream_write_BYTE(data_out, 0x30 | cbChId);
                stream_set_pos(data_out, pos);
                stream_write(data_out, data, data_size);
                error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out);
@@ -120,7 +120,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
                cbLen = drdynvc_write_variable_uint(data_out, data_size);
                pos = stream_get_pos(data_out);
                stream_set_pos(data_out, 0);
-               stream_write_uint8(data_out, 0x20 | cbChId | (cbLen << 2));
+               stream_write_BYTE(data_out, 0x20 | cbChId | (cbLen << 2));
                stream_set_pos(data_out, pos);
                chunk_len = CHANNEL_CHUNK_LENGTH - pos;
                stream_write(data_out, data, chunk_len);
@@ -136,7 +136,7 @@ int drdynvc_write_data(drdynvcPlugin* drdynvc, uint32 ChannelId, uint8* data, ui
 
                        pos = stream_get_pos(data_out);
                        stream_set_pos(data_out, 0);
-                       stream_write_uint8(data_out, 0x30 | cbChId);
+                       stream_write_BYTE(data_out, 0x30 | cbChId);
                        stream_set_pos(data_out, pos);
 
                        chunk_len = data_size;
@@ -177,17 +177,17 @@ static int drdynvc_process_capability_request(drdynvcPlugin* drdynvc, int Sp, in
 
        DEBUG_DVC("Sp=%d cbChId=%d", Sp, cbChId);
        stream_seek(s, 1); /* pad */
-       stream_read_uint16(s, drdynvc->version);
+       stream_read_UINT16(s, drdynvc->version);
        if (drdynvc->version == 2)
        {
-               stream_read_uint16(s, drdynvc->PriorityCharge0);
-               stream_read_uint16(s, drdynvc->PriorityCharge1);
-               stream_read_uint16(s, drdynvc->PriorityCharge2);
-               stream_read_uint16(s, drdynvc->PriorityCharge3);
+               stream_read_UINT16(s, drdynvc->PriorityCharge0);
+               stream_read_UINT16(s, drdynvc->PriorityCharge1);
+               stream_read_UINT16(s, drdynvc->PriorityCharge2);
+               stream_read_UINT16(s, drdynvc->PriorityCharge3);
        }
        data_out = stream_new(4);
-       stream_write_uint16(data_out, 0x0050); /* Cmd+Sp+cbChId+Pad. Note: MSTSC sends 0x005c */
-       stream_write_uint16(data_out, drdynvc->version);
+       stream_write_UINT16(data_out, 0x0050); /* Cmd+Sp+cbChId+Pad. Note: MSTSC sends 0x005c */
+       stream_write_UINT16(data_out, drdynvc->version);
        error = svc_plugin_send((rdpSvcPlugin*)drdynvc, data_out);
        if (error != CHANNEL_RC_OK)
        {
@@ -206,10 +206,10 @@ static uint32 drdynvc_read_variable_uint(STREAM* stream, int cbLen)
        switch (cbLen)
        {
                case 0:
-                       stream_read_uint8(stream, val);
+                       stream_read_BYTE(stream, val);
                        break;
                case 1:
-                       stream_read_uint16(stream, val);
+                       stream_read_UINT16(stream, val);
                        break;
                default:
                        stream_read_uint32(stream, val);
@@ -232,7 +232,7 @@ static int drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp, int cb
        error = dvcman_create_channel(drdynvc->channel_mgr, ChannelId, (char*)stream_get_tail(s));
 
        data_out = stream_new(pos + 4);
-       stream_write_uint8(data_out, 0x10 | cbChId);
+       stream_write_BYTE(data_out, 0x10 | cbChId);
        stream_set_pos(s, 1);
        stream_copy(data_out, s, pos - 1);
        
@@ -304,7 +304,7 @@ static void drdynvc_process_receive(rdpSvcPlugin* plugin, STREAM* s)
        int Sp;
        int cbChId;
 
-       stream_read_uint8(s, value);
+       stream_read_BYTE(s, value);
        Cmd = (value & 0xf0) >> 4;
        Sp = (value & 0x0c) >> 2;
        cbChId = (value & 0x03) >> 0;
index 2226c3f..7089262 100644 (file)
@@ -24,7 +24,7 @@
 
 typedef struct drdynvc_plugin drdynvcPlugin;
 
-int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, uint8* data, uint32 data_size);
+int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, BYTE* data, uint32 data_size);
 int drdynvc_push_event(drdynvcPlugin* plugin, RDP_EVENT* event);
 
 #endif
index 53418ae..c0d496e 100644 (file)
@@ -241,7 +241,7 @@ int dvcman_load_plugin(IWTSVirtualChannelManager* pChannelMgr, RDP_PLUGIN_DATA*
                        pDVCPluginEntry((IDRDYNVC_ENTRY_POINTS*) &entryPoints);
                }
                
-               data = (RDP_PLUGIN_DATA*)(((uint8*) data) + data->size);
+               data = (RDP_PLUGIN_DATA*)(((BYTE*) data) + data->size);
        }
 
        return 0;
@@ -303,7 +303,7 @@ int dvcman_init(IWTSVirtualChannelManager* pChannelMgr)
        return 0;
 }
 
-static int dvcman_write_channel(IWTSVirtualChannel* pChannel, uint32 cbSize, uint8* pBuffer, void* pReserved)
+static int dvcman_write_channel(IWTSVirtualChannel* pChannel, uint32 cbSize, BYTE* pBuffer, void* pReserved)
 {
        int status;
        DVCMAN_CHANNEL* channel = (DVCMAN_CHANNEL*) pChannel;
@@ -424,7 +424,7 @@ int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, ui
        return 0;
 }
 
-int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size)
+int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size)
 {
        int error = 0;
        DVCMAN_CHANNEL* channel;
index 6f68b54..95d5a11 100644 (file)
@@ -30,7 +30,7 @@ int dvcman_init(IWTSVirtualChannelManager* pChannelMgr);
 int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, const char* ChannelName);
 int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId);
 int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint32 length);
-int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size);
+int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, BYTE* data, uint32 data_size);
 
 #endif
 
index 9f5f3fd..9f55bf0 100644 (file)
@@ -104,7 +104,7 @@ static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp)
        }
 
        stream_write_uint32(irp->output, parallel->id);
-       stream_write_uint8(irp->output, 0);
+       stream_write_BYTE(irp->output, 0);
 
        free(path);
 
@@ -128,12 +128,12 @@ static void parallel_process_irp_read(PARALLEL_DEVICE* parallel, IRP* irp)
        uint32 Length;
        uint64 Offset;
        ssize_t status;
-       uint8* buffer = NULL;
+       BYTE* buffer = NULL;
 
        stream_read_uint32(irp->input, Length);
        stream_read_uint64(irp->input, Offset);
 
-       buffer = (uint8*) malloc(Length);
+       buffer = (BYTE*) malloc(Length);
 
        status = read(parallel->file, irp->output->p, Length);
 
@@ -195,7 +195,7 @@ static void parallel_process_irp_write(PARALLEL_DEVICE* parallel, IRP* irp)
        }
 
        stream_write_uint32(irp->output, Length);
-       stream_write_uint8(irp->output, 0); /* Padding */
+       stream_write_BYTE(irp->output, 0); /* Padding */
 
        irp->Complete(irp);
 }
@@ -330,7 +330,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
                parallel->device.data = stream_new(length + 1);
 
                for (i = 0; i <= length; i++)
-                       stream_write_uint8(parallel->device.data, name[i] < 0 ? '_' : name[i]);
+                       stream_write_BYTE(parallel->device.data, name[i] < 0 ? '_' : name[i]);
 
                parallel->path = path;
 
index bd8d4dc..40b71f5 100644 (file)
@@ -77,7 +77,7 @@ static void printer_cups_get_printjob_name(char* buf, int size)
                t->tm_hour, t->tm_min, t->tm_sec);
 }
 
-static void printer_cups_write_printjob(rdpPrintJob* printjob, uint8* data, int size)
+static void printer_cups_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
 {
        rdpCupsPrintJob* cups_printjob = (rdpCupsPrintJob*)printjob;
 
index 2b63203..ac20f1d 100644 (file)
@@ -135,7 +135,7 @@ static void printer_process_irp_write(PRINTER_DEVICE* printer_dev, IRP* irp)
        }
 
        stream_write_uint32(irp->output, Length);
-       stream_write_uint8(irp->output, 0); /* Padding */
+       stream_write_BYTE(irp->output, 0); /* Padding */
 
        irp->Complete(irp);
 }
@@ -241,7 +241,7 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri
        int PrintNameLen;
        WCHAR* PrintName;
        uint32 CachedFieldsLen;
-       uint8* CachedPrinterConfigData;
+       BYTE* CachedPrinterConfigData;
        PRINTER_DEVICE* printer_dev;
 
        port = malloc(10);
@@ -278,9 +278,9 @@ void printer_register(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints, rdpPrinter* pri
        stream_write_uint32(printer_dev->device.data, PrintNameLen + 2);
        stream_write_uint32(printer_dev->device.data, CachedFieldsLen);
        stream_write(printer_dev->device.data, DriverName, DriverNameLen);
-       stream_write_uint16(printer_dev->device.data, 0);
+       stream_write_UINT16(printer_dev->device.data, 0);
        stream_write(printer_dev->device.data, PrintName, PrintNameLen);
-       stream_write_uint16(printer_dev->device.data, 0);
+       stream_write_UINT16(printer_dev->device.data, 0);
 
        if (CachedFieldsLen > 0)
        {
index f21442f..a2c70ee 100644 (file)
@@ -64,7 +64,7 @@ struct rdp_printer
        pcFreePrinter Free;
 };
 
-typedef void (*pcWritePrintJob) (rdpPrintJob* printjob, uint8* data, int size);
+typedef void (*pcWritePrintJob) (rdpPrintJob* printjob, BYTE* data, int size);
 typedef void (*pcClosePrintJob) (rdpPrintJob* printjob);
 
 struct rdp_print_job
index b1069fa..35e7bac 100644 (file)
@@ -82,7 +82,7 @@ static void printer_win_get_printjob_name(char* buf, int size)
 
 }
 
-static void printer_win_write_printjob(rdpPrintJob* printjob, uint8* data, int size)
+static void printer_win_write_printjob(rdpPrintJob* printjob, BYTE* data, int size)
 {
        rdpWinPrintJob* win_printjob = (rdpWinPrintJob*)printjob;
 
index da3fee8..aa9c85d 100644 (file)
@@ -58,7 +58,7 @@ static void on_free_rail_channel_event(RDP_EVENT* event)
        }
 }
 
-void rail_send_channel_event(void* rail_object, uint16 event_type, void* param)
+void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param)
 {
        void * payload = NULL;
        RDP_EVENT* out_event = NULL;
index 484aa6c..ec9fc1f 100644 (file)
@@ -56,7 +56,7 @@ struct rail_plugin
 };
 typedef struct rail_plugin railPlugin;
 
-void rail_send_channel_event(void* rail_object, uint16 event_type, void* param);
+void rail_send_channel_event(void* rail_object, UINT16 event_type, void* param);
 void rail_send_channel_data(void* rail_object, void* data, size_t length);
 
 #ifdef WITH_DEBUG_RAIL
index 2c4303a..34ab88b 100644 (file)
@@ -85,20 +85,20 @@ void rail_string_to_unicode_string(rdpRailOrder* rail_order, char* string, RAIL_
 
        length = freerdp_AsciiToUnicodeAlloc(string, &buffer, 0) * 2;
 
-       unicode_string->string = (uint8*) buffer;
-       unicode_string->length = (uint16) length;
+       unicode_string->string = (BYTE*) buffer;
+       unicode_string->length = (UINT16) length;
 }
 
-void rail_read_pdu_header(STREAM* s, uint16* orderType, uint16* orderLength)
+void rail_read_pdu_header(STREAM* s, UINT16* orderType, UINT16* orderLength)
 {
-       stream_read_uint16(s, *orderType); /* orderType (2 bytes) */
-       stream_read_uint16(s, *orderLength); /* orderLength (2 bytes) */
+       stream_read_UINT16(s, *orderType); /* orderType (2 bytes) */
+       stream_read_UINT16(s, *orderLength); /* orderLength (2 bytes) */
 }
 
-void rail_write_pdu_header(STREAM* s, uint16 orderType, uint16 orderLength)
+void rail_write_pdu_header(STREAM* s, UINT16 orderType, UINT16 orderLength)
 {
-       stream_write_uint16(s, orderType); /* orderType (2 bytes) */
-       stream_write_uint16(s, orderLength); /* orderLength (2 bytes) */
+       stream_write_UINT16(s, orderType); /* orderType (2 bytes) */
+       stream_write_UINT16(s, orderLength); /* orderLength (2 bytes) */
 }
 
 STREAM* rail_pdu_init(int length)
@@ -109,9 +109,9 @@ STREAM* rail_pdu_init(int length)
        return s;
 }
 
-void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, uint16 orderType)
+void rail_send_pdu(rdpRailOrder* rail_order, STREAM* s, UINT16 orderType)
 {
-       uint16 orderLength;
+       UINT16 orderLength;
 
        orderLength = stream_get_length(s);
        stream_set_pos(s, 0);
@@ -141,18 +141,18 @@ void rail_read_handshake_order(STREAM* s, RAIL_HANDSHAKE_ORDER* handshake)
 
 void rail_read_server_exec_result_order(STREAM* s, RAIL_EXEC_RESULT_ORDER* exec_result)
 {
-       stream_read_uint16(s, exec_result->flags); /* flags (2 bytes) */
-       stream_read_uint16(s, exec_result->execResult); /* execResult (2 bytes) */
+       stream_read_UINT16(s, exec_result->flags); /* flags (2 bytes) */
+       stream_read_UINT16(s, exec_result->execResult); /* execResult (2 bytes) */
        stream_read_uint32(s, exec_result->rawResult); /* rawResult (4 bytes) */
-       stream_seek_uint16(s); /* padding (2 bytes) */
+       stream_seek_UINT16(s); /* padding (2 bytes) */
        rail_read_unicode_string(s, &exec_result->exeOrFile); /* exeOrFile */
 }
 
 void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
 {
-       uint8 body;
+       BYTE body;
        stream_read_uint32(s, sysparam->param); /* systemParam (4 bytes) */
-       stream_read_uint8(s, body); /* body (1 byte) */
+       stream_read_BYTE(s, body); /* body (1 byte) */
 
        switch (sysparam->param)
        {
@@ -172,27 +172,27 @@ void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
 void rail_read_server_minmaxinfo_order(STREAM* s, RAIL_MINMAXINFO_ORDER* minmaxinfo)
 {
        stream_read_uint32(s, minmaxinfo->windowId); /* windowId (4 bytes) */
-       stream_read_uint16(s, minmaxinfo->maxWidth); /* maxWidth (2 bytes) */
-       stream_read_uint16(s, minmaxinfo->maxHeight); /* maxHeight (2 bytes) */
-       stream_read_uint16(s, minmaxinfo->maxPosX); /* maxPosX (2 bytes) */
-       stream_read_uint16(s, minmaxinfo->maxPosY); /* maxPosY (2 bytes) */
-       stream_read_uint16(s, minmaxinfo->minTrackWidth); /* minTrackWidth (2 bytes) */
-       stream_read_uint16(s, minmaxinfo->minTrackHeight); /* minTrackHeight (2 bytes) */
-       stream_read_uint16(s, minmaxinfo->maxTrackWidth); /* maxTrackWidth (2 bytes) */
-       stream_read_uint16(s, minmaxinfo->maxTrackHeight); /* maxTrackHeight (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->maxWidth); /* maxWidth (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->maxHeight); /* maxHeight (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->maxPosX); /* maxPosX (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->maxPosY); /* maxPosY (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->minTrackWidth); /* minTrackWidth (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->minTrackHeight); /* minTrackHeight (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->maxTrackWidth); /* maxTrackWidth (2 bytes) */
+       stream_read_UINT16(s, minmaxinfo->maxTrackHeight); /* maxTrackHeight (2 bytes) */
 }
 
 void rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* localmovesize)
 {
-       uint16 isMoveSizeStart;
+       UINT16 isMoveSizeStart;
        stream_read_uint32(s, localmovesize->windowId); /* windowId (4 bytes) */
 
-       stream_read_uint16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */
+       stream_read_UINT16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */
        localmovesize->isMoveSizeStart = (isMoveSizeStart != 0) ? TRUE : FALSE;
 
-       stream_read_uint16(s, localmovesize->moveSizeType); /* moveSizeType (2 bytes) */
-       stream_read_uint16(s, localmovesize->posX); /* posX (2 bytes) */
-       stream_read_uint16(s, localmovesize->posY); /* posY (2 bytes) */
+       stream_read_UINT16(s, localmovesize->moveSizeType); /* moveSizeType (2 bytes) */
+       stream_read_UINT16(s, localmovesize->posX); /* posX (2 bytes) */
+       stream_read_UINT16(s, localmovesize->posY); /* posY (2 bytes) */
 }
 
 void rail_read_server_get_appid_resp_order(STREAM* s, RAIL_GET_APPID_RESP_ORDER* get_appid_resp)
@@ -221,10 +221,10 @@ void rail_write_client_status_order(STREAM* s, RAIL_CLIENT_STATUS_ORDER* client_
 
 void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec)
 {
-       stream_write_uint16(s, exec->flags); /* flags (2 bytes) */
-       stream_write_uint16(s, exec->exeOrFile.length); /* exeOrFileLength (2 bytes) */
-       stream_write_uint16(s, exec->workingDir.length); /* workingDirLength (2 bytes) */
-       stream_write_uint16(s, exec->arguments.length); /* argumentsLength (2 bytes) */
+       stream_write_UINT16(s, exec->flags); /* flags (2 bytes) */
+       stream_write_UINT16(s, exec->exeOrFile.length); /* exeOrFileLength (2 bytes) */
+       stream_write_UINT16(s, exec->workingDir.length); /* workingDirLength (2 bytes) */
+       stream_write_UINT16(s, exec->arguments.length); /* argumentsLength (2 bytes) */
        rail_write_unicode_string_value(s, &exec->exeOrFile); /* exeOrFile */
        rail_write_unicode_string_value(s, &exec->workingDir); /* workingDir */
        rail_write_unicode_string_value(s, &exec->arguments); /* arguments */
@@ -232,50 +232,50 @@ void rail_write_client_exec_order(STREAM* s, RAIL_EXEC_ORDER* exec)
 
 void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
 {
-       uint8 body;
+       BYTE body;
        stream_write_uint32(s, sysparam->param); /* systemParam (4 bytes) */
 
        switch (sysparam->param)
        {
                case SPI_SET_DRAG_FULL_WINDOWS:
                        body = sysparam->dragFullWindows;
-                       stream_write_uint8(s, body);
+                       stream_write_BYTE(s, body);
                        break;
 
                case SPI_SET_KEYBOARD_CUES:
                        body = sysparam->keyboardCues;
-                       stream_write_uint8(s, body);
+                       stream_write_BYTE(s, body);
                        break;
 
                case SPI_SET_KEYBOARD_PREF:
                        body = sysparam->keyboardPref;
-                       stream_write_uint8(s, body);
+                       stream_write_BYTE(s, body);
                        break;
 
                case SPI_SET_MOUSE_BUTTON_SWAP:
                        body = sysparam->mouseButtonSwap;
-                       stream_write_uint8(s, body);
+                       stream_write_BYTE(s, body);
                        break;
 
                case SPI_SET_WORK_AREA:
-                       stream_write_uint16(s, sysparam->workArea.left); /* left (2 bytes) */
-                       stream_write_uint16(s, sysparam->workArea.top); /* top (2 bytes) */
-                       stream_write_uint16(s, sysparam->workArea.right); /* right (2 bytes) */
-                       stream_write_uint16(s, sysparam->workArea.bottom); /* bottom (2 bytes) */
+                       stream_write_UINT16(s, sysparam->workArea.left); /* left (2 bytes) */
+                       stream_write_UINT16(s, sysparam->workArea.top); /* top (2 bytes) */
+                       stream_write_UINT16(s, sysparam->workArea.right); /* right (2 bytes) */
+                       stream_write_UINT16(s, sysparam->workArea.bottom); /* bottom (2 bytes) */
                        break;
 
                case SPI_DISPLAY_CHANGE:
-                       stream_write_uint16(s, sysparam->displayChange.left); /* left (2 bytes) */
-                       stream_write_uint16(s, sysparam->displayChange.top); /* top (2 bytes) */
-                       stream_write_uint16(s, sysparam->displayChange.right); /* right (2 bytes) */
-                       stream_write_uint16(s, sysparam->displayChange.bottom); /* bottom (2 bytes) */
+                       stream_write_UINT16(s, sysparam->displayChange.left); /* left (2 bytes) */
+                       stream_write_UINT16(s, sysparam->displayChange.top); /* top (2 bytes) */
+                       stream_write_UINT16(s, sysparam->displayChange.right); /* right (2 bytes) */
+                       stream_write_UINT16(s, sysparam->displayChange.bottom); /* bottom (2 bytes) */
                        break;
 
                case SPI_TASKBAR_POS:
-                       stream_write_uint16(s, sysparam->taskbarPos.left); /* left (2 bytes) */
-                       stream_write_uint16(s, sysparam->taskbarPos.top); /* top (2 bytes) */
-                       stream_write_uint16(s, sysparam->taskbarPos.right); /* right (2 bytes) */
-                       stream_write_uint16(s, sysparam->taskbarPos.bottom); /* bottom (2 bytes) */
+                       stream_write_UINT16(s, sysparam->taskbarPos.left); /* left (2 bytes) */
+                       stream_write_UINT16(s, sysparam->taskbarPos.top); /* top (2 bytes) */
+                       stream_write_UINT16(s, sysparam->taskbarPos.right); /* right (2 bytes) */
+                       stream_write_UINT16(s, sysparam->taskbarPos.bottom); /* bottom (2 bytes) */
                        break;
 
                case SPI_SET_HIGH_CONTRAST:
@@ -286,25 +286,25 @@ void rail_write_client_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
 
 void rail_write_client_activate_order(STREAM* s, RAIL_ACTIVATE_ORDER* activate)
 {
-       uint8 enabled;
+       BYTE enabled;
 
        stream_write_uint32(s, activate->windowId); /* windowId (4 bytes) */
 
        enabled = activate->enabled;
-       stream_write_uint8(s, enabled); /* enabled (1 byte) */
+       stream_write_BYTE(s, enabled); /* enabled (1 byte) */
 }
 
 void rail_write_client_sysmenu_order(STREAM* s, RAIL_SYSMENU_ORDER* sysmenu)
 {
        stream_write_uint32(s, sysmenu->windowId); /* windowId (4 bytes) */
-       stream_write_uint16(s, sysmenu->left); /* left (2 bytes) */
-       stream_write_uint16(s, sysmenu->top); /* top (2 bytes) */
+       stream_write_UINT16(s, sysmenu->left); /* left (2 bytes) */
+       stream_write_UINT16(s, sysmenu->top); /* top (2 bytes) */
 }
 
 void rail_write_client_syscommand_order(STREAM* s, RAIL_SYSCOMMAND_ORDER* syscommand)
 {
        stream_write_uint32(s, syscommand->windowId); /* windowId (4 bytes) */
-       stream_write_uint16(s, syscommand->command); /* command (2 bytes) */
+       stream_write_UINT16(s, syscommand->command); /* command (2 bytes) */
 }
 
 void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* notify_event)
@@ -317,10 +317,10 @@ void rail_write_client_notify_event_order(STREAM* s, RAIL_NOTIFY_EVENT_ORDER* no
 void rail_write_client_window_move_order(STREAM* s, RAIL_WINDOW_MOVE_ORDER* window_move)
 {
        stream_write_uint32(s, window_move->windowId); /* windowId (4 bytes) */
-       stream_write_uint16(s, window_move->left); /* left (2 bytes) */
-       stream_write_uint16(s, window_move->top); /* top (2 bytes) */
-       stream_write_uint16(s, window_move->right); /* right (2 bytes) */
-       stream_write_uint16(s, window_move->bottom); /* bottom (2 bytes) */
+       stream_write_UINT16(s, window_move->left); /* left (2 bytes) */
+       stream_write_UINT16(s, window_move->top); /* top (2 bytes) */
+       stream_write_UINT16(s, window_move->right); /* right (2 bytes) */
+       stream_write_UINT16(s, window_move->bottom); /* bottom (2 bytes) */
 }
 
 void rail_write_client_get_appid_req_order(STREAM* s, RAIL_GET_APPID_REQ_ORDER* get_appid_req)
@@ -418,8 +418,8 @@ void rail_recv_langbar_info_order(rdpRailOrder* rail_order, STREAM* s)
 
 void rail_order_recv(rdpRailOrder* rail_order, STREAM* s)
 {
-       uint16 orderType;
-       uint16 orderLength;
+       UINT16 orderType;
+       UINT16 orderLength;
 
        rail_read_pdu_header(s, &orderType, &orderLength);
 
index 0a3fea4..3b20ee8 100644 (file)
@@ -90,8 +90,8 @@ IRP* irp_new(DEVMAN* devman, STREAM* data_in)
        irp->input = data_in;
 
        irp->output = stream_new(256);
-       stream_write_uint16(irp->output, RDPDR_CTYP_CORE);
-       stream_write_uint16(irp->output, PAKID_CORE_DEVICE_IOCOMPLETION);
+       stream_write_UINT16(irp->output, RDPDR_CTYP_CORE);
+       stream_write_UINT16(irp->output, PAKID_CORE_DEVICE_IOCOMPLETION);
        stream_write_uint32(irp->output, DeviceId);
        stream_write_uint32(irp->output, irp->CompletionId);
        stream_seek_uint32(irp->output); /* IoStatus */
index a54052c..4b16568 100644 (file)
 #include "rdpdr_capabilities.h"
 
 /* Output device redirection capability set header */
-static void rdpdr_write_capset_header(STREAM* data_out, uint16 capabilityType, uint16 capabilityLength, uint32 version)
+static void rdpdr_write_capset_header(STREAM* data_out, UINT16 capabilityType, UINT16 capabilityLength, uint32 version)
 {
-       stream_write_uint16(data_out, capabilityType);
-       stream_write_uint16(data_out, capabilityLength);
+       stream_write_UINT16(data_out, capabilityType);
+       stream_write_UINT16(data_out, capabilityLength);
        stream_write_uint32(data_out, version);
 }
 
@@ -47,8 +47,8 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
 
        stream_write_uint32(data_out, 0); /* osType, ignored on receipt */
        stream_write_uint32(data_out, 0); /* osVersion, unused and must be set to zero */
-       stream_write_uint16(data_out, 1); /* protocolMajorVersion, must be set to 1 */
-       stream_write_uint16(data_out, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinorVersion */
+       stream_write_UINT16(data_out, 1); /* protocolMajorVersion, must be set to 1 */
+       stream_write_UINT16(data_out, RDPDR_MINOR_RDP_VERSION_5_2); /* protocolMinorVersion */
        stream_write_uint32(data_out, 0x0000FFFF); /* ioCode1 */
        stream_write_uint32(data_out, 0); /* ioCode2, must be set to zero, reserved for future use */
        stream_write_uint32(data_out, RDPDR_DEVICE_REMOVE_PDUS | RDPDR_CLIENT_DISPLAY_NAME_PDU | RDPDR_USER_LOGGEDON_PDU); /* extendedPDU */
@@ -60,9 +60,9 @@ static void rdpdr_write_general_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
 /* Process device direction general capability set */
 static void rdpdr_process_general_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       uint16 capabilityLength;
+       UINT16 capabilityLength;
 
-       stream_read_uint16(data_in, capabilityLength);
+       stream_read_UINT16(data_in, capabilityLength);
        stream_seek(data_in, capabilityLength - 4);
 }
 
@@ -75,9 +75,9 @@ static void rdpdr_write_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
 /* Process printer direction capability set */
 static void rdpdr_process_printer_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       uint16 capabilityLength;
+       UINT16 capabilityLength;
 
-       stream_read_uint16(data_in, capabilityLength);
+       stream_read_UINT16(data_in, capabilityLength);
        stream_seek(data_in, capabilityLength - 4);
 }
 
@@ -90,9 +90,9 @@ static void rdpdr_write_port_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
 /* Process port redirection capability set */
 static void rdpdr_process_port_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       uint16 capabilityLength;
+       UINT16 capabilityLength;
 
-       stream_read_uint16(data_in, capabilityLength);
+       stream_read_UINT16(data_in, capabilityLength);
        stream_seek(data_in, capabilityLength - 4);
 }
 
@@ -105,9 +105,9 @@ static void rdpdr_write_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
 /* Process drive redirection capability set */
 static void rdpdr_process_drive_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       uint16 capabilityLength;
+       UINT16 capabilityLength;
 
-       stream_read_uint16(data_in, capabilityLength);
+       stream_read_UINT16(data_in, capabilityLength);
        stream_seek(data_in, capabilityLength - 4);
 }
 
@@ -120,24 +120,24 @@ static void rdpdr_write_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_out)
 /* Process smartcard redirection capability set */
 static void rdpdr_process_smartcard_capset(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       uint16 capabilityLength;
+       UINT16 capabilityLength;
 
-       stream_read_uint16(data_in, capabilityLength);
+       stream_read_UINT16(data_in, capabilityLength);
        stream_seek(data_in, capabilityLength - 4);
 }
 
 void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       uint16 i;
-       uint16 numCapabilities;
-       uint16 capabilityType;
+       UINT16 i;
+       UINT16 numCapabilities;
+       UINT16 capabilityType;
 
-       stream_read_uint16(data_in, numCapabilities);
+       stream_read_UINT16(data_in, numCapabilities);
        stream_seek(data_in, 2); /* pad (2 bytes) */
 
        for(i = 0; i < numCapabilities; i++)
        {
-               stream_read_uint16(data_in, capabilityType);
+               stream_read_UINT16(data_in, capabilityType);
 
                switch (capabilityType)
                {
@@ -174,11 +174,11 @@ void rdpdr_send_capability_response(rdpdrPlugin* rdpdr)
 
        data_out = stream_new(256);
 
-       stream_write_uint16(data_out, RDPDR_CTYP_CORE);
-       stream_write_uint16(data_out, PAKID_CORE_CLIENT_CAPABILITY);
+       stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
+       stream_write_UINT16(data_out, PAKID_CORE_CLIENT_CAPABILITY);
 
-       stream_write_uint16(data_out, 5); /* numCapabilities */
-       stream_write_uint16(data_out, 0); /* pad */
+       stream_write_UINT16(data_out, 5); /* numCapabilities */
+       stream_write_UINT16(data_out, 0); /* pad */
 
        rdpdr_write_general_capset(rdpdr, data_out);
        rdpdr_write_printer_capset(rdpdr, data_out);
index 91b7a2d..ea7ee87 100644 (file)
@@ -67,14 +67,14 @@ static void rdpdr_process_connect(rdpSvcPlugin* plugin)
                        devman_load_device_service(rdpdr->devman, data);
                }
 
-               data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size);
+               data = (RDP_PLUGIN_DATA*) (((BYTE*) data) + data->size);
        }
 }
 
 static void rdpdr_process_server_announce_request(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       stream_read_uint16(data_in, rdpdr->versionMajor);
-       stream_read_uint16(data_in, rdpdr->versionMinor);
+       stream_read_UINT16(data_in, rdpdr->versionMajor);
+       stream_read_UINT16(data_in, rdpdr->versionMinor);
        stream_read_uint32(data_in, rdpdr->clientID);
 
        DEBUG_SVC("version %d.%d clientID %d", rdpdr->versionMajor, rdpdr->versionMinor, rdpdr->clientID);
@@ -86,11 +86,11 @@ static void rdpdr_send_client_announce_reply(rdpdrPlugin* rdpdr)
 
        data_out = stream_new(12);
 
-       stream_write_uint16(data_out, RDPDR_CTYP_CORE);
-       stream_write_uint16(data_out, PAKID_CORE_CLIENTID_CONFIRM);
+       stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
+       stream_write_UINT16(data_out, PAKID_CORE_CLIENTID_CONFIRM);
 
-       stream_write_uint16(data_out, rdpdr->versionMajor);
-       stream_write_uint16(data_out, rdpdr->versionMinor);
+       stream_write_UINT16(data_out, rdpdr->versionMajor);
+       stream_write_UINT16(data_out, rdpdr->versionMinor);
        stream_write_uint32(data_out, (uint32) rdpdr->clientID);
 
        svc_plugin_send((rdpSvcPlugin*) rdpdr, data_out);
@@ -109,14 +109,14 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
 
        data_out = stream_new(16 + computerNameLenW + 2);
 
-       stream_write_uint16(data_out, RDPDR_CTYP_CORE);
-       stream_write_uint16(data_out, PAKID_CORE_CLIENT_NAME);
+       stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
+       stream_write_UINT16(data_out, PAKID_CORE_CLIENT_NAME);
 
        stream_write_uint32(data_out, 1); /* unicodeFlag, 0 for ASCII and 1 for Unicode */
        stream_write_uint32(data_out, 0); /* codePage, must be set to zero */
        stream_write_uint32(data_out, computerNameLenW + 2); /* computerNameLen, including null terminator */
        stream_write(data_out, computerNameW, computerNameLenW);
-       stream_write_uint16(data_out, 0); /* null terminator */
+       stream_write_UINT16(data_out, 0); /* null terminator */
 
        free(computerNameW);
 
@@ -125,12 +125,12 @@ static void rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
 
 static void rdpdr_process_server_clientid_confirm(rdpdrPlugin* rdpdr, STREAM* data_in)
 {
-       uint16 versionMajor;
-       uint16 versionMinor;
+       UINT16 versionMajor;
+       UINT16 versionMinor;
        uint32 clientID;
 
-       stream_read_uint16(data_in, versionMajor);
-       stream_read_uint16(data_in, versionMinor);
+       stream_read_UINT16(data_in, versionMajor);
+       stream_read_UINT16(data_in, versionMinor);
        stream_read_uint32(data_in, clientID);
 
        if (versionMajor != rdpdr->versionMajor || versionMinor != rdpdr->versionMinor)
@@ -151,7 +151,7 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
 {
        int i;
        int pos;
-       uint8 c;
+       BYTE c;
        uint32 count;
        int data_len;
        int count_pos;
@@ -161,8 +161,8 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
 
        data_out = stream_new(256);
 
-       stream_write_uint16(data_out, RDPDR_CTYP_CORE);
-       stream_write_uint16(data_out, PAKID_CORE_DEVICELIST_ANNOUNCE);
+       stream_write_UINT16(data_out, RDPDR_CTYP_CORE);
+       stream_write_UINT16(data_out, PAKID_CORE_DEVICELIST_ANNOUNCE);
 
        count_pos = stream_get_pos(data_out);
        count = 0;
@@ -190,12 +190,12 @@ static void rdpdr_send_device_list_announce_request(rdpdrPlugin* rdpdr, BOOL use
 
                        for (i = 0; i < 8; i++)
                        {
-                               stream_peek_uint8(data_out, c);
+                               stream_peek_BYTE(data_out, c);
 
                                if (c > 0x7F)
-                                       stream_write_uint8(data_out, '_');
+                                       stream_write_BYTE(data_out, '_');
                                else
-                                       stream_seek_uint8(data_out);
+                                       stream_seek_BYTE(data_out);
                        }
 
                        stream_write_uint32(data_out, data_len);
@@ -235,14 +235,14 @@ static BOOL rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in)
 
 static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
 {
-       uint16 component;
-       uint16 packetID;
+       UINT16 component;
+       UINT16 packetID;
        uint32 deviceID;
        uint32 status;
        rdpdrPlugin* rdpdr = (rdpdrPlugin*) plugin;
 
-       stream_read_uint16(data_in, component);
-       stream_read_uint16(data_in, packetID);
+       stream_read_UINT16(data_in, component);
+       stream_read_UINT16(data_in, packetID);
 
        if (component == RDPDR_CTYP_CORE)
        {
index ef93f74..c988a31 100644 (file)
@@ -32,9 +32,9 @@ struct rdpdr_plugin
 
        DEVMAN* devman;
 
-       uint16 versionMajor;
-       uint16 versionMinor;
-       uint16 clientID;
+       UINT16 versionMajor;
+       UINT16 versionMinor;
+       UINT16 clientID;
        char computerName[256];
 };
 
index 528ccda..1f0c61e 100644 (file)
@@ -150,7 +150,7 @@ static void rdpsnd_audio_set_volume(rdpsndDevicePlugin* device, uint32 value)
 {
 }
 
-static void rdpsnd_audio_play(rdpsndDevicePlugin* device, uint8* data, int size)
+static void rdpsnd_audio_play(rdpsndDevicePlugin* device, BYTE* data, int size)
 {
        rdpsndAudioQPlugin* aq_plugin_p = (rdpsndAudioQPlugin *) device;
        AudioQueueBufferRef aq_buf_ref;
index 4307b5f..aadb808 100644 (file)
@@ -321,16 +321,16 @@ static void rdpsnd_alsa_set_volume(rdpsndDevicePlugin* device, uint32 value)
        }
 }
 
-static void rdpsnd_alsa_play(rdpsndDevicePlugin* device, uint8* data, int size)
+static void rdpsnd_alsa_play(rdpsndDevicePlugin* device, BYTE* data, int size)
 {
-       uint8* src;
+       BYTE* src;
        int len;
        int status;
        int frames;
        int rbytes_per_frame;
        int sbytes_per_frame;
-       uint8* pindex;
-       uint8* end;
+       BYTE* pindex;
+       BYTE* end;
        rdpsndAlsaPlugin* alsa = (rdpsndAlsaPlugin*) device;
 
        if (alsa->out_handle == 0)
index 2630796..aeabe08 100644 (file)
@@ -453,11 +453,11 @@ static void rdpsnd_pulse_set_volume(rdpsndDevicePlugin* device, uint32 value)
        pa_threaded_mainloop_unlock(pulse->mainloop);
 }
 
-static void rdpsnd_pulse_play(rdpsndDevicePlugin* device, uint8* data, int size)
+static void rdpsnd_pulse_play(rdpsndDevicePlugin* device, BYTE* data, int size)
 {
        int len;
        int ret;
-       uint8* src;
+       BYTE* src;
        rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*) device;
 
        if (!pulse->stream)
index 7426267..7fba7bf 100644 (file)
@@ -48,22 +48,22 @@ struct rdpsnd_plugin
 
        LIST* data_out_list;
 
-       uint8 cBlockNo;
+       BYTE cBlockNo;
        rdpsndFormat* supported_formats;
        int n_supported_formats;
        int current_format;
 
        BOOL expectingWave;
-       uint8 waveData[4];
-       uint16 waveDataSize;
+       BYTE waveData[4];
+       UINT16 waveDataSize;
        uint32 wTimeStamp; /* server timestamp */
        uint32 wave_timestamp; /* client timestamp */
 
        BOOL is_open;
        uint32 close_timestamp;
 
-       uint16 fixed_format;
-       uint16 fixed_channel;
+       UINT16 fixed_format;
+       UINT16 fixed_channel;
        uint32 fixed_rate;
        int latency;
 
@@ -132,7 +132,7 @@ static void rdpsnd_process_interval(rdpSvcPlugin* plugin)
 
 static void rdpsnd_free_supported_formats(rdpsndPlugin* rdpsnd)
 {
-       uint16 i;
+       UINT16 i;
 
        for (i = 0; i < rdpsnd->n_supported_formats; i++)
                free(rdpsnd->supported_formats[i].data);
@@ -146,15 +146,15 @@ static void rdpsnd_free_supported_formats(rdpsndPlugin* rdpsnd)
    of client supported formats */
 static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in)
 {
-       uint16 wNumberOfFormats;
-       uint16 nFormat;
-       uint16 wVersion;
+       UINT16 wNumberOfFormats;
+       UINT16 nFormat;
+       UINT16 wVersion;
        STREAM* data_out;
        rdpsndFormat* out_formats;
-       uint16 n_out_formats;
+       UINT16 n_out_formats;
        rdpsndFormat* format;
-       uint8* format_mark;
-       uint8* data_mark;
+       BYTE* format_mark;
+       BYTE* data_mark;
        int pos;
 
        rdpsnd_free_supported_formats(rdpsnd);
@@ -162,11 +162,11 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
        stream_seek_uint32(data_in); /* dwFlags */
        stream_seek_uint32(data_in); /* dwVolume */
        stream_seek_uint32(data_in); /* dwPitch */
-       stream_seek_uint16(data_in); /* wDGramPort */
-       stream_read_uint16(data_in, wNumberOfFormats);
-       stream_read_uint8(data_in, rdpsnd->cBlockNo); /* cLastBlockConfirmed */
-       stream_read_uint16(data_in, wVersion);
-       stream_seek_uint8(data_in); /* bPad */
+       stream_seek_UINT16(data_in); /* wDGramPort */
+       stream_read_UINT16(data_in, wNumberOfFormats);
+       stream_read_BYTE(data_in, rdpsnd->cBlockNo); /* cLastBlockConfirmed */
+       stream_read_UINT16(data_in, wVersion);
+       stream_seek_BYTE(data_in); /* bPad */
 
        DEBUG_SVC("wNumberOfFormats %d wVersion %d", wNumberOfFormats, wVersion);
        if (wNumberOfFormats < 1)
@@ -179,29 +179,29 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
        n_out_formats = 0;
 
        data_out = stream_new(24);
-       stream_write_uint8(data_out, SNDC_FORMATS); /* msgType */
-       stream_write_uint8(data_out, 0); /* bPad */
-       stream_seek_uint16(data_out); /* BodySize */
+       stream_write_BYTE(data_out, SNDC_FORMATS); /* msgType */
+       stream_write_BYTE(data_out, 0); /* bPad */
+       stream_seek_UINT16(data_out); /* BodySize */
        stream_write_uint32(data_out, TSSNDCAPS_ALIVE | TSSNDCAPS_VOLUME); /* dwFlags */
        stream_write_uint32(data_out, 0xFFFFFFFF); /* dwVolume */
        stream_write_uint32(data_out, 0); /* dwPitch */
-       stream_write_uint16_be(data_out, 0); /* wDGramPort */
-       stream_seek_uint16(data_out); /* wNumberOfFormats */
-       stream_write_uint8(data_out, 0); /* cLastBlockConfirmed */
-       stream_write_uint16(data_out, 6); /* wVersion */
-       stream_write_uint8(data_out, 0); /* bPad */
+       stream_write_UINT16_be(data_out, 0); /* wDGramPort */
+       stream_seek_UINT16(data_out); /* wNumberOfFormats */
+       stream_write_BYTE(data_out, 0); /* cLastBlockConfirmed */
+       stream_write_UINT16(data_out, 6); /* wVersion */
+       stream_write_BYTE(data_out, 0); /* bPad */
 
        for (nFormat = 0; nFormat < wNumberOfFormats; nFormat++)
        {
                stream_get_mark(data_in, format_mark);
                format = &out_formats[n_out_formats];
-               stream_read_uint16(data_in, format->wFormatTag);
-               stream_read_uint16(data_in, format->nChannels);
+               stream_read_UINT16(data_in, format->wFormatTag);
+               stream_read_UINT16(data_in, format->nChannels);
                stream_read_uint32(data_in, format->nSamplesPerSec);
                stream_seek_uint32(data_in); /* nAvgBytesPerSec */
-               stream_read_uint16(data_in, format->nBlockAlign);
-               stream_read_uint16(data_in, format->wBitsPerSample);
-               stream_read_uint16(data_in, format->cbSize);
+               stream_read_UINT16(data_in, format->nBlockAlign);
+               stream_read_UINT16(data_in, format->wBitsPerSample);
+               stream_read_UINT16(data_in, format->cbSize);
                stream_get_mark(data_in, data_mark);
                stream_seek(data_in, format->cbSize);
                format->data = NULL;
@@ -244,9 +244,9 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
 
        pos = stream_get_pos(data_out);
        stream_set_pos(data_out, 2);
-       stream_write_uint16(data_out, pos - 4);
+       stream_write_UINT16(data_out, pos - 4);
        stream_set_pos(data_out, 18);
-       stream_write_uint16(data_out, n_out_formats);
+       stream_write_UINT16(data_out, n_out_formats);
        stream_set_pos(data_out, pos);
 
        svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out);
@@ -254,11 +254,11 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
        if (wVersion >= 6)
        {
                data_out = stream_new(8);
-               stream_write_uint8(data_out, SNDC_QUALITYMODE); /* msgType */
-               stream_write_uint8(data_out, 0); /* bPad */
-               stream_write_uint16(data_out, 4); /* BodySize */
-               stream_write_uint16(data_out, HIGH_QUALITY); /* wQualityMode */
-               stream_write_uint16(data_out, 0); /* Reserved */
+               stream_write_BYTE(data_out, SNDC_QUALITYMODE); /* msgType */
+               stream_write_BYTE(data_out, 0); /* bPad */
+               stream_write_UINT16(data_out, 4); /* BodySize */
+               stream_write_UINT16(data_out, HIGH_QUALITY); /* wQualityMode */
+               stream_write_UINT16(data_out, 0); /* Reserved */
 
                svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out);
        }
@@ -267,30 +267,30 @@ static void rdpsnd_process_message_formats(rdpsndPlugin* rdpsnd, STREAM* data_in
 /* server is getting a feel of the round trip time */
 static void rdpsnd_process_message_training(rdpsndPlugin* rdpsnd, STREAM* data_in)
 {
-       uint16 wTimeStamp;
-       uint16 wPackSize;
+       UINT16 wTimeStamp;
+       UINT16 wPackSize;
        STREAM* data_out;
 
-       stream_read_uint16(data_in, wTimeStamp);
-       stream_read_uint16(data_in, wPackSize);
+       stream_read_UINT16(data_in, wTimeStamp);
+       stream_read_UINT16(data_in, wPackSize);
 
        data_out = stream_new(8);
-       stream_write_uint8(data_out, SNDC_TRAINING); /* msgType */
-       stream_write_uint8(data_out, 0); /* bPad */
-       stream_write_uint16(data_out, 4); /* BodySize */
-       stream_write_uint16(data_out, wTimeStamp);
-       stream_write_uint16(data_out, wPackSize);
+       stream_write_BYTE(data_out, SNDC_TRAINING); /* msgType */
+       stream_write_BYTE(data_out, 0); /* bPad */
+       stream_write_UINT16(data_out, 4); /* BodySize */
+       stream_write_UINT16(data_out, wTimeStamp);
+       stream_write_UINT16(data_out, wPackSize);
 
        svc_plugin_send((rdpSvcPlugin*)rdpsnd, data_out);
 }
 
-static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_in, uint16 BodySize)
+static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_in, UINT16 BodySize)
 {
-       uint16 wFormatNo;
+       UINT16 wFormatNo;
 
-       stream_read_uint16(data_in, rdpsnd->wTimeStamp);
-       stream_read_uint16(data_in, wFormatNo);
-       stream_read_uint8(data_in, rdpsnd->cBlockNo);
+       stream_read_UINT16(data_in, rdpsnd->wTimeStamp);
+       stream_read_UINT16(data_in, wFormatNo);
+       stream_read_BYTE(data_in, rdpsnd->cBlockNo);
        stream_seek(data_in, 3); /* bPad */
        stream_read(data_in, rdpsnd->waveData, 4);
        rdpsnd->waveDataSize = BodySize - 8;
@@ -320,7 +320,7 @@ static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_
 /* header is not removed from data in this function */
 static void rdpsnd_process_message_wave(rdpsndPlugin* rdpsnd, STREAM* data_in)
 {
-       uint16 wTimeStamp;
+       UINT16 wTimeStamp;
        uint32 delay_ms;
        uint32 process_ms;
        struct data_out_item* item;
@@ -344,12 +344,12 @@ static void rdpsnd_process_message_wave(rdpsndPlugin* rdpsnd, STREAM* data_in)
 
        item = xnew(struct data_out_item);
        item->data_out = stream_new(8);
-       stream_write_uint8(item->data_out, SNDC_WAVECONFIRM);
-       stream_write_uint8(item->data_out, 0);
-       stream_write_uint16(item->data_out, 4);
-       stream_write_uint16(item->data_out, wTimeStamp);
-       stream_write_uint8(item->data_out, rdpsnd->cBlockNo); /* cConfirmedBlockNo */
-       stream_write_uint8(item->data_out, 0); /* bPad */
+       stream_write_BYTE(item->data_out, SNDC_WAVECONFIRM);
+       stream_write_BYTE(item->data_out, 0);
+       stream_write_UINT16(item->data_out, 4);
+       stream_write_UINT16(item->data_out, wTimeStamp);
+       stream_write_BYTE(item->data_out, rdpsnd->cBlockNo); /* cConfirmedBlockNo */
+       stream_write_BYTE(item->data_out, 0); /* bPad */
        item->out_timestamp = rdpsnd->wave_timestamp + delay_ms;
 
        list_enqueue(rdpsnd->data_out_list, item);
@@ -378,8 +378,8 @@ static void rdpsnd_process_message_setvolume(rdpsndPlugin* rdpsnd, STREAM* data_
 static void rdpsnd_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
 {
        rdpsndPlugin* rdpsnd = (rdpsndPlugin*)plugin;
-       uint8 msgType;
-       uint16 BodySize;
+       BYTE msgType;
+       UINT16 BodySize;
 
        if (rdpsnd->expectingWave)
        {
@@ -388,9 +388,9 @@ static void rdpsnd_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
                return;
        }
 
-       stream_read_uint8(data_in, msgType); /* msgType */
-       stream_seek_uint8(data_in); /* bPad */
-       stream_read_uint16(data_in, BodySize);
+       stream_read_BYTE(data_in, msgType); /* msgType */
+       stream_seek_BYTE(data_in); /* bPad */
+       stream_read_UINT16(data_in, BodySize);
 
        DEBUG_SVC("msgType %d BodySize %d", msgType, BodySize);
 
@@ -503,7 +503,7 @@ static void rdpsnd_process_connect(rdpSvcPlugin* plugin)
        while (data && data->size > 0)
        {
                rdpsnd_process_plugin_data(rdpsnd, data);
-               data = (RDP_PLUGIN_DATA*) (((uint8*) data) + data->size);
+               data = (RDP_PLUGIN_DATA*) (((BYTE*) data) + data->size);
        }
 
        if (rdpsnd->device == NULL)
index 8ea1694..1ca7784 100644 (file)
@@ -30,7 +30,7 @@ typedef BOOL (*pcFormatSupported) (rdpsndDevicePlugin* device, rdpsndFormat* for
 typedef void (*pcOpen) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency);
 typedef void (*pcSetFormat) (rdpsndDevicePlugin* device, rdpsndFormat* format, int latency);
 typedef void (*pcSetVolume) (rdpsndDevicePlugin* device, uint32 value);
-typedef void (*pcPlay) (rdpsndDevicePlugin* device, uint8* data, int size);
+typedef void (*pcPlay) (rdpsndDevicePlugin* device, BYTE* data, int size);
 typedef void (*pcStart) (rdpsndDevicePlugin* device);
 typedef void (*pcClose) (rdpsndDevicePlugin* device);
 typedef void (*pcFree) (rdpsndDevicePlugin* device);
index a3c75ed..2427044 100644 (file)
@@ -42,7 +42,7 @@ typedef struct _rdpsnd_server
        STREAM* rdpsnd_pdu;
 
        FREERDP_DSP_CONTEXT* dsp_context;
-       uint8* out_buffer;
+       BYTE* out_buffer;
        int out_buffer_size;
        int out_frames;
        int out_pending_frames;
@@ -53,9 +53,9 @@ typedef struct _rdpsnd_server
 
 #define RDPSND_PDU_INIT(_s, _msgType) \
 { \
-       stream_write_uint8(_s, _msgType); \
-       stream_write_uint8(_s, 0); \
-       stream_seek_uint16(_s); \
+       stream_write_BYTE(_s, _msgType); \
+       stream_write_BYTE(_s, 0); \
+       stream_seek_UINT16(_s); \
 }
 
 #define RDPSND_PDU_FINISH(_s) \
@@ -64,7 +64,7 @@ typedef struct _rdpsnd_server
        int _pos; \
        _pos = stream_get_pos(_s); \
        stream_set_pos(_s, 2); \
-       stream_write_uint16(_s, _pos - 4); \
+       stream_write_UINT16(_s, _pos - 4); \
        stream_set_pos(_s, _pos); \
        _r = WTSVirtualChannelWrite(rdpsnd->rdpsnd_channel, stream_get_head(_s), stream_get_length(_s), NULL); \
        stream_set_pos(_s, 0); \
@@ -73,32 +73,32 @@ typedef struct _rdpsnd_server
 
 static BOOL rdpsnd_server_send_formats(rdpsnd_server* rdpsnd, STREAM* s)
 {
-       uint16 i;
+       UINT16 i;
 
        RDPSND_PDU_INIT(s, SNDC_FORMATS);
 
        stream_write_uint32(s, 0); /* dwFlags */
        stream_write_uint32(s, 0); /* dwVolume */
        stream_write_uint32(s, 0); /* dwPitch */
-       stream_write_uint16(s, 0); /* wDGramPort */
-       stream_write_uint16(s, rdpsnd->context.num_server_formats); /* wNumberOfFormats */
-       stream_write_uint8(s, rdpsnd->context.block_no); /* cLastBlockConfirmed */
-       stream_write_uint16(s, 0x06); /* wVersion */
-       stream_write_uint8(s, 0); /* bPad */
+       stream_write_UINT16(s, 0); /* wDGramPort */
+       stream_write_UINT16(s, rdpsnd->context.num_server_formats); /* wNumberOfFormats */
+       stream_write_BYTE(s, rdpsnd->context.block_no); /* cLastBlockConfirmed */
+       stream_write_UINT16(s, 0x06); /* wVersion */
+       stream_write_BYTE(s, 0); /* bPad */
 
        for (i = 0; i < rdpsnd->context.num_server_formats; i++)
        {
-               stream_write_uint16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */
-               stream_write_uint16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */
+               stream_write_UINT16(s, rdpsnd->context.server_formats[i].wFormatTag); /* wFormatTag (WAVE_FORMAT_PCM) */
+               stream_write_UINT16(s, rdpsnd->context.server_formats[i].nChannels); /* nChannels */
                stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec); /* nSamplesPerSec */
 
                stream_write_uint32(s, rdpsnd->context.server_formats[i].nSamplesPerSec *
                        rdpsnd->context.server_formats[i].nChannels *
                        rdpsnd->context.server_formats[i].wBitsPerSample / 8); /* nAvgBytesPerSec */
 
-               stream_write_uint16(s, rdpsnd->context.server_formats[i].nBlockAlign); /* nBlockAlign */
-               stream_write_uint16(s, rdpsnd->context.server_formats[i].wBitsPerSample); /* wBitsPerSample */
-               stream_write_uint16(s, rdpsnd->context.server_formats[i].cbSize); /* cbSize */
+               stream_write_UINT16(s, rdpsnd->context.server_formats[i].nBlockAlign); /* nBlockAlign */
+               stream_write_UINT16(s, rdpsnd->context.server_formats[i].wBitsPerSample); /* wBitsPerSample */
+               stream_write_UINT16(s, rdpsnd->context.server_formats[i].cbSize); /* cbSize */
 
                if (rdpsnd->context.server_formats[i].cbSize > 0)
                {
@@ -119,11 +119,11 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s)
        stream_seek_uint32(s); /* dwFlags */
        stream_seek_uint32(s); /* dwVolume */
        stream_seek_uint32(s); /* dwPitch */
-       stream_seek_uint16(s); /* wDGramPort */
-       stream_read_uint16(s, rdpsnd->context.num_client_formats); /* wNumberOfFormats */
-       stream_seek_uint8(s); /* cLastBlockConfirmed */
-       stream_seek_uint16(s); /* wVersion */
-       stream_seek_uint8(s); /* bPad */
+       stream_seek_UINT16(s); /* wDGramPort */
+       stream_read_UINT16(s, rdpsnd->context.num_client_formats); /* wNumberOfFormats */
+       stream_seek_BYTE(s); /* cLastBlockConfirmed */
+       stream_seek_UINT16(s); /* wVersion */
+       stream_seek_BYTE(s); /* bPad */
 
        if (rdpsnd->context.num_client_formats > 0)
        {
@@ -138,13 +138,13 @@ static BOOL rdpsnd_server_recv_formats(rdpsnd_server* rdpsnd, STREAM* s)
                                return FALSE;
                        }
 
-                       stream_read_uint16(s, rdpsnd->context.client_formats[i].wFormatTag);
-                       stream_read_uint16(s, rdpsnd->context.client_formats[i].nChannels);
+                       stream_read_UINT16(s, rdpsnd->context.client_formats[i].wFormatTag);
+                       stream_read_UINT16(s, rdpsnd->context.client_formats[i].nChannels);
                        stream_read_uint32(s, rdpsnd->context.client_formats[i].nSamplesPerSec);
                        stream_seek_uint32(s); /* nAvgBytesPerSec */
-                       stream_read_uint16(s, rdpsnd->context.client_formats[i].nBlockAlign);
-                       stream_read_uint16(s, rdpsnd->context.client_formats[i].wBitsPerSample);
-                       stream_read_uint16(s, rdpsnd->context.client_formats[i].cbSize);
+                       stream_read_UINT16(s, rdpsnd->context.client_formats[i].nBlockAlign);
+                       stream_read_UINT16(s, rdpsnd->context.client_formats[i].wBitsPerSample);
+                       stream_read_UINT16(s, rdpsnd->context.client_formats[i].cbSize);
 
                        if (rdpsnd->context.client_formats[i].cbSize > 0)
                        {
@@ -161,8 +161,8 @@ static void* rdpsnd_server_thread_func(void* arg)
        void* fd;
        STREAM* s;
        void* buffer;
-       uint8 msgType;
-       uint16 BodySize;
+       BYTE msgType;
+       UINT16 BodySize;
        uint32 bytes_returned = 0;
        rdpsnd_server* rdpsnd = (rdpsnd_server*) arg;
        freerdp_thread* thread = rdpsnd->rdpsnd_channel_thread;
@@ -200,9 +200,9 @@ static void* rdpsnd_server_thread_func(void* arg)
                                break;
                }
 
-               stream_read_uint8(s, msgType);
-               stream_seek_uint8(s); /* bPad */
-               stream_read_uint16(s, BodySize);
+               stream_read_BYTE(s, msgType);
+               stream_seek_BYTE(s); /* bPad */
+               stream_read_UINT16(s, BodySize);
 
                if (BodySize + 4 > (int) bytes_returned)
                        continue;
@@ -301,7 +301,7 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd)
 {
        int size;
        BOOL r;
-       uint8* src;
+       BYTE* src;
        int frames;
        int fill_size;
        rdpsndFormat* format;
@@ -353,13 +353,13 @@ static BOOL rdpsnd_server_send_audio_pdu(rdpsnd_server* rdpsnd)
 
        /* WaveInfo PDU */
        stream_set_pos(s, 0);
-       stream_write_uint8(s, SNDC_WAVE); /* msgType */
-       stream_write_uint8(s, 0); /* bPad */
-       stream_write_uint16(s, size + fill_size + 8); /* BodySize */
+       stream_write_BYTE(s, SNDC_WAVE); /* msgType */
+       stream_write_BYTE(s, 0); /* bPad */
+       stream_write_UINT16(s, size + fill_size + 8); /* BodySize */
 
-       stream_write_uint16(s, 0); /* wTimeStamp */
-       stream_write_uint16(s, rdpsnd->context.selected_client_format); /* wFormatNo */
-       stream_write_uint8(s, rdpsnd->context.block_no); /* cBlockNo */
+       stream_write_UINT16(s, 0); /* wTimeStamp */
+       stream_write_UINT16(s, rdpsnd->context.selected_client_format); /* wFormatNo */
+       stream_write_BYTE(s, rdpsnd->context.block_no); /* cBlockNo */
        stream_seek(s, 3); /* bPad */
        stream_write(s, src, 4);
 
@@ -397,7 +397,7 @@ static BOOL rdpsnd_server_send_samples(rdpsnd_server_context* context, const voi
                cframesize = cframes * rdpsnd->src_bytes_per_frame;
 
                memcpy(rdpsnd->out_buffer + (rdpsnd->out_pending_frames * rdpsnd->src_bytes_per_frame), buf, cframesize);
-               buf = (uint8*) buf + cframesize;
+               buf = (BYTE*) buf + cframesize;
                nframes -= cframes;
                rdpsnd->out_pending_frames += cframes;
 
@@ -418,8 +418,8 @@ static BOOL rdpsnd_server_set_volume(rdpsnd_server_context* context, int left, i
 
        RDPSND_PDU_INIT(s, SNDC_SETVOLUME);
 
-       stream_write_uint16(s, left);
-       stream_write_uint16(s, right);
+       stream_write_UINT16(s, left);
+       stream_write_UINT16(s, right);
        
        RDPSND_PDU_FINISH(s);
 }
index f585220..06960d7 100644 (file)
@@ -108,7 +108,7 @@ static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp)
        }
 
        stream_write_uint32(irp->output, FileId);
-       stream_write_uint8(irp->output, 0);
+       stream_write_BYTE(irp->output, 0);
 
        free(path);
 
@@ -144,7 +144,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
        SERIAL_TTY* tty;
        uint32 Length;
        uint64 Offset;
-       uint8* buffer = NULL;
+       BYTE* buffer = NULL;
 
        stream_read_uint32(irp->input, Length);
        stream_read_uint64(irp->input, Offset);
@@ -162,7 +162,7 @@ static void serial_process_irp_read(SERIAL_DEVICE* serial, IRP* irp)
        }
        else
        {
-               buffer = (uint8*) malloc(Length);
+               buffer = (BYTE*) malloc(Length);
 
                if (!serial_tty_read(tty, buffer, &Length))
                {
@@ -226,7 +226,7 @@ static void serial_process_irp_write(SERIAL_DEVICE* serial, IRP* irp)
        }
 
        stream_write_uint32(irp->output, Length);
-       stream_write_uint8(irp->output, 0); /* Padding */
+       stream_write_BYTE(irp->output, 0); /* Padding */
 
        irp->Complete(irp);
 }
@@ -420,7 +420,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
                serial->device.data = stream_new(len + 1);
 
                for (i = 0; i <= len; i++)
-                       stream_write_uint8(serial->device.data, name[i] < 0 ? '_' : name[i]);
+                       stream_write_BYTE(serial->device.data, name[i] < 0 ? '_' : name[i]);
 
                serial->path = path;
                serial->irp_list = list_new();
index 41599d9..d567b83 100644 (file)
@@ -73,7 +73,7 @@
 #define TIOCOUTQ FIONWRITE
 #endif
 
-static uint32 tty_write_data(SERIAL_TTY* tty, uint8* data, int len);
+static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len);
 static void tty_set_termios(SERIAL_TTY* tty);
 static BOOL tty_get_termios(SERIAL_TTY* tty);
 static int tty_get_error_status();
@@ -83,7 +83,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
        int purge_mask;
        uint32 result;
        uint32 modemstate;
-       uint8 immediate;
+       BYTE immediate;
        uint32 ret = STATUS_SUCCESS;
        uint32 length = 0;
        uint32 pos;
@@ -113,9 +113,9 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
                        break;
 
                case IOCTL_SERIAL_SET_LINE_CONTROL:
-                       stream_read_uint8(input, tty->stop_bits);
-                       stream_read_uint8(input, tty->parity);
-                       stream_read_uint8(input, tty->word_length);
+                       stream_read_BYTE(input, tty->stop_bits);
+                       stream_read_BYTE(input, tty->parity);
+                       stream_read_BYTE(input, tty->word_length);
                        tty_set_termios(tty);
                        DEBUG_SVC("SERIAL_SET_LINE_CONTROL stop %d parity %d word %d",
                                tty->stop_bits, tty->parity, tty->word_length);
@@ -124,14 +124,14 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
                case IOCTL_SERIAL_GET_LINE_CONTROL:
                        DEBUG_SVC("SERIAL_GET_LINE_CONTROL");
                        length = 3;
-                       stream_write_uint8(output, tty->stop_bits);
-                       stream_write_uint8(output, tty->parity);
-                       stream_write_uint8(output, tty->word_length);
+                       stream_write_BYTE(output, tty->stop_bits);
+                       stream_write_BYTE(output, tty->parity);
+                       stream_write_BYTE(output, tty->word_length);
                        break;
 
                case IOCTL_SERIAL_IMMEDIATE_CHAR:
                        DEBUG_SVC("SERIAL_IMMEDIATE_CHAR");
-                       stream_read_uint8(input, immediate);
+                       stream_read_BYTE(input, immediate);
                        tty_write_data(tty, &immediate, 1);
                        break;
 
@@ -293,8 +293,8 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
                        stream_write_uint32(output, result);    /* Amount in out queue */
                        DEBUG_SVC("SERIAL_GET_COMMSTATUS out queue %d", result);
 
-                       stream_write_uint8(output, 0); /* EofReceived */
-                       stream_write_uint8(output, 0); /* WaitForImmediate */
+                       stream_write_BYTE(output, 0); /* EofReceived */
+                       stream_write_BYTE(output, 0); /* WaitForImmediate */
                        break;
 
                case IOCTL_SERIAL_PURGE:
@@ -369,7 +369,7 @@ uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input,
        return ret;
 }
 
-BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length)
+BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length)
 {
        long timeout = 90;
        struct termios *ptermios;
@@ -418,7 +418,7 @@ BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length)
        return TRUE;
 }
 
-BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length)
+BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length)
 {
        ssize_t r;
        uint32 event_txempty = Length;
@@ -969,7 +969,7 @@ static void tty_set_termios(SERIAL_TTY* tty)
        tcsetattr(tty->fd, TCSANOW, ptermios);
 }
 
-static uint32 tty_write_data(SERIAL_TTY* tty, uint8* data, int len)
+static uint32 tty_write_data(SERIAL_TTY* tty, BYTE* data, int len)
 {
        ssize_t r;
 
index d2d788c..c5b9596 100644 (file)
@@ -53,10 +53,10 @@ struct _SERIAL_TTY
        uint32 read_total_timeout_constant;
        uint32 write_total_timeout_multiplier;
        uint32 write_total_timeout_constant;
-       uint8 stop_bits;
-       uint8 parity;
-       uint8 word_length;
-       uint8 chars[6];
+       BYTE stop_bits;
+       BYTE parity;
+       BYTE word_length;
+       BYTE chars[6];
        struct termios* ptermios;
        struct termios* pold_termios;
        int event_txempty;
@@ -69,8 +69,8 @@ struct _SERIAL_TTY
 SERIAL_TTY* serial_tty_new(const char* path, uint32 id);
 void serial_tty_free(SERIAL_TTY* tty);
 
-BOOL serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length);
-BOOL serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length);
+BOOL serial_tty_read(SERIAL_TTY* tty, BYTE* buffer, uint32* Length);
+BOOL serial_tty_write(SERIAL_TTY* tty, BYTE* buffer, uint32 Length);
 uint32 serial_tty_control(SERIAL_TTY* tty, uint32 IoControlCode, STREAM* input, STREAM* output, uint32* abort_io);
 
 BOOL serial_tty_get_event(SERIAL_TTY* tty, uint32* result);
index 8023c8d..17ffa0b 100644 (file)
@@ -307,7 +307,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
                scard->device.data = stream_new(length + 1);
 
                for (i = 0; i <= length; i++)
-                       stream_write_uint8(scard->device.data, name[i] < 0 ? '_' : name[i]);
+                       stream_write_BYTE(scard->device.data, name[i] < 0 ? '_' : name[i]);
 
                scard->path = path;
 
index 138676b..9c23571 100644 (file)
@@ -86,7 +86,7 @@
 
 static uint32 sc_output_string(IRP* irp, char *src, BOOL wide)
 {
-       uint8* p;
+       BYTE* p;
        uint32 len;
 
        p = stream_get_tail(irp->output);
@@ -1060,7 +1060,7 @@ static uint32 handle_GetAttrib(IRP* irp)
        SCARDHANDLE hCard;
        DWORD dwAttrId = 0, dwAttrLen = 0;
        DWORD attrLen = 0;
-       uint8* pbAttr = NULL;
+       BYTE* pbAttr = NULL;
 
        stream_seek(irp->input, 0x20);
        stream_read_uint32(irp->input, dwAttrId);
@@ -1083,7 +1083,7 @@ static uint32 handle_GetAttrib(IRP* irp)
        }
 #endif
 
-       rv = SCardGetAttrib(hCard, dwAttrId, attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen);
+       rv = SCardGetAttrib(hCard, dwAttrId, attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen);
        if( rv != SCARD_S_SUCCESS ) {
 #ifdef SCARD_AUTOALLOCATE
                if(dwAttrLen == 0)
@@ -1100,7 +1100,7 @@ static uint32 handle_GetAttrib(IRP* irp)
        if(dwAttrId == SCARD_ATTR_DEVICE_FRIENDLY_NAME_A && rv == SCARD_E_UNSUPPORTED_FEATURE)
        {
                rv = SCardGetAttrib(hCard, SCARD_ATTR_DEVICE_FRIENDLY_NAME_W,
-                       attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen);
+                       attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen);
                if( rv != SCARD_S_SUCCESS ) {
 #ifdef SCARD_AUTOALLOCATE
                        if(dwAttrLen == 0)
@@ -1117,7 +1117,7 @@ static uint32 handle_GetAttrib(IRP* irp)
        if(dwAttrId == SCARD_ATTR_DEVICE_FRIENDLY_NAME_W && rv == SCARD_E_UNSUPPORTED_FEATURE)
        {
                rv = SCardGetAttrib(hCard, SCARD_ATTR_DEVICE_FRIENDLY_NAME_A,
-                       attrLen == 0 ? NULL : (uint8*) &pbAttr, &attrLen);
+                       attrLen == 0 ? NULL : (BYTE*) &pbAttr, &attrLen);
                if( rv != SCARD_S_SUCCESS ) {
 #ifdef SCARD_AUTOALLOCATE
                        if(dwAttrLen == 0)
@@ -1190,8 +1190,8 @@ void scard_error(SCARD_DEVICE* scard, IRP* irp, uint32 ntstatus)
 typedef struct _SERVER_SCARD_ATRMASK
 {
        uint32 cbAtr;
-       uint8 rgbAtr[36];
-       uint8 rgbMask[36];
+       BYTE rgbAtr[36];
+       BYTE rgbMask[36];
 }
 SERVER_SCARD_ATRMASK;
 
index 4dcaa24..af72e4a 100644 (file)
@@ -147,14 +147,14 @@ static BOOL tsmf_alsa_set_format(ITSMFAudioDevice* audio,
        return TRUE;
 }
 
-static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size)
+static BOOL tsmf_alsa_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size)
 {
        int len;
        int error;
        int frames;
-       uint8* end;
-       uint8* src;
-       uint8* pindex;
+       BYTE* end;
+       BYTE* src;
+       BYTE* pindex;
        int rbytes_per_frame;
        int sbytes_per_frame;
        TSMFALSAAudioDevice* alsa = (TSMFALSAAudioDevice*) audio;
index 6590f37..a6d348b 100644 (file)
@@ -50,7 +50,7 @@ typedef struct _TSMFFFmpegDecoder
        AVFrame* frame;
        int prepared;
 
-       uint8* decoded_data;
+       BYTE* decoded_data;
        uint32 decoded_size;
        uint32 decoded_size_max;
 } TSMFFFmpegDecoder;
@@ -110,8 +110,8 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
 {
        TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
        uint32 size;
-       const uint8* s;
-       uint8* p;
+       const BYTE* s;
+       BYTE* p;
 
        mdecoder->codec = avcodec_find_decoder(mdecoder->codec_id);
        if (!mdecoder->codec)
@@ -260,7 +260,7 @@ static BOOL tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* medi
        return TRUE;
 }
 
-static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
+static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions)
 {
        TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
        int decoded;
@@ -274,7 +274,7 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, u
        {
                AVPacket pkt;
                av_init_packet(&pkt);
-               pkt.data = (uint8*) data;
+               pkt.data = (BYTE*) data;
                pkt.size = data_size;
                if (extensions & TSMM_SAMPLE_EXT_CLEANPOINT)
                        pkt.flags |= AV_PKT_FLAG_KEY;
@@ -319,14 +319,14 @@ static BOOL tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, u
        return ret;
 }
 
-static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
+static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions)
 {
        TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
        int len;
        int frame_size;
        uint32 src_size;
-       const uint8* src;
-       uint8* dst;
+       const BYTE* src;
+       BYTE* dst;
        int dst_offset;
 
 #if 0
@@ -345,7 +345,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
                mdecoder->decoded_size_max = AVCODEC_MAX_AUDIO_FRAME_SIZE + 16;
        mdecoder->decoded_data = xzalloc(mdecoder->decoded_size_max);
        /* align the memory for SSE2 needs */
-       dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
+       dst = (BYTE*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
        dst_offset = dst - mdecoder->decoded_data;
        src = data;
        src_size = data_size;
@@ -357,7 +357,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
                {
                        mdecoder->decoded_size_max = mdecoder->decoded_size_max * 2 + 16;
                        mdecoder->decoded_data = realloc(mdecoder->decoded_data, mdecoder->decoded_size_max);
-                       dst = (uint8*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
+                       dst = (BYTE*) (((uintptr_t)mdecoder->decoded_data + 15) & ~ 0x0F);
                        if (dst - mdecoder->decoded_data != dst_offset)
                        {
                                /* re-align the memory if the alignment has changed after realloc */
@@ -377,7 +377,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
                        int got_frame = 0;
                        AVPacket pkt;
                        av_init_packet(&pkt);
-                       pkt.data = (uint8*) src;
+                       pkt.data = (BYTE*) src;
                        pkt.size = src_size;
                        len = avcodec_decode_audio4(mdecoder->codec_context, decoded_frame, &got_frame, &pkt);
                        
@@ -419,7 +419,7 @@ static BOOL tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data, u
        return TRUE;
 }
 
-static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
+static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions)
 {
        TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
 
@@ -442,10 +442,10 @@ static BOOL tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32
        }
 }
 
-static uint8* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size)
+static BYTE* tsmf_ffmpeg_get_decoded_data(ITSMFDecoder* decoder, uint32* size)
 {
        TSMFFFmpegDecoder* mdecoder = (TSMFFFmpegDecoder*) decoder;
-       uint8* buf;
+       BYTE* buf;
 
        *size = mdecoder->decoded_size;
        buf = mdecoder->decoded_data;
index caf4766..0589335 100644 (file)
@@ -1094,7 +1094,7 @@ static BOOL tsmf_gstreamer_pipeline_build(TSMFGstreamerDecoder * mdecoder)
        return TRUE;
 }
 
-static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions,
+static BOOL tsmf_gstreamer_decodeEx(ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions,
                                uint64 start_time, uint64 end_time, uint64 duration)
 {
        TSMFGstreamerDecoder * mdecoder = (TSMFGstreamerDecoder *) decoder;
index f4c9102..0a867af 100644 (file)
@@ -298,10 +298,10 @@ static BOOL tsmf_pulse_set_format(ITSMFAudioDevice* audio,
        return tsmf_pulse_open_stream(pulse);
 }
 
-static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size)
+static BOOL tsmf_pulse_play(ITSMFAudioDevice* audio, BYTE* data, uint32 data_size)
 {
        TSMFPulseAudioDevice* pulse = (TSMFPulseAudioDevice*) audio;
-       uint8* src;
+       BYTE* src;
        int len;
        int ret;
 
index 3020536..cdad9dd 100644 (file)
@@ -31,7 +31,7 @@ struct _ITSMFAudioDevice
        /* Set the audio data format. */
        BOOL (*SetFormat) (ITSMFAudioDevice* audio, uint32 sample_rate, uint32 channels, uint32 bits_per_sample);
        /* Play audio data. */
-       BOOL (*Play) (ITSMFAudioDevice* audio, uint8* data, uint32 data_size);
+       BOOL (*Play) (ITSMFAudioDevice* audio, BYTE* data, uint32 data_size);
        /* Get the latency of the last written sample, in 100ns */
        uint64 (*GetLatency) (ITSMFAudioDevice* audio);
        /* Change the playback volume level */
index 2a416ab..1360303 100644 (file)
@@ -36,7 +36,7 @@
 
 typedef struct _TSMFMediaTypeMap
 {
-       uint8 guid[16];
+       BYTE guid[16];
        const char* name;
        int type;
 } TSMFMediaTypeMap;
@@ -259,7 +259,7 @@ static const TSMFMediaTypeMap tsmf_format_type_map[] =
        }
 };
 
-static void tsmf_print_guid(const uint8* guid)
+static void tsmf_print_guid(const BYTE* guid)
 {
 #ifdef WITH_DEBUG_DVC
        int i;
@@ -454,15 +454,15 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
                case TSMF_FORMAT_TYPE_WAVEFORMATEX:
                        /* http://msdn.microsoft.com/en-us/library/dd757720.aspx */
 
-                       stream_seek_uint16(s);
-                       stream_read_uint16(s, mediatype->Channels);
+                       stream_seek_UINT16(s);
+                       stream_read_UINT16(s, mediatype->Channels);
                        stream_read_uint32(s, mediatype->SamplesPerSecond.Numerator);
                        mediatype->SamplesPerSecond.Denominator = 1;
                        stream_read_uint32(s, mediatype->BitRate);
                        mediatype->BitRate *= 8;
-                       stream_read_uint16(s, mediatype->BlockAlign);
-                       stream_read_uint16(s, mediatype->BitsPerSample);
-                       stream_read_uint16(s, mediatype->ExtraDataSize);
+                       stream_read_UINT16(s, mediatype->BlockAlign);
+                       stream_read_UINT16(s, mediatype->BitsPerSample);
+                       stream_read_UINT16(s, mediatype->ExtraDataSize);
                        if (mediatype->ExtraDataSize > 0)
                                mediatype->ExtraData = stream_get_tail(s);
                        
@@ -516,7 +516,7 @@ BOOL tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
 
 BOOL tsmf_codec_check_media_type(STREAM* s)
 {
-       uint8* m;
+       BYTE* m;
        BOOL ret;
        TS_AM_MEDIA_TYPE mediatype;
 
index d9d0cbe..9f222d1 100644 (file)
@@ -38,9 +38,9 @@ struct _ITSMFDecoder
        /* Set the decoder format. Return true if supported. */
        BOOL (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type);
        /* Decode a sample. */
-       BOOL (*Decode) (ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions);
+       BOOL (*Decode) (ITSMFDecoder* decoder, const BYTE* data, uint32 data_size, uint32 extensions);
        /* Get the decoded data */
-       uint8* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size);
+       BYTE* (*GetDecodedData) (ITSMFDecoder* decoder, uint32* size);
        /* Get the pixel format of decoded video frame */
        uint32 (*GetDecodedFormat) (ITSMFDecoder* decoder);
        /* Get the width and height of decoded video frame */
@@ -50,7 +50,7 @@ struct _ITSMFDecoder
        /* Optional Contol function */
        void (*Control) (ITSMFDecoder * decoder, ITSMFControlMsg control_msg, uint32 *arg);
        /* Decode a sample with extended interface. */
-       int (*DecodeEx) (ITSMFDecoder * decoder, const uint8 * data, uint32 data_size, uint32 extensions,
+       int (*DecodeEx) (ITSMFDecoder * decoder, const BYTE * data, uint32 data_size, uint32 extensions,
                                uint64 start_time, uint64 end_time, uint64 duration);
        /* Get current play time */
        uint64 (*GetRunningTime) (ITSMFDecoder * decoder);
index 8576273..a55fed3 100644 (file)
@@ -338,14 +338,14 @@ int tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman)
                        rects = (RDP_RECT*) xzalloc(sizeof(RDP_RECT) * num_rects);
                        for (i = 0; i < num_rects; i++)
                        {
-                               stream_read_uint16(ifman->input, rects[i].y); /* Top */
-                               stream_seek_uint16(ifman->input);
-                               stream_read_uint16(ifman->input, rects[i].x); /* Left */
-                               stream_seek_uint16(ifman->input);
-                               stream_read_uint16(ifman->input, rects[i].height); /* Bottom */
-                               stream_seek_uint16(ifman->input);
-                               stream_read_uint16(ifman->input, rects[i].width); /* Right */
-                               stream_seek_uint16(ifman->input);
+                               stream_read_UINT16(ifman->input, rects[i].y); /* Top */
+                               stream_seek_UINT16(ifman->input);
+                               stream_read_UINT16(ifman->input, rects[i].x); /* Left */
+                               stream_seek_UINT16(ifman->input);
+                               stream_read_UINT16(ifman->input, rects[i].height); /* Bottom */
+                               stream_seek_UINT16(ifman->input);
+                               stream_read_UINT16(ifman->input, rects[i].width); /* Right */
+                               stream_seek_UINT16(ifman->input);
                                rects[i].width -= rects[i].x;
                                rects[i].height -= rects[i].y;
 
index 55108ed..0827dde 100644 (file)
@@ -27,7 +27,7 @@ struct _TSMF_IFMAN
        const char* decoder_name;
        const char* audio_name;
        const char* audio_device;
-       uint8 presentation_id[16];
+       BYTE presentation_id[16];
        uint32 stream_id;
        uint32 message_id;
 
index a94dbe7..922e064 100644 (file)
@@ -57,7 +57,7 @@ struct _TSMF_CHANNEL_CALLBACK
        IWTSVirtualChannelManager* channel_mgr;
        IWTSVirtualChannel* channel;
 
-       uint8 presentation_id[16];
+       BYTE presentation_id[16];
        uint32 stream_id;
 };
 
@@ -113,7 +113,7 @@ BOOL tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback,
 
 static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
        uint32 cbSize,
-       uint8* pBuffer)
+       BYTE* pBuffer)
 {
        int length;
        STREAM* input;
@@ -132,7 +132,7 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
                return 1;
        }
        input = stream_new(0);
-       stream_attach(input, (uint8*) pBuffer, cbSize);
+       stream_attach(input, (BYTE*) pBuffer, cbSize);
        output = stream_new(256);
        stream_seek(output, 8);
 
@@ -355,7 +355,7 @@ static int tsmf_on_close(IWTSVirtualChannelCallback* pChannelCallback)
 
 static int tsmf_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
        IWTSVirtualChannel* pChannel,
-       uint8* Data,
+       BYTE* Data,
        int* pbAccept,
        IWTSVirtualChannelCallback** ppCallback)
 {
@@ -421,7 +421,7 @@ static void tsmf_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data)
                        }
                }
                
-               data = (RDP_PLUGIN_DATA*)(((uint8*)data) + data->size);
+               data = (RDP_PLUGIN_DATA*)(((BYTE*)data) + data->size);
        }
 }
 
index 3e77c42..31db61f 100644 (file)
@@ -57,7 +57,7 @@
 
 struct _TSMF_PRESENTATION
 {
-       uint8 presentation_id[GUID_SIZE];
+       BYTE presentation_id[GUID_SIZE];
 
        const char* audio_name;
        const char* audio_device;
@@ -67,14 +67,14 @@ struct _TSMF_PRESENTATION
        uint32 last_y;
        uint32 last_width;
        uint32 last_height;
-       uint16 last_num_rects;
+       UINT16 last_num_rects;
        RDP_RECT* last_rects;
 
        uint32 output_x;
        uint32 output_y;
        uint32 output_width;
        uint32 output_height;
-       uint16 output_num_rects;
+       UINT16 output_num_rects;
        RDP_RECT* output_rects;
 
        IWTSVirtualChannelCallback* channel_callback;
@@ -127,7 +127,7 @@ struct _TSMF_SAMPLE
        uint64 duration;
        uint32 extensions;
        uint32 data_size;
-       uint8* data;
+       BYTE* data;
        uint32 decoded_size;
        uint32 pixfmt;
 
@@ -250,7 +250,7 @@ static void tsmf_stream_process_ack(TSMF_STREAM* stream)
        }
 }
 
-TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCallback* pChannelCallback)
+TSMF_PRESENTATION* tsmf_presentation_new(const BYTE* guid, IWTSVirtualChannelCallback* pChannelCallback)
 {
        TSMF_PRESENTATION* presentation;
        pthread_t thid = pthread_self();
@@ -284,7 +284,7 @@ TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCa
        return presentation;
 }
 
-TSMF_PRESENTATION* tsmf_presentation_find_by_id(const uint8* guid)
+TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE* guid)
 {
        LIST_ITEM* item;
        TSMF_PRESENTATION* presentation;
@@ -1021,7 +1021,7 @@ void tsmf_stream_free(TSMF_STREAM* stream)
 
 void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback,
        uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions,
-       uint32 data_size, uint8* data)
+       uint32 data_size, BYTE* data)
 {
        TSMF_SAMPLE* sample;
 
index 50c0083..e1d21c8 100644 (file)
@@ -32,8 +32,8 @@ typedef struct _TSMF_STREAM TSMF_STREAM;
 
 typedef struct _TSMF_SAMPLE TSMF_SAMPLE;
 
-TSMF_PRESENTATION* tsmf_presentation_new(const uint8* guid, IWTSVirtualChannelCallback* pChannelCallback);
-TSMF_PRESENTATION* tsmf_presentation_find_by_id(const uint8* guid);
+TSMF_PRESENTATION* tsmf_presentation_new(const BYTE* guid, IWTSVirtualChannelCallback* pChannelCallback);
+TSMF_PRESENTATION* tsmf_presentation_find_by_id(const BYTE* guid);
 void tsmf_presentation_start(TSMF_PRESENTATION* presentation);
 void tsmf_presentation_stop(TSMF_PRESENTATION* presentation);
 void tsmf_presentation_paused(TSMF_PRESENTATION* presentation);
@@ -55,7 +55,7 @@ void tsmf_stream_free(TSMF_STREAM* stream);
 
 void tsmf_stream_push_sample(TSMF_STREAM* stream, IWTSVirtualChannelCallback* pChannelCallback,
        uint32 sample_id, uint64 start_time, uint64 end_time, uint64 duration, uint32 extensions,
-       uint32 data_size, uint8* data);
+       uint32 data_size, BYTE* data);
 
 void tsmf_media_init(void);
 
index 5a27552..b42e329 100644 (file)
@@ -51,7 +51,7 @@ typedef struct _TS_AM_MEDIA_TYPE
        uint32 Channels;
        uint32 BitsPerSample;
        uint32 BlockAlign;
-       const uint8* ExtraData;
+       const BYTE* ExtraData;
        uint32 ExtraDataSize;
 } TS_AM_MEDIA_TYPE;
 
index f0a3ba7..746720e 100644 (file)
@@ -30,7 +30,7 @@
 #include "urbdrc_types.h"
 #include "data_transfer.h"
 
-static void usb_process_get_port_status(IUDEVICE* pdev, uint8* OutputBuffer)
+static void usb_process_get_port_status(IUDEVICE* pdev, BYTE* OutputBuffer)
 {
        int bcdUSB = pdev->query_device_descriptor(pdev, BCD_USB);
 
@@ -59,7 +59,7 @@ static void usb_process_get_port_status(IUDEVICE* pdev, uint8* OutputBuffer)
 static int func_check_isochronous_fds(IUDEVICE* pdev)
 {
        int ret = 0;
-       uint8* data_temp;
+       BYTE* data_temp;
        uint32 size_temp, process_times = 2;
        ISOCH_CALLBACK_QUEUE* isoch_queue = NULL;
        ISOCH_CALLBACK_DATA* isoch = NULL;
@@ -118,7 +118,7 @@ static int func_check_isochronous_fds(IUDEVICE* pdev)
 #endif
 
 static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* callback,
-               uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
+               BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
 {
        IUDEVICE* pdev;
        uint32 NumRequestCompletion = 0;
@@ -157,7 +157,7 @@ static int urbdrc_process_register_request_callback(URBDRC_CHANNEL_CALLBACK* cal
        return 0;
 }
 
-static int urbdrc_process_cancel_request(uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
+static int urbdrc_process_cancel_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
 {
        IUDEVICE* pdev;
        uint32 CancelId;
@@ -177,7 +177,7 @@ static int urbdrc_process_cancel_request(uint8* data, uint32 data_sizem, IUDEVMA
        return error;
 }
 
-static int urbdrc_process_retract_device_request(uint8* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
+static int urbdrc_process_retract_device_request(BYTE* data, uint32 data_sizem, IUDEVMAN* udevman, uint32 UsbDevice)
 {
        uint32 Reason;
        LLOGLN(urbdrc_debug, ("urbdrc_process_retract_device_request"));
@@ -200,7 +200,7 @@ static int urbdrc_process_retract_device_request(uint8* data, uint32 data_sizem,
        return 0;
 }
 
-static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
+static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
                uint32 data_sizem, uint32 MessageId, IUDEVMAN * udevman, uint32 UsbDevice)
 {
        IUDEVICE* pdev;
@@ -211,8 +211,8 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
        uint32 OutputBufferSize;
        uint32 RequestId;
        uint32 usbd_status = USBD_STATUS_SUCCESS;
-       uint8* OutputBuffer;
-       uint8* out_data;
+       BYTE* OutputBuffer;
+       BYTE* out_data;
        int i, offset, success = 0;
 
        LLOGLN(urbdrc_debug, ("urbdrc_process__io_control"));
@@ -230,7 +230,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
        InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
 
        /**  process */
-       OutputBuffer = (uint8 *)malloc(OutputBufferSize);
+       OutputBuffer = (BYTE *)malloc(OutputBufferSize);
        memset(OutputBuffer, 0, OutputBufferSize);
 
        switch (IoControlCode)
@@ -285,7 +285,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
 
        offset = 28;
        out_size = offset + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
        data_write_uint32(out_data + 0, InterfaceId); /** interface */
        data_write_uint32(out_data + 4, MessageId); /** message id */
@@ -297,7 +297,7 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
 
        for (i=0;i<OutputBufferSize;i++)
        {
-               data_write_uint8(out_data + offset, OutputBuffer[i]); /** OutputBuffer */
+               data_write_BYTE(out_data + offset, OutputBuffer[i]); /** OutputBuffer */
                offset += 1;
        }
 
@@ -310,11 +310,11 @@ static int urbdrc_process_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* d
        return 0;
 }
 
-static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
+static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
                uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice)
 {
        IUDEVICE* pdev;
-       uint8* out_data;
+       BYTE* out_data;
        uint32 out_size, IoControlCode, InterfaceId, InputBufferSize;
        uint32 OutputBufferSize, RequestId, frames;
 
@@ -337,7 +337,7 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback,
        urbdrc_get_mstime(frames);
 
        out_size = 32;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
        data_write_uint32(out_data + 0, InterfaceId); /** interface */
        data_write_uint32(out_data + 4, MessageId); /** message id */
@@ -356,7 +356,7 @@ static int urbdrc_process_internal_io_control(URBDRC_CHANNEL_CALLBACK* callback,
        return 0;
 }
 
-static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
+static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
                uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice)
 {
        IUDEVICE* pdev;
@@ -365,8 +365,8 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, u
        uint32 TextType;
        uint32 LocaleId;
        uint32 bufferSize = 1024;
-       uint8* out_data;
-       uint8 DeviceDescription[bufferSize];
+       BYTE* out_data;
+       BYTE DeviceDescription[bufferSize];
        int out_offset;
 
        LLOGLN(urbdrc_debug, ("urbdrc_process_query_device_text"));
@@ -389,7 +389,7 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, u
        if (bufferSize != 0)
                out_size += 2;
 
-       out_data = (uint8*) malloc(out_size);
+       out_data = (BYTE*) malloc(out_size);
        memset(out_data, 0, out_size);
 
        data_write_uint32(out_data + 0, InterfaceId); /** interface */
@@ -401,7 +401,7 @@ static int urbdrc_process_query_device_text(URBDRC_CHANNEL_CALLBACK* callback, u
                out_offset = 12;
                memcpy(out_data + out_offset, DeviceDescription, bufferSize);
                out_offset += bufferSize;
-               data_write_uint16(out_data + out_offset, 0x0000);
+               data_write_UINT16(out_data + out_offset, 0x0000);
                out_offset += 2;
        }
        else
@@ -424,7 +424,7 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev, MSUSB_CONFIG_
 {
        int inum;
        MSUSB_INTERFACE_DESCRIPTOR** MsInterfaces = MsConfig->MsInterfaces;
-       uint8  InterfaceNumber, AlternateSetting;
+       BYTE  InterfaceNumber, AlternateSetting;
        uint32 NumInterfaces = MsConfig->NumInterfaces;
 
        for (inum = 0; inum < NumInterfaces; inum++)
@@ -435,14 +435,14 @@ static void func_select_all_interface_for_msconfig(IUDEVICE* pdev, MSUSB_CONFIG_
        }
 }
 
-static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
+static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
        uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir)
 {
        MSUSB_CONFIG_DESCRIPTOR * MsConfig = NULL;
        IUDEVICE* pdev = NULL;
        uint32 out_size, InterfaceId, RequestId, NumInterfaces, usbd_status = 0;
-       uint8 ConfigurationDescriptorIsValid;
-       uint8* out_data;
+       BYTE ConfigurationDescriptorIsValid;
+       BYTE* out_data;
        int MsOutSize = 0, offset = 0;
 
        if (transferDir == 0)
@@ -458,7 +458,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
 
        InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
        data_read_uint32(data + 0, RequestId);
-       data_read_uint8(data + 4, ConfigurationDescriptorIsValid);
+       data_read_BYTE(data + 4, ConfigurationDescriptorIsValid);
        data_read_uint32(data + 8, NumInterfaces);
        offset = 12;
 
@@ -482,7 +482,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
                out_size = 36 + MsOutSize;
        else
                out_size = 44;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
        data_write_uint32(out_data + 0, InterfaceId);   /** interface */
        data_write_uint32(out_data + 4, MessageId);             /** message id */
@@ -493,16 +493,16 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
                /** CbTsUrbResult */
                data_write_uint32(out_data + 16, 8 + MsOutSize);
                /** TS_URB_RESULT_HEADER Size*/
-               data_write_uint16(out_data + 20, 8 + MsOutSize);
+               data_write_UINT16(out_data + 20, 8 + MsOutSize);
        }
        else
        {
                data_write_uint32(out_data + 16, 16);
-               data_write_uint16(out_data + 20, 16);
+               data_write_UINT16(out_data + 20, 16);
        }
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_SELECT_CONFIGURATION);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_CONFIGURATION);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
        offset = 28;
        /** TS_URB_SELECT_CONFIGURATION_RESULT */
@@ -525,7 +525,7 @@ static int urb_select_configuration(URBDRC_CHANNEL_CALLBACK* callback, uint8* da
        return 0;
 }
 
-static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data, uint32 data_sizem,
+static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data, uint32 data_sizem,
        uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir)
 {
        MSUSB_CONFIG_DESCRIPTOR* MsConfig;
@@ -533,8 +533,8 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        IUDEVICE* pdev;
        uint32 out_size, InterfaceId, RequestId, ConfigurationHandle;
        uint32 OutputBufferSize;
-       uint8 InterfaceNumber;
-       uint8* out_data;
+       BYTE InterfaceNumber;
+       BYTE* out_data;
        int out_offset, interface_size;
 
        if (transferDir == 0)
@@ -571,7 +571,7 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        interface_size = 16 + (MsInterface->NumberOfPipes * 20);
 
        out_size = 36 + interface_size ;
-       out_data = (uint8*) malloc(out_size);
+       out_data = (BYTE*) malloc(out_size);
        memset(out_data, 0, out_size);
 
        data_write_uint32(out_data + 0, InterfaceId);   /** interface */
@@ -580,9 +580,9 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 8 + interface_size);   /** CbTsUrbResult */
        /** TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 8 + interface_size);   /** Size */
+       data_write_UINT16(out_data + 20, 8 + interface_size);   /** Size */
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_SELECT_INTERFACE);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_SELECT_INTERFACE);
        data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS);  /** UsbdStatus */
        out_offset = 28;
 
@@ -600,16 +600,16 @@ static int urb_select_interface(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        return 0;
 }
 
-static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
+static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
        uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir, int External)
 {
        IUDEVICE* pdev;
        uint32 out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle;
        uint32 TransferFlags, OutputBufferSize, usbd_status, Timeout;
-       uint8 bmRequestType, Request;
-       uint16 Value, Index, length;
-       uint8* buffer;
-       uint8* out_data;
+       BYTE bmRequestType, Request;
+       UINT16 Value, Index, length;
+       BYTE* buffer;
+       BYTE* out_data;
        int offset, ret;
 
        pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@@ -637,11 +637,11 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        }
 
        /** SetupPacket 8 bytes */
-       data_read_uint8(data + offset, bmRequestType);
-       data_read_uint8(data + offset + 1, Request);
-       data_read_uint16(data + offset + 2, Value);
-       data_read_uint16(data + offset + 4, Index);
-       data_read_uint16(data + offset + 6, length);
+       data_read_BYTE(data + offset, bmRequestType);
+       data_read_BYTE(data + offset + 1, Request);
+       data_read_UINT16(data + offset + 2, Value);
+       data_read_UINT16(data + offset + 4, Index);
+       data_read_UINT16(data + offset + 6, length);
        data_read_uint32(data + offset + 8, OutputBufferSize);
        offset +=  12;
 
@@ -652,7 +652,7 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        }
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -695,10 +695,10 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 0x00000008);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 0x0008);       /** Size */
+       data_write_UINT16(out_data + 20, 0x0008);       /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_CONTROL_TRANSFER);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_CONTROL_TRANSFER);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -712,14 +712,14 @@ static int urb_control_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
        return 0;
 }
 
-static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uint8* data,
+static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, BYTE* data,
        uint32 data_sizem, uint32 MessageId, IUDEVMAN* udevman, uint32 UsbDevice, int transferDir)
 {
        IUDEVICE *      pdev;
        uint32          out_size, RequestId, InterfaceId, EndpointAddress, PipeHandle;
        uint32          TransferFlags, OutputBufferSize, usbd_status = 0;
-       uint8 *         Buffer;
-       uint8 *         out_data;
+       BYTE *          Buffer;
+       BYTE *          out_data;
        int                     offset;
 
        pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@@ -740,7 +740,7 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin
        else
                out_size = 36 + OutputBufferSize;
 
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        switch (transferDir)
@@ -776,10 +776,10 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 0x00000008);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 0x0008);       /** Size */
+       data_write_UINT16(out_data + 20, 0x0008);       /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -795,7 +795,7 @@ static int urb_bulk_or_interrupt_transfer(URBDRC_CHANNEL_CALLBACK* callback, uin
 
 
 static int
-urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
+urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
@@ -808,9 +808,9 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        uint32  ErrorCount, OutputBufferSize, usbd_status = 0;
        uint32  RequestField, noAck = 0;
        uint32  out_size = 0;
-       uint8 * iso_buffer      = NULL;
-       uint8 * iso_packets     = NULL;
-       uint8 * out_data        = NULL;
+       BYTE *  iso_buffer      = NULL;
+       BYTE *  iso_packets     = NULL;
+       BYTE *  out_data        = NULL;
        int     offset, nullBuffer = 0, iso_status;
 
        pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@@ -837,13 +837,13 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        if (transferDir == USBD_TRANSFER_DIRECTION_OUT) {
                if (!noAck) {
                        out_size = 48 + (NumberOfPackets * 12);
-                       out_data = (uint8 *) malloc(out_size);
+                       out_data = (BYTE *) malloc(out_size);
                        iso_packets = out_data + 40;
                }
        }
        else {
                out_size = 48 + OutputBufferSize + (NumberOfPackets * 12);
-               out_data = (uint8 *) malloc(out_size);
+               out_data = (BYTE *) malloc(out_size);
                iso_packets = out_data + 40;
        }
 
@@ -917,9 +917,9 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 20 + (NumberOfPackets * 12));  /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 20 + (NumberOfPackets * 12));  /** Size */
+       data_write_UINT16(out_data + 20, 20 + (NumberOfPackets * 12));  /** Size */
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_ISOCH_TRANSFER);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_ISOCH_TRANSFER);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, StartFrame);   /** StartFrame */
@@ -961,20 +961,20 @@ urb_isoch_transfer(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
 
 static int
 urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
-       uint8 * data,
+       BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
        uint32 UsbDevice,
-       uint8 func_recipient,
+       BYTE func_recipient,
        int transferDir)
 {
        IUDEVICE * pdev;
        uint32  out_size, InterfaceId, RequestId, OutputBufferSize, usbd_status;
-       uint8   bmRequestType, desc_index, desc_type;
-       uint16  langId;
-       uint8 * buffer;
-       uint8 * out_data;
+       BYTE    bmRequestType, desc_index, desc_type;
+       UINT16  langId;
+       BYTE *  buffer;
+       BYTE *  out_data;
        int     ret, offset;
 
        pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@@ -982,13 +982,13 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
                return 0;
        InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
        data_read_uint32(data + 0, RequestId);
-       data_read_uint8(data + 4, desc_index);
-       data_read_uint8(data + 5, desc_type);
-       data_read_uint16(data + 6, langId);
+       data_read_BYTE(data + 4, desc_index);
+       data_read_BYTE(data + 5, desc_type);
+       data_read_UINT16(data + 6, langId);
        data_read_uint32(data + 8, OutputBufferSize);
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -1037,9 +1037,9 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 0x00000008);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 0x0008);       /** Size */
+       data_write_UINT16(out_data + 20, 0x0008);       /** Size */
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
        data_write_uint32(out_data + 28, 0);    /** HResult */
        data_write_uint32(out_data + 32, OutputBufferSize);     /** OutputBufferSize */
@@ -1055,20 +1055,20 @@ urb_control_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
 
 
 static int
-urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
+urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
        uint32 UsbDevice,
-       uint8 func_recipient,
+       BYTE func_recipient,
        int transferDir)
 {
        IUDEVICE * pdev;
        uint32  out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
-       uint16  Index;
-       uint8   bmRequestType;
-       uint8 * buffer;
-       uint8 * out_data;
+       UINT16  Index;
+       BYTE    bmRequestType;
+       BYTE *  buffer;
+       BYTE *  out_data;
        int     offset, ret;
 
        if (transferDir == 0){
@@ -1082,11 +1082,11 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
 
        data_read_uint32(data + 0, RequestId);
-       data_read_uint16(data + 4, Index); /** Index */
+       data_read_UINT16(data + 4, Index); /** Index */
        data_read_uint32(data + 8, OutputBufferSize);
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -1130,9 +1130,9 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId, include NoAck*/
        data_write_uint32(out_data + 16, 0x00000008);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 0x0008);               /** Size */
+       data_write_UINT16(out_data + 20, 0x0008);               /** Size */
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -1148,22 +1148,22 @@ urb_control_get_status_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
 
 static int
 urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
-       uint8 * data,
+       BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
        uint32 UsbDevice,
-       uint8 func_type,
-       uint8 func_recipient,
+       BYTE func_type,
+       BYTE func_recipient,
        int transferDir)
 {
        IUDEVICE * pdev;
        uint32  out_size, RequestId, InterfaceId, TransferFlags, usbd_status;
        uint32  OutputBufferSize;
-       uint8   ReqTypeReservedBits, Request, bmRequestType;
-       uint16  Value, Index, Padding;
-       uint8 * buffer;
-       uint8 * out_data;
+       BYTE    ReqTypeReservedBits, Request, bmRequestType;
+       UINT16  Value, Index, Padding;
+       BYTE *  buffer;
+       BYTE *  out_data;
        int             offset, ret;
        /** control by vendor command */
 
@@ -1174,16 +1174,16 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
 
        data_read_uint32(data + 0, RequestId);
        data_read_uint32(data + 4, TransferFlags); /** TransferFlags */
-       data_read_uint8(data + 8, ReqTypeReservedBits); /** ReqTypeReservedBids */
-       data_read_uint8(data + 9, Request); /** Request */
-       data_read_uint16(data + 10, Value); /** value */
-       data_read_uint16(data + 12, Index); /** index */
-       data_read_uint16(data + 14, Padding); /** Padding */
+       data_read_BYTE(data + 8, ReqTypeReservedBits); /** ReqTypeReservedBids */
+       data_read_BYTE(data + 9, Request); /** Request */
+       data_read_UINT16(data + 10, Value); /** value */
+       data_read_UINT16(data + 12, Index); /** index */
+       data_read_UINT16(data + 14, Padding); /** Padding */
        data_read_uint32(data + 16, OutputBufferSize);
        offset = 20;
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -1240,8 +1240,8 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId, include NoAck*/
        data_write_uint32(out_data + 16, 0x00000008);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 0x0008);       /** Size */
-       data_write_uint16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE);   /** Padding, MUST be ignored upon receipt */
+       data_write_UINT16(out_data + 20, 0x0008);       /** Size */
+       data_write_UINT16(out_data + 22, URB_FUNCTION_VENDOR_DEVICE);   /** Padding, MUST be ignored upon receipt */
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -1258,7 +1258,7 @@ urb_control_vendor_or_class_request(URBDRC_CHANNEL_CALLBACK * callback,
 
 static int
 urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
-       uint8 * data,
+       BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
@@ -1267,10 +1267,10 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
 {
        IUDEVICE * pdev;
        uint32          out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
-       uint8           Recipient, InterfaceNumber, Ms_PageIndex;
-       uint16          Ms_featureDescIndex;
-       uint8 *         out_data;
-       uint8 *         buffer;
+       BYTE            Recipient, InterfaceNumber, Ms_PageIndex;
+       UINT16          Ms_featureDescIndex;
+       BYTE *          out_data;
+       BYTE *          buffer;
        int                     offset, ret;
 
        pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@@ -1279,16 +1279,16 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
        InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
 
        data_read_uint32(data + 0, RequestId);
-       data_read_uint8(data + 4, Recipient); /** Recipient */
+       data_read_BYTE(data + 4, Recipient); /** Recipient */
        Recipient = Recipient && 0x1f;
-       data_read_uint8(data + 5, InterfaceNumber); /** InterfaceNumber */
-       data_read_uint8(data + 6, Ms_PageIndex); /** Ms_PageIndex */
-       data_read_uint16(data + 7, Ms_featureDescIndex); /** Ms_featureDescIndex */
+       data_read_BYTE(data + 5, InterfaceNumber); /** InterfaceNumber */
+       data_read_BYTE(data + 6, Ms_PageIndex); /** Ms_PageIndex */
+       data_read_UINT16(data + 7, Ms_featureDescIndex); /** Ms_featureDescIndex */
        data_read_uint32(data + 12, OutputBufferSize);
        offset = 16;
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -1334,10 +1334,10 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 0x00000008);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 0x0008);       /** Size */
+       data_write_UINT16(out_data + 20, 0x0008);       /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -1354,7 +1354,7 @@ urb_os_feature_descriptor_request(URBDRC_CHANNEL_CALLBACK * callback,
 
 
 static int
-urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
+urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
@@ -1365,7 +1365,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        IUDEVICE *      pdev;
        uint32          out_size, RequestId, InterfaceId, PipeHandle, EndpointAddress;
        uint32          OutputBufferSize, usbd_status = 0;
-       uint8 *         out_data;
+       BYTE *          out_data;
        int                     out_offset, ret;
 
        if (transferDir == 0){
@@ -1420,7 +1420,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        /** send data */
        out_offset = 36;
        out_size = out_offset + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
        data_write_uint32(out_data + 0, InterfaceId);   /** interface */
        data_write_uint32(out_data + 4, MessageId);     /** message id */
@@ -1429,10 +1429,10 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 0x00000008);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 0x0008);       /** Size */
+       data_write_UINT16(out_data + 20, 0x0008);       /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -1449,7 +1449,7 @@ urb_pipe_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
 
 static int
 urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
-       uint8 * data,
+       BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
@@ -1459,7 +1459,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
        IUDEVICE *      pdev;
        uint32          out_size, RequestId, InterfaceId, OutputBufferSize;
        uint32          dummy_frames;
-       uint8 *         out_data;
+       BYTE *          out_data;
 
        if (transferDir == 0){
                LLOGLN(urbdrc_debug, ("urb_get_current_frame_number: not support transfer out\n"));
@@ -1479,7 +1479,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
        urbdrc_get_mstime(dummy_frames);
 
        out_size = 40;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
        data_write_uint32(out_data + 0, InterfaceId);   /** interface */
        data_write_uint32(out_data + 4, MessageId);     /** message id */
@@ -1488,10 +1488,10 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 12);   /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 12);   /** Size */
+       data_write_UINT16(out_data + 20, 12);   /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_GET_CURRENT_FRAME_NUMBER);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CURRENT_FRAME_NUMBER);
        data_write_uint32(out_data + 24, USBD_STATUS_SUCCESS);  /** UsbdStatus */
        data_write_uint32(out_data + 28, dummy_frames); /** FrameNumber */
 
@@ -1508,7 +1508,7 @@ urb_get_current_frame_number(URBDRC_CHANNEL_CALLBACK * callback,
 /* Unused function for current server */
 static int
 urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
-       uint8 * data,
+       BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
@@ -1517,8 +1517,8 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
 {
        IUDEVICE *      pdev;
        uint32          out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
-       uint8 *         buffer;
-       uint8 *         out_data;
+       BYTE *          buffer;
+       BYTE *          out_data;
        int                     ret, offset;
 
        if (transferDir == 0){
@@ -1536,7 +1536,7 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
        data_read_uint32(data + 4, OutputBufferSize);
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -1569,10 +1569,10 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 8);    /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 8);    /** Size */
+       data_write_UINT16(out_data + 20, 8);    /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_GET_CONFIGURATION);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_GET_CONFIGURATION);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -1587,7 +1587,7 @@ urb_control_get_configuration_request(URBDRC_CHANNEL_CALLBACK * callback,
 /* Unused function for current server */
 static int
 urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
-       uint8 * data,
+       BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
@@ -1596,9 +1596,9 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
 {
        IUDEVICE *      pdev;
        uint32          out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
-       uint16          interface;
-       uint8 *         buffer;
-       uint8 *         out_data;
+       UINT16          interface;
+       BYTE *          buffer;
+       BYTE *          out_data;
        int                     ret, offset;
 
        if (transferDir == 0){
@@ -1612,11 +1612,11 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
        InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
 
        data_read_uint32(data + 0, RequestId);
-       data_read_uint16(data + 4, interface);
+       data_read_UINT16(data + 4, interface);
        data_read_uint32(data + 8, OutputBufferSize);
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -1647,10 +1647,10 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 8);    /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 8);    /** Size */
+       data_write_UINT16(out_data + 20, 8);    /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -1663,21 +1663,21 @@ urb_control_get_interface_request(URBDRC_CHANNEL_CALLBACK * callback,
 }
 
 static int
-urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
+urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
        uint32 UsbDevice,
-       uint8 func_recipient,
-       uint8 command,
+       BYTE func_recipient,
+       BYTE command,
        int transferDir)
 {
        IUDEVICE *      pdev;
        uint32          out_size, RequestId, InterfaceId, OutputBufferSize, usbd_status;
-       uint16          FeatureSelector, Index;
-       uint8           bmRequestType, bmRequest;
-       uint8 *         buffer;
-       uint8 *         out_data;
+       UINT16          FeatureSelector, Index;
+       BYTE            bmRequestType, bmRequest;
+       BYTE *          buffer;
+       BYTE *          out_data;
        int                     ret, offset;
 
        pdev = udevman->get_udevice_by_UsbDevice(udevman, UsbDevice);
@@ -1686,13 +1686,13 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        InterfaceId = ((STREAM_ID_PROXY<<30) | pdev->get_ReqCompletion(pdev));
 
        data_read_uint32(data + 0, RequestId);
-       data_read_uint16(data + 4, FeatureSelector);
-       data_read_uint16(data + 6, Index);
+       data_read_UINT16(data + 4, FeatureSelector);
+       data_read_UINT16(data + 6, Index);
        data_read_uint32(data + 8, OutputBufferSize);
        offset = 12;
 
        out_size = 36 + OutputBufferSize;
-       out_data = (uint8 *) malloc(out_size);
+       out_data = (BYTE *) malloc(out_size);
        memset(out_data, 0, out_size);
 
        buffer = out_data + 36;
@@ -1749,10 +1749,10 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
        data_write_uint32(out_data + 12, RequestId);    /** RequestId */
        data_write_uint32(out_data + 16, 8);    /** CbTsUrbResult */
        /** TsUrbResult TS_URB_RESULT_HEADER */
-       data_write_uint16(out_data + 20, 8);    /** Size */
+       data_write_UINT16(out_data + 20, 8);    /** Size */
 
        /** Padding, MUST be ignored upon receipt */
-       data_write_uint16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
+       data_write_UINT16(out_data + 22, URB_FUNCTION_GET_INTERFACE);
        data_write_uint32(out_data + 24, usbd_status);  /** UsbdStatus */
 
        data_write_uint32(out_data + 28, 0);    /** HResult */
@@ -1766,7 +1766,7 @@ urb_control_feature_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
 }
 
 static int
-urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data,
+urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, BYTE * data,
        uint32 data_sizem,
        uint32 MessageId,
        IUDEVMAN * udevman,
@@ -1775,8 +1775,8 @@ urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data
 {
        IUDEVICE *      pdev;
        uint32          CbTsUrb;
-       uint16          Size;
-       uint16          URB_Function;
+       UINT16          Size;
+       UINT16          URB_Function;
        uint32          OutputBufferSize;
        int                     error = 0;
 
@@ -1784,8 +1784,8 @@ urbdrc_process_transfer_request(URBDRC_CHANNEL_CALLBACK * callback, uint8 * data
        if (pdev == NULL)
                return 0;
        data_read_uint32(data + 0, CbTsUrb);    /** CbTsUrb */
-       data_read_uint16(data + 4, Size);       /** size */
-       data_read_uint16(data + 6, URB_Function);
+       data_read_UINT16(data + 4, Size);       /** size */
+       data_read_UINT16(data + 6, URB_Function);
        data_read_uint32(data + 4 + CbTsUrb, OutputBufferSize);
 
        switch (URB_Function)
@@ -2302,7 +2302,7 @@ urbdrc_process_udev_data_transfer(void* arg)
 {
        TRANSFER_DATA*  transfer_data = (TRANSFER_DATA*) arg;
        URBDRC_CHANNEL_CALLBACK * callback = transfer_data->callback;
-       uint8 *         pBuffer         = transfer_data->pBuffer;
+       BYTE *          pBuffer         = transfer_data->pBuffer;
        uint32          cbSize          = transfer_data->cbSize;
        uint32          UsbDevice       = transfer_data->UsbDevice;
        IUDEVMAN *      udevman         = transfer_data->udevman;
index 66db441..0aacb1c 100644 (file)
@@ -34,7 +34,7 @@ struct _ISOCH_CALLBACK_DATA
        void * prev;
        void * next;
        void * device;
-       uint8 * out_data;
+       BYTE * out_data;
        uint32 out_size;
        void * callback;
 };
index 86fe1de..12ee8b1 100644 (file)
@@ -48,7 +48,7 @@ static USB_SEARCHDEV* searchman_get_next(USB_SEARCHMAN* searchman)
        return search;
 }
 
-static int searchman_list_add(USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct)
+static int searchman_list_add(USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct)
 {
        USB_SEARCHDEV*  search;
        
@@ -77,7 +77,7 @@ static int searchman_list_add(USB_SEARCHMAN* searchman, uint16 idVendor, uint16
        return 1;
 }
 
-static int searchman_list_remove(USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct)
+static int searchman_list_remove(USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct)
 {
        USB_SEARCHDEV* search;
        USB_SEARCHDEV* point;
index 1d29324..d83d17a 100644 (file)
@@ -30,8 +30,8 @@ struct _USB_SEARCHDEV
        void * inode;
        void * prev;
        void * next;
-       uint16 idVendor;
-       uint16 idProduct;
+       UINT16 idVendor;
+       UINT16 idProduct;
 };
 
 typedef struct _USB_SEARCHMAN USB_SEARCHMAN;
@@ -60,9 +60,9 @@ struct _USB_SEARCHMAN
        /* close searchman */
        void (*close) (USB_SEARCHMAN* self);
        /* add a new usb device for search */
-       int (*add) (USB_SEARCHMAN* seachman, uint16 idVendor, uint16 idProduct);
+       int (*add) (USB_SEARCHMAN* seachman, UINT16 idVendor, UINT16 idProduct);
        /* remove a usb device from list */
-       int (*remove) (USB_SEARCHMAN* searchman, uint16 idVendor, uint16 idProduct);
+       int (*remove) (USB_SEARCHMAN* searchman, UINT16 idVendor, UINT16 idProduct);
        /* check list has next device*/
        int (*has_next) (USB_SEARCHMAN* seachman);
        /* get the device from list*/
index 2dd75c7..f5ce42e 100644 (file)
@@ -94,7 +94,7 @@ static void func_close_udevice(USB_SEARCHMAN* searchman, IUDEVICE* pdev)
        pdev->SigToEnd(pdev);
        idVendor = pdev->query_device_descriptor(pdev, ID_VENDOR);
        idProduct = pdev->query_device_descriptor(pdev, ID_PRODUCT);
-       searchman->add(searchman, (uint16) idVendor, (uint16) idProduct);
+       searchman->add(searchman, (UINT16) idVendor, (UINT16) idProduct);
 
        pdev->cancel_all_transfer_request(pdev);
        pdev->wait_action_completion(pdev);
@@ -121,12 +121,12 @@ static int fun_device_string_send_set(char* out_data, int out_offset, char* str)
 
        while (str[i])
        {
-               data_write_uint16(out_data + out_offset + offset, str[i]);   /* str */
+               data_write_UINT16(out_data + out_offset + offset, str[i]);   /* str */
                i++;
                offset += 2;
        }
 
-       data_write_uint16(out_data + out_offset + offset, 0x0000);   /* add "\0" */
+       data_write_UINT16(out_data + out_offset + offset, 0x0000);   /* add "\0" */
        offset += 2;
 
        return offset + out_offset;
@@ -187,7 +187,7 @@ static void func_lock_isoch_mutex(TRANSFER_DATA*  transfer_data)
        IUDEVICE* pdev;
        uint32 FunctionId;
        uint32 RequestField;
-       uint16 URB_Function;
+       UINT16 URB_Function;
        IUDEVMAN* udevman = transfer_data->udevman;
 
        if (transfer_data->cbSize >= 8)
@@ -198,7 +198,7 @@ static void func_lock_isoch_mutex(TRANSFER_DATA*  transfer_data)
                        FunctionId == TRANSFER_OUT_REQUEST) &&
                        transfer_data->cbSize >= 16)
                {
-                       data_read_uint16(transfer_data->pBuffer + 14, URB_Function);
+                       data_read_UINT16(transfer_data->pBuffer + 14, URB_Function);
 
                        if (URB_Function == URB_FUNCTION_ISOCH_TRANSFER &&
                                transfer_data->cbSize >= 20)
@@ -237,7 +237,7 @@ static int urbdrc_process_capability_request(URBDRC_CHANNEL_CALLBACK* callback,
        data_write_uint32(out_data + 4, MessageId); /* message id */
        data_write_uint32(out_data + 8, Version); /* usb protocol version */
        data_write_uint32(out_data + 12, 0x00000000); /* HRESULT */
-       callback->channel->Write(callback->channel, out_size, (uint8*) out_data, NULL);
+       callback->channel->Write(callback->channel, out_size, (BYTE*) out_data, NULL);
        zfree(out_data);
 
        return 0;
@@ -268,7 +268,7 @@ static int urbdrc_process_channel_create(URBDRC_CHANNEL_CALLBACK* callback, char
        data_write_uint32(out_data + 12, MajorVersion);
        data_write_uint32(out_data + 16, MinorVersion);
        data_write_uint32(out_data + 20, Capabilities); /* capabilities version */
-       callback->channel->Write(callback->channel, out_size, (uint8 *)out_data, NULL);
+       callback->channel->Write(callback->channel, out_size, (BYTE *)out_data, NULL);
        zfree(out_data);
 
        return 0;
@@ -291,7 +291,7 @@ static int urdbrc_send_virtual_channel_add(IWTSVirtualChannel* channel, uint32 M
        data_write_uint32(out_data + 4, MessageId); /* message id */
        data_write_uint32(out_data + 8, ADD_VIRTUAL_CHANNEL); /* function id */
 
-       channel->Write(channel, out_size, (uint8*) out_data, NULL);
+       channel->Write(channel, out_size, (BYTE*) out_data, NULL);
        zfree(out_data);
 
        return 0;
@@ -358,7 +358,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC
        out_offset = fun_device_string_send_set(out_data, out_offset, HardwareIds[0]);
        /* HardwareIds 2 */
        out_offset = fun_device_string_send_set(out_data, out_offset, HardwareIds[1]);
-       data_write_uint16(out_data + out_offset, 0x0000); /* add "\0" */
+       data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */
        out_offset += 2;
 
        data_write_uint32(out_data + out_offset, cchCompatIds); /* cchCompatIds */
@@ -373,7 +373,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC
        if (pdev->isCompositeDevice(pdev))
                out_offset = fun_device_string_send_set(out_data, out_offset, composite_str);
 
-       data_write_uint16(out_data + out_offset, 0x0000); /* add "\0" */
+       data_write_UINT16(out_data + out_offset, 0x0000); /* add "\0" */
        out_offset += 2;
 
        data_write_uint32(out_data + out_offset, 0x00000027); /* cchContainerId */
@@ -399,7 +399,7 @@ static int urdbrc_send_usb_device_add(URBDRC_CHANNEL_CALLBACK* callback, IUDEVIC
        data_write_uint32(out_data + out_offset + 24, 0x50); /* NoAckIsochWriteJitterBufferSizeInMs, >=10 or <=512 */
        out_offset += 28;
 
-       callback->channel->Write(callback->channel, out_offset, (uint8 *)out_data, NULL);
+       callback->channel->Write(callback->channel, out_offset, (BYTE *)out_data, NULL);
        zfree(out_data);
 
        return 0;
@@ -658,7 +658,7 @@ void* urbdrc_new_device_create(void * arg)
        IWTSVirtualChannelManager* channel_mgr;
        URBDRC_PLUGIN* urbdrc = transfer_data->urbdrc;
        USB_SEARCHMAN* searchman = urbdrc->searchman;
-       uint8* pBuffer = transfer_data->pBuffer;
+       BYTE* pBuffer = transfer_data->pBuffer;
        IUDEVMAN* udevman = transfer_data->udevman;
        IUDEVICE* pdev = NULL;
        uint32 ChannelId = 0;
@@ -756,7 +756,7 @@ static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback
                        transfer_data->udevman = urbdrc->udevman;
                        transfer_data->urbdrc = urbdrc;
                        transfer_data->cbSize = cbSize;
-                       transfer_data->pBuffer = (uint8 *)malloc((cbSize));
+                       transfer_data->pBuffer = (BYTE *)malloc((cbSize));
 
                        for (i = 0; i < (cbSize); i++)
                        {
@@ -775,7 +775,7 @@ static int urbdrc_process_channel_notification(URBDRC_CHANNEL_CALLBACK* callback
        return error;
 }
 
-static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, uint8* Buffer)
+static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, uint32 cbSize, BYTE* Buffer)
 {
        URBDRC_CHANNEL_CALLBACK* callback = (URBDRC_CHANNEL_CALLBACK*) pChannelCallback;
        URBDRC_PLUGIN* urbdrc;
@@ -829,7 +829,7 @@ static int urbdrc_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
                        transfer_data->udevman = udevman;
                        transfer_data->cbSize = cbSize - 4;
                        transfer_data->UsbDevice = InterfaceId;
-                       transfer_data->pBuffer = (uint8 *)malloc((cbSize - 4));
+                       transfer_data->pBuffer = (BYTE *)malloc((cbSize - 4));
 
                        memcpy(transfer_data->pBuffer, pBuffer + 4, (cbSize - 4));
 
@@ -898,7 +898,7 @@ static int urbdrc_on_close(IWTSVirtualChannelCallback * pChannelCallback)
 }
 
 static int urbdrc_on_new_channel_connection(IWTSListenerCallback* pListenerCallback,
-       IWTSVirtualChannel * pChannel, uint8* pData, int* pbAccept, IWTSVirtualChannelCallback** ppCallback)
+       IWTSVirtualChannel * pChannel, BYTE* pData, int* pbAccept, IWTSVirtualChannelCallback** ppCallback)
 {
        URBDRC_LISTENER_CALLBACK* listener_callback = (URBDRC_LISTENER_CALLBACK*) pListenerCallback;
        URBDRC_CHANNEL_CALLBACK* callback;
index 1de9dbd..2a33971 100644 (file)
@@ -98,7 +98,7 @@ struct _TRANSFER_DATA
        URBDRC_CHANNEL_CALLBACK* callback;
        URBDRC_PLUGIN* urbdrc;
        IUDEVMAN* udevman;
-       uint8* pBuffer;
+       BYTE* pBuffer;
        uint32 cbSize;
        uint32 UsbDevice;
 };
@@ -114,21 +114,21 @@ struct _IUDEVICE
                uint32 *UrbdStatus,
                uint32 *StartFrame,
                uint32 NumberOfPackets,
-               uint8 *IsoPacket,
+               BYTE *IsoPacket,
                uint32 *BufferSize,
-               uint8 *Buffer,
+               BYTE *Buffer,
                int Timeout);
 
        int (*control_transfer) (IUDEVICE * idev, uint32 RequestId,
                uint32 EndpointAddress,
                uint32 TransferFlags,
-               uint8 bmRequestType,
-               uint8 Request,
-               uint16 Value,
-               uint16 Index,
+               BYTE bmRequestType,
+               BYTE Request,
+               UINT16 Value,
+               UINT16 Index,
                uint32 *UrbdStatus,
                uint32 *BufferSize,
-               uint8 *Buffer,
+               BYTE *Buffer,
                uint32 Timeout);
 
        int (*bulk_or_interrupt_transfer) (IUDEVICE * idev, uint32 RequestId,
@@ -136,14 +136,14 @@ struct _IUDEVICE
                uint32 TransferFlags,
                uint32 *UsbdStatus,
                uint32 *BufferSize,
-               uint8 *Buffer,
+               BYTE *Buffer,
                uint32 Timeout);
 
 
        int (*select_configuration) (IUDEVICE * idev, uint32 bConfigurationValue);
 
-       int (*select_interface) (IUDEVICE * idev, uint8 InterfaceNumber,
-               uint8 AlternateSetting);
+       int (*select_interface) (IUDEVICE * idev, BYTE InterfaceNumber,
+               BYTE AlternateSetting);
 
        int (*control_pipe_request) (IUDEVICE * idev, uint32 RequestId,
                uint32 EndpointAddress,
@@ -153,16 +153,16 @@ struct _IUDEVICE
        int (*control_query_device_text) (IUDEVICE * idev, uint32 TextType,
                uint32 LocaleId,
                uint32 *BufferSize,
-               uint8 * Buffer);
+               BYTE * Buffer);
 
        int (*os_feature_descriptor_request) (IUDEVICE * idev, uint32 RequestId,
-               uint8 Recipient,
-               uint8 InterfaceNumber,
-               uint8 Ms_PageIndex,
-               uint16 Ms_featureDescIndex,
+               BYTE Recipient,
+               BYTE InterfaceNumber,
+               BYTE Ms_PageIndex,
+               UINT16 Ms_featureDescIndex,
                uint32 * UsbdStatus,
                uint32 * BufferSize,
-               uint8* Buffer,
+               BYTE* Buffer,
                int Timeout);
 
        void (*cancel_all_transfer_request) (IUDEVICE * idev);
@@ -191,7 +191,7 @@ struct _IUDEVICE
 
        int (*query_device_port_status) (IUDEVICE * idev, uint32 *UsbdStatus,
                uint32 * BufferSize,
-               uint8 * Buffer);
+               BYTE * Buffer);
 
        int (*request_queue_is_none) (IUDEVICE * idev);
 
@@ -211,8 +211,8 @@ struct _IUDEVICE
        BASIC_DEV_STATE_DEFINED(channel_id, uint32);
        BASIC_DEV_STATE_DEFINED(UsbDevice, uint32);
        BASIC_DEV_STATE_DEFINED(ReqCompletion, uint32);
-       BASIC_DEV_STATE_DEFINED(bus_number, uint16);
-       BASIC_DEV_STATE_DEFINED(dev_number, uint16);
+       BASIC_DEV_STATE_DEFINED(bus_number, UINT16);
+       BASIC_DEV_STATE_DEFINED(dev_number, UINT16);
        BASIC_DEV_STATE_DEFINED(port_number, int);
        BASIC_DEV_STATE_DEFINED(isoch_queue, void *);
        BASIC_DEV_STATE_DEFINED(MsConfig, MSUSB_CONFIG_DESCRIPTOR *);
@@ -237,8 +237,8 @@ struct _IUDEVMAN
        int  (*register_udevice) (IUDEVMAN* idevman, int bus_number, 
                int dev_number,
                int UsbDevice, 
-               uint16 idVendor, 
-               uint16 idProduct, 
+               UINT16 idVendor, 
+               UINT16 idProduct, 
                int flag);
        IUDEVICE *(*get_next) (IUDEVMAN *idevman);
        IUDEVICE *(*get_udevice_by_UsbDevice) (IUDEVMAN * idevman, 
@@ -246,8 +246,8 @@ struct _IUDEVMAN
        IUDEVICE *(*get_udevice_by_UsbDevice_try_again) (IUDEVMAN * idevman, 
                uint32 UsbDevice);
        /* Extension */
-       int (*check_device_exist_by_id) (IUDEVMAN * idevman, uint16 idVendor, 
-               uint16 idProduct);
+       int (*check_device_exist_by_id) (IUDEVMAN * idevman, UINT16 idVendor, 
+               UINT16 idProduct);
        int (*isAutoAdd) (IUDEVMAN * idevman);
        /* Basic state */
        BASIC_DEVMAN_STATE_DEFINED(defUsbDevice, uint32);
index bba9a4e..e0a2da0 100644 (file)
@@ -58,8 +58,8 @@ static void udev_set_p_##_arg (IUDEVICE * idev, _type _t) \
 typedef struct _ISO_USER_DATA ISO_USER_DATA;
 struct _ISO_USER_DATA
 {
-       uint8 *         IsoPacket;
-       uint8 *         output_data;
+       BYTE *          IsoPacket;
+       BYTE *          output_data;
        int                     iso_status;
        int                     completed;
        uint32          error_count;
@@ -153,12 +153,12 @@ static void
 func_iso_callback(struct libusb_transfer *transfer)
 {
        ISO_USER_DATA * iso_user_data   = (ISO_USER_DATA *) transfer->user_data;
-       uint8 * data            = iso_user_data->IsoPacket;
+       BYTE * data             = iso_user_data->IsoPacket;
        int * completed         = &iso_user_data->completed;
        uint32 offset           = 0;
        uint32 index            = 0;
        uint32 i, act_len;
-       uint8 *b;
+       BYTE *b;
 
        *completed = 1;
        /* Fixme: currently fill the dummy frame number, tt needs to be 
@@ -220,7 +220,7 @@ func_get_ep_desc(LIBUSB_CONFIG_DESCRIPTOR * LibusbConfig,
        MSUSB_INTERFACE_DESCRIPTOR **           MsInterfaces;
        const LIBUSB_INTERFACE *                        interface;
        const LIBUSB_ENDPOINT_DESCEIPTOR *      endpoint;
-       uint8 alt;
+       BYTE alt;
        int inum, pnum;
 
        MsInterfaces = MsConfig->MsInterfaces;
@@ -320,7 +320,7 @@ func_set_usbd_status(UDEVICE* pdev, uint32* status, int err_result)
 
 static void
 func_iso_data_init(ISO_USER_DATA * iso_user_data, uint32 numPacket, uint32 buffsize, 
-       uint32 noAck, uint8 * isoPacket, uint8 * buffer)
+       uint32 noAck, BYTE * isoPacket, BYTE * buffer)
 {
        /* init struct iso_user_data */
        iso_user_data->IsoPacket = isoPacket;
@@ -478,7 +478,7 @@ udev_new_descript(LIBUSB_DEVICE* libusb_dev)
 
  /* Get HUB handle */
 static int
-udev_get_hub_handle(UDEVICE * pdev, uint16 bus_number, uint16 dev_number)
+udev_get_hub_handle(UDEVICE * pdev, UINT16 bus_number, UINT16 dev_number)
 {
        struct udev *udev;
        struct udev_enumerate *enumerate;
@@ -590,7 +590,7 @@ udev_get_hub_handle(UDEVICE * pdev, uint16 bus_number, uint16 dev_number)
 
 
 static int
-libusb_udev_select_interface(IUDEVICE * idev, uint8 InterfaceNumber, uint8 AlternateSetting)
+libusb_udev_select_interface(IUDEVICE * idev, BYTE InterfaceNumber, BYTE AlternateSetting)
 {
        MSUSB_CONFIG_DESCRIPTOR * MsConfig;
        MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces;
@@ -638,7 +638,7 @@ libusb_udev_complete_msconfig_setup(IUDEVICE * idev, MSUSB_CONFIG_DESCRIPTOR * M
        const LIBUSB_INTERFACE * LibusbInterface;
        const LIBUSB_INTERFACE_DESCRIPTOR * LibusbAltsetting; 
        const LIBUSB_ENDPOINT_DESCEIPTOR * LibusbEndpoint;
-       uint8 LibusbNumEndpoint;
+       BYTE LibusbNumEndpoint;
        int inum = 0, pnum = 0, MsOutSize = 0;
 
        LibusbConfig = pdev->LibusbConfig;
@@ -746,7 +746,7 @@ libusb_udev_complete_msconfig_setup(IUDEVICE * idev, MSUSB_CONFIG_DESCRIPTOR * M
                                | (pdev->bus_number << 24);
                        /* count endpoint max packet size */
                        int max = LibusbEndpoint->wMaxPacketSize & 0x07ff;
-                       uint8 attr = LibusbEndpoint->bmAttributes;
+                       BYTE attr = LibusbEndpoint->bmAttributes;
                        if ((attr & 0x3) == 1 || (attr & 0x3) == 3)
                        {
                                max *= (1 + ((LibusbEndpoint->wMaxPacketSize >> 11) & 3));
@@ -866,14 +866,14 @@ static int
 libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType, 
        uint32 LocaleId, 
        uint32 * BufferSize, 
-       uint8 * Buffer)
+       BYTE * Buffer)
 {
        UDEVICE * pdev = (UDEVICE *) idev;
        LIBUSB_DEVICE_DESCRIPTOR * devDescriptor = pdev->devDescriptor;
        char * strDesc = "Generic Usb String";
        char deviceLocation[25];
-       uint8 bus_number;
-       uint8 device_address;
+       BYTE bus_number;
+       BYTE device_address;
        int ret = 0, i = 0;
 
        switch (TextType){
@@ -914,7 +914,7 @@ libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType,
                        sprintf(deviceLocation, "Port_#%04d.Hub_#%04d", device_address, bus_number);
 
                        for(i=0;i<strlen(deviceLocation);i++){
-                               Buffer[i*2] = (uint8)deviceLocation[i];
+                               Buffer[i*2] = (BYTE)deviceLocation[i];
                                Buffer[(i*2)+1] = 0;
                        }
                        *BufferSize = (i*2);
@@ -930,17 +930,17 @@ libusb_udev_control_query_device_text(IUDEVICE * idev, uint32 TextType,
 
 static int
 libusb_udev_os_feature_descriptor_request(IUDEVICE * idev, uint32 RequestId, 
-       uint8 Recipient, 
-       uint8 InterfaceNumber, 
-       uint8 Ms_PageIndex, 
-       uint16 Ms_featureDescIndex, 
+       BYTE Recipient, 
+       BYTE InterfaceNumber, 
+       BYTE Ms_PageIndex, 
+       UINT16 Ms_featureDescIndex, 
        uint32 * UsbdStatus,
        uint32 * BufferSize, 
-       uint8* Buffer, 
+       BYTE* Buffer, 
        int Timeout)
 {
        UDEVICE * pdev = (UDEVICE *) idev;
-       uint8 ms_string_desc[0x13];
+       BYTE ms_string_desc[0x13];
        int error = 0;
        /*
        pdev->request_queue->register_request(pdev->request_queue, RequestId, NULL, 0);
@@ -957,8 +957,8 @@ libusb_udev_os_feature_descriptor_request(IUDEVICE * idev, uint32 RequestId,
        //printf("Get ms string: result number %d", error);
        if (error > 0)
        {
-               uint8 bMS_Vendorcode;
-               data_read_uint8(ms_string_desc + 16, bMS_Vendorcode);
+               BYTE bMS_Vendorcode;
+               data_read_BYTE(ms_string_desc + 16, bMS_Vendorcode);
                //printf("bMS_Vendorcode:0x%x", bMS_Vendorcode);
                /** get os descriptor */
                error = libusb_control_transfer(pdev->libusb_handle, 
@@ -1205,7 +1205,7 @@ libusb_udev_unlock_fifo_isoch(IUDEVICE * idev)
 static int
 libusb_udev_query_device_port_status(IUDEVICE * idev, uint32 *UsbdStatus,
        uint32 * BufferSize, 
-       uint8 * Buffer)
+       BYTE * Buffer)
 {
        UDEVICE * pdev = (UDEVICE *) idev;
        int success = 0, ret;
@@ -1256,9 +1256,9 @@ libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAdd
        uint32 *UrbdStatus, 
        uint32 *StartFrame,
        uint32 NumberOfPackets, 
-       uint8 *IsoPacket, 
+       BYTE *IsoPacket, 
        uint32 *BufferSize, 
-       uint8 *Buffer, 
+       BYTE *Buffer, 
        int Timeout)
 {
        UDEVICE * pdev = (UDEVICE *) idev;
@@ -1346,13 +1346,13 @@ libusb_udev_isoch_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAdd
 static int
 libusb_udev_control_transfer(IUDEVICE * idev, uint32 RequestId, uint32 EndpointAddress, 
        uint32 TransferFlags, 
-       uint8 bmRequestType, 
-       uint8 Request, 
-       uint16 Value, 
-       uint16 Index, 
+       BYTE bmRequestType, 
+       BYTE Request, 
+       UINT16 Value, 
+       UINT16 Index, 
        uint32 *UrbdStatus, 
        uint32 *BufferSize, 
-       uint8 *Buffer, 
+       BYTE *Buffer, 
        uint32 Timeout)
 {
        UDEVICE * pdev = (UDEVICE *) idev;
@@ -1386,7 +1386,7 @@ libusb_udev_bulk_or_interrupt_transfer(IUDEVICE * idev, uint32 RequestId,
        uint32 TransferFlags, 
        uint32 *UsbdStatus, 
        uint32 *BufferSize, 
-       uint8 *Buffer, 
+       BYTE *Buffer, 
        uint32 Timeout)
 {
        UDEVICE * pdev = (UDEVICE *) idev;
@@ -1647,8 +1647,8 @@ cancel_retry:
 BASIC_STATE_FUNC_DEFINED(channel_id, uint32)
 BASIC_STATE_FUNC_DEFINED(UsbDevice, uint32)
 BASIC_STATE_FUNC_DEFINED(ReqCompletion, uint32)
-BASIC_STATE_FUNC_DEFINED(bus_number, uint16)
-BASIC_STATE_FUNC_DEFINED(dev_number, uint16)
+BASIC_STATE_FUNC_DEFINED(bus_number, UINT16)
+BASIC_STATE_FUNC_DEFINED(dev_number, UINT16)
 BASIC_STATE_FUNC_DEFINED(port_number, int)
 BASIC_STATE_FUNC_DEFINED(isoch_queue, void *)
 BASIC_STATE_FUNC_DEFINED(MsConfig, MSUSB_CONFIG_DESCRIPTOR *)
@@ -1718,7 +1718,7 @@ udev_load_interface(UDEVICE * pdev)
 
 
 static IUDEVICE*
-udev_init(UDEVICE* pdev, uint16 bus_number, uint16 dev_number)
+udev_init(UDEVICE* pdev, UINT16 bus_number, UINT16 dev_number)
 {
        LIBUSB_DEVICE_DESCRIPTOR* devDescriptor;
        LIBUSB_CONFIG_DESCRIPTOR* config_temp;
@@ -1829,13 +1829,13 @@ udev_init(UDEVICE* pdev, uint16 bus_number, uint16 dev_number)
 
 
 int
-udev_new_by_id(uint16 idVendor, uint16 idProduct, IUDEVICE *** devArray)
+udev_new_by_id(UINT16 idVendor, UINT16 idProduct, IUDEVICE *** devArray)
 {
        LIBUSB_DEVICE_DESCRIPTOR * descriptor;
        LIBUSB_DEVICE ** libusb_list;
        UDEVICE ** array;
-       uint16 bus_number;
-       uint16 dev_number;
+       UINT16 bus_number;
+       UINT16 dev_number;
        ssize_t total_device;
        int i, ret, num = 0;
 
index 0b55f89..df667b1 100644 (file)
@@ -52,9 +52,9 @@ struct _UDEVICE
        uint32  UsbDevice; /* An unique interface ID */
        uint32  ReqCompletion; /* An unique interface ID */
        uint32  channel_id;
-       uint16  status;
-       uint16  bus_number;
-       uint16  dev_number;
+       UINT16  status;
+       UINT16  bus_number;
+       UINT16  dev_number;
        char    path[17];
        int     port_number;
        int     isCompositeDevice;
@@ -77,7 +77,7 @@ typedef UDEVICE * PUDEVICE;
 
 
 int
-udev_new_by_id(uint16_t idVendor, uint16_t idProduct, IUDEVICE ***devArray);
+udev_new_by_id(UINT16_t idVendor, UINT16_t idProduct, IUDEVICE ***devArray);
 IUDEVICE*
 udev_new_by_addr(int bus_number, int dev_number);
 
index 4b26058..c3e8b63 100644 (file)
@@ -56,7 +56,7 @@ struct _UDEVMAN
        IUDEVICE* tail; /* tail device in linked list */
 
        uint32 defUsbDevice;
-       uint16 flags;
+       UINT16 flags;
        int device_num;
        int sem_timeout;
 
@@ -125,8 +125,8 @@ udevman_get_udevice_by_addr(IUDEVMAN * idevman, int bus_number, int dev_number)
 static int
 udevman_register_udevice(IUDEVMAN* idevman, int bus_number, int dev_number, 
        int UsbDevice, 
-       uint16 idVendor, 
-       uint16 idProduct, 
+       UINT16 idVendor, 
+       UINT16 idProduct, 
        int flag)
 {
        UDEVMAN * udevman = (UDEVMAN *) idevman;
@@ -324,7 +324,7 @@ udevman_parse_device_pid_vid (char *str, int *id1, int *id2, char sign)
 
 
 static int 
-udevman_check_device_exist_by_id(IUDEVMAN * idevman, uint16 idVendor, uint16 idProduct)
+udevman_check_device_exist_by_id(IUDEVMAN * idevman, UINT16 idVendor, UINT16 idProduct)
 {
        if (libusb_open_device_with_vid_pid (NULL, idVendor, idProduct)) 
                return 1;
@@ -537,8 +537,8 @@ int FreeRDPUDEVMANEntry(PFREERDP_URBDRC_SERVICE_ENTRY_POINTS pEntryPoints)
                                0, 
                                0, 
                                UsbDevice, 
-                               (uint16) idVendor, 
-                               (uint16) idProduct, 
+                               (UINT16) idVendor, 
+                               (UINT16) idProduct, 
                                UDEVMAN_FLAG_ADD_BY_VID_PID);
                }
                else if (udevman->flags & UDEVMAN_FLAG_ADD_BY_ADDR)
index 787f3d8..de95913 100644 (file)
@@ -50,7 +50,7 @@ request_queue_has_next(REQUEST_QUEUE* queue)
 TRANSFER_REQUEST*
 request_queue_register_request(REQUEST_QUEUE* queue, uint32 RequestId, 
        struct libusb_transfer * transfer, 
-       uint8 endpoint)
+       BYTE endpoint)
 {
        TRANSFER_REQUEST*   request;
 
@@ -90,7 +90,7 @@ request_queue_rewind(REQUEST_QUEUE *queue)
 
 /* Get first*/
 TRANSFER_REQUEST*
-request_queue_get_request_by_endpoint(REQUEST_QUEUE *queue, uint8 ep)
+request_queue_get_request_by_endpoint(REQUEST_QUEUE *queue, BYTE ep)
 {
        TRANSFER_REQUEST * request;
        pthread_mutex_lock(&queue->request_loading);
index f13764b..fc7ae46 100644 (file)
@@ -33,7 +33,7 @@ struct _TRANSFER_REQUEST
        void*   next;
 
        uint32  RequestId;
-       uint8   endpoint;  
+       BYTE    endpoint;  
        struct libusb_transfer *transfer;
        int             submit;
 };
@@ -53,9 +53,9 @@ struct _REQUEST_QUEUE
        int (*has_next) (REQUEST_QUEUE* queue);
        int (*unregister_request) (REQUEST_QUEUE *queue, uint32 RequestId);
        TRANSFER_REQUEST *(*get_next) (REQUEST_QUEUE* queue);
-       TRANSFER_REQUEST *(*get_request_by_ep) (REQUEST_QUEUE *queue, uint8 ep);
+       TRANSFER_REQUEST *(*get_request_by_ep) (REQUEST_QUEUE *queue, BYTE ep);
        TRANSFER_REQUEST *(*register_request) (REQUEST_QUEUE* queue, 
-               uint32 RequestId, struct libusb_transfer * transfer, uint8 endpoint);
+               uint32 RequestId, struct libusb_transfer * transfer, BYTE endpoint);
 };
 
 
index d0d54c4..5f43fdd 100644 (file)
@@ -21,8 +21,8 @@
 
 #include "df_event.h"
 
-static uint8 keymap[256];
-static uint8 functionmap[128];
+static BYTE keymap[256];
+static BYTE functionmap[128];
 
 void df_keyboard_init()
 {
@@ -154,9 +154,9 @@ void df_keyboard_init()
 
 }
 
-void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, uint16 x, uint16 y)
+void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, UINT16 x, UINT16 y)
 {
-       uint16 flags;
+       UINT16 flags;
 
        flags = (down) ? PTR_FLAGS_DOWN : 0;
 
@@ -171,14 +171,14 @@ void df_send_mouse_button_event(rdpInput* input, BOOL down, uint32 button, uint1
                input->MouseEvent(input, flags, x, y);
 }
 
-void df_send_mouse_motion_event(rdpInput* input, uint16 x, uint16 y)
+void df_send_mouse_motion_event(rdpInput* input, UINT16 x, UINT16 y)
 {
        input->MouseEvent(input, PTR_FLAGS_MOVE, x, y);
 }
 
-void df_send_mouse_wheel_event(rdpInput* input, sint16 axisrel, uint16 x, uint16 y)
+void df_send_mouse_wheel_event(rdpInput* input, INT16 axisrel, UINT16 x, UINT16 y)
 {
-       uint16 flags = PTR_FLAGS_WHEEL;
+       UINT16 flags = PTR_FLAGS_WHEEL;
 
        if (axisrel < 0)
                flags |= 0x0078;
@@ -188,9 +188,9 @@ void df_send_mouse_wheel_event(rdpInput* input, sint16 axisrel, uint16 x, uint16
        input->MouseEvent(input, flags, x, y);
 }
 
-void df_send_keyboard_event(rdpInput* input, BOOL down, uint8 keycode, uint8 function)
+void df_send_keyboard_event(rdpInput* input, BOOL down, BYTE keycode, BYTE function)
 {
-       uint8 vkcode;
+       BYTE vkcode;
        RDP_SCANCODE rdp_scancode;
        
        if (keycode)
index d593f4e..8d138fe 100644 (file)
@@ -44,7 +44,7 @@ void df_Pointer_New(rdpContext* context, rdpPointer* pointer)
        if (result == DFB_OK)
        {
                int pitch;
-               uint8* point = NULL;
+               BYTE* point = NULL;
 
                df_pointer->xhot = pointer->xPos;
                df_pointer->yhot = pointer->yPos;
index 2328c97..d957c14 100644 (file)
@@ -261,7 +261,7 @@ BOOL df_verify_certificate(freerdp* instance, char* subject, char* issuer, char*
 }
 
 static int
-df_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
+df_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
 {
        return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
 }
index 3430e67..6fd2cd5 100644 (file)
@@ -14,7 +14,7 @@
 {
 @public
     rdpPointer       *pointer;
-    uint8            *cursor_data;   // bitmapped pixel data
+    BYTE            *cursor_data;   // bitmapped pixel data
     NSBitmapImageRep *bmiRep;
     NSCursor         *nsCursor;
     NSImage          *nsImage;
index 48a849d..ee2df38 100644 (file)
@@ -50,7 +50,7 @@
 
 void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window);
 void apple_to_windowMove(NSRect * r, RAIL_WINDOW_MOVE_ORDER * windowMove);
-void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param);
+void mac_send_rail_client_event(rdpChannels *channels, UINT16 event_type, void *param);
 void windows_to_apple_cords(NSRect * r);
 void rail_MoveWindow(rdpRail * rail, rdpWindow * window);
 void mac_rail_send_activate(int window_id);
index 88e094c..0ef7404 100644 (file)
@@ -113,13 +113,13 @@ void channel_activity_cb(CFSocketRef s, CFSocketCallBackType callbackType, CFDat
 int register_fds(int *fds, int count, void *inst);
 int invoke_draw_rect(rdpContext *context);
 int process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data);
-int receive_channel_data(freerdp *inst, int chan_id, uint8 *data, int size, int flags, int total_size);
+int receive_channel_data(freerdp *inst, int chan_id, BYTE *data, int size, int flags, int total_size);
 void process_cliprdr_event(freerdp *inst, RDP_EVENT *event);
 void cliprdr_process_cb_format_list_event(freerdp *inst, RDP_CB_FORMAT_LIST_EVENT* event);
 void cliprdr_send_data_request(freerdp *inst, uint32 format);
 void cliprdr_process_cb_monitor_ready_event(freerdp* inst);
 void cliprdr_process_cb_data_response_event(freerdp *inst, RDP_CB_DATA_RESPONSE_EVENT *event);
-void cliprdr_process_text(freerdp *inst, uint8 *data, int len);
+void cliprdr_process_text(freerdp *inst, BYTE *data, int len);
 void cliprdr_send_supported_format_list(freerdp *inst);
 int register_channel_fds(int *fds, int count, void *inst);
 
@@ -127,14 +127,14 @@ void mac_process_rail_event(freerdp *inst, RDP_EVENT *event);
 void mac_rail_register_callbacks(freerdp *inst, rdpRail *rail);
 void mac_rail_CreateWindow(rdpRail *rail, rdpWindow *window);
 void mac_rail_MoveWindow(rdpRail *rail, rdpWindow *window);
-void mac_rail_ShowWindow(rdpRail *rail, rdpWindow *window, uint8 state);
+void mac_rail_ShowWindow(rdpRail *rail, rdpWindow *window, BYTE state);
 void mac_rail_SetWindowText(rdpRail *rail, rdpWindow *window);
 void mac_rail_SetWindowIcon(rdpRail *rail, rdpWindow *window, rdpIcon *icon);
 void mac_rail_SetWindowRects(rdpRail *rail, rdpWindow *window);
 void mac_rail_SetWindowVisibilityRects(rdpRail *rail, rdpWindow *window);
 void mac_rail_DestroyWindow(rdpRail *rail, rdpWindow *window);
 void mac_process_rail_get_sysparams_event(rdpChannels *channels, RDP_EVENT *event);
-void mac_send_rail_client_event(rdpChannels *channels, uint16 event_type, void *param);
+void mac_send_rail_client_event(rdpChannels *channels, UINT16 event_type, void *param);
 void mac_on_free_rail_client_event(RDP_EVENT* event);
 void mac_process_rail_server_sysparam_event(rdpChannels* channels, RDP_EVENT* event);
 void mac_process_rail_exec_result_event(rdpChannels* channels, RDP_EVENT* event);
@@ -153,7 +153,7 @@ struct mac_context
 struct cursor
 {
     rdpPointer  *pointer;
-    uint8       *cursor_data;   // bitmapped pixel data
+    BYTE       *cursor_data;   // bitmapped pixel data
     void        *bmiRep;        // NSBitmapImageRep
     void        *nsCursor;      // NSCursor
     void        *nsImage;       // NSImage
index 3eefeb0..070d030 100644 (file)
@@ -94,7 +94,7 @@ void tf_end_paint(rdpContext* context)
                return;
 }
 
-int tf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
+int tf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
 {
        return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
 }
index 2f9c514..94e7ac3 100644 (file)
@@ -59,10 +59,10 @@ LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam)
                                if (!wfi || !p)
                                        return 1;
                                input = wfi->instance->input;
-                               rdp_scancode = MAKE_RDP_SCANCODE((uint8) p->scanCode, p->flags & LLKHF_EXTENDED);
+                               rdp_scancode = MAKE_RDP_SCANCODE((BYTE) p->scanCode, p->flags & LLKHF_EXTENDED);
 
                                DEBUG_KBD("keydown %d scanCode %04X flags %02X vkCode %02X",
-                                       (wParam == WM_KEYDOWN), (uint8) p->scanCode, p->flags, p->vkCode);
+                                       (wParam == WM_KEYDOWN), (BYTE) p->scanCode, p->flags, p->vkCode);
 
                                if (wfi->fs_toggle &&
                                        ((p->vkCode == VK_RETURN) || (p->vkCode == VK_CANCEL)) &&
index 76bd92c..4e85ace 100644 (file)
@@ -39,7 +39,7 @@
 #include "wfreerdp.h"
 #include "wf_graphics.h"
 
-const uint8 wf_rop2_table[] =
+const BYTE wf_rop2_table[] =
 {
        R2_BLACK,       /* 0 */
        R2_NOTMERGEPEN, /* DPon */
@@ -84,19 +84,19 @@ void wf_glyph_free(wfBitmap* glyph)
        wf_image_free(glyph);
 }
 
-uint8* wf_glyph_convert(wfInfo* wfi, int width, int height, uint8* data)
+BYTE* wf_glyph_convert(wfInfo* wfi, int width, int height, BYTE* data)
 {
        int indexx;
        int indexy;
-       uint8* src;
-       uint8* dst;
-       uint8* cdata;
+       BYTE* src;
+       BYTE* dst;
+       BYTE* cdata;
        int src_bytes_per_row;
        int dst_bytes_per_row;
 
        src_bytes_per_row = (width + 7) / 8;
        dst_bytes_per_row = src_bytes_per_row + (src_bytes_per_row % 2);
-       cdata = (uint8 *) malloc(dst_bytes_per_row * height);
+       cdata = (BYTE *) malloc(dst_bytes_per_row * height);
 
        src = data;
        for (indexy = 0; indexy < height; indexy++)
@@ -120,8 +120,8 @@ HBRUSH wf_create_brush(wfInfo * wfi, rdpBrush* brush, uint32 color, int bpp)
        int i;
        HBRUSH br;
        LOGBRUSH lbr;
-       uint8* cdata;
-       uint8 ipattern[8];
+       BYTE* cdata;
+       BYTE ipattern[8];
        HBITMAP pattern = NULL;
 
        lbr.lbStyle = brush->style;
@@ -466,7 +466,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
                wfi->image->_bitmap.width = surface_bits_command->width;
                wfi->image->_bitmap.height = surface_bits_command->height;
                wfi->image->_bitmap.bpp = surface_bits_command->bpp;
-               wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
+               wfi->image->_bitmap.data = (BYTE*) realloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
                freerdp_image_flip(nsc_context->bmpdata, wfi->image->_bitmap.data, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32);
                BitBlt(wfi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, wfi->image->hdc, 0, 0, GDI_SRCCOPY);
        } 
@@ -476,12 +476,12 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
                wfi->image->_bitmap.height = surface_bits_command->height;
                wfi->image->_bitmap.bpp = surface_bits_command->bpp;
 
-               wfi->image->_bitmap.data = (uint8*) realloc(wfi->image->_bitmap.data,
+               wfi->image->_bitmap.data = (BYTE*) realloc(wfi->image->_bitmap.data,
                                wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
 
                if ((surface_bits_command->bpp != 32) || (wfi->clrconv->alpha == TRUE))
                {
-                       uint8* temp_image;
+                       BYTE* temp_image;
 
                        freerdp_image_convert(surface_bits_command->bitmapData, wfi->image->_bitmap.data,
                                wfi->image->_bitmap.width, wfi->image->_bitmap.height,
@@ -490,7 +490,7 @@ void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
                        surface_bits_command->bpp = 32;
                        surface_bits_command->bitmapData = wfi->image->_bitmap.data;
 
-                       temp_image = (uint8*) malloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
+                       temp_image = (BYTE*) malloc(wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
                        freerdp_image_flip(wfi->image->_bitmap.data, temp_image, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32);
                        free(wfi->image->_bitmap.data);
                        wfi->image->_bitmap.data = temp_image;
index 09e301d..470f661 100644 (file)
@@ -25,7 +25,7 @@
 #include "wfreerdp.h"
 
 void wf_invalidate_region(wfInfo* wfi, int x, int y, int width, int height);
-wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data);
+wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data);
 void wf_image_free(wfBitmap* image);
 void wf_toggle_fullscreen(wfInfo* wfi);
 
index 6500028..13aee10 100644 (file)
 #include "wf_gdi.h"
 #include "wf_graphics.h"
 
-HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, uint8** pdata)
+HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, BYTE* data, BYTE** pdata)
 {
        HDC hdc;
        int negHeight;
        HBITMAP bitmap;
        BITMAPINFO bmi;
-       uint8* cdata = NULL;
+       BYTE* cdata = NULL;
 
        /**
         * See: http://msdn.microsoft.com/en-us/library/dd183376
@@ -65,7 +65,7 @@ HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data,
        return bitmap;
 }
 
-wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data)
+wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data)
 {
        HDC hdc;
        wfBitmap* image;
@@ -143,16 +143,16 @@ void wf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
 }
 
 void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
-               uint8* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id)
+               BYTE* data, int width, int height, int bpp, int length, BOOL compressed, int codec_id)
 {
-       uint16 size;
+       UINT16 size;
 
        size = width * height * (bpp / 8);
 
        if (bitmap->data == NULL)
-               bitmap->data = (uint8*) malloc(size);
+               bitmap->data = (BYTE*) malloc(size);
        else
-               bitmap->data = (uint8*) realloc(bitmap->data, size);
+               bitmap->data = (BYTE*) realloc(bitmap->data, size);
 
        if (compressed)
        {
index b9868bd..7c3827e 100644 (file)
@@ -22,8 +22,8 @@
 
 #include "wfreerdp.h"
 
-HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, uint8** pdata);
-wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data);
+HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, BYTE* data, BYTE** pdata);
+wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data);
 void wf_image_free(wfBitmap* image);
 
 void wf_register_graphics(rdpGraphics* graphics);
index 0c383b3..f9425a2 100644 (file)
@@ -37,7 +37,7 @@ void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail)
 {
 }
 
-void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command)
+void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command)
 {
 }
 
index 053b27c..6715251 100644 (file)
@@ -23,7 +23,7 @@
 
 void wf_rail_paint(wfInfo* wfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom);
 void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail);
-void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, uint16 command);
+void wf_rail_send_client_system_command(wfInfo* wfi, uint32 windowId, UINT16 command);
 void wf_rail_send_activate(wfInfo* wfi, HWND window, BOOL enabled);
 void wf_process_rail_event(wfInfo* wfi, rdpChannels* chanman, RDP_EVENT* event);
 void wf_rail_adjust_position(wfInfo* wfi, rdpWindow *window);
index 5686b5d..e48c7b7 100644 (file)
@@ -426,7 +426,7 @@ BOOL wf_verify_certificate(freerdp* instance, char* subject, char* issuer, char*
        return TRUE;
 }
 
-int wf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
+int wf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
 {
        return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
 }
index 7387547..b1c4b1f 100644 (file)
@@ -43,7 +43,7 @@ struct wf_bitmap
        HDC hdc;
        HBITMAP bitmap;
        HBITMAP org_bitmap;
-       uint8* pdata;
+       BYTE* pdata;
 };
 typedef struct wf_bitmap wfBitmap;
 
@@ -72,8 +72,8 @@ struct wf_info
 
        HWND hwnd;
        HGDI_DC hdc;
-       uint16 srcBpp;
-       uint16 dstBpp;
+       UINT16 srcBpp;
+       UINT16 dstBpp;
        freerdp* instance;
        wfBitmap* primary;
        wfBitmap* drawing;
index 7e140da..4c7bd88 100644 (file)
@@ -56,7 +56,7 @@ struct clipboard_context
        int num_formats;
        Atom targets[20];
        int num_targets;
-       uint8* data;
+       BYTE* data;
        uint32 data_format;
        uint32 data_alt_format;
        int data_length;
@@ -70,7 +70,7 @@ struct clipboard_context
        /* INCR mechanism */
        Atom incr_atom;
        BOOL incr_starts;
-       uint8* incr_data;
+       BYTE* incr_data;
        int incr_data_length;
 };
 
@@ -99,7 +99,7 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman)
        cb->identity_atom = XInternAtom(xfi->display, "_FREERDP_CLIPRDR_ID", FALSE);
 
        XChangeProperty(xfi->display, xfi->drawable, cb->identity_atom,
-                       XA_INTEGER, 32, PropModeReplace, (uint8*) &id, 1);
+                       XA_INTEGER, 32, PropModeReplace, (BYTE*) &id, 1);
 
        XSelectInput(xfi->display, cb->root_window, PropertyChangeMask);
 
@@ -158,17 +158,17 @@ void xf_cliprdr_uninit(xfInfo* xfi)
        }
 }
 
-static uint8* lf2crlf(uint8* data, int* size)
+static BYTE* lf2crlf(BYTE* data, int* size)
 {
-       uint8 c;
-       uint8* outbuf;
-       uint8* out;
-       uint8* in_end;
-       uint8* in;
+       BYTE c;
+       BYTE* outbuf;
+       BYTE* out;
+       BYTE* in_end;
+       BYTE* in;
        int out_size;
 
        out_size = (*size) * 2 + 1;
-       outbuf = (uint8*) xzalloc(out_size);
+       outbuf = (BYTE*) xzalloc(out_size);
        out = outbuf;
        in = data;
        in_end = data + (*size);
@@ -193,12 +193,12 @@ static uint8* lf2crlf(uint8* data, int* size)
        return outbuf;
 }
 
-static void crlf2lf(uint8* data, int* size)
+static void crlf2lf(BYTE* data, int* size)
 {
-       uint8 c;
-       uint8* out;
-       uint8* in;
-       uint8* in_end;
+       BYTE c;
+       BYTE* out;
+       BYTE* in;
+       BYTE* in_end;
 
        out = data;
        in = data;
@@ -215,9 +215,9 @@ static void crlf2lf(uint8* data, int* size)
        *size = out - data;
 }
 
-static void be2le(uint8* data, int size)
+static void be2le(BYTE* data, int size)
 {
-       uint8 c;
+       BYTE c;
 
        while (size >= 2)
        {
@@ -245,7 +245,7 @@ static BOOL xf_cliprdr_is_self_owned(xfInfo* xfi)
        {
                result = XGetWindowProperty(xfi->display, cb->owner,
                        cb->identity_atom, 0, 4, 0, XA_INTEGER,
-                       &type, &format, &length, &bytes_left, (uint8**) &pid);
+                       &type, &format, &length, &bytes_left, (BYTE**) &pid);
        }
 
        if (pid)
@@ -305,7 +305,7 @@ static int xf_cliprdr_select_format_by_atom(clipboardContext* cb, Atom target)
 static void xf_cliprdr_send_raw_format_list(xfInfo* xfi)
 {
        Atom type;
-       uint8* format_data;
+       BYTE* format_data;
        int format, result;
        unsigned long length, bytes_left;
        RDP_CB_FORMAT_LIST_EVENT* event;
@@ -313,7 +313,7 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi)
 
        result = XGetWindowProperty(xfi->display, cb->root_window,
                cb->property_atom, 0, 3600, 0, XA_STRING,
-               &type, &format, &length, &bytes_left, (uint8**) &format_data);
+               &type, &format, &length, &bytes_left, (BYTE**) &format_data);
 
        if (result != Success)
        {
@@ -325,7 +325,7 @@ static void xf_cliprdr_send_raw_format_list(xfInfo* xfi)
        event = (RDP_CB_FORMAT_LIST_EVENT*) freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR,
                RDP_EVENT_TYPE_CB_FORMAT_LIST, NULL, NULL);
 
-       event->raw_format_data = (uint8*) malloc(length);
+       event->raw_format_data = (BYTE*) malloc(length);
        memcpy(event->raw_format_data, format_data, length);
        event->raw_format_data_size = length;
        XFree(format_data);
@@ -397,7 +397,7 @@ static void xf_cliprdr_send_data_request(xfInfo* xfi, uint32 format)
        freerdp_channels_send_event(cb->channels, (RDP_EVENT*) event);
 }
 
-static void xf_cliprdr_send_data_response(xfInfo* xfi, uint8* data, int size)
+static void xf_cliprdr_send_data_response(xfInfo* xfi, BYTE* data, int size)
 {
        RDP_CB_DATA_RESPONSE_EVENT* event;
        clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
@@ -436,7 +436,7 @@ static void xf_cliprdr_process_cb_data_request_event(xfInfo* xfi, RDP_CB_DATA_RE
                /* CB_FORMAT_RAW */
                i = 0;
                XChangeProperty(xfi->display, xfi->drawable, cb->property_atom,
-                       XA_INTEGER, 32, PropModeReplace, (uint8*) &event->format, 1);
+                       XA_INTEGER, 32, PropModeReplace, (BYTE*) &event->format, 1);
        }
        else
        {
@@ -468,7 +468,7 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi)
        int i, j;
        Atom atom;
        int format;
-       uint8* data = NULL;
+       BYTE* data = NULL;
        unsigned long length, bytes_left;
        RDP_CB_FORMAT_LIST_EVENT* event;
        clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
@@ -516,16 +516,16 @@ static void xf_cliprdr_get_requested_targets(xfInfo* xfi)
        }
 }
 
-static uint8* xf_cliprdr_process_requested_raw(uint8* data, int* size)
+static BYTE* xf_cliprdr_process_requested_raw(BYTE* data, int* size)
 {
-       uint8* outbuf;
+       BYTE* outbuf;
 
-       outbuf = (uint8*) malloc(*size);
+       outbuf = (BYTE*) malloc(*size);
        memcpy(outbuf, data, *size);
        return outbuf;
 }
 
-static uint8* xf_cliprdr_process_requested_unicodetext(uint8* data, int* size)
+static BYTE* xf_cliprdr_process_requested_unicodetext(BYTE* data, int* size)
 {
        char* inbuf;
        WCHAR* outbuf;
@@ -537,21 +537,21 @@ static uint8* xf_cliprdr_process_requested_unicodetext(uint8* data, int* size)
 
        *size = (int) ((out_size + 1) * 2);
 
-       return (uint8*) outbuf;
+       return (BYTE*) outbuf;
 }
 
-static uint8* xf_cliprdr_process_requested_text(uint8* data, int* size)
+static BYTE* xf_cliprdr_process_requested_text(BYTE* data, int* size)
 {
-       uint8* outbuf;
+       BYTE* outbuf;
 
        outbuf = lf2crlf(data, size);
 
        return outbuf;
 }
 
-static uint8* xf_cliprdr_process_requested_dib(uint8* data, int* size)
+static BYTE* xf_cliprdr_process_requested_dib(BYTE* data, int* size)
 {
-       uint8* outbuf;
+       BYTE* outbuf;
 
        /* length should be at least BMP header (14) + sizeof(BITMAPINFOHEADER) */
        if (*size < 54)
@@ -561,29 +561,29 @@ static uint8* xf_cliprdr_process_requested_dib(uint8* data, int* size)
        }
 
        *size -= 14;
-       outbuf = (uint8*) xzalloc(*size);
+       outbuf = (BYTE*) xzalloc(*size);
        memcpy(outbuf, data + 14, *size);
 
        return outbuf;
 }
 
-static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
+static BYTE* xf_cliprdr_process_requested_html(BYTE* data, int* size)
 {
        char* inbuf;
-       uint8* in;
-       uint8* outbuf;
+       BYTE* in;
+       BYTE* outbuf;
        char num[11];
 
        inbuf = NULL;
 
        if (*size > 2)
        {
-               if ((uint8) data[0] == 0xFE && (uint8) data[1] == 0xFF)
+               if ((BYTE) data[0] == 0xFE && (BYTE) data[1] == 0xFF)
                {
                        be2le(data, *size);
                }
 
-               if ((uint8) data[0] == 0xFF && (uint8) data[1] == 0xFE)
+               if ((BYTE) data[0] == 0xFF && (BYTE) data[1] == 0xFE)
                {
                        freerdp_UnicodeToAsciiAlloc((WCHAR*) (data + 2), &inbuf, (*size - 2) / 2);
                }
@@ -595,7 +595,7 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
                memcpy(inbuf, data, *size);
        }
 
-       outbuf = (uint8*) xzalloc(*size + 200);
+       outbuf = (BYTE*) xzalloc(*size + 200);
        strcpy((char*) outbuf,
                "Version:0.9\r\n"
                "StartHTML:0000000000\r\n"
@@ -603,10 +603,10 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
                "StartFragment:0000000000\r\n"
                "EndFragment:0000000000\r\n");
 
-       in = (uint8*) strstr((char*) inbuf, "<body");
+       in = (BYTE*) strstr((char*) inbuf, "<body");
        if (in == NULL)
        {
-               in = (uint8*) strstr((char*) inbuf, "<BODY");
+               in = (BYTE*) strstr((char*) inbuf, "<BODY");
        }
        /* StartHTML */
        snprintf(num, sizeof(num), "%010lu", (unsigned long) strlen((char*) outbuf));
@@ -638,9 +638,9 @@ static uint8* xf_cliprdr_process_requested_html(uint8* data, int* size)
        return outbuf;
 }
 
-static void xf_cliprdr_process_requested_data(xfInfo* xfi, BOOL has_data, uint8* data, int size)
+static void xf_cliprdr_process_requested_data(xfInfo* xfi, BOOL has_data, BYTE* data, int size)
 {
-       uint8* outbuf;
+       BYTE* outbuf;
        clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
 
        if (cb->incr_starts && has_data)
@@ -695,7 +695,7 @@ static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
 {
        Atom type;
        int format;
-       uint8* data = NULL;
+       BYTE* data = NULL;
        BOOL has_data = FALSE;
        unsigned long length, bytes_left, dummy;
        clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
@@ -758,7 +758,7 @@ static BOOL xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
                        {
                                bytes_left = length * format / 8;
                                DEBUG_X11("%d bytes", (int)bytes_left);
-                               cb->incr_data = (uint8*) realloc(cb->incr_data, cb->incr_data_length + bytes_left);
+                               cb->incr_data = (BYTE*) realloc(cb->incr_data, cb->incr_data_length + bytes_left);
                                memcpy(cb->incr_data + cb->incr_data_length, data, bytes_left);
                                cb->incr_data_length += bytes_left;
                                XFree(data);
@@ -807,7 +807,7 @@ static void xf_cliprdr_provide_targets(xfInfo* xfi, XEvent* respond)
                        respond->xselection.requestor,
                        respond->xselection.property,
                        XA_ATOM, 32, PropModeReplace,
-                       (uint8*) cb->targets, cb->num_targets);
+                       (BYTE*) cb->targets, cb->num_targets);
        }
 }
 
@@ -821,7 +821,7 @@ static void xf_cliprdr_provide_data(xfInfo* xfi, XEvent* respond)
                        respond->xselection.requestor,
                        respond->xselection.property,
                        respond->xselection.target, 8, PropModeReplace,
-                       (uint8*) cb->data, cb->data_length);
+                       (BYTE*) cb->data, cb->data_length);
        }
 }
 
@@ -868,24 +868,24 @@ static void xf_cliprdr_process_cb_format_list_event(xfInfo* xfi, RDP_CB_FORMAT_L
        XFlush(xfi->display);
 }
 
-static void xf_cliprdr_process_text(clipboardContext* cb, uint8* data, int size)
+static void xf_cliprdr_process_text(clipboardContext* cb, BYTE* data, int size)
 {
-       cb->data = (uint8*) malloc(size);
+       cb->data = (BYTE*) malloc(size);
        memcpy(cb->data, data, size);
        cb->data_length = size;
        crlf2lf(cb->data, &cb->data_length);
 }
 
-static void xf_cliprdr_process_unicodetext(clipboardContext* cb, uint8* data, int size)
+static void xf_cliprdr_process_unicodetext(clipboardContext* cb, BYTE* data, int size)
 {
        cb->data_length = freerdp_UnicodeToAsciiAlloc((WCHAR*) data, (CHAR**) &(cb->data), size / 2);
        crlf2lf(cb->data, &cb->data_length);
 }
 
-static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
+static void xf_cliprdr_process_dib(clipboardContext* cb, BYTE* data, int size)
 {
        STREAM* s;
-       uint16 bpp;
+       UINT16 bpp;
        uint32 offset;
        uint32 ncolors;
 
@@ -899,7 +899,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
        s = stream_new(0);
        stream_attach(s, data, size);
        stream_seek(s, 14);
-       stream_read_uint16(s, bpp);
+       stream_read_UINT16(s, bpp);
        stream_read_uint32(s, ncolors);
        offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0);
        stream_detach(s);
@@ -908,8 +908,8 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
        DEBUG_X11_CLIPRDR("offset=%d bpp=%d ncolors=%d", offset, bpp, ncolors);
 
        s = stream_new(14 + size);
-       stream_write_uint8(s, 'B');
-       stream_write_uint8(s, 'M');
+       stream_write_BYTE(s, 'B');
+       stream_write_BYTE(s, 'M');
        stream_write_uint32(s, 14 + size);
        stream_write_uint32(s, 0);
        stream_write_uint32(s, offset);
@@ -921,7 +921,7 @@ static void xf_cliprdr_process_dib(clipboardContext* cb, uint8* data, int size)
        stream_free(s);
 }
 
-static void xf_cliprdr_process_html(clipboardContext* cb, uint8* data, int size)
+static void xf_cliprdr_process_html(clipboardContext* cb, BYTE* data, int size)
 {
        char* start_str;
        char* end_str;
@@ -943,7 +943,7 @@ static void xf_cliprdr_process_html(clipboardContext* cb, uint8* data, int size)
                return;
        }
 
-       cb->data = (uint8*) malloc(size - start + 1);
+       cb->data = (BYTE*) malloc(size - start + 1);
        memcpy(cb->data, data + start, end - start);
        cb->data_length = end - start;
        crlf2lf(cb->data, &cb->data_length);
@@ -1071,7 +1071,7 @@ BOOL xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent)
        uint32 format;
        XEvent* respond;
        uint32 alt_format;
-       uint8* data = NULL;
+       BYTE* data = NULL;
        BOOL delay_respond;
        unsigned long length, bytes_left;
        clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
index 247ee78..8183ef2 100644 (file)
@@ -701,12 +701,12 @@ static BOOL xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, BOOL app)
        
                        for (i=0;i<nitems;i++)
                        {
-                               if ((Atom) ((uint16 **) prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_VERT", False))
+                               if ((Atom) ((UINT16 **) prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_VERT", False))
                                {
                                        maxVert = TRUE;
                                }
 
-                               if ((Atom) ((uint16 **)prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False))
+                               if ((Atom) ((UINT16 **)prop)[i] == XInternAtom(xfi->display, "_NET_WM_STATE_MAXIMIZED_HORZ", False))
                                {
                                        maxHorz = TRUE;
                                }
index 0a457fc..68a8ab1 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "xf_gdi.h"
 
-static const uint8 xf_rop2_table[] =
+static const BYTE xf_rop2_table[] =
 {
        0,
        GXclear,        /* 0 */
@@ -205,10 +205,10 @@ BOOL xf_set_rop3(xfInfo* xfi, int rop3)
        return TRUE;
 }
 
-Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data)
+Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, BYTE* data)
 {
        Pixmap bitmap;
-       uint8* cdata;
+       BYTE* cdata;
        XImage* image;
 
        bitmap = XCreatePixmap(xfi->display, xfi->drawable, width, height, xfi->depth);
@@ -235,7 +235,7 @@ Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data)
        return bitmap;
 }
 
-Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, uint8* data)
+Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, BYTE* data)
 {
        int scanline;
        XImage* image;
@@ -254,7 +254,7 @@ Pixmap xf_mono_bitmap_new(xfInfo* xfi, int width, int height, uint8* data)
        return bitmap;
 }
 
-Pixmap xf_glyph_new(xfInfo* xfi, int width, int height, uint8* data)
+Pixmap xf_glyph_new(xfInfo* xfi, int width, int height, BYTE* data)
 {
        int scanline;
        Pixmap bitmap;
@@ -911,7 +911,7 @@ void xf_gdi_surface_frame_marker(rdpContext* context, SURFACE_FRAME_MARKER* surf
        }
 }
 
-static void xf_gdi_surface_update_frame(xfInfo* xfi, uint16 tx, uint16 ty, uint16 width, uint16 height)
+static void xf_gdi_surface_update_frame(xfInfo* xfi, UINT16 tx, UINT16 ty, UINT16 width, UINT16 height)
 {
        if (xfi->remote_app != TRUE)
        {
@@ -998,7 +998,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
                XSetFunction(xfi->display, xfi->gc, GXcopy);
                XSetFillStyle(xfi->display, xfi->gc, FillSolid);
 
-               xfi->bmp_codec_nsc = (uint8*) realloc(xfi->bmp_codec_nsc,
+               xfi->bmp_codec_nsc = (BYTE*) realloc(xfi->bmp_codec_nsc,
                                surface_bits_command->width * surface_bits_command->height * 4);
 
                freerdp_image_flip(nsc_context->bmpdata, xfi->bmp_codec_nsc,
@@ -1026,7 +1026,7 @@ void xf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits
                /* Validate that the data received is large enough */
                if( surface_bits_command->width * surface_bits_command->height * surface_bits_command->bpp / 8 <= surface_bits_command->bitmapDataLength )
                {
-                       xfi->bmp_codec_none = (uint8*) realloc(xfi->bmp_codec_none,
+                       xfi->bmp_codec_none = (BYTE*) realloc(xfi->bmp_codec_none,
                                        surface_bits_command->width * surface_bits_command->height * 4);
 
                        freerdp_image_flip(surface_bits_command->bitmapData, xfi->bmp_codec_none,
index 5c3fa21..1ca8345 100644 (file)
@@ -38,7 +38,7 @@
 
 void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
 {
-       uint8* data;
+       BYTE* data;
        Pixmap pixmap;
        XImage* image;
        xfContext* context_ = (xfContext*) context;
@@ -112,13 +112,13 @@ void xf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
 }
 
 void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
-               uint8* data, int width, int height, int bpp, int length,
+               BYTE* data, int width, int height, int bpp, int length,
                BOOL compressed, int codec_id)
 {
-       uint16 size;
+       UINT16 size;
        RFX_MESSAGE* msg;
-       uint8* src;
-       uint8* dst;
+       BYTE* src;
+       BYTE* dst;
        int yindex;
        int xindex;
        xfInfo* xfi;
@@ -127,9 +127,9 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
        size = width * height * (bpp + 7) / 8;
 
        if (bitmap->data == NULL)
-               bitmap->data = (uint8*) malloc(size);
+               bitmap->data = (BYTE*) malloc(size);
        else
-               bitmap->data = (uint8*) realloc(bitmap->data, size);
+               bitmap->data = (BYTE*) realloc(bitmap->data, size);
 
        switch (codec_id)
        {
@@ -217,7 +217,7 @@ void xf_Pointer_New(rdpContext* context, rdpPointer* pointer)
 
        if ((pointer->andMaskData != 0) && (pointer->xorMaskData != 0))
        {
-               freerdp_alpha_cursor_convert((uint8*) (ci.pixels), pointer->xorMaskData, pointer->andMaskData,
+               freerdp_alpha_cursor_convert((BYTE*) (ci.pixels), pointer->xorMaskData, pointer->andMaskData,
                                pointer->width, pointer->height, pointer->xorBpp, xfi->clrconv);
        }
 
index 52d6e63..0463c57 100644 (file)
@@ -43,7 +43,7 @@ void xf_kbd_clear(xfInfo* xfi)
        memset(xfi->pressed_keys, 0, 256 * sizeof(BOOL));
 }
 
-void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym)
+void xf_kbd_set_keypress(xfInfo* xfi, BYTE keycode, KeySym keysym)
 {
        if (keycode >= 8)
                xfi->pressed_keys[keycode] = keysym;
@@ -51,7 +51,7 @@ void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym)
                return;
 }
 
-void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode)
+void xf_kbd_unset_keypress(xfInfo* xfi, BYTE keycode)
 {
        if (keycode >= 8)
                xfi->pressed_keys[keycode] = NoSymbol;
@@ -81,7 +81,7 @@ BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym)
        return (xfi->pressed_keys[keycode] == keysym);
 }
 
-void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode)
+void xf_kbd_send_key(xfInfo* xfi, BOOL down, BYTE keycode)
 {
        RDP_SCANCODE rdp_scancode;
        rdpInput* input;
index cb01fc8..ec90e31 100644 (file)
 
 void xf_kbd_init(xfInfo* xfi);
 void xf_kbd_clear(xfInfo* xfi);
-void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym);
-void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode);
+void xf_kbd_set_keypress(xfInfo* xfi, BYTE keycode, KeySym keysym);
+void xf_kbd_unset_keypress(xfInfo* xfi, BYTE keycode);
 void xf_kbd_release_all_keypress(xfInfo* xfi);
 BOOL xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym);
-void xf_kbd_send_key(xfInfo* xfi, BOOL down, uint8 keycode);
+void xf_kbd_send_key(xfInfo* xfi, BOOL down, BYTE keycode);
 int xf_kbd_read_keyboard_state(xfInfo* xfi);
 BOOL xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym);
 int xf_kbd_get_toggle_keys_state(xfInfo* xfi);
index fab5400..2f64532 100644 (file)
@@ -162,7 +162,7 @@ static void xf_rail_MoveWindow(rdpRail* rail, rdpWindow* window)
                window->windowWidth, window->windowHeight);
 }
 
-static void xf_rail_ShowWindow(rdpRail* rail, rdpWindow* window, uint8 state)
+static void xf_rail_ShowWindow(rdpRail* rail, rdpWindow* window, BYTE state)
 {
        xfInfo* xfi;
        xfWindow* xfw;
@@ -249,7 +249,7 @@ static void xf_on_free_rail_client_event(RDP_EVENT* event)
        }
 }
 
-static void xf_send_rail_client_event(rdpChannels* channels, uint16 event_type, void* param)
+static void xf_send_rail_client_event(rdpChannels* channels, UINT16 event_type, void* param)
 {
        RDP_EVENT* out_event = NULL;
        void * payload = NULL;
@@ -284,7 +284,7 @@ void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled)
        xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE, &activate);
 }
 
-void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command)
+void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command)
 {
        rdpChannels* channels;
        RAIL_SYSCOMMAND_ORDER syscommand;
@@ -518,7 +518,7 @@ void xf_process_rail_server_minmaxinfo_event(xfInfo* xfi, rdpChannels* channels,
                DEBUG_X11_LMS("windowId=0x%X maxWidth=%d maxHeight=%d maxPosX=%d maxPosY=%d "
                        "minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d",
                        minmax->windowId, minmax->maxWidth, minmax->maxHeight,
-                       (sint16)minmax->maxPosX, (sint16)minmax->maxPosY,
+                       (INT16)minmax->maxPosX, (INT16)minmax->maxPosY,
                        minmax->minTrackWidth, minmax->minTrackHeight,
                        minmax->maxTrackWidth, minmax->maxTrackHeight);
 
@@ -562,7 +562,7 @@ void xf_process_rail_server_localmovesize_event(xfInfo* xfi, rdpChannels* channe
 
                DEBUG_X11_LMS("windowId=0x%X isMoveSizeStart=%d moveSizeType=%s PosX=%d PosY=%d",
                        movesize->windowId, movesize->isMoveSizeStart,
-                       movetype_names[movesize->moveSizeType], (sint16) movesize->posX, (sint16) movesize->posY);
+                       movetype_names[movesize->moveSizeType], (INT16) movesize->posX, (INT16) movesize->posY);
 
                switch (movesize->moveSizeType)
                {
index 542a0fc..d4cddc0 100644 (file)
@@ -24,7 +24,7 @@
 
 void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom);
 void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail);
-void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command);
+void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, UINT16 command);
 void xf_rail_send_activate(xfInfo* xfi, Window xwindow, BOOL enabled);
 void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event);
 void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window);
index 85bad59..d22da85 100644 (file)
@@ -200,8 +200,8 @@ xf_tsmf_is_format_supported(xfXvContext* xv, uint32 pixfmt)
 static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT* vevent)
 {
        int i;
-       uint8* data1;
-       uint8* data2;
+       BYTE* data1;
+       BYTE* data2;
        uint32 pixfmt;
        uint32 xvpixfmt;
        BOOL converti420yv12 = FALSE;
index 3e92f23..a2e489b 100644 (file)
@@ -133,7 +133,7 @@ void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, BOOL fullscreen)
 /* http://tronche.com/gui/x/xlib/window-information/XGetWindowProperty.html */
 
 BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length,
-               unsigned long* nitems, unsigned long* bytes, uint8** prop)
+               unsigned long* nitems, unsigned long* bytes, BYTE** prop)
 {
        int status;
        Atom actual_type;
@@ -224,7 +224,7 @@ void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, BOOL show)
        hints.status = 0;
 
        XChangeProperty(xfi->display, window->handle, xfi->_MOTIF_WM_HINTS, xfi->_MOTIF_WM_HINTS, 32,
-               PropModeReplace, (uint8*) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS);
+               PropModeReplace, (BYTE*) &hints, PROP_MOTIF_WM_HINTS_ELEMENTS);
 }
 
 void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window)
@@ -235,7 +235,7 @@ void xf_SetWindowUnlisted(xfInfo* xfi, xfWindow* window)
        window_state[1] = xfi->_NET_WM_STATE_SKIP_TASKBAR;
 
        XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_STATE,
-               XA_ATOM, 32, PropModeReplace, (uint8*) &window_state, 2);
+               XA_ATOM, 32, PropModeReplace, (BYTE*) &window_state, 2);
 }
 
 void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_style)
@@ -282,7 +282,7 @@ void xf_SetWindowStyle(xfInfo* xfi, xfWindow* window, uint32 style, uint32 ex_st
        }
 
        XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_WINDOW_TYPE,
-               XA_ATOM, 32, PropModeReplace, (uint8*) &window_type, 1);
+               XA_ATOM, 32, PropModeReplace, (BYTE*) &window_type, 1);
 
 }
 
@@ -373,7 +373,7 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height,
                        input_mask |= EnterWindowMask | LeaveWindowMask;
 
                XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32,
-                               PropModeReplace, (uint8*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop));
+                               PropModeReplace, (BYTE*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop));
 
                if (xfi->parent_window)
                         XReparentWindow(xfi->display, window->handle, xfi->parent_window, 0, 0);
@@ -688,7 +688,7 @@ void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int h
        xf_UpdateWindowArea(xfi, window, 0, 0, width, height);
 }
 
-void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state)
+void xf_ShowWindow(xfInfo* xfi, xfWindow* window, BYTE state)
 {
        switch (state)
        {
@@ -777,7 +777,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon)
        }
 
        XChangeProperty(xfi->display, window->handle, xfi->_NET_WM_ICON, XA_CARDINAL, 32,
-               PropModeReplace, (uint8*) propdata, propsize);
+               PropModeReplace, (BYTE*) propdata, propsize);
 
        XFlush(xfi->display);
 }
index 0888a88..4748b71 100644 (file)
@@ -77,7 +77,7 @@ struct xf_window
        BOOL is_mapped;
        BOOL is_transient;
        xfLocalMove local_move;
-       uint8 rail_state;
+       BYTE rail_state;
        BOOL rail_ignore_configure;
 };
 
@@ -96,7 +96,7 @@ void xf_ResizeDesktopWindow(xfInfo* xfi, xfWindow* window, int width, int height
 xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width, int height, uint32 id);
 void xf_SetWindowText(xfInfo *xfi, xfWindow* window, char *name);
 void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height);
-void xf_ShowWindow(xfInfo* xfi, xfWindow* window, uint8 state);
+void xf_ShowWindow(xfInfo* xfi, xfWindow* window, BYTE state);
 void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon);
 void xf_SetWindowRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects);
 void xf_SetWindowVisibilityRects(xfInfo* xfi, xfWindow* window, RECTANGLE_16* rects, int nrects);
@@ -107,7 +107,7 @@ void xf_DestroyWindow(xfInfo* xfi, xfWindow* window);
 rdpWindow* xf_rdpWindowFromWindow(xfInfo* xfi, Window wnd);
 
 BOOL xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int length,
-               unsigned long* nitems, unsigned long* bytes, uint8** prop);
+               unsigned long* nitems, unsigned long* bytes, BYTE** prop);
 
 void xf_SetWindowMinMaxInfo(xfInfo* xfi, xfWindow* window, int maxWidth, int maxHeight,
                int maxPosX, int maxPosY, int minTrackWidth, int minTrackHeight, int maxTrackWidth, int maxTrackHeight);
index 58ab5ca..f3251e8 100644 (file)
@@ -75,7 +75,7 @@
 
 static HANDLE g_sem;
 static int g_thread_count = 0;
-static uint8 g_disconnect_reason = 0;
+static BYTE g_disconnect_reason = 0;
 
 static long xv_port = 0;
 static const size_t password_size = 512;
@@ -759,7 +759,7 @@ BOOL xf_post_connect(freerdp* instance)
        xfi->image = XCreateImage(xfi->display, xfi->visual, xfi->depth, ZPixmap, 0,
                        (char*) xfi->primary_buffer, xfi->width, xfi->height, xfi->scanline_pad, 0);
 
-       xfi->bmp_codec_none = (uint8*) malloc(64 * 64 * 4);
+       xfi->bmp_codec_none = (BYTE*) malloc(64 * 64 * 4);
 
        if (xfi->sw_gdi)
        {
@@ -966,7 +966,7 @@ int xf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_D
        return 1;
 }
 
-int xf_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size)
+int xf_receive_channel_data(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size)
 {
        return freerdp_channels_data(instance, channelId, data, size, flags, total_size);
 }
@@ -1272,7 +1272,7 @@ void* thread_func(void* param)
        pthread_exit(NULL);
 }
 
-static uint8 exit_code_from_disconnect_reason(uint32 reason)
+static BYTE exit_code_from_disconnect_reason(uint32 reason)
 {
        if (reason == 0 ||
           (reason >= XF_EXIT_PARSE_ARGUMENTS && reason <= XF_EXIT_CONN_FAILED))
index ed51e92..30d75e1 100644 (file)
@@ -117,13 +117,13 @@ struct xf_info
 
        HGDI_DC hdc;
        BOOL sw_gdi;
-       uint8* primary_buffer;
+       BYTE* primary_buffer;
 
        BOOL frame_begin;
-       uint16 frame_x1;
-       uint16 frame_y1;
-       uint16 frame_x2;
-       uint16 frame_y2;
+       UINT16 frame_x1;
+       UINT16 frame_y1;
+       UINT16 frame_x2;
+       UINT16 frame_y2;
 
        BOOL focused;
        BOOL mouse_active;
@@ -136,8 +136,8 @@ struct xf_info
        XSetWindowAttributes attribs;
        BOOL complex_regions;
        VIRTUAL_SCREEN vscreen;
-       uint8* bmp_codec_none;
-       uint8* bmp_codec_nsc;
+       BYTE* bmp_codec_none;
+       BYTE* bmp_codec_nsc;
        void* rfx_context;
        void* nsc_context;
        void* xv_context;
index 1e5f0c6..6759b2e 100644 (file)
 
 #include "test_bitmap.h"
 
-uint8 compressed_16x1x8[] =
+BYTE compressed_16x1x8[] =
 {
 0x10
 };
 
-uint8 decompressed_16x1x8[] =
+BYTE decompressed_16x1x8[] =
 {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 compressed_32x32x8[] =
+BYTE compressed_32x32x8[] =
 {
 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06,
 0xec, 0x6c, 0x0e, 0x0e, 0x44, 0x0e, 0x0e, 0x0e, 0x13, 0x06, 0x06, 0x06, 0xed, 0x06, 0x06, 0x06,
@@ -90,7 +90,7 @@ uint8 compressed_32x32x8[] =
 0x04, 0x8b, 0x04, 0x6c, 0xe6, 0x04, 0x06, 0x82, 0x00, 0x00
 };
 
-uint8 decompressed_32x32x8[] =
+BYTE decompressed_32x32x8[] =
 {
 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x6c, 0x04, 0x8b,
 0x04, 0x6c, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x04, 0x06, 0x00, 0x00,
@@ -158,18 +158,18 @@ uint8 decompressed_32x32x8[] =
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 compressed_16x1x16[] =
+BYTE compressed_16x1x16[] =
 {
 0x0c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 decompressed_16x1x16[] =
+BYTE decompressed_16x1x16[] =
 {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 compressed_32x32x16[] =
+BYTE compressed_32x32x16[] =
 {
 0x1c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0xef, 0x1a, 0x8a,
 0xcf, 0x12, 0x4e, 0x12, 0xce, 0x09, 0xaf, 0x09, 0x8f, 0x01, 0x8f, 0x01, 0xaf, 0x09, 0xce, 0x09,
@@ -268,7 +268,7 @@ uint8 compressed_32x32x16[] =
 0xcf, 0x12, 0x69, 0xef, 0x1a, 0x84, 0xef, 0x1a, 0xef, 0x1a, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 decompressed_32x32x16[] =
+BYTE decompressed_32x32x16[] =
 {
 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a,
 0xef, 0x1a, 0xef, 0x1a, 0xef, 0x1a, 0xcf, 0x12, 0xb0, 0x12, 0x91, 0x0a, 0xb3, 0x0a, 0xb3, 0x0a,
@@ -400,19 +400,19 @@ uint8 decompressed_32x32x16[] =
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 compressed_16x1x24[] =
+BYTE compressed_16x1x24[] =
 {
 0x0c, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 decompressed_16x1x24[] =
+BYTE decompressed_16x1x24[] =
 {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 compressed_32x32x24[] =
+BYTE compressed_32x32x24[] =
 {
 0x84, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x38, 0x8a, 0xff,
 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x80,
@@ -479,7 +479,7 @@ uint8 compressed_32x32x24[] =
 0xff, 0xff, 0xff, 0xff
 };
 
-uint8 decompressed_32x32x24[] =
+BYTE decompressed_32x32x24[] =
 {
 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@@ -675,12 +675,12 @@ uint8 decompressed_32x32x24[] =
 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
 };
 
-uint8 compressed_16x1x32[] =
+BYTE compressed_16x1x32[] =
 {
 0x10, 0x01, 0x01, 0x01, 0x01
 };
 
-uint8 decompressed_16x1x32[] =
+BYTE decompressed_16x1x32[] =
 {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -688,7 +688,7 @@ uint8 decompressed_16x1x32[] =
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-uint8 compressed_32x32x32[] =
+BYTE compressed_32x32x32[] =
 {
 0x10, 0x02, 0x02, 0x0a, 0xbb, 0x22, 0x8e, 0xf6, 0xb9, 0x91, 0x91, 0xa9, 0xf5, 0xaa, 0x3c, 0x00,
 0x08, 0xf9, 0x5e, 0xd1, 0x59, 0x8f, 0xf7, 0xb8, 0x90, 0x90, 0xa8, 0xf4, 0xab, 0x59, 0xa3, 0x8c,
@@ -866,7 +866,7 @@ uint8 compressed_32x32x32[] =
 0xcf, 0xb5, 0xb3, 0xc7, 0xd3, 0xc1, 0x85, 0x31, 0x03, 0x00
 };
 
-uint8 decompressed_32x32x32[] =
+BYTE decompressed_32x32x32[] =
 {
 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00,
 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00, 0x7a, 0x5f, 0x1d, 0x00,
@@ -1149,14 +1149,14 @@ void test_bitmap(void)
 {
        struct btest
        {
-               uint8 decompressed_16x1x8[16 * 1 * 1];
-               uint8 decompressed_32x32x8[32 * 32 * 1];
-               uint8 decompressed_16x1x16[16 * 1 * 2];
-               uint8 decompressed_32x32x16[32 * 32 * 2];
-               uint8 decompressed_16x1x24[16 * 1 * 3];
-               uint8 decompressed_32x32x24[32 * 32 * 3];
-               uint8 decompressed_16x1x32[16 * 1 * 4];
-               uint8 decompressed_32x32x32[32 * 32 * 4];
+               BYTE decompressed_16x1x8[16 * 1 * 1];
+               BYTE decompressed_32x32x8[32 * 32 * 1];
+               BYTE decompressed_16x1x16[16 * 1 * 2];
+               BYTE decompressed_32x32x16[32 * 32 * 2];
+               BYTE decompressed_16x1x24[16 * 1 * 3];
+               BYTE decompressed_32x32x24[32 * 32 * 3];
+               BYTE decompressed_16x1x32[16 * 1 * 4];
+               BYTE decompressed_32x32x32[32 * 32 * 4];
        };
        struct btest* t;
        int width;
index bcf68a3..42b548a 100644 (file)
@@ -51,18 +51,18 @@ int add_cliprdr_suite(void)
        return 0;
 }
 
-static const uint8 test_clip_caps_data[] =
+static const BYTE test_clip_caps_data[] =
 {
        "\x07\x00\x00\x00\x10\x00\x00\x00\x01\x00\x00\x00\x01\x00\x0C\x00"
        "\x02\x00\x00\x00\x0E\x00\x00\x00"
 };
 
-static const uint8 test_monitor_ready_data[] =
+static const BYTE test_monitor_ready_data[] =
 {
        "\x01\x00\x00\x00\x00\x00\x00\x00"
 };
 
-static const uint8 test_format_list_data[] =
+static const BYTE test_format_list_data[] =
 {
        "\x02\x00\x00\x00\x48\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00"
        "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
@@ -71,23 +71,23 @@ static const uint8 test_format_list_data[] =
        "\x6D\x00\x61\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
 };
 
-static const uint8 test_format_list_response_data[] =
+static const BYTE test_format_list_response_data[] =
 {
        "\x03\x00\x01\x00\x00\x00\x00\x00"
 };
 
-static const uint8 test_data_request_data[] =
+static const BYTE test_data_request_data[] =
 {
        "\x04\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00"
 };
 
-static const uint8 test_data_response_data[] =
+static const BYTE test_data_response_data[] =
 {
        "\x05\x00\x01\x00\x18\x00\x00\x00\x68\x00\x65\x00\x6C\x00\x6C\x00"
        "\x6F\x00\x20\x00\x77\x00\x6F\x00\x72\x00\x6c\x00\x64\x00\x00\x00"
 };
 
-static int test_rdp_channel_data(freerdp* instance, int chan_id, uint8* data, int data_size)
+static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size)
 {
        printf("chan_id %d data_size %d\n", chan_id, data_size);
        freerdp_hexdump(data, data_size);
@@ -199,7 +199,7 @@ void test_cliprdr(void)
        /* UI sends data response event to cliprdr */
        event = freerdp_event_new(RDP_EVENT_CLASS_CLIPRDR, RDP_EVENT_TYPE_CB_DATA_RESPONSE, event_process_callback, NULL);
        data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*)event;
-       data_response_event->data = (uint8*)malloc(6);
+       data_response_event->data = (BYTE*)malloc(6);
        strcpy((char*)data_response_event->data, "hello");
        data_response_event->size = 6;
        event_processed = 0;
index eb471e4..8d7a11f 100644 (file)
@@ -83,7 +83,7 @@ void test_color_GetRGB_565(void)
        */
        
        int r, g, b;
-       uint16 rgb16 = 0xAE7D;
+       UINT16 rgb16 = 0xAE7D;
        GetRGB_565(r, g, b, rgb16);
        
        CU_ASSERT(r == 0x15);
@@ -103,7 +103,7 @@ void test_color_GetRGB16(void)
        */
        
        int r, g, b;
-       uint16 rgb16 = 0xAE7D;
+       UINT16 rgb16 = 0xAE7D;
        GetRGB16(r, g, b, rgb16);
        
        CU_ASSERT(r == 0xAD);
@@ -122,7 +122,7 @@ void test_color_GetBGR_565(void)
        */
                
        int r, g, b;
-       uint16 bgr16 = 0xEE75;
+       UINT16 bgr16 = 0xEE75;
        GetBGR_565(r, g, b, bgr16);
        
        CU_ASSERT(r == 0x15);
@@ -142,7 +142,7 @@ void test_color_GetBGR16(void)
        */
                
        int r, g, b;
-       uint16 bgr16 = 0xEE75;
+       UINT16 bgr16 = 0xEE75;
        GetBGR16(r, g, b, bgr16);
        
        CU_ASSERT(r == 0xAD);
index fd6d600..3de60d8 100644 (file)
@@ -50,14 +50,14 @@ int add_drdynvc_suite(void)
        return 0;
 }
 
-static const uint8 test_capability_request_data[] =
+static const BYTE test_capability_request_data[] =
 {
        "\x58\x00\x02\x00\x33\x33\x11\x11\x3D\x0A\xA7\x04"
 };
 
 static int data_received = 0;
 
-static int test_rdp_channel_data(freerdp* instance, int chan_id, uint8* data, int data_size)
+static int test_rdp_channel_data(freerdp* instance, int chan_id, BYTE* data, int data_size)
 {
        printf("chan_id %d data_size %d\n", chan_id, data_size);
        freerdp_hexdump(data, data_size);
index 045f3ab..46b8bed 100644 (file)
@@ -63,11 +63,11 @@ void dump_data(unsigned char * p, int len, int width, char* name)
        printf("\n");
 }
 
-void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line)
+void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line)
 {
        int i;
        int actual_length;
-       uint8* actual_data;
+       BYTE* actual_data;
 
        actual_data = s->data;
        actual_length = stream_get_length(s);
index 113823f..7a537f4 100644 (file)
@@ -38,6 +38,6 @@
        }
 
 void dump_data(unsigned char * p, int len, int width, char* name);
-void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line);
+void assert_stream(STREAM* s, BYTE* data, int length, const char* func, int line);
 
 #define ASSERT_STREAM(_s, _data, _length) assert_stream(_s, _data, _length, __FUNCTION__, __LINE__)
index f25d453..dcf307f 100644 (file)
@@ -48,7 +48,7 @@ int add_gcc_suite(void)
        return 0;
 }
 
-uint8 gcc_user_data[284] =
+BYTE gcc_user_data[284] =
        "\x01\xc0\xd8\x00\x04\x00\x08\x00\x00\x05\x00\x04\x01\xCA\x03\xAA"
        "\x09\x04\x00\x00\xCE\x0E\x00\x00\x45\x00\x4c\x00\x54\x00\x4f\x00"
        "\x4e\x00\x53\x00\x2d\x00\x44\x00\x45\x00\x56\x00\x32\x00\x00\x00"
@@ -68,7 +68,7 @@ uint8 gcc_user_data[284] =
        "\x00\x00\x80\x80\x63\x6c\x69\x70\x72\x64\x72\x00\x00\x00\xA0\xC0"
        "\x72\x64\x70\x73\x6e\x64\x00\x00\x00\x00\x00\xc0";
 
-uint8 gcc_conference_create_request_expected[307] =
+BYTE gcc_conference_create_request_expected[307] =
        "\x00\x05\x00\x14\x7C\x00\x01\x81\x2A\x00\x08\x00\x10\x00\x01\xC0"
        "\x00\x44\x75\x63\x61\x81\x1c\x01\xc0\xd8\x00\x04\x00\x08\x00\x00"
        "\x05\x00\x04\x01\xCA\x03\xAA\x09\x04\x00\x00\xCE\x0E\x00\x00\x45"
@@ -102,10 +102,10 @@ void test_gcc_write_conference_create_request(void)
        s = stream_new(sizeof(gcc_conference_create_request_expected));
 
        gcc_write_conference_create_request(s, &user_data);
-       ASSERT_STREAM(s, (uint8*) gcc_conference_create_request_expected, sizeof(gcc_conference_create_request_expected));
+       ASSERT_STREAM(s, (BYTE*) gcc_conference_create_request_expected, sizeof(gcc_conference_create_request_expected));
 }
 
-uint8 gcc_client_core_data_expected[216] =
+BYTE gcc_client_core_data_expected[216] =
        "\x01\xc0\xd8\x00\x04\x00\x08\x00\x00\x05\x00\x04\x01\xCA\x03\xAA"
        "\x09\x04\x00\x00\xCE\x0E\x00\x00\x45\x00\x4c\x00\x54\x00\x4f\x00"
        "\x4e\x00\x53\x00\x2d\x00\x44\x00\x45\x00\x56\x00\x32\x00\x00\x00"
@@ -142,10 +142,10 @@ void test_gcc_write_client_core_data(void)
 
        gcc_write_client_core_data(s, settings);
 
-       ASSERT_STREAM(s, (uint8*) gcc_client_core_data_expected, sizeof(gcc_client_core_data_expected));
+       ASSERT_STREAM(s, (BYTE*) gcc_client_core_data_expected, sizeof(gcc_client_core_data_expected));
 }
 
-uint8 gcc_client_security_data_expected[12] =
+BYTE gcc_client_security_data_expected[12] =
                "\x02\xC0\x0C\x00\x1B\x00\x00\x00\x00\x00\x00\x00";
 
 void test_gcc_write_client_security_data(void)
@@ -165,10 +165,10 @@ void test_gcc_write_client_security_data(void)
 
        gcc_write_client_security_data(s, settings);
 
-       ASSERT_STREAM(s, (uint8*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected));
+       ASSERT_STREAM(s, (BYTE*) gcc_client_security_data_expected, sizeof(gcc_client_security_data_expected));
 }
 
-uint8 gcc_client_cluster_data_expected[12] =
+BYTE gcc_client_cluster_data_expected[12] =
                "\x04\xC0\x0C\x00\x0D\x00\x00\x00\x00\x00\x00\x00";
 
 void test_gcc_write_client_cluster_data(void)
@@ -181,10 +181,10 @@ void test_gcc_write_client_cluster_data(void)
 
        gcc_write_client_cluster_data(s, settings);
 
-       ASSERT_STREAM(s, (uint8*) gcc_client_cluster_data_expected, sizeof(gcc_client_cluster_data_expected));
+       ASSERT_STREAM(s, (BYTE*) gcc_client_cluster_data_expected, sizeof(gcc_client_cluster_data_expected));
 }
 
-uint8 gcc_client_network_data_expected[44] =
+BYTE gcc_client_network_data_expected[44] =
                "\x03\xC0\x2C\x00\x03\x00\x00\x00\x72\x64\x70\x64\x72\x00\x00\x00"
                "\x00\x00\x80\x80\x63\x6c\x69\x70\x72\x64\x72\x00\x00\x00\xA0\xC0"
                "\x72\x64\x70\x73\x6e\x64\x00\x00\x00\x00\x00\xc0";
@@ -211,5 +211,5 @@ void test_gcc_write_client_network_data(void)
 
        gcc_write_client_network_data(s, settings);
 
-       ASSERT_STREAM(s, (uint8*) gcc_client_network_data_expected, sizeof(gcc_client_network_data_expected));
+       ASSERT_STREAM(s, (BYTE*) gcc_client_network_data_expected, sizeof(gcc_client_network_data_expected));
 }
index 2c0bdca..49937cb 100644 (file)
@@ -1162,7 +1162,7 @@ unsigned char polygon_case_2[256] =
 int CompareBitmaps(HGDI_BITMAP hBmp1, HGDI_BITMAP hBmp2)
 {
        int x, y;
-       uint8 *p1, *p2;
+       BYTE *p1, *p2;
 
        int minw = (hBmp1->width < hBmp2->width) ? hBmp1->width : hBmp2->width;
        int minh = (hBmp1->height < hBmp2->height) ? hBmp1->height : hBmp2->height;
@@ -1285,13 +1285,13 @@ void test_gdi_CreateBitmap(void)
        int bpp;
        int width;
        int height;
-       uint8* data;
+       BYTE* data;
        HGDI_BITMAP hBitmap;
        
        bpp = 32;
        width = 32;
        height = 16;
-       data = (uint8*) malloc(width * height * 4);
+       data = (BYTE*) malloc(width * height * 4);
        hBitmap = gdi_CreateBitmap(width, height, bpp, data);
 
        CU_ASSERT(hBitmap->objectType == GDIOBJECT_BITMAP);
@@ -1481,7 +1481,7 @@ void test_gdi_LineTo(void)
 {
        HGDI_DC hdc;
        HGDI_PEN pen;
-       uint8* data;
+       BYTE* data;
        HGDI_BITMAP hBmp;
        HGDI_BITMAP hBmp_LineTo_1;
        HGDI_BITMAP hBmp_LineTo_2;
@@ -1533,88 +1533,88 @@ void test_gdi_LineTo(void)
        clrconv->invert = 0;
        clrconv->palette = hPalette;
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_4, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_4 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_5, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_5 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_6, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_6 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_7, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_7 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_8, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_8 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_9, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_9 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_10, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_10 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_case_11, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_11 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_BLACK, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_BLACK = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_NOTMERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKNOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_MASKNOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTCOPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_NOTCOPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_MASKPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_NOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_XORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_XORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTMASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_NOTMASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MASKPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_MASKPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOTXORPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_NOTXORPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_NOP, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_NOP = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGENOTPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_MERGENOTPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_COPYPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_COPYPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPENNOT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_MERGEPENNOT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_MERGEPEN, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_MERGEPEN = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) line_to_R2_WHITE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_LineTo_R2_WHITE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
        /* Test Case 1: (0,0) -> (15, 15) */
@@ -1823,7 +1823,7 @@ void test_gdi_Ellipse(void)
 {
        HGDI_DC hdc;
        HGDI_PEN pen;
-       uint8* data;
+       BYTE* data;
        HGDI_BITMAP hBmp;
        HGDI_BITMAP hBmp_Ellipse_1;
        HGDI_BITMAP hBmp_Ellipse_2;
@@ -1851,13 +1851,13 @@ void test_gdi_Ellipse(void)
        clrconv->invert = 0;
        clrconv->palette = hPalette;
 
-       data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_1, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_Ellipse_1 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_2, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_Ellipse_2 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) ellipse_case_3, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_Ellipse_3 = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
        /* Test Case 1: (0,0) -> (16, 16) */
@@ -1964,7 +1964,7 @@ void test_gdi_FillRect(void)
 
 void test_gdi_BitBlt_32bpp(void)
 {
-       uint8* data;
+       BYTE* data;
        HGDI_DC hdcSrc;
        HGDI_DC hdcDst;
        HGDI_BRUSH hBrush;
@@ -2009,64 +2009,64 @@ void test_gdi_BitBlt_32bpp(void)
        clrconv->invert = 0;
        clrconv->palette = hPalette;
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
        hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
        
        gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
@@ -2218,7 +2218,7 @@ void test_gdi_BitBlt_32bpp(void)
 
 void test_gdi_BitBlt_16bpp(void)
 {
-       uint8* data;
+       BYTE* data;
        HGDI_DC hdcSrc;
        HGDI_DC hdcDst;
        HGDI_BRUSH hBrush;
@@ -2263,64 +2263,64 @@ void test_gdi_BitBlt_16bpp(void)
        clrconv->invert = 0;
        clrconv->palette = hPalette;
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
        hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
        
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
        
        gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
@@ -2472,7 +2472,7 @@ void test_gdi_BitBlt_16bpp(void)
 
 void test_gdi_BitBlt_8bpp(void)
 {
-       uint8* data;
+       BYTE* data;
        HGDI_DC hdcSrc;
        HGDI_DC hdcDst;
        HGDI_BRUSH hBrush;
@@ -2517,64 +2517,64 @@ void test_gdi_BitBlt_8bpp(void)
        clrconv->invert = 0;
        clrconv->palette = hPalette;
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRC, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpSrc = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpDst = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DST, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmpDstOriginal = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PAT, NULL, 8, 8, 8, bitsPerPixel, clrconv);
        hBmpPat = gdi_CreateBitmap(8, 8, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SPna, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SPna = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_BLACKNESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_BLACKNESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_WHITENESS, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_WHITENESS = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCAND, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCAND = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_SRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_SRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_NOTSRCCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_NOTSRCERASE, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_NOTSRCERASE = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_DSTINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_DSTINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGECOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_MERGECOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_MERGEPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_MERGEPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATCOPY, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATCOPY = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATPAINT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATPAINT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
-       data = (uint8*) freerdp_image_convert((uint8*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
+       data = (BYTE*) freerdp_image_convert((BYTE*) bmp_PATINVERT, NULL, 16, 16, 8, bitsPerPixel, clrconv);
        hBmp_PATINVERT = gdi_CreateBitmap(16, 16, bitsPerPixel, data);
 
        gdi_SelectObject(hdcSrc, (HGDIOBJECT) hBmpSrc);
index bd18d5c..f19b325 100644 (file)
@@ -55,7 +55,7 @@ int add_license_suite(void)
 
 /* Server License Request (2200 bytes) */
 
-uint8 server_license_request[2200] =
+BYTE server_license_request[2200] =
        "\x01\x03\x98\x08\x84\xef\xae\x20\xb1\xd5\x9e\x36\x49\x1a\xe8\x2e"
        "\x0a\x99\x89\xac\x49\xa6\x47\x4f\x33\x9b\x5a\xb9\x95\x03\xa6\xc6"
        "\xc2\x3c\x3f\x61\x00\x00\x06\x00\x2c\x00\x00\x00\x4d\x00\x69\x00"
@@ -197,7 +197,7 @@ uint8 server_license_request[2200] =
 
 /* Client New License Request (341 bytes) */
 
-uint8 client_new_license_request[341] =
+BYTE client_new_license_request[341] =
        "\x13\x83\x55\x01\x01\x00\x00\x00\x00\x00\x01\x04\xdc\x73\xa0\xc8"
        "\x69\x25\x6b\x18\xaf\x0b\x94\x7a\xa9\xa5\x20\xaf\x8b\xbc\x0d\xcc"
        "\xa3\x95\xb7\xb9\xeb\x81\x5d\xbe\x0a\x10\x9c\xd8\x02\x00\x08\x01"
@@ -223,21 +223,21 @@ uint8 client_new_license_request[341] =
 
 /* Server Platform Challenge (38 bytes) */
 
-uint8 server_platform_challenge[38] =
+BYTE server_platform_challenge[38] =
        "\x02\x03\x26\x00\xff\xff\xff\xff\x50\xf7\x0a\x00\x46\x37\x85\x54"
        "\x8e\xc5\x91\x34\x97\x5d\x78\x94\xad\x3b\x81\xda\x88\x18\x56\x0f"
        "\x3a\xd1\xf1\x03\xef\x35";
 
 /* Client Platform Challenge Response (66 bytes) */
 
-uint8 client_platform_challenge_response[66] =
+BYTE client_platform_challenge_response[66] =
        "\x15\x83\x42\x00\x01\x00\x12\x00\xfa\xb4\xe8\x24\xcf\x56\xb2\x4e"
        "\x80\x02\xbd\xb6\x61\xfc\xdf\xe9\x6c\x44\x01\x00\x14\x00\xf8\xb5"
        "\xe8\x25\x3d\x0f\x3f\x70\x1d\xda\x60\x19\x16\xfe\x73\x1a\x45\x7e"
        "\x02\x71\x38\x23\x62\x5d\x10\x8b\x93\xc3\xf1\xe4\x67\x1f\x4a\xb6"
        "\x00\x0a";
 
-uint8 license_server_modulus[256] =
+BYTE license_server_modulus[256] =
        "\x88\xad\x7c\x8f\x8b\x82\x76\x5a\xbd\x8f\x6f\x62\x18\xe1\xd9\xaa"
        "\x41\xfd\xed\x68\x01\xc6\x34\x35\xb0\x29\x04\xca\x4a\x4a\x1c\x7e"
        "\x80\x14\xf7\x8e\x77\xb8\x25\xff\x16\x47\x6f\xbd\xe2\x34\x3d\x2e"
@@ -255,9 +255,9 @@ uint8 license_server_modulus[256] =
        "\x6a\x9d\x7d\xde\xae\xf9\xe6\xaf\x57\xae\xb9\x01\x96\x5d\xe0\x4d"
        "\xcd\xed\xc8\xd7\xf3\x01\x03\x38\x10\xbe\x7c\x42\x67\x01\xa7\x23";
 
-uint8 license_server_exponent[4] = "\x00\x01\x00\x01";
+BYTE license_server_exponent[4] = "\x00\x01\x00\x01";
 
-uint8 terminal_server_modulus[256] =
+BYTE terminal_server_modulus[256] =
        "\xc8\x90\x6b\xf0\xc6\x58\x81\xa6\x89\x1c\x0e\xf2\xf6\xd9\x82\x12"
        "\x71\xa5\x6e\x51\xdb\xe0\x32\x66\xaa\x91\x77\x0e\x88\xab\x44\xb7"
        "\xd3\x97\xda\x78\x8f\x0e\x44\x26\x46\x7f\x16\xd4\xc6\x63\xeb\xca"
@@ -275,22 +275,22 @@ uint8 terminal_server_modulus[256] =
        "\x88\x1f\xb4\x35\x0f\x7c\xc0\x75\x17\xc6\x67\xdd\x48\x80\xcb\x0a"
        "\xbe\x9d\xf6\x93\x60\x65\x34\xeb\x97\xaf\x65\x6d\xdf\xbf\x6f\x5b";
 
-uint8 terminal_server_exponent[4] = "\x00\x01\x00\x01";
+BYTE terminal_server_exponent[4] = "\x00\x01\x00\x01";
 
-uint8 client_random[32] =
+BYTE client_random[32] =
        "\xdc\x73\xa0\xc8\x69\x25\x6b\x18\xaf\x0b\x94\x7a\xa9\xa5\x20\xaf"
        "\x8b\xbc\x0d\xcc\xa3\x95\xb7\xb9\xeb\x81\x5d\xbe\x0a\x10\x9c\xd8";
 
-uint8 server_random[32] =
+BYTE server_random[32] =
        "\x84\xef\xae\x20\xb1\xd5\x9e\x36\x49\x1a\xe8\x2e\x0a\x99\x89\xac"
        "\x49\xa6\x47\x4f\x33\x9b\x5a\xb9\x95\x03\xa6\xc6\xc2\x3c\x3f\x61";
 
-uint8 premaster_secret[48] =
+BYTE premaster_secret[48] =
        "\xcf\x7a\xdb\xcb\xfb\x0e\x15\x23\x87\x1c\x84\x81\xba\x9d\x4e\x15"
        "\xbb\xd2\x56\xbd\xd8\xf7\xf3\x16\xcc\x35\x3b\xe1\x93\x42\x78\xdd"
        "\x92\x9a\xe4\x7a\xe2\x99\xd4\x73\xb1\xaa\x6f\x55\x94\x3b\xc9\xbc";
 
-uint8 encrypted_premaster_secret[264] =
+BYTE encrypted_premaster_secret[264] =
        "\xda\x9c\x5d\xa6\x68\x9d\xa3\x90\x67\x24\xf3\x3a\xea\xa1\xe2\x68"
        "\xad\x12\xf5\xf6\x0b\x7a\xac\x92\xb1\x69\x6f\x42\x55\x8a\xa0\xe2"
        "\x9b\x2c\xd0\xc7\xee\x33\x6c\x47\x79\xc3\x1e\xbf\x03\x8b\x95\x70"
@@ -309,7 +309,7 @@ uint8 encrypted_premaster_secret[264] =
        "\x09\x83\x0b\xbc\x3d\x3e\x05\x47\x65\x96\x31\x8c\x6b\xc5\xe6\xa0"
        "\x00\x00\x00\x00\x00\x00\x00\x00";
 
-uint8 platform_challenge[10] = "\x54\x00\x45\x00\x53\x00\x54\x00\x00\x00";
+BYTE platform_challenge[10] = "\x54\x00\x45\x00\x53\x00\x54\x00\x00\x00";
 
 void test_license(void)
 {
@@ -374,44 +374,44 @@ void test_license(void)
        license_read_platform_challenge_packet(license, s);
 }
 
-uint8 test_client_random[32] =
+BYTE test_client_random[32] =
        "\xdc\x73\xa0\xc8\x69\x25\x6b\x18\xaf\x0b\x94\x7a\xa9\xa5\x20\xaf"
        "\x8b\xbc\x0d\xcc\xa3\x95\xb7\xb9\xeb\x81\x5d\xbe\x0a\x10\x9c\xd8";
 
-uint8 test_server_random[32] =
+BYTE test_server_random[32] =
        "\x16\x7e\xf8\x71\x48\x16\x1a\x4f\xa5\x2c\xcd\x73\x63\x60\xa6\xc3"
        "\xb9\x19\x1b\x4b\x6b\xb2\x0a\xb8\xec\xf1\x8d\x95\x4e\xa8\x21\xc5";
 
-uint8 test_premaster_secret[48] =
+BYTE test_premaster_secret[48] =
        "\xcf\x7a\xdb\xcb\xfb\x0e\x15\x23\x87\x1c\x84\x81\xba\x9d\x4e\x15"
        "\xbb\xd2\x56\xbd\xd8\xf7\xf3\x16\xcc\x35\x3b\xe1\x93\x42\x78\xdd"
        "\x92\x9a\xe4\x7a\xe2\x99\xd4\x73\xb1\xaa\x6f\x55\x94\x3b\xc9\xbc";
 
-uint8 test_modulus[64] =
+BYTE test_modulus[64] =
        "\x23\xc9\xec\x0e\x9f\x1e\x0e\x1a\x78\xaf\xa5\x14\xd4\xf5\x45\xe4"
        "\x04\x6e\xf4\x01\xe9\xdf\x45\xd1\xc2\xae\xf4\x7f\xd3\xb9\xcb\xf3"
        "\x1a\x23\xa1\x0d\x4b\xd4\xd1\x4a\xd2\xd1\xc9\x7c\xab\x24\x8b\xb1"
        "\x5a\x93\xca\x34\x44\x17\xb5\xe4\xfe\xf7\x9a\xaa\x72\x0d\x41\x95";
 
-uint8 test_exponent[4] = "\x01\x00\x01\x00";
+BYTE test_exponent[4] = "\x01\x00\x01\x00";
 
-uint8 test_master_secret[48] =
+BYTE test_master_secret[48] =
        "\xbe\x51\xee\x63\x23\x90\xd0\xf4\x3a\xce\x3a\x37\x65\xc3\xdd\xcf"
        "\xed\xf0\xc8\x19\xed\x77\x33\x4e\xfd\x2b\x7d\x5a\xe2\xca\xf3\x0a"
        "\xf1\x16\xe5\x0c\x78\x59\x7e\xd4\x4b\x57\xce\x17\x60\x3a\x5a\xb3";
 
-uint8 test_session_key_blob[48] =
+BYTE test_session_key_blob[48] =
        "\x07\x4f\xa0\x2e\xee\xc4\x5a\x46\x21\x8c\xae\x01\x45\x02\x26\xe4"
        "\x54\x6b\x59\x10\xcc\x5b\xd1\x96\xd0\x5c\xeb\xc2\x96\x9b\x44\x7b"
        "\x1c\xd9\x66\xb1\x9e\x24\xaa\x60\x4f\x89\xd1\x4e\xf8\xb9\x55\x3b";
 
-uint8 test_mac_salt_key[16] =
+BYTE test_mac_salt_key[16] =
        "\x07\x4f\xa0\x2e\xee\xc4\x5a\x46\x21\x8c\xae\x01\x45\x02\x26\xe4";
 
-uint8 test_licensing_encryption_key[16] =
+BYTE test_licensing_encryption_key[16] =
        "\xf3\xb1\xe0\x3b\xfe\xb4\xf2\xc5\x28\xa9\x48\xcd\x90\xf1\x93\xe5";
 
-uint8 test_encrypted_premaster_secret[64] =
+BYTE test_encrypted_premaster_secret[64] =
        "\x6b\xbc\x77\x9f\x20\x0c\x98\x39\xc1\x85\x77\xc8\x19\x87\xd8\x82"
        "\x93\xbd\x21\x69\x5f\x87\xe0\xd6\x4e\xad\x5e\x23\x13\x80\x8c\x63"
        "\x3e\xd6\x6e\x60\xc9\x40\xe9\x86\x08\x8c\xd5\xaa\xa9\x54\xfe\x27"
@@ -468,10 +468,10 @@ void test_license_encrypt_premaster_secret(void)
        ASSERT_STREAM(s, test_encrypted_premaster_secret, sizeof(test_encrypted_premaster_secret));
 }
 
-uint8 test_encrypted_platform_challenge[10] =
+BYTE test_encrypted_platform_challenge[10] =
        "\x84\x0a\x42\x50\xad\x5e\xc1\x29\x30\xbd";
 
-uint8 test_platform_challenge[10] =
+BYTE test_platform_challenge[10] =
        "\x54\x00\x45\x00\x53\x00\x54\x00\x00\x00";
 
 void test_license_decrypt_platform_challenge(void)
@@ -483,7 +483,7 @@ void test_license_decrypt_platform_challenge(void)
                        sizeof(test_licensing_encryption_key));
 
        license->encrypted_platform_challenge->data =
-                       (uint8*) malloc(sizeof(test_encrypted_platform_challenge));
+                       (BYTE*) malloc(sizeof(test_encrypted_platform_challenge));
        license->encrypted_platform_challenge->length =
                        sizeof(test_encrypted_platform_challenge);
 
index e549f7a..6f1fd6e 100644 (file)
@@ -44,7 +44,7 @@ int add_mcs_suite(void)
        return 0;
 }
 
-uint8 gcc_CCrq[307] =
+BYTE gcc_CCrq[307] =
        "\x00\x05\x00\x14\x7C\x00\x01\x81\x2A\x00\x08\x00\x10\x00\x01\xC0"
        "\x00\x44\x75\x63\x61\x81\x1c\x01\xc0\xd8\x00\x04\x00\x08\x00\x00"
        "\x05\x00\x04\x01\xCA\x03\xAA\x09\x04\x00\x00\xCE\x0E\x00\x00\x45"
@@ -66,7 +66,7 @@ uint8 gcc_CCrq[307] =
        "\x64\x72\x00\x00\x00\xA0\xC0\x72\x64\x70\x73\x6e\x64\x00\x00\x00"
        "\x00\x00\xc0";
 
-uint8 mcs_connect_initial_expected[409] =
+BYTE mcs_connect_initial_expected[409] =
        "\x7F\x65\x82\x01\x94\x04\x01\x01\x04\x01\x01\x01\x01\xFF\x30\x19"
        "\x02\x01\x22\x02\x01\x02\x02\x01\x00\x02\x01\x01\x02\x01\x00\x02"
        "\x01\x01\x02\x02\xFF\xFF\x02\x01\x02\x30\x19\x02\x01\x01\x02\x01"
@@ -109,7 +109,7 @@ void test_mcs_write_connect_initial(void)
        s = stream_new(512);
        mcs_write_connect_initial(s, mcs, user_data);
 
-       ASSERT_STREAM(s, (uint8*) mcs_connect_initial_expected, sizeof(mcs_connect_initial_expected));
+       ASSERT_STREAM(s, (BYTE*) mcs_connect_initial_expected, sizeof(mcs_connect_initial_expected));
 
        stream_free(s);
 }
index e53b87e..5912f95 100644 (file)
@@ -24,7 +24,7 @@
 #include "rdp.h"
 #include "test_mppc.h"
 
-uint8_t compressed_rd5[] =
+BYTE_t compressed_rd5[] =
 {
     0x24, 0x02, 0x03, 0x09, 0x00, 0x20, 0x0c, 0x05, 0x10, 0x01, 0x40, 0x0a, 0xbf, 0xdf, 0xc3, 0x20,
     0x80, 0x00, 0x1f, 0x0a, 0x00, 0x00, 0x07, 0x43, 0x4e, 0x00, 0x68, 0x02, 0x00, 0x22, 0x00, 0x34,
@@ -206,7 +206,7 @@ uint8_t compressed_rd5[] =
     0x7f, 0x52, 0x00                                         
 };
 
-uint8_t decompressed_rd5[] = 
+BYTE_t decompressed_rd5[] = 
 {
     0x24, 0x02, 0x03, 0x09, 0x00, 0x20, 0x0c, 0x05, 0x10, 0x01, 0x40, 0x0a, 0xff, 0xff, 0x0c, 0x84, 
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x0d, 0x38, 0x01, 0xc0, 0x10, 0x01, 0x10, 
index d1f21c4..bdafee7 100644 (file)
@@ -525,12 +525,12 @@ void test_mppc_enc(void)
                        block_num++;
                        total += bytes_read;
                        DLOG(("block_num=%d\n", block_num));
-                       CU_ASSERT(compress_rdp(enc, (uint8*) buf, bytes_read) != FALSE);
+                       CU_ASSERT(compress_rdp(enc, (BYTE*) buf, bytes_read) != FALSE);
                        if (enc->flags & PACKET_COMPRESSED)
                        {
                                DLOG(("%d bytes compressed to %d\n", bytes_read, enc->bytes_in_opb));
                                clen += enc->bytes_in_opb;
-                               CU_ASSERT(decompress_rdp_5(rmppc, (uint8 *) enc->outputBuffer,
+                               CU_ASSERT(decompress_rdp_5(rmppc, (BYTE *) enc->outputBuffer,
                                                enc->bytes_in_opb, enc->flags, &roff, &rlen) != FALSE);
                                CU_ASSERT(bytes_read == rlen);
                                CU_ASSERT(memcmp(buf, &rmppc->history_buf[roff], rlen) == 0);
@@ -561,10 +561,10 @@ void test_mppc_enc(void)
                /* save starting time */
                gettimeofday(&start_time, NULL);
 
-               CU_ASSERT(compress_rdp(enc, (uint8*) decompressed_rd5_data, data_len) != FALSE);
+               CU_ASSERT(compress_rdp(enc, (BYTE*) decompressed_rd5_data, data_len) != FALSE);
                if (enc->flags & PACKET_COMPRESSED)
                {
-                       CU_ASSERT(decompress_rdp_5(rmppc, (uint8 *) enc->outputBuffer,
+                       CU_ASSERT(decompress_rdp_5(rmppc, (BYTE *) enc->outputBuffer,
                                        enc->bytes_in_opb, enc->flags, &roff, &rlen) != FALSE);
                        CU_ASSERT(data_len == rlen);
                        CU_ASSERT(memcmp(decompressed_rd5_data, &rmppc->history_buf[roff], rlen) == 0);
index ae7f4a5..915d7b6 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "test_nsc.h"
 
-static const uint8 nsc_data[] =
+static const BYTE nsc_data[] =
 {
        0x71, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
        0x03, 0x01, 0x00, 0x00, 0x63, 0x63, 0x01, 0x64, 0x64, 0x00, 0x63, 0x63, 0x02, 0x64, 0x64, 0x00,
@@ -48,7 +48,7 @@ static const uint8 nsc_data[] =
        0x37, 0x37, 0x06, 0x37, 0x37, 0x37, 0x37, 0xff, 0xff, 0x90, 0xff, 0xff, 0xff, 0xff
 };
 
-static const uint8 nsc_stress_data[] =
+static const BYTE nsc_stress_data[] =
 {
          0xec, 0x04, 0x00, 0x00, 0xfb, 0x04, 0x00, 0x00, 0x74, 0x03, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00
        , 0x03, 0x00, 0x00, 0x00, 0x94, 0x94, 0x0f, 0xa2, 0xb2, 0x8e, 0x61, 0x62, 0x82, 0x9b, 0xa8, 0xb0
@@ -273,7 +273,7 @@ static const uint8 nsc_stress_data[] =
        , 0x00, 0x00, 0xff, 0xf7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-static const uint8 rgb_scanline_data[] =
+static const BYTE rgb_scanline_data[] =
 {
        0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
        0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
@@ -337,11 +337,11 @@ void test_nsc_decode(void)
 
        context = nsc_context_new();
        nsc_context_set_cpu_opt(context, CPU_SSE2);
-       nsc_process_message(context, 32, 15, 10, (uint8*) nsc_data, sizeof(nsc_data));
+       nsc_process_message(context, 32, 15, 10, (BYTE*) nsc_data, sizeof(nsc_data));
        /*freerdp_hexdump(context->bmpdata, 15 * 10 * 4);*/
        for (i = 0; i < 30000; i++)
        {
-               nsc_process_message(context, 32, 54, 44, (uint8*) nsc_stress_data, sizeof(nsc_stress_data));
+               nsc_process_message(context, 32, 54, 44, (BYTE*) nsc_stress_data, sizeof(nsc_stress_data));
        }
        nsc_context_free(context);
 }
@@ -349,11 +349,11 @@ void test_nsc_decode(void)
 void test_nsc_encode(void)
 {
        int i;
-       uint8* rgb_data;
+       BYTE* rgb_data;
        STREAM* enc_stream;
        NSC_CONTEXT* context;
 
-       rgb_data = (uint8 *) malloc(64 * 64 * 3);
+       rgb_data = (BYTE *) malloc(64 * 64 * 3);
        for (i = 0; i < 64; i++)
                memcpy(rgb_data + i * 64 * 3, rgb_scanline_data, 64 * 3);
 
index 505b180..7f70bfc 100644 (file)
@@ -75,7 +75,7 @@ void test_ntlm_compute_ntlm_hash(void)
        context = ntlm_ContextNew();
        ntlm_set_password(context, password);
 
-       ntlm_compute_ntlm_hash((uint16*) &password, ntlm_hash);
+       ntlm_compute_ntlm_hash((UINT16*) &password, ntlm_hash);
 
        ntlm_hash_good = 1;
 
@@ -272,8 +272,8 @@ void test_ntlm_generate_client_signing_key(void)
        int i;
        NTLM_CONTEXT* ntlm;
        int client_signing_key_good;
-       uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
-       uint8 expected_client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89";
+       BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
+       BYTE expected_client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89";
 
        ntlm = ntlm_client_new();
        memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key));
@@ -296,8 +296,8 @@ void test_ntlm_generate_server_signing_key(void)
        int i;
        NTLM_CONTEXT* ntlm;
        int server_signing_key_good;
-       uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
-       uint8 expected_server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11";
+       BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
+       BYTE expected_server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11";
 
        ntlm = ntlm_client_new();
        memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key));
@@ -320,8 +320,8 @@ void test_ntlm_generate_client_sealing_key(void)
        int i;
        NTLM_CONTEXT* ntlm;
        int client_sealing_key_good;
-       uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
-       uint8 expected_client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73";
+       BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
+       BYTE expected_client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73";
 
        ntlm = ntlm_client_new();
        memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key));
@@ -344,8 +344,8 @@ void test_ntlm_generate_server_sealing_key(void)
        int i;
        NTLM_CONTEXT* ntlm;
        int server_sealing_key_good;
-       uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
-       uint8 expected_server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90";
+       BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
+       BYTE expected_server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90";
 
        ntlm = ntlm_client_new();
        memcpy(ntlm->exported_session_key, exported_session_key, sizeof(exported_session_key));
@@ -368,9 +368,9 @@ void test_ntlm_encrypt_random_session_key(void)
        int i;
        NTLM_CONTEXT* ntlm;
        int encrypted_random_session_key_good;
-       uint8 key_exchange_key[16] = "\x6e\xf1\x6b\x79\x88\xf2\x3d\x7e\x54\x2a\x1a\x38\x4e\xa0\x6b\x52";
-       uint8 exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
-       uint8 expected_encrypted_random_session_key[16] = "\xb1\xd2\x45\x42\x0f\x37\x9a\x0e\xe0\xce\x77\x40\x10\x8a\xda\xba";
+       BYTE key_exchange_key[16] = "\x6e\xf1\x6b\x79\x88\xf2\x3d\x7e\x54\x2a\x1a\x38\x4e\xa0\x6b\x52";
+       BYTE exported_session_key[16] = "\x89\x90\x0d\x5d\x2c\x53\x2b\x36\x31\xcc\x1a\x46\xce\xa9\x34\xf1";
+       BYTE expected_encrypted_random_session_key[16] = "\xb1\xd2\x45\x42\x0f\x37\x9a\x0e\xe0\xce\x77\x40\x10\x8a\xda\xba";
 
        ntlm = ntlm_client_new();
        memcpy(ntlm->key_exchange_key, key_exchange_key, 16);
@@ -395,15 +395,15 @@ void test_ntlm_compute_message_integrity_check(void)
        int i;
        NTLM_CONTEXT* ntlm;
        int message_integrity_check_good;
-       uint8 exported_session_key[16] = "\xfd\x35\x59\x39\x23\x81\x29\xcd\xb8\x1c\x11\x04\xd7\x54\x4f\xd4";
-       uint8 expected_message_integrity_check[16] = "\x81\x37\x56\xcf\x19\x76\x71\xf2\xc0\x3f\x95\x87\xe3\x30\xe6\x9b";
+       BYTE exported_session_key[16] = "\xfd\x35\x59\x39\x23\x81\x29\xcd\xb8\x1c\x11\x04\xd7\x54\x4f\xd4";
+       BYTE expected_message_integrity_check[16] = "\x81\x37\x56\xcf\x19\x76\x71\xf2\xc0\x3f\x95\x87\xe3\x30\xe6\x9b";
 
-       uint8 negotiate_message_data[40] =
+       BYTE negotiate_message_data[40] =
                "\x4e\x54\x4c\x4d\x53\x53\x50\x00\x01\x00\x00\x00\xb7\x82\x08\xe2"
                "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
                "\x06\x01\xb0\x1d\x00\x00\x00\x0f";
 
-       uint8 challenge_message_data[278] =
+       BYTE challenge_message_data[278] =
                "\x4e\x54\x4c\x4d\x53\x53\x50\x00\x02\x00\x00\x00\x16\x00\x16\x00"
                "\x38\x00\x00\x00\x35\x82\x89\xe2\xed\x75\x9b\x8d\x1c\x2e\x3e\xc8"
                "\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x00\xc8\x00\x4e\x00\x00\x00"
@@ -423,7 +423,7 @@ void test_ntlm_compute_message_integrity_check(void)
                "\x2e\x00\x63\x00\x78\x00\x07\x00\x08\x00\xd1\x12\x78\x10\xde\xd2"
                "\xcb\x01\x00\x00\x00\x00";
 
-       uint8 authenticate_message_data[504] =
+       BYTE authenticate_message_data[504] =
                "\x4e\x54\x4c\x4d\x53\x53\x50\x00\x03\x00\x00\x00\x18\x00\x18\x00"
                "\x98\x00\x00\x00\x38\x01\x38\x01\xb0\x00\x00\x00\x16\x00\x16\x00"
                "\x58\x00\x00\x00\x1a\x00\x1a\x00\x6e\x00\x00\x00\x10\x00\x10\x00"
@@ -485,22 +485,22 @@ void test_ntlm_compute_message_integrity_check(void)
 void test_ntlm_encrypt_message(void)
 {
        int i;
-       uint8* p;
+       BYTE* p;
        NTLM_CONTEXT* ntlm;
        rdpBlob public_key;
        rdpBlob ts_credentials;
        rdpBlob encrypted_public_key;
        rdpBlob encrypted_ts_credentials;
-       uint8 public_key_signature[16];
-       uint8 ts_credentials_signature[16];
+       BYTE public_key_signature[16];
+       BYTE ts_credentials_signature[16];
        int encrypted_public_key_good;
        int public_key_signature_good;
        int encrypted_ts_credentials_good;
        int ts_credentials_signature_good;
-       uint8 client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89";
-       uint8 client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73";
+       BYTE client_signing_key[16] = "\xbf\x5e\x42\x76\x55\x68\x38\x97\x45\xd3\xb4\x9f\x5e\x2f\xbc\x89";
+       BYTE client_sealing_key[16] = "\xca\x41\xcd\x08\x48\x07\x22\x6e\x0d\x84\xc3\x88\xa5\x07\xa9\x73";
 
-       uint8 public_key_data[270] =
+       BYTE public_key_data[270] =
                "\x30\x82\x01\x0a\x02\x82\x01\x01\x00\xc2\x1c\x54\xaf\x07\xf1\x16"
                "\x97\xc3\x0f\x6b\xa6\x33\x2e\xdd\x1e\xe4\xb2\x9c\xe4\x12\x7f\xda"
                "\x58\x21\xc0\x68\xe6\xd3\xf5\x20\x1c\xba\x06\x64\x7d\x7f\x44\xb5"
@@ -519,7 +519,7 @@ void test_ntlm_encrypt_message(void)
                "\x1b\xbc\x0b\x47\x66\x16\x3a\x7b\x6d\x8e\xcf\x55\xe8\x8c\x8a\xfe"
                "\x24\xce\x19\x99\xc3\x5a\xe5\xc2\xf3\x02\x03\x01\x00\x01";
 
-       uint8 expected_encrypted_public_key[270] =
+       BYTE expected_encrypted_public_key[270] =
                "\x27\x29\x73\xa9\xfa\x46\x17\x3c\x74\x14\x45\x2a\xd1\xe2\x92\xa1"
                "\xc6\x0a\x30\xd4\xcc\xe0\x92\xf6\xb3\x20\xb3\xa0\xf1\x38\xb1\xf4"
                "\xe5\x96\xdf\xa1\x65\x5b\xd6\x0c\x2a\x86\x99\xcc\x72\x80\xbd\xe9"
@@ -538,24 +538,24 @@ void test_ntlm_encrypt_message(void)
                "\xfb\xc9\xfc\x89\xaa\x5d\x25\x49\xc8\x6e\x86\xee\xc2\xce\xc4\x8e"
                "\x85\x9f\xe8\x30\xb3\x86\x11\xd5\xb8\x34\x4a\xe0\x03\xe5";
 
-       uint8 expected_public_key_signature[16] =
+       BYTE expected_public_key_signature[16] =
                "\x01\x00\x00\x00\x91\x5e\xb0\x6e\x72\x82\x53\xae\x00\x00\x00\x00";
 
-       uint8 ts_credentials_data[65] =
+       BYTE ts_credentials_data[65] =
                "\x30\x3f\xa0\x03\x02\x01\x01\xa1\x38\x04\x36\x30\x34\xa0\x0a\x04"
                "\x08\x77\x00\x69\x00\x6e\x00\x37\x00\xa1\x12\x04\x10\x75\x00\x73"
                "\x00\x65\x00\x72\x00\x6e\x00\x61\x00\x6d\x00\x65\x00\xa2\x12\x04"
                "\x10\x70\x00\x61\x00\x73\x00\x73\x00\x77\x00\x6f\x00\x72\x00\x64"
                "\x00";
 
-       uint8 expected_encrypted_ts_credentials[65] =
+       BYTE expected_encrypted_ts_credentials[65] =
                "\xa8\x85\x7d\x11\xef\x92\xa0\xd6\xff\xee\xa1\xae\x6d\xc5\x2e\x4e"
                "\x65\x50\x28\x93\x75\x30\xe1\xc3\x37\xeb\xac\x1f\xdd\xf3\xe0\x92"
                "\xf6\x21\xbc\x8f\xa8\xd4\xe0\x5a\xa6\xff\xda\x09\x50\x24\x0d\x8f"
                "\x8f\xf4\x92\xfe\x49\x2a\x13\x52\xa6\x52\x75\x50\x8d\x3e\xe9\x6b"
                "\x57";
 
-       uint8 expected_ts_credentials_signature[16] =
+       BYTE expected_ts_credentials_signature[16] =
                "\x01\x00\x00\x00\xb3\x2c\x3b\xa1\x36\xf6\x55\x71\x01\x00\x00\x00";
 
        public_key.data = public_key_data;
@@ -568,7 +568,7 @@ void test_ntlm_encrypt_message(void)
 
        ntlm_encrypt_message(ntlm, &public_key, &encrypted_public_key, public_key_signature);
 
-       p = (uint8*) encrypted_public_key.data;
+       p = (BYTE*) encrypted_public_key.data;
        encrypted_public_key_good = 1;
 
        for (i = 0; i < encrypted_public_key.length; i++)
@@ -594,7 +594,7 @@ void test_ntlm_encrypt_message(void)
 
        ntlm_encrypt_message(ntlm, &ts_credentials, &encrypted_ts_credentials, ts_credentials_signature);
 
-       p = (uint8*) encrypted_ts_credentials.data;
+       p = (BYTE*) encrypted_ts_credentials.data;
        encrypted_ts_credentials_good = 1;
 
        for (i = 0; i < encrypted_ts_credentials.length; i++)
@@ -619,15 +619,15 @@ void test_ntlm_encrypt_message(void)
 void test_ntlm_decrypt_message(void)
 {
        int i;
-       uint8* p;
+       BYTE* p;
        NTLM_CONTEXT* ntlm;
        rdpBlob public_key;
        rdpBlob encrypted_public_key;
        int public_key_good;
-       uint8 server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11";
-       uint8 server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90";
+       BYTE server_signing_key[16] = "\x9b\x3b\x64\x89\xda\x84\x52\x17\xd5\xc2\x6e\x90\x16\x3b\x42\x11";
+       BYTE server_sealing_key[16] = "\x14\xb7\x1d\x06\x2c\x68\x2e\xad\x4b\x0e\x95\x23\x70\x91\x98\x90";
 
-       uint8 encrypted_public_key_data[270] =
+       BYTE encrypted_public_key_data[270] =
                "\xc7\x51\xf4\x71\xd3\x9f\xb6\x50\xbe\xa8\xf6\x20\x77\xa1\xfc\xdd"
                "\x8e\x02\xf0\xa4\x6b\xba\x3f\x9d\x65\x9d\xab\x4a\x95\xc9\xb4\x38"
                "\x03\x87\x04\xb1\xfe\x42\xec\xfa\xfc\xaa\x85\xf1\x31\x2d\x26\xcf"
@@ -646,7 +646,7 @@ void test_ntlm_decrypt_message(void)
                "\xcd\x43\x3a\xce\x40\x74\xe1\x34\x81\xe3\x94\x47\x6f\x49\x01\xf8"
                "\xb5\xfc\xd0\x75\x80\xc6\x35\xac\xc0\xfd\x1b\xb5\xa2\xd3";
 
-       uint8 expected_public_key[270] =
+       BYTE expected_public_key[270] =
                "\x31\x82\x01\x0a\x02\x82\x01\x01\x00\xc2\x1c\x54\xaf\x07\xf1\x16"
                "\x97\xc3\x0f\x6b\xa6\x33\x2e\xdd\x1e\xe4\xb2\x9c\xe4\x12\x7f\xda"
                "\x58\x21\xc0\x68\xe6\xd3\xf5\x20\x1c\xba\x06\x64\x7d\x7f\x44\xb5"
@@ -665,7 +665,7 @@ void test_ntlm_decrypt_message(void)
                "\x1b\xbc\x0b\x47\x66\x16\x3a\x7b\x6d\x8e\xcf\x55\xe8\x8c\x8a\xfe"
                "\x24\xce\x19\x99\xc3\x5a\xe5\xc2\xf3\x02\x03\x01\x00\x01";
 
-       uint8 public_key_signature[16] =
+       BYTE public_key_signature[16] =
                "\x01\x00\x00\x00\xc9\x88\xfc\xf1\x11\x68\x2c\x72\x00\x00\x00\x00";
 
        encrypted_public_key.data = encrypted_public_key_data;
@@ -678,7 +678,7 @@ void test_ntlm_decrypt_message(void)
 
        ntlm_decrypt_message(ntlm, &encrypted_public_key, &public_key, public_key_signature);
 
-       p = (uint8*) public_key.data;
+       p = (BYTE*) public_key.data;
        public_key_good = 1;
 
        for (i = 0; i < public_key.length; i++)
index 0739a2e..63ee2ce 100644 (file)
@@ -69,7 +69,7 @@ int add_orders_suite(void)
        return 0;
 }
 
-uint8 dstblt_order[] = "\x48\x00\x37\x01";
+BYTE dstblt_order[] = "\x48\x00\x37\x01";
 
 void test_read_dstblt_order(void)
 {
@@ -94,7 +94,7 @@ void test_read_dstblt_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(dstblt_order) - 1));
 }
 
-uint8 patblt_order[] = "\x1a\x00\xc3\x01\x0d\x00\x0d\x00\xf0\xff\xff\x00\x5b\xef\x00\x81";
+BYTE patblt_order[] = "\x1a\x00\xc3\x01\x0d\x00\x0d\x00\xf0\xff\xff\x00\x5b\xef\x00\x81";
 
 void test_read_patblt_order(void)
 {
@@ -124,7 +124,7 @@ void test_read_patblt_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(patblt_order) - 1));
 }
 
-uint8 scrblt_order[] = "\x07\x00\xa1\x01\xf1\x00\xcc\x2f\x01\x8e\x00";
+BYTE scrblt_order[] = "\x07\x00\xa1\x01\xf1\x00\xcc\x2f\x01\x8e\x00";
 
 void test_read_scrblt_order(void)
 {
@@ -151,7 +151,7 @@ void test_read_scrblt_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(scrblt_order) - 1));
 }
 
-uint8 opaque_rect_order[] = "\x00\x04\x00\x03\x73\x02\x06";
+BYTE opaque_rect_order[] = "\x00\x04\x00\x03\x73\x02\x06";
 
 void test_read_opaque_rect_order(void)
 {
@@ -176,7 +176,7 @@ void test_read_opaque_rect_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(opaque_rect_order) - 1));
 }
 
-uint8 draw_nine_grid_order[] = "\xfb\xf9\x0d\x00";
+BYTE draw_nine_grid_order[] = "\xfb\xf9\x0d\x00";
 
 void test_read_draw_nine_grid_order(void)
 {
@@ -206,7 +206,7 @@ void test_read_draw_nine_grid_order(void)
 }
 
 
-uint8 multi_opaque_rect_order[] =
+BYTE multi_opaque_rect_order[] =
        "\x87\x01\x1c\x01\xf1\x00\x12\x00\x5c\xef\x04\x16\x00\x08\x40\x81"
        "\x87\x81\x1c\x80\xf1\x01\x01\x01\x10\x80\xf0\x01\x10\xff\x10\x10"
        "\x80\xf1\x01";
@@ -256,7 +256,7 @@ void test_read_multi_opaque_rect_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(multi_opaque_rect_order) - 1));
 }
 
-uint8 line_to_order[] = "\x03\xb1\x0e\xa6\x5b\xef\x00";
+BYTE line_to_order[] = "\x03\xb1\x0e\xa6\x5b\xef\x00";
 
 void test_read_line_to_order(void)
 {
@@ -291,7 +291,7 @@ void test_read_line_to_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(line_to_order) - 1));
 }
 
-uint8 polyline_order[] =
+BYTE polyline_order[] =
        "\xf8\x01\xb8\x02\x00\xc0\x00\x20\x6c\x00\x00\x00\x00\x00\x04\x00"
        "\x00\xff\x7e\x76\xff\x41\x6c\xff\x24\x62\xff\x2b\x59\xff\x55\x51"
        "\xff\x9c\x49\x73\x43\x80\x4d\xff\xbe\x80\x99\xff\xba\x80\xcd\xff"
@@ -360,12 +360,12 @@ void test_read_polyline_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(polyline_order) - 1));
 }
 
-uint8 glyph_index_order_1[] =
+BYTE glyph_index_order_1[] =
        "\x6a\x02\x27\x38\x00\x39\x07\x3a\x06\x3b\x07\x3c\x06\x3d\x06\x18"
        "\x04\x1f\x06\x17\x02\x14\x04\x1b\x06\x19\x06\x45\x05\x18\x06\x1f"
        "\x06\x1f\x02\x14\x02\x46\x06\xff\x15\x24";
 
-uint8 glyph_index_order_2[] =
+BYTE glyph_index_order_2[] =
        "\x00\xff\xff\xff\x0c\x02\x6e\x01\x4d\x02\x7b\x01\x09\x02\x6e\x01"
        "\xf6\x02\x7b\x01\x0c\x02\x79\x01\x03\xfe\x04\x00";
 
@@ -415,7 +415,7 @@ void test_read_glyph_index_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(glyph_index_order_2) - 1));
 }
 
-uint8 fast_index_order[] =
+BYTE fast_index_order[] =
        "\x07\x00\x03\xff\xff\x00\x74\x3b\x00\x0e\x00\x71\x00\x42\x00\x7e"
        "\x00\x00\x80\x7c\x00\x15\x00\x00\x01\x06\x02\x04\x03\x08\x05\x09"
        "\x06\x06\x06\x06\x07\x06\x08\x02\xff\x00\x12";
@@ -453,7 +453,7 @@ void test_read_fast_index_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(fast_index_order) - 1));
 }
 
-uint8 fast_glyph_order[] =
+BYTE fast_glyph_order[] =
        "\x06\x00\x03\xff\xff\x00\x8b\x00\xb1\x00\x93\x00\xbe\x00\x0d\x00"
        "\xfe\x7f\x00\x80\x00\x80\xbb\x00\x13\x00\x01\x4a\x06\x0a\x80\x80"
        "\x80\xb8\xc4\x84\x84\x84\x84\x84\x00\x00\x68\x00";
@@ -489,7 +489,7 @@ void test_read_fast_glyph_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(fast_glyph_order) - 1));
 }
 
-uint8 polygon_cb_order[] =
+BYTE polygon_cb_order[] =
        "\xea\x00\x46\x01\x0d\x01\x08\x00\x00\x04\x03\x81\x08\x03\x05\x88"
        "\x09\x26\x09\x77";
 
@@ -523,12 +523,12 @@ void test_read_polygon_cb_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(polygon_cb_order) - 1));
 }
 
-uint8 cache_bitmap_order[] = "\x00\x00\x10\x01\x08\x01\x00\x00\x00\x10";
+BYTE cache_bitmap_order[] = "\x00\x00\x10\x01\x08\x01\x00\x00\x00\x10";
 
 void test_read_cache_bitmap_order(void)
 {
        STREAM _s, *s;
-       uint16 extraFlags;
+       UINT16 extraFlags;
        CACHE_BITMAP_ORDER cache_bitmap;
 
        s = &_s;
@@ -549,7 +549,7 @@ void test_read_cache_bitmap_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(cache_bitmap_order) - 1));
 }
 
-uint8 cache_bitmap_v2_order[] =
+BYTE cache_bitmap_v2_order[] =
        "\x20\x40\xdc\xff\xff\x85\xff\xff\x99\xd6\x99\xd6\x99\xd6\x99\xd6"
        "\x06\x8b\x99\xd6\x99\xd6\x99\xd6\x10\x84\x08\x42\x08\x42\x10\x84"
        "\x99\xd6\x99\xd6\x99\xd6\x99\xd6\x06\x84\x99\xd6\x99\xd6\x99\xd6"
@@ -569,7 +569,7 @@ uint8 cache_bitmap_v2_order[] =
 void test_read_cache_bitmap_v2_order(void)
 {
        STREAM _s, *s;
-       uint16 extraFlags;
+       UINT16 extraFlags;
        CACHE_BITMAP_V2_ORDER cache_bitmap_v2;
 
        s = &_s;
@@ -591,7 +591,7 @@ void test_read_cache_bitmap_v2_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(cache_bitmap_v2_order) - 1));
 }
 
-uint8 cache_bitmap_v3_order[] =
+BYTE cache_bitmap_v3_order[] =
        "\xff\x7f\x35\x50\xec\xbc\x74\x52\x65\xb7\x20\x00\x00\x00\x05\x00"
        "\x02\x00\x28\x00\x00\x00\x5b\x4f\x45\xff\x5b\x4f\x45\xff\x5b\x4f"
        "\x45\xff\x5b\x4f\x45\xff\x5b\x4f\x45\xff\x5b\x50\x45\xff\x5b\x50"
@@ -600,7 +600,7 @@ uint8 cache_bitmap_v3_order[] =
 void test_read_cache_bitmap_v3_order(void)
 {
        STREAM _s, *s;
-       uint16 extraFlags;
+       UINT16 extraFlags;
        CACHE_BITMAP_V3_ORDER cache_bitmap_v3;
 
        s = &_s;
@@ -625,7 +625,7 @@ void test_read_cache_bitmap_v3_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(cache_bitmap_v3_order) - 1));
 }
 
-uint8 cache_brush_order[] = "\x00\x01\x08\x08\x81\x08\xaa\x55\xaa\x55\xaa\x55\xaa\x55";
+BYTE cache_brush_order[] = "\x00\x01\x08\x08\x81\x08\xaa\x55\xaa\x55\xaa\x55\xaa\x55";
 
 void test_read_cache_brush_order(void)
 {
@@ -649,7 +649,7 @@ void test_read_cache_brush_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(cache_brush_order) - 1));
 }
 
-uint8 create_offscreen_bitmap_order[] = "\x00\x80\x60\x01\x10\x00\x01\x00\x02\x00";
+BYTE create_offscreen_bitmap_order[] = "\x00\x80\x60\x01\x10\x00\x01\x00\x02\x00";
 
 void test_read_create_offscreen_bitmap_order(void)
 {
@@ -665,7 +665,7 @@ void test_read_create_offscreen_bitmap_order(void)
        deleteList = &(create_offscreen_bitmap.deleteList);
        deleteList->cIndices = 0;
        deleteList->sIndices = 16;
-       deleteList->indices = malloc(sizeof(uint16) * deleteList->sIndices);
+       deleteList->indices = malloc(sizeof(UINT16) * deleteList->sIndices);
 
        update_read_create_offscreen_bitmap_order(s, &create_offscreen_bitmap);
 
@@ -677,7 +677,7 @@ void test_read_create_offscreen_bitmap_order(void)
        CU_ASSERT(stream_get_length(s) == (sizeof(create_offscreen_bitmap_order) - 1));
 }
 
-uint8 switch_surface_order[] = "\xff\xff";
+BYTE switch_surface_order[] = "\xff\xff";
 
 void test_read_switch_surface_order(void)
 {
@@ -700,7 +700,7 @@ int opaque_rect_count;
 int polyline_count;
 int patblt_count;
 
-uint8 orders_update_1[] =
+BYTE orders_update_1[] =
        "\x00\x00\x33\xd0\x07\x00\x80\xba\x0d\x0a\x7f\x1e\x2c\x4d\x00\x36"
        "\x02\xd3\x00\x47\x00\x4d\x00\xf0\x01\x87\x00\xc2\xdc\xff\x05\x7f"
        "\x0f\x67\x01\x90\x01\x8e\x01\xa5\x01\x67\x01\x90\x01\x28\x00\x16"
@@ -710,7 +710,7 @@ uint8 orders_update_1[] =
        "\x03\x15\x0f\xf0\x65\x01\x15\xfe\x65\x01\xb0\xfd\x1d\x16\x01\xf0"
        "\xff\xff\x01\x01\x7a";
 
-uint8 orders_update_2[] =
+BYTE orders_update_2[] =
        "\x00\x00\x45\x62\x03\x00\x93\x14\x55\x01\x50\xff\xff\xff\x55\x01"
        "\x50\x01\x01\x01\x55\x01\x50\xff\xff\xff\x16\x00\x17\x00\xea\x03"
        "\xea\x03\x02\x00\x85\x02\x16\x00\x02\x00\x00\x00\x03\x00\x14\xb2";
index 23e4353..51067a2 100644 (file)
@@ -42,14 +42,14 @@ int add_pcap_suite(void)
        return 0;
 }
 
-uint8 test_packet_1[16] =
+BYTE test_packet_1[16] =
        "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA";
 
-uint8 test_packet_2[32] =
+BYTE test_packet_2[32] =
        "\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB"
        "\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB\xBB";
 
-uint8 test_packet_3[64] =
+BYTE test_packet_3[64] =
        "\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC"
        "\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC"
        "\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC\xCC"
index 182e71c..8a4dab8 100644 (file)
@@ -67,12 +67,12 @@ int add_rail_suite(void)
 }
 
 
-static uint8 client_handshake[] =
+static BYTE client_handshake[] =
 {
 0x05, 0x00, 0x08, 0x00, 0xb0, 0x1d, 0x00, 0x00
 };
 
-static uint8 client_info_pdu[] =
+static BYTE client_info_pdu[] =
 {
 0x0b, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00
 };
@@ -82,7 +82,7 @@ static uint8 client_info_pdu[] =
 // WorkingDir: f:\windows\system32
 // Arguments: www.bing.com
 
-static uint8 client_execute_pdu[] =
+static BYTE client_execute_pdu[] =
 {
 0x01,0x00,0x5e,0x00,0x08,0x00,0x14,0x00,0x26,0x00,0x18,0x00,0x7c,0x00,
 0x7c,0x00,0x69,0x00,0x65,0x00,0x78,0x00,0x70,0x00,0x6c,0x00,0x6f,0x00,
@@ -93,7 +93,7 @@ static uint8 client_execute_pdu[] =
 0x67,0x00,0x2e,0x00,0x63,0x00,0x6f,0x00,0x6d,0x00
 };
 
-static uint8 client_activate_pdu[] =
+static BYTE client_activate_pdu[] =
 {
 0x02,0x00,
 0x09,0x00,
@@ -103,7 +103,7 @@ static uint8 client_activate_pdu[] =
 
 
 
-static uint8 client_sysparam_highcontrast_pdu[] =
+static BYTE client_sysparam_highcontrast_pdu[] =
 {
 0x03,0x00,
 0x12,0x00,
@@ -115,7 +115,7 @@ static uint8 client_sysparam_highcontrast_pdu[] =
 };
 
 
-static uint8 client_sysparam_taskbarpos_pdu[] =
+static BYTE client_sysparam_taskbarpos_pdu[] =
 {
 0x03,0x00,
 0x10,0x00,
@@ -126,7 +126,7 @@ static uint8 client_sysparam_taskbarpos_pdu[] =
 0xc2,0x03  // 0x03c2
 };
 
-static uint8 client_sysparam_mousebuttonswap_pdu[] =
+static BYTE client_sysparam_mousebuttonswap_pdu[] =
 {
 0x03,0x00,
 0x09,0x00,
@@ -135,7 +135,7 @@ static uint8 client_sysparam_mousebuttonswap_pdu[] =
 };
 
 
-static uint8 client_sysparam_keyboardpref_pdu[] =
+static BYTE client_sysparam_keyboardpref_pdu[] =
 {
 0x03,0x00,
 0x09,0x00,
@@ -144,7 +144,7 @@ static uint8 client_sysparam_keyboardpref_pdu[] =
 };
 
 
-static uint8 client_sysparam_dragfullwindow_pdu[] =
+static BYTE client_sysparam_dragfullwindow_pdu[] =
 {
 0x03,0x00,
 0x09,0x00,
@@ -153,7 +153,7 @@ static uint8 client_sysparam_dragfullwindow_pdu[] =
 };
 
 
-static uint8 client_sysparam_keyboardcues_pdu[] =
+static BYTE client_sysparam_keyboardcues_pdu[] =
 {
 0x03,0x00,
 0x09,0x00,
@@ -161,7 +161,7 @@ static uint8 client_sysparam_keyboardcues_pdu[] =
 0x00 // FALSE
 };
 
-static uint8 client_sysparam_setworkarea_pdu[] =
+static BYTE client_sysparam_setworkarea_pdu[] =
 {
 0x03,0x00,
 0x10,0x00,
@@ -172,7 +172,7 @@ static uint8 client_sysparam_setworkarea_pdu[] =
 0x9a,0x03  // 0x039a
 };
 
-static uint8 client_syscommand_pdu[] =
+static BYTE client_syscommand_pdu[] =
 {
 0x04,0x00,
 0x0a,0x00,
@@ -180,7 +180,7 @@ static uint8 client_syscommand_pdu[] =
 0x20,0xf0
 };
 
-static uint8 client_notify_pdu[] =
+static BYTE client_notify_pdu[] =
 {
 0x06,0x00,
 0x10,0x00,
@@ -189,7 +189,7 @@ static uint8 client_notify_pdu[] =
 0x04,0x02,0x00,0x00
 };
 
-static uint8 client_windowmove_pdu[] =
+static BYTE client_windowmove_pdu[] =
 {
 0x08,0x00,
 0x10,0x00,
@@ -200,7 +200,7 @@ static uint8 client_windowmove_pdu[] =
 0x88,0x01
 };
 
-static uint8 client_system_menu_pdu[] =
+static BYTE client_system_menu_pdu[] =
 {
 0x0c,0x00,
 0x0c,0x00,
@@ -209,35 +209,35 @@ static uint8 client_system_menu_pdu[] =
 0x4a,0x02
 };
 
-static uint8 client_langbar_pdu[] =
+static BYTE client_langbar_pdu[] =
 {
 0x0D,0x00,0x08,0x00,0x01,0x00,0x00,0x00
 };
 
-static uint8 client_get_app_id_req_pdu[] =
+static BYTE client_get_app_id_req_pdu[] =
 {
 0x0E,0x00,0x08,0x00,0x52,0x00,0x02,0x00
 };
 
-static uint8 server_handshake[] =
+static BYTE server_handshake[] =
 {
        0x05, 0x00, 0x08, 0x00, 0xb0, 0x1d, 0x00, 0x00
 };
 
-static uint8 server_exec_result_pdu[] =
+static BYTE server_exec_result_pdu[] =
 {
 0x80,0x00,0x24,0x00,0x08,0x00,0x03,0x00,0x15,0x00,0x00,0x00,0x00,0x00,
 0x14,0x00,0x7c,0x00,0x7c,0x00,0x57,0x00,0x72,0x00,0x6f,0x00,0x6e,0x00,
 0x67,0x00,0x41,0x00,0x70,0x00,0x70,0x00
 };
 
-static uint8 server_exec_result_exe_or_file[] =
+static BYTE server_exec_result_exe_or_file[] =
 {
 0x7c,0x00,0x7c,0x00,0x57,0x00,0x72,0x00,0x6f,0x00,0x6e,0x00,
 0x67,0x00,0x41,0x00,0x70,0x00,0x70,0x00
 };
 
-static uint8 server_sysparam1_pdu[] =
+static BYTE server_sysparam1_pdu[] =
 {
 0x03,0x00,
 0x09,0x00,
@@ -245,7 +245,7 @@ static uint8 server_sysparam1_pdu[] =
 0x00
 };
 
-static uint8 server_sysparam2_pdu[] =
+static BYTE server_sysparam2_pdu[] =
 {
 0x03,0x00,
 0x09,0x00,
@@ -253,31 +253,31 @@ static uint8 server_sysparam2_pdu[] =
 0x00
 };
 
-static uint8 server_localmovesize_start_pdu[] =
+static BYTE server_localmovesize_start_pdu[] =
 {
 0x09,0x00,0x10,0x00,0x8e,0x00,0x07,0x00,0x01,0x00,0x09,0x00,0x7e,0x01,
 0x0a,0x00
 };
 
-static uint8 server_localmovesize_stop_pdu[] =
+static BYTE server_localmovesize_stop_pdu[] =
 {
 0x09,0x00,0x10,0x00,0x8e,0x00,0x07,0x00,0x00,0x00,0x09,0x00,0xa6,0x00,
 0x44,0x00
 };
 
-static uint8 server_minmaxinfo_pdu[] =
+static BYTE server_minmaxinfo_pdu[] =
 {
 0x0a,0x00,0x18,0x00,0x8e,0x00,0x07,0x00,0x08,0x04,0xd6,0x02,0x00,0x00,
 0x00,0x00,0x70,0x00,0x1b,0x00,0x0c,0x04,0x0c,0x03
 };
 
-static uint8 server_langbar_pdu[] =
+static BYTE server_langbar_pdu[] =
 {
 0x0D,0x00,0x08,0x00,0x01,0x00,0x00,0x00
 };
 
 
-static uint8 server_app_get_resp_pdu[] =
+static BYTE server_app_get_resp_pdu[] =
 {
 0x0F,0x00,0x08,0x02,0x52,0x00,0x02,0x00,0x6d,0x00,0x69,0x00,0x63,0x00,
 0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,0x66,0x00,0x74,0x00,0x2e,0x00,
@@ -328,7 +328,7 @@ static uint8 server_app_get_resp_pdu[] =
 0x00,0x00,0x00,0x00,0x00,0x00
 };
 
-static uint8 server_app_get_resp_app_id[] =
+static BYTE server_app_get_resp_app_id[] =
 {
 0x6d,0x00,0x69,0x00,0x63,0x00,0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,
 0x66,0x00,0x74,0x00,0x2e,0x00,0x77,0x00,0x69,0x00,0x6e,0x6f,0x00,0x77,
@@ -459,7 +459,7 @@ int stream_equal_dump(void * dataS, size_t sizeS, void * data, size_t size)
 
        for (i=0; i < size; i++)
        {
-               if (((uint8*)dataS)[i] != ((uint8*)data)[i])
+               if (((BYTE*)dataS)[i] != ((BYTE*)data)[i])
                {
                        printf("----------------- stream_equal_dump -----------------\n");
                        printf("Stream and dump have different content from %d offset.\n", (int) i);
@@ -486,7 +486,7 @@ static void test_on_free_rail_client_event(RDP_EVENT* event)
 //-----------------------------------------------------------------------------
 static void send_ui_event2plugin(
        rdpChannels* chan_man,
-       uint16 event_type,
+       UINT16 event_type,
        void * data
        )
 {
@@ -533,7 +533,7 @@ static void save_dump(void* data, size_t size)
 }
 //-----------------------------------------------------------------------------
 static int emulate_client_send_channel_data(
-       freerdp* freerdp, int channelId, uint8* data, int size
+       freerdp* freerdp, int channelId, BYTE* data, int size
        )
 {
        static int counter = 0;
index 6720ae9..f42ead9 100644 (file)
@@ -41,7 +41,7 @@
 
 #include "test_rfx.h"
 
-static const uint8 y_data[] =
+static const BYTE y_data[] =
 {
                          0x19, 0x82, 0x1d, 0x10, 0x62, 0x9d, 0x28, 0x85, 0x2c, 0xa2, 0x14, 0xb2, 0x88,
        0x52, 0xca, 0x21, 0x4b, 0x28, 0x85, 0x2c, 0xa2, 0x14, 0xb2, 0x88, 0x52, 0xca, 0x21, 0x4b, 0x28,
@@ -64,7 +64,7 @@ static const uint8 y_data[] =
        0x4d, 0x43, 0x46, 0xd7, 0xe9, 0xe2, 0x20, 0x30, 0x00
 };
 
-static const uint8 cb_data[] =
+static const BYTE cb_data[] =
 {
                                                              0x1b, 0x04, 0x7f, 0x04, 0x31, 0x5f, 0xc2,
        0x94, 0xaf, 0x05, 0x29, 0x5e, 0x0a, 0x52, 0xbc, 0x14, 0xa5, 0x78, 0x29, 0x25, 0x78, 0x29, 0x25,
@@ -89,7 +89,7 @@ static const uint8 cb_data[] =
        0x77, 0x82, 0xbc, 0x00, 0x18, 0x00
 };
 
-static const uint8 cr_data[] =
+static const BYTE cr_data[] =
 {
                                            0x1b, 0xfc, 0x11, 0xc1, 0x0f, 0x4a, 0xc1, 0x4f, 0x4a, 0xc1,
        0x4f, 0x4a, 0xa1, 0x4d, 0x95, 0x42, 0x9e, 0x95, 0x42, 0x9e, 0x95, 0x42, 0x9b, 0x2a, 0x85, 0x3d,
@@ -120,7 +120,7 @@ static const unsigned int test_quantization_values[] =
        6, 6, 6, 6, 7, 7, 8, 8, 8, 9
 };
 
-static const uint8 rgb_scanline_data[] =
+static const BYTE rgb_scanline_data[] =
 {
        0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
        0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00,
@@ -157,7 +157,7 @@ static const uint8 rgb_scanline_data[] =
        0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF
 };
 
-static uint8* rgb_data;
+static BYTE* rgb_data;
 
 int init_rfx_suite(void)
 {
@@ -188,11 +188,11 @@ int add_rfx_suite(void)
 
 void test_bitstream(void)
 {
-       uint16 b;
+       UINT16 b;
        RFX_BITSTREAM* bs;
 
        bs = xnew(RFX_BITSTREAM);
-       rfx_bitstream_attach(bs, (uint8*) y_data, sizeof(y_data));
+       rfx_bitstream_attach(bs, (BYTE*) y_data, sizeof(y_data));
        while (!rfx_bitstream_eos(bs))
        {
                rfx_bitstream_get_bits(bs, 3, b);
@@ -206,7 +206,7 @@ void test_bitstream(void)
 
 void test_bitstream_enc(void)
 {
-       uint8 buffer[10];
+       BYTE buffer[10];
        RFX_BITSTREAM* bs;
        int i;
 
@@ -226,9 +226,9 @@ void test_bitstream_enc(void)
        //printf("\n");
 }
 
-static sint16 buffer[4096];
+static INT16 buffer[4096];
 
-void dump_buffer(sint16* buf, int n)
+void dump_buffer(INT16* buf, int n)
 {
        int i;
 
@@ -274,7 +274,7 @@ void test_dwt(void)
 }
 
 /* Dump a .ppm image. */
-static void dump_ppm_image(uint8* image_buf)
+static void dump_ppm_image(BYTE* image_buf)
 {
        static int frame_id = 0;
        char buf[100];
@@ -295,7 +295,7 @@ static void dump_ppm_image(uint8* image_buf)
 void test_decode(void)
 {
        RFX_CONTEXT* context;
-       uint8 decode_buffer[4096 * 3];
+       BYTE decode_buffer[4096 * 3];
        STREAM* s;
 
        s = stream_new(sizeof(y_data) + sizeof(cb_data) + sizeof(cr_data));
@@ -324,9 +324,9 @@ void test_encode(void)
        STREAM* enc_stream;
        int y_size, cb_size, cr_size;
        int i;
-       uint8 decode_buffer[4096 * 3];
+       BYTE decode_buffer[4096 * 3];
 
-       rgb_data = (uint8 *) malloc(64 * 64 * 3);
+       rgb_data = (BYTE *) malloc(64 * 64 * 3);
        for (i = 0; i < 64; i++)
                memcpy(rgb_data + i * 64 * 3, rgb_scanline_data, 64 * 3);
        //freerdp_hexdump(rgb_data, 64 * 64 * 3);
@@ -371,7 +371,7 @@ void test_message(void)
        RFX_RECT rect = {0, 0, 100, 80};
        RFX_MESSAGE * message;
 
-       rgb_data = (uint8 *) malloc(100 * 80 * 3);
+       rgb_data = (BYTE *) malloc(100 * 80 * 3);
        for (i = 0; i < 80; i++)
                memcpy(rgb_data + i * 100 * 3, rgb_scanline_data, 100 * 3);
 
index 949b520..f458218 100644 (file)
@@ -40,7 +40,7 @@ struct _OFFSCREEN_DELETE_LIST
 {
        uint32 sIndices;
        uint32 cIndices;
-       uint16* indices;
+       UINT16* indices;
 };
 typedef struct _OFFSCREEN_DELETE_LIST OFFSCREEN_DELETE_LIST;
 
@@ -95,7 +95,7 @@ struct _STREAM_BITMAP_FIRST_ORDER
        uint32 bitmapHeight;
        uint32 bitmapSize;
        uint32 bitmapBlockSize;
-       uint8* bitmapBlock;
+       BYTE* bitmapBlock;
 };
 typedef struct _STREAM_BITMAP_FIRST_ORDER STREAM_BITMAP_FIRST_ORDER;
 
@@ -104,7 +104,7 @@ struct _STREAM_BITMAP_NEXT_ORDER
        uint32 bitmapFlags;
        uint32 bitmapType;
        uint32 bitmapBlockSize;
-       uint8* bitmapBlock;
+       BYTE* bitmapBlock;
 };
 typedef struct _STREAM_BITMAP_NEXT_ORDER STREAM_BITMAP_NEXT_ORDER;
 
@@ -113,14 +113,14 @@ struct _DRAW_GDIPLUS_FIRST_ORDER
        uint32 cbSize;
        uint32 cbTotalSize;
        uint32 cbTotalEmfSize;
-       uint8* emfRecords;
+       BYTE* emfRecords;
 };
 typedef struct _DRAW_GDIPLUS_FIRST_ORDER DRAW_GDIPLUS_FIRST_ORDER;
 
 struct _DRAW_GDIPLUS_NEXT_ORDER
 {
        uint32 cbSize;
-       uint8* emfRecords;
+       BYTE* emfRecords;
 };
 typedef struct _DRAW_GDIPLUS_NEXT_ORDER DRAW_GDIPLUS_NEXT_ORDER;
 
@@ -129,7 +129,7 @@ struct _DRAW_GDIPLUS_END_ORDER
        uint32 cbSize;
        uint32 cbTotalSize;
        uint32 cbTotalEmfSize;
-       uint8* emfRecords;
+       BYTE* emfRecords;
 };
 typedef struct _DRAW_GDIPLUS_END_ORDER DRAW_GDIPLUS_END_ORDER;
 
@@ -140,7 +140,7 @@ struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER
        uint32 cacheIndex;
        uint32 cbSize;
        uint32 cbTotalSize;
-       uint8* emfRecords;
+       BYTE* emfRecords;
 };
 typedef struct _DRAW_GDIPLUS_CACHE_FIRST_ORDER DRAW_GDIPLUS_CACHE_FIRST_ORDER;
 
@@ -150,7 +150,7 @@ struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER
        uint32 cacheType;
        uint32 cacheIndex;
        uint32 cbSize;
-       uint8* emfRecords;
+       BYTE* emfRecords;
 };
 typedef struct _DRAW_GDIPLUS_CACHE_NEXT_ORDER DRAW_GDIPLUS_CACHE_NEXT_ORDER;
 
@@ -161,7 +161,7 @@ struct _DRAW_GDIPLUS_CACHE_END_ORDER
        uint32 cacheIndex;
        uint32 cbSize;
        uint32 cbTotalSize;
-       uint8* emfRecords;
+       BYTE* emfRecords;
 };
 typedef struct _DRAW_GDIPLUS_CACHE_END_ORDER DRAW_GDIPLUS_CACHE_END_ORDER;
 
index a366c07..4545077 100644 (file)
@@ -27,13 +27,13 @@ typedef struct rdpsnd_format rdpsndFormat;
 
 struct rdpsnd_format
 {
-       uint16 wFormatTag;
-       uint16 nChannels;
+       UINT16 wFormatTag;
+       UINT16 nChannels;
        uint32 nSamplesPerSec;
-       uint16 nBlockAlign;
-       uint16 wBitsPerSample;
-       uint16 cbSize;
-       uint8* data;
+       UINT16 nBlockAlign;
+       UINT16 wBitsPerSample;
+       UINT16 cbSize;
+       BYTE* data;
 };
 
 #define SNDC_CLOSE         1
index 274eeb5..8cb9013 100644 (file)
@@ -108,7 +108,7 @@ FREERDP_API void WTSFreeMemory(
 FREERDP_API BOOL WTSVirtualChannelRead(
        /* __in */  void* hChannelHandle,
        /* __in */  uint32 TimeOut,
-       /* __out */ uint8* Buffer,
+       /* __out */ BYTE* Buffer,
        /* __in */  uint32 BufferSize,
        /* __out */ uint32* pBytesRead);
 
@@ -117,7 +117,7 @@ FREERDP_API BOOL WTSVirtualChannelRead(
  */
 FREERDP_API BOOL WTSVirtualChannelWrite(
        /* __in */  void* hChannelHandle,
-       /* __in */  uint8* Buffer,
+       /* __in */  BYTE* Buffer,
        /* __in */  uint32 Length,
        /* __out */ uint32* pBytesWritten);
 
index 7714aeb..9940b00 100644 (file)
@@ -50,8 +50,8 @@ struct _RDP_CB_FORMAT_LIST_EVENT
 {
        RDP_EVENT event;
        uint32* formats;
-       uint16 num_formats;
-       uint8* raw_format_data;
+       UINT16 num_formats;
+       BYTE* raw_format_data;
        uint32 raw_format_data_size;
 };
 typedef struct _RDP_CB_FORMAT_LIST_EVENT RDP_CB_FORMAT_LIST_EVENT;
@@ -66,7 +66,7 @@ typedef struct _RDP_CB_DATA_REQUEST_EVENT RDP_CB_DATA_REQUEST_EVENT;
 struct _RDP_CB_DATA_RESPONSE_EVENT
 {
        RDP_EVENT event;
-       uint8* data;
+       BYTE* data;
        uint32 size;
 };
 typedef struct _RDP_CB_DATA_RESPONSE_EVENT RDP_CB_DATA_RESPONSE_EVENT;
index 1e30496..7f11638 100644 (file)
@@ -32,16 +32,16 @@ enum RDP_EVENT_TYPE_TSMF
 struct _RDP_VIDEO_FRAME_EVENT
 {
        RDP_EVENT event;
-       uint8* frame_data;
+       BYTE* frame_data;
        uint32 frame_size;
        uint32 frame_pixfmt;
-       sint16 frame_width;
-       sint16 frame_height;
-       sint16 x;
-       sint16 y;
-       sint16 width;
-       sint16 height;
-       uint16 num_visible_rects;
+       INT16 frame_width;
+       INT16 frame_height;
+       INT16 x;
+       INT16 y;
+       INT16 width;
+       INT16 height;
+       UINT16 num_visible_rects;
        RDP_RECT* visible_rects;
 };
 typedef struct _RDP_VIDEO_FRAME_EVENT RDP_VIDEO_FRAME_EVENT;
@@ -49,10 +49,10 @@ typedef struct _RDP_VIDEO_FRAME_EVENT RDP_VIDEO_FRAME_EVENT;
 struct _RDP_REDRAW_EVENT
 {
        RDP_EVENT event;
-       sint16 x;
-       sint16 y;
-       sint16 width;
-       sint16 height;
+       INT16 x;
+       INT16 y;
+       INT16 width;
+       INT16 height;
 };
 typedef struct _RDP_REDRAW_EVENT RDP_REDRAW_EVENT;
 
index 7a63fff..a58195d 100644 (file)
@@ -23,6 +23,6 @@
 #include <freerdp/api.h>
 #include <freerdp/types.h>
 
-FREERDP_API BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp);
+FREERDP_API BOOL bitmap_decompress(BYTE* srcData, BYTE* dstData, int width, int height, int size, int srcBpp, int dstBpp);
 
 #endif /* __BITMAP_H */
index 920a2f6..1ce2224 100644 (file)
@@ -235,16 +235,16 @@ typedef CLRCONV* HCLRCONV;
 
 #define IBPP(_bpp) (((_bpp + 1)/ 8) % 5)
 
-typedef uint8* (*p_freerdp_image_convert)(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv);
-
-FREERDP_API uint8* freerdp_image_convert(uint8* srcData, uint8 *dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv);
-FREERDP_API uint8* freerdp_glyph_convert(int width, int height, uint8* data);
-FREERDP_API void   freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height);
-FREERDP_API uint8* freerdp_image_flip(uint8* srcData, uint8* dstData, int width, int height, int bpp);
-FREERDP_API uint8* freerdp_icon_convert(uint8* srcData, uint8* dstData, uint8* mask, int width, int height, int bpp, HCLRCONV clrconv);
-FREERDP_API uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv);
-FREERDP_API void freerdp_alpha_cursor_convert(uint8* alphaData, uint8* xorMask, uint8* andMask, int width, int height, int bpp, HCLRCONV clrconv);
-FREERDP_API void freerdp_image_swap_color_order(uint8* data, int width, int height);
+typedef BYTE* (*p_freerdp_image_convert)(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv);
+
+FREERDP_API BYTE* freerdp_image_convert(BYTE* srcData, BYTE *dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv);
+FREERDP_API BYTE* freerdp_glyph_convert(int width, int height, BYTE* data);
+FREERDP_API void   freerdp_bitmap_flip(BYTE * src, BYTE * dst, int scanLineSz, int height);
+FREERDP_API BYTE* freerdp_image_flip(BYTE* srcData, BYTE* dstData, int width, int height, int bpp);
+FREERDP_API BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width, int height, int bpp, HCLRCONV clrconv);
+FREERDP_API BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv);
+FREERDP_API void freerdp_alpha_cursor_convert(BYTE* alphaData, BYTE* xorMask, BYTE* andMask, int width, int height, int bpp, HCLRCONV clrconv);
+FREERDP_API void freerdp_image_swap_color_order(BYTE* data, int width, int height);
 
 FREERDP_API uint32 freerdp_color_convert_var(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv);
 FREERDP_API uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv);
index 8819679..fdbe549 100644 (file)
@@ -23,6 +23,6 @@
 #include <freerdp/types.h>
 
 BOOL
-jpeg_decompress(uint8* input, uint8* output, int width, int height, int size, int bpp);
+jpeg_decompress(BYTE* input, BYTE* output, int width, int height, int size, int bpp);
 
 #endif /* __BITMAP_H */
index 5d205b7..32e00fa 100644 (file)
 
 struct rdp_mppc_dec
 {
-       uint8* history_buf;
-       uint16* offset_cache;
-       uint8* history_buf_end;
-       uint8* history_ptr;
+       BYTE* history_buf;
+       UINT16* offset_cache;
+       BYTE* history_buf_end;
+       BYTE* history_ptr;
 };
 
-FREERDP_API int decompress_rdp(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
-FREERDP_API int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
-FREERDP_API int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
-FREERDP_API int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
-FREERDP_API int decompress_rdp_61(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
+FREERDP_API int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
+FREERDP_API int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
+FREERDP_API int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
+FREERDP_API int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
+FREERDP_API int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen);
 FREERDP_API struct rdp_mppc_dec* mppc_dec_new(void);
 FREERDP_API void mppc_dec_free(struct rdp_mppc_dec* dec);
 
index 32f348b..f039c7b 100644 (file)
@@ -39,12 +39,12 @@ struct rdp_mppc_enc
        int   flags;            /* PACKET_COMPRESSED, PACKET_AT_FRONT, PACKET_FLUSHED etc */
        int   flagsHold;
        int   first_pkt;        /* this is the first pkt passing through enc */
-       uint16* hash_table;
+       UINT16* hash_table;
 };
 
-FREERDP_API BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len);
-FREERDP_API BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len);
-FREERDP_API BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len);
+FREERDP_API BOOL compress_rdp(struct rdp_mppc_enc* enc, BYTE* srcData, int len);
+FREERDP_API BOOL compress_rdp_4(struct rdp_mppc_enc* enc, BYTE* srcData, int len);
+FREERDP_API BOOL compress_rdp_5(struct rdp_mppc_enc* enc, BYTE* srcData, int len);
 FREERDP_API struct rdp_mppc_enc* mppc_enc_new(int protocol_type);
 FREERDP_API void mppc_enc_free(struct rdp_mppc_enc* enc);
 
index a1c8b40..5e55fb3 100644 (file)
@@ -34,10 +34,10 @@ extern "C" {
 struct _NSC_STREAM
 {
        uint32 PlaneByteCount[4];
-       uint8 ColorLossLevel;
-       uint8 ChromaSubSamplingLevel;
-       uint16 Reserved;
-       uint8* Planes;
+       BYTE ColorLossLevel;
+       BYTE ChromaSubSamplingLevel;
+       UINT16 Reserved;
+       BYTE* Planes;
 };
 typedef struct _NSC_STREAM NSC_STREAM;
 
@@ -48,18 +48,18 @@ struct _NSC_CONTEXT
 {
        uint32 OrgByteCount[4]; /* original byte length of luma, chroma orange, chroma green, alpha variable in order */
        NSC_STREAM nsc_stream;
-       uint16 bpp;
-       uint16 width;
-       uint16 height;
-       uint8* bmpdata;     /* final argb values in little endian order */
+       UINT16 bpp;
+       UINT16 width;
+       UINT16 height;
+       BYTE* bmpdata;     /* final argb values in little endian order */
        uint32 bmpdata_length; /* the maximum length of the buffer that bmpdata points to */
        RDP_PIXEL_FORMAT pixel_format;
 
        /* color palette allocated by the application */
-       const uint8* palette;
+       const BYTE* palette;
 
        void (*decode)(NSC_CONTEXT* context);
-       void (*encode)(NSC_CONTEXT* context, uint8* bmpdata, int rowstride);
+       void (*encode)(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride);
 
        NSC_CONTEXT_PRIV* priv;
 };
@@ -67,10 +67,10 @@ struct _NSC_CONTEXT
 FREERDP_API NSC_CONTEXT* nsc_context_new(void);
 FREERDP_API void nsc_context_set_cpu_opt(NSC_CONTEXT* context, uint32 cpu_opt);
 FREERDP_API void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format);
-FREERDP_API void nsc_process_message(NSC_CONTEXT* context, uint16 bpp,
-       uint16 width, uint16 height, uint8* data, uint32 length);
+FREERDP_API void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
+       UINT16 width, UINT16 height, BYTE* data, uint32 length);
 FREERDP_API void nsc_compose_message(NSC_CONTEXT* context, STREAM* s,
-       uint8* bmpdata, int width, int height, int rowstride);
+       BYTE* bmpdata, int width, int height, int rowstride);
 FREERDP_API void nsc_context_free(NSC_CONTEXT* context);
 
 #ifdef __cplusplus
index ef9f42c..8b2c791 100644 (file)
@@ -38,18 +38,18 @@ typedef enum _RLGR_MODE RLGR_MODE;
 
 struct _RFX_RECT
 {
-       uint16 x;
-       uint16 y;
-       uint16 width;
-       uint16 height;
+       UINT16 x;
+       UINT16 y;
+       UINT16 width;
+       UINT16 height;
 };
 typedef struct _RFX_RECT RFX_RECT;
 
 struct _RFX_TILE
 {
-       uint16 x;
-       uint16 y;
-       uint8* data;
+       UINT16 x;
+       UINT16 y;
+       BYTE* data;
 };
 typedef struct _RFX_TILE RFX_TILE;
 
@@ -59,7 +59,7 @@ struct _RFX_MESSAGE
         * The rects array represents the updated region of the frame. The UI
         * requires to clip drawing destination base on the union of the rects.
         */
-       uint16 num_rects;
+       UINT16 num_rects;
        RFX_RECT* rects;
 
        /**
@@ -68,7 +68,7 @@ struct _RFX_MESSAGE
         * rects described above) are valid. Pixels outside of the region may
         * contain arbitrary data.
         */
-       uint16 num_tiles;
+       UINT16 num_tiles;
        RFX_TILE** tiles;
 };
 typedef struct _RFX_MESSAGE RFX_MESSAGE;
@@ -77,36 +77,36 @@ typedef struct _RFX_CONTEXT_PRIV RFX_CONTEXT_PRIV;
 
 struct _RFX_CONTEXT
 {
-       uint16 flags;
-       uint16 properties;
-       uint16 width;
-       uint16 height;
+       UINT16 flags;
+       UINT16 properties;
+       UINT16 width;
+       UINT16 height;
        RLGR_MODE mode;
        uint32 version;
        uint32 codec_id;
        uint32 codec_version;
        RDP_PIXEL_FORMAT pixel_format;
-       uint8 bits_per_pixel;
+       BYTE bits_per_pixel;
 
        /* color palette allocated by the application */
-       const uint8* palette;
+       const BYTE* palette;
 
        /* temporary data within a frame */
        uint32 frame_idx;
        BOOL header_processed;
-       uint8 num_quants;
+       BYTE num_quants;
        uint32* quants;
-       uint8 quant_idx_y;
-       uint8 quant_idx_cb;
-       uint8 quant_idx_cr;
+       BYTE quant_idx_y;
+       BYTE quant_idx_cb;
+       BYTE quant_idx_cr;
 
        /* routines */
-       void (*decode_ycbcr_to_rgb)(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf);
-       void (*encode_rgb_to_ycbcr)(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf);
-       void (*quantization_decode)(sint16* buffer, const uint32* quantization_values);
-       void (*quantization_encode)(sint16* buffer, const uint32* quantization_values);
-       void (*dwt_2d_decode)(sint16* buffer, sint16* dwt_buffer);
-       void (*dwt_2d_encode)(sint16* buffer, sint16* dwt_buffer);
+       void (*decode_ycbcr_to_rgb)(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf);
+       void (*encode_rgb_to_ycbcr)(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf);
+       void (*quantization_decode)(INT16* buffer, const uint32* quantization_values);
+       void (*quantization_encode)(INT16* buffer, const uint32* quantization_values);
+       void (*dwt_2d_decode)(INT16* buffer, INT16* dwt_buffer);
+       void (*dwt_2d_encode)(INT16* buffer, INT16* dwt_buffer);
 
        /* private definitions */
        RFX_CONTEXT_PRIV* priv;
@@ -119,16 +119,16 @@ FREERDP_API void rfx_context_set_cpu_opt(RFX_CONTEXT* context, uint32 cpu_opt);
 FREERDP_API void rfx_context_set_pixel_format(RFX_CONTEXT* context, RDP_PIXEL_FORMAT pixel_format);
 FREERDP_API void rfx_context_reset(RFX_CONTEXT* context);
 
-FREERDP_API RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 length);
-FREERDP_API uint16 rfx_message_get_tile_count(RFX_MESSAGE* message);
+FREERDP_API RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length);
+FREERDP_API UINT16 rfx_message_get_tile_count(RFX_MESSAGE* message);
 FREERDP_API RFX_TILE* rfx_message_get_tile(RFX_MESSAGE* message, int index);
-FREERDP_API uint16 rfx_message_get_rect_count(RFX_MESSAGE* message);
+FREERDP_API UINT16 rfx_message_get_rect_count(RFX_MESSAGE* message);
 FREERDP_API RFX_RECT* rfx_message_get_rect(RFX_MESSAGE* message, int index);
 FREERDP_API void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message);
 
 FREERDP_API void rfx_compose_message_header(RFX_CONTEXT* context, STREAM* s);
 FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, STREAM* s,
-       const RFX_RECT* rects, int num_rects, uint8* image_data, int width, int height, int rowstride);
+       const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride);
 
 #ifdef __cplusplus
 }
index 26558ae..1835c0c 100644 (file)
@@ -55,22 +55,22 @@ FREERDP_API void ber_read_length(STREAM* s, int* length);
 FREERDP_API int ber_write_length(STREAM* s, int length);
 FREERDP_API int _ber_skip_length(int length);
 FREERDP_API int ber_get_content_length(int length);
-FREERDP_API BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc);
-FREERDP_API void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc);
-FREERDP_API BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length);
-FREERDP_API void ber_write_application_tag(STREAM* s, uint8 tag, int length);
-FREERDP_API BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length);
-FREERDP_API BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count);
-FREERDP_API void ber_write_enumerated(STREAM* s, uint8 enumerated, uint8 count);
-FREERDP_API BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc);
-FREERDP_API int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc);
+FREERDP_API BOOL ber_read_universal_tag(STREAM* s, BYTE tag, BOOL pc);
+FREERDP_API void ber_write_universal_tag(STREAM* s, BYTE tag, BOOL pc);
+FREERDP_API BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length);
+FREERDP_API void ber_write_application_tag(STREAM* s, BYTE tag, int length);
+FREERDP_API BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length);
+FREERDP_API BOOL ber_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count);
+FREERDP_API void ber_write_enumerated(STREAM* s, BYTE enumerated, BYTE count);
+FREERDP_API BOOL ber_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc);
+FREERDP_API int ber_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc);
 FREERDP_API int ber_skip_contextual_tag(int length);
 FREERDP_API BOOL ber_read_sequence_tag(STREAM* s, int* length);
 FREERDP_API int ber_write_sequence_tag(STREAM* s, int length);
 FREERDP_API int ber_skip_sequence(int length);
 FREERDP_API int ber_skip_sequence_tag(int length);
-FREERDP_API BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding);
-FREERDP_API void ber_write_octet_string(STREAM* s, const uint8* oct_str, int length);
+FREERDP_API BOOL ber_read_bit_string(STREAM* s, int* length, BYTE* padding);
+FREERDP_API void ber_write_octet_string(STREAM* s, const BYTE* oct_str, int length);
 FREERDP_API BOOL ber_read_octet_string_tag(STREAM* s, int* length);
 FREERDP_API int ber_write_octet_string_tag(STREAM* s, int length);
 FREERDP_API int ber_skip_octet_string(int length);
index 73ee407..c06fe7e 100644 (file)
@@ -80,43 +80,43 @@ struct crypto_cert_struct
 typedef struct crypto_sha1_struct* CryptoSha1;
 
 FREERDP_API CryptoSha1 crypto_sha1_init(void);
-FREERDP_API void crypto_sha1_update(CryptoSha1 sha1, const uint8* data, uint32 length);
-FREERDP_API void crypto_sha1_final(CryptoSha1 sha1, uint8* out_data);
+FREERDP_API void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, uint32 length);
+FREERDP_API void crypto_sha1_final(CryptoSha1 sha1, BYTE* out_data);
 
 #define        CRYPTO_MD5_DIGEST_LENGTH        MD5_DIGEST_LENGTH
 typedef struct crypto_md5_struct* CryptoMd5;
 
 FREERDP_API CryptoMd5 crypto_md5_init(void);
-FREERDP_API void crypto_md5_update(CryptoMd5 md5, const uint8* data, uint32 length);
-FREERDP_API void crypto_md5_final(CryptoMd5 md5, uint8* out_data);
+FREERDP_API void crypto_md5_update(CryptoMd5 md5, const BYTE* data, uint32 length);
+FREERDP_API void crypto_md5_final(CryptoMd5 md5, BYTE* out_data);
 
 typedef struct crypto_rc4_struct* CryptoRc4;
 
-FREERDP_API CryptoRc4 crypto_rc4_init(const uint8* key, uint32 length);
-FREERDP_API void crypto_rc4(CryptoRc4 rc4, uint32 length, const uint8* in_data, uint8* out_data);
+FREERDP_API CryptoRc4 crypto_rc4_init(const BYTE* key, uint32 length);
+FREERDP_API void crypto_rc4(CryptoRc4 rc4, uint32 length, const BYTE* in_data, BYTE* out_data);
 FREERDP_API void crypto_rc4_free(CryptoRc4 rc4);
 
 typedef struct crypto_des3_struct* CryptoDes3;
 
-FREERDP_API CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec);
-FREERDP_API CryptoDes3 crypto_des3_decrypt_init(const uint8* key, const uint8* ivec);
-FREERDP_API void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const uint8 *in_data, uint8 *out_data);
-FREERDP_API void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const uint8 *in_data, uint8* out_data);
+FREERDP_API CryptoDes3 crypto_des3_encrypt_init(const BYTE* key, const BYTE* ivec);
+FREERDP_API CryptoDes3 crypto_des3_decrypt_init(const BYTE* key, const BYTE* ivec);
+FREERDP_API void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const BYTE *in_data, BYTE *out_data);
+FREERDP_API void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const BYTE *in_data, BYTE* out_data);
 FREERDP_API void crypto_des3_free(CryptoDes3 des3);
 
 typedef struct crypto_hmac_struct* CryptoHmac;
 
 FREERDP_API CryptoHmac crypto_hmac_new(void);
-FREERDP_API void crypto_hmac_sha1_init(CryptoHmac hmac, const uint8 *data, uint32 length);
-FREERDP_API void crypto_hmac_update(CryptoHmac hmac, const uint8 *data, uint32 length);
-FREERDP_API void crypto_hmac_final(CryptoHmac hmac, uint8 *out_data, uint32 length);
+FREERDP_API void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE *data, uint32 length);
+FREERDP_API void crypto_hmac_update(CryptoHmac hmac, const BYTE *data, uint32 length);
+FREERDP_API void crypto_hmac_final(CryptoHmac hmac, BYTE *out_data, uint32 length);
 FREERDP_API void crypto_hmac_free(CryptoHmac hmac);
 
 typedef struct crypto_cert_struct* CryptoCert;
 
 #include <freerdp/crypto/certificate.h>
 
-FREERDP_API CryptoCert crypto_cert_read(uint8* data, uint32 length);
+FREERDP_API CryptoCert crypto_cert_read(BYTE* data, uint32 length);
 FREERDP_API char* crypto_cert_fingerprint(X509* xcert);
 FREERDP_API char* crypto_cert_subject(X509* xcert);
 FREERDP_API char* crypto_cert_subject_common_name(X509* xcert, int* length);
@@ -130,18 +130,18 @@ FREERDP_API rdpCertificateData* crypto_get_certificate_data(X509* xcert, char* h
 FREERDP_API BOOL crypto_cert_get_public_key(CryptoCert cert, BYTE** PublicKey, DWORD* PublicKeyLength);
 
 #define        TSSK_KEY_LENGTH 64
-extern const uint8 tssk_modulus[];
-extern const uint8 tssk_privateExponent[];
-extern const uint8 tssk_exponent[];
-
-FREERDP_API void crypto_rsa_public_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output);
-FREERDP_API void crypto_rsa_public_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output);
-FREERDP_API void crypto_rsa_private_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output);
-FREERDP_API void crypto_rsa_private_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output);
-FREERDP_API void crypto_reverse(uint8* data, int length);
-FREERDP_API void crypto_nonce(uint8* nonce, int size);
-
-FREERDP_API char* crypto_base64_encode(uint8* data, int length);
-FREERDP_API void crypto_base64_decode(uint8* enc_data, int length, uint8** dec_data, int* res_length);
+extern const BYTE tssk_modulus[];
+extern const BYTE tssk_privateExponent[];
+extern const BYTE tssk_exponent[];
+
+FREERDP_API void crypto_rsa_public_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output);
+FREERDP_API void crypto_rsa_public_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output);
+FREERDP_API void crypto_rsa_private_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output);
+FREERDP_API void crypto_rsa_private_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output);
+FREERDP_API void crypto_reverse(BYTE* data, int length);
+FREERDP_API void crypto_nonce(BYTE* nonce, int size);
+
+FREERDP_API char* crypto_base64_encode(BYTE* data, int length);
+FREERDP_API void crypto_base64_decode(BYTE* enc_data, int length, BYTE** dec_data, int* res_length);
 
 #endif /* FREERDP_CRYPTO_H */
index 13537c7..f7758e5 100644 (file)
@@ -30,7 +30,7 @@ FREERDP_API int der_skip_octet_string(int length);
 FREERDP_API int der_skip_sequence_tag(int length);
 FREERDP_API int der_write_sequence_tag(STREAM* s, int length);
 FREERDP_API int der_skip_contextual_tag(int length);
-FREERDP_API int der_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc);
-FREERDP_API void der_write_octet_string(STREAM* s, uint8* oct_str, int length);
+FREERDP_API int der_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc);
+FREERDP_API void der_write_octet_string(STREAM* s, BYTE* oct_str, int length);
 
 #endif /* FREERDP_CRYPTO_DER_H */
index 9ad53a6..4174ea9 100644 (file)
@@ -58,24 +58,24 @@ FREERDP_API void er_read_length(STREAM* s, int* length);
 FREERDP_API int er_write_length(STREAM* s, int length, BOOL flag);
 FREERDP_API int _er_skip_length(int length);
 FREERDP_API int er_get_content_length(int length);
-FREERDP_API BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc);
-FREERDP_API void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc);
-FREERDP_API BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length);
-FREERDP_API void er_write_application_tag(STREAM* s, uint8 tag, int length, BOOL flag);
-FREERDP_API BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length);
-FREERDP_API BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count);
-FREERDP_API void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, BOOL flag);
-FREERDP_API BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc);
-FREERDP_API int er_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc, BOOL flag);
+FREERDP_API BOOL er_read_universal_tag(STREAM* s, BYTE tag, BOOL pc);
+FREERDP_API void er_write_universal_tag(STREAM* s, BYTE tag, BOOL pc);
+FREERDP_API BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length);
+FREERDP_API void er_write_application_tag(STREAM* s, BYTE tag, int length, BOOL flag);
+FREERDP_API BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length);
+FREERDP_API BOOL er_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count);
+FREERDP_API void er_write_enumerated(STREAM* s, BYTE enumerated, BYTE count, BOOL flag);
+FREERDP_API BOOL er_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc);
+FREERDP_API int er_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc, BOOL flag);
 FREERDP_API int er_skip_contextual_tag(int length);
 FREERDP_API BOOL er_read_sequence_tag(STREAM* s, int* length);
 FREERDP_API int er_write_sequence_tag(STREAM* s, int length, BOOL flag);
 FREERDP_API int er_skip_sequence(int length);
 FREERDP_API int er_skip_sequence_tag(int length);
-FREERDP_API BOOL er_read_bit_string(STREAM* s, int* length, uint8* padding);
-FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, BOOL flag);
+FREERDP_API BOOL er_read_bit_string(STREAM* s, int* length, BYTE* padding);
+FREERDP_API BOOL er_write_bit_string_tag(STREAM* s, uint32 length, BYTE padding, BOOL flag);
 FREERDP_API BOOL er_read_octet_string(STREAM* s, int* length);
-FREERDP_API void er_write_octet_string(STREAM* s, uint8* oct_str, int length, BOOL flag);
+FREERDP_API void er_write_octet_string(STREAM* s, BYTE* oct_str, int length, BOOL flag);
 FREERDP_API int er_write_octet_string_tag(STREAM* s, int length, BOOL flag);
 FREERDP_API int er_skip_octet_string(int length);
 FREERDP_API BOOL er_read_BOOL(STREAM* s, BOOL* value);
index d03e322..54db219 100644 (file)
 #include <freerdp/api.h>
 #include <freerdp/utils/stream.h>
 
-FREERDP_API BOOL per_read_length(STREAM* s, uint16* length);
+FREERDP_API BOOL per_read_length(STREAM* s, UINT16* length);
 FREERDP_API void per_write_length(STREAM* s, int length);
-FREERDP_API BOOL per_read_choice(STREAM* s, uint8* choice);
-FREERDP_API void per_write_choice(STREAM* s, uint8 choice);
-FREERDP_API BOOL per_read_selection(STREAM* s, uint8* selection);
-FREERDP_API void per_write_selection(STREAM* s, uint8 selection);
-FREERDP_API BOOL per_read_number_of_sets(STREAM* s, uint8* number);
-FREERDP_API void per_write_number_of_sets(STREAM* s, uint8 number);
+FREERDP_API BOOL per_read_choice(STREAM* s, BYTE* choice);
+FREERDP_API void per_write_choice(STREAM* s, BYTE choice);
+FREERDP_API BOOL per_read_selection(STREAM* s, BYTE* selection);
+FREERDP_API void per_write_selection(STREAM* s, BYTE selection);
+FREERDP_API BOOL per_read_number_of_sets(STREAM* s, BYTE* number);
+FREERDP_API void per_write_number_of_sets(STREAM* s, BYTE number);
 FREERDP_API BOOL per_read_padding(STREAM* s, int length);
 FREERDP_API void per_write_padding(STREAM* s, int length);
 FREERDP_API BOOL per_read_integer(STREAM* s, uint32* integer);
-FREERDP_API BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min);
+FREERDP_API BOOL per_read_integer16(STREAM* s, UINT16* integer, UINT16 min);
 FREERDP_API void per_write_integer(STREAM* s, uint32 integer);
-FREERDP_API void per_write_integer16(STREAM* s, uint16 integer, uint16 min);
-FREERDP_API BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count);
-FREERDP_API void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count);
-FREERDP_API void per_write_object_identifier(STREAM* s, uint8 oid[6]);
-FREERDP_API BOOL per_read_object_identifier(STREAM* s, uint8 oid[6]);
-FREERDP_API BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min);
-FREERDP_API void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min);
+FREERDP_API void per_write_integer16(STREAM* s, UINT16 integer, UINT16 min);
+FREERDP_API BOOL per_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count);
+FREERDP_API void per_write_enumerated(STREAM* s, BYTE enumerated, BYTE count);
+FREERDP_API void per_write_object_identifier(STREAM* s, BYTE oid[6]);
+FREERDP_API BOOL per_read_object_identifier(STREAM* s, BYTE oid[6]);
+FREERDP_API BOOL per_read_octet_string(STREAM* s, BYTE* oct_str, int length, int min);
+FREERDP_API void per_write_octet_string(STREAM* s, BYTE* oct_str, int length, int min);
 FREERDP_API BOOL per_read_numeric_string(STREAM* s, int min);
-FREERDP_API void per_write_numeric_string(STREAM* s, uint8* num_str, int length, int min);
+FREERDP_API void per_write_numeric_string(STREAM* s, BYTE* num_str, int length, int min);
 
 #endif /* FREERDP_CRYPTO_PER_H */
index 105d051..949f60a 100644 (file)
@@ -47,11 +47,11 @@ FREERDP_API BOOL tls_connect(rdpTls* tls);
 FREERDP_API BOOL tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file);
 FREERDP_API BOOL tls_disconnect(rdpTls* tls);
 
-FREERDP_API int tls_read(rdpTls* tls, uint8* data, int length);
-FREERDP_API int tls_write(rdpTls* tls, uint8* data, int length);
+FREERDP_API int tls_read(rdpTls* tls, BYTE* data, int length);
+FREERDP_API int tls_write(rdpTls* tls, BYTE* data, int length);
 
-FREERDP_API int tls_read_all(rdpTls* tls, uint8* data, int length);
-FREERDP_API int tls_write_all(rdpTls* tls, uint8* data, int length);
+FREERDP_API int tls_read_all(rdpTls* tls, BYTE* data, int length);
+FREERDP_API int tls_write_all(rdpTls* tls, BYTE* data, int length);
 
 FREERDP_API BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname);
 FREERDP_API void tls_print_certificate_error(char* hostname, char* fingerprint);
index 2ab21f9..5c83776 100644 (file)
@@ -73,7 +73,7 @@ struct _IWTSVirtualChannel
        /* Starts a write request on the channel. */
        int (*Write) (IWTSVirtualChannel* pChannel,
                uint32 cbSize,
-               uint8* pBuffer,
+               BYTE* pBuffer,
                void* pReserved);
        /* Closes the channel. */
        int (*Close) (IWTSVirtualChannel* pChannel);
@@ -122,7 +122,7 @@ struct _IWTSListenerCallback
           the associated listener. */
        int (*OnNewChannelConnection) (IWTSListenerCallback* pListenerCallback,
                IWTSVirtualChannel* pChannel,
-               uint8* Data,
+               BYTE* Data,
                int* pbAccept,
                IWTSVirtualChannelCallback** ppCallback);
 };
@@ -132,7 +132,7 @@ struct _IWTSVirtualChannelCallback
        /* Notifies the user about data that is being received. */
        int (*OnDataReceived) (IWTSVirtualChannelCallback* pChannelCallback,
                uint32 cbSize,
-               uint8* pBuffer);
+               BYTE* pBuffer);
        /* Notifies the user that the channel has been closed. */
        int (*OnClose) (IWTSVirtualChannelCallback* pChannelCallback);
 };
index 3200e3c..62b5254 100644 (file)
@@ -54,8 +54,8 @@ typedef BOOL (*pAuthenticate)(freerdp* instance, char** username, char** passwor
 typedef BOOL (*pVerifyCertificate)(freerdp* instance, char* subject, char* issuer, char* fingerprint);
 typedef BOOL (*pVerifyChangedCertificate)(freerdp* instance, char* subject, char* issuer, char* new_fingerprint, char* old_fingerprint);
 
-typedef int (*pSendChannelData)(freerdp* instance, int channelId, uint8* data, int size);
-typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size);
+typedef int (*pSendChannelData)(freerdp* instance, int channelId, BYTE* data, int size);
+typedef int (*pReceiveChannelData)(freerdp* instance, int channelId, BYTE* data, int size, int flags, int total_size);
 
 /**
  * Defines the context for a given instance of RDP connection.
index 447dcea..0594a49 100644 (file)
@@ -23,7 +23,7 @@
 
 typedef int (*pLineTo_16bpp)(HGDI_DC hdc, int nXEnd, int nYEnd);
 
-FREERDP_API uint16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color);
+FREERDP_API UINT16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color);
 
 FREERDP_API int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr);
 FREERDP_API int BitBlt_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop);
index 329e369..6ee9e8e 100644 (file)
@@ -23,7 +23,7 @@
 
 typedef int (*pLineTo_8bpp)(HGDI_DC hdc, int nXEnd, int nYEnd);
 
-FREERDP_API uint8 gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color);
+FREERDP_API BYTE gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color);
 
 FREERDP_API int FillRect_8bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr);
 FREERDP_API int BitBlt_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop);
index 558e6ec..df79e6e 100644 (file)
 
 FREERDP_API GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos);
 FREERDP_API GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor);
-FREERDP_API uint8 gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y);
-FREERDP_API uint16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y);
+FREERDP_API BYTE gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y);
+FREERDP_API UINT16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y);
 FREERDP_API uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y);
-FREERDP_API uint8* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y);
-FREERDP_API uint16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y);
+FREERDP_API BYTE* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y);
+FREERDP_API UINT16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y);
 FREERDP_API uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y);
-FREERDP_API void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, uint8 pixel);
-FREERDP_API void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, uint16 pixel);
+FREERDP_API void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, BYTE pixel);
+FREERDP_API void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, UINT16 pixel);
 FREERDP_API void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel);
-FREERDP_API HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, uint8* data);
+FREERDP_API HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, BYTE* data);
 FREERDP_API HGDI_BITMAP gdi_CreateCompatibleBitmap(HGDI_DC hdc, int nWidth, int nHeight);
 FREERDP_API int gdi_BitBlt(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop);
 
index 39b9cd2..c419edd 100644 (file)
 
 struct _GDIOBJECT
 {
-       uint8 objectType;
+       BYTE objectType;
 };
 typedef struct _GDIOBJECT GDIOBJECT;
 typedef GDIOBJECT* HGDIOBJECT;
@@ -127,7 +127,7 @@ typedef GDI_COLOR* LPGDI_COLOR;
 
 struct _GDI_RECT
 {
-       uint8 objectType;
+       BYTE objectType;
        int left;
        int top;
        int right;
@@ -138,7 +138,7 @@ typedef GDI_RECT* HGDI_RECT;
 
 struct _GDI_RGN
 {
-       uint8 objectType;
+       BYTE objectType;
        int x; /* left */
        int y; /* top */
        int w; /* width */
@@ -150,20 +150,20 @@ typedef GDI_RGN* HGDI_RGN;
 
 struct _GDI_BITMAP
 {
-       uint8 objectType;
+       BYTE objectType;
        int bytesPerPixel;
        int bitsPerPixel;
        int width;
        int height;
        int scanline;
-       uint8* data;
+       BYTE* data;
 };
 typedef struct _GDI_BITMAP GDI_BITMAP;
 typedef GDI_BITMAP* HGDI_BITMAP;
 
 struct _GDI_PEN
 {
-       uint8 objectType;
+       BYTE objectType;
        int style;
        int width;
        int posX;
@@ -175,15 +175,15 @@ typedef GDI_PEN* HGDI_PEN;
 
 struct _GDI_PALETTEENTRY
 {
-       uint8 red;
-       uint8 green;
-       uint8 blue;
+       BYTE red;
+       BYTE green;
+       BYTE blue;
 };
 typedef struct _GDI_PALETTEENTRY GDI_PALETTEENTRY;
 
 struct _GDI_PALETTE
 {
-       uint16 count;
+       UINT16 count;
        GDI_PALETTEENTRY *entries;
 };
 typedef struct _GDI_PALETTE GDI_PALETTE;
@@ -199,7 +199,7 @@ typedef GDI_POINT* HGDI_POINT;
 
 struct _GDI_BRUSH
 {
-       uint8 objectType;
+       BYTE objectType;
        int style;
        HGDI_BITMAP pattern;
        GDI_COLOR color;
@@ -273,7 +273,7 @@ struct rdp_gdi
        HCLRCONV clrconv;
        gdiBitmap* primary;
        gdiBitmap* drawing;
-       uint8* primary_buffer;
+       BYTE* primary_buffer;
        GDI_COLOR textColor;
        void* rfx_context;
        void* nsc_context;
@@ -281,13 +281,13 @@ struct rdp_gdi
        gdiBitmap* image;
 };
 
-FREERDP_API uint32 gdi_rop3_code(uint8 code);
-FREERDP_API uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y);
-FREERDP_API uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y);
-FREERDP_API int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width);
+FREERDP_API uint32 gdi_rop3_code(BYTE code);
+FREERDP_API BYTE* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y);
+FREERDP_API BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y);
+FREERDP_API int gdi_is_mono_pixel_set(BYTE* data, int x, int y, int width);
 FREERDP_API void gdi_resize(rdpGdi* gdi, int width, int height);
 
-FREERDP_API int gdi_init(freerdp* instance, uint32 flags, uint8* buffer);
+FREERDP_API int gdi_init(freerdp* instance, uint32 flags, BYTE* buffer);
 FREERDP_API void gdi_free(freerdp* instance);
 
 #ifdef WITH_DEBUG_GDI
index 827d6e2..1872c71 100644 (file)
@@ -24,8 +24,8 @@
 #include <freerdp/gdi/gdi.h>
 
 FREERDP_API HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor);
-FREERDP_API uint8 gdi_GetPenColor_8bpp(HGDI_PEN pen);
-FREERDP_API uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen);
+FREERDP_API BYTE gdi_GetPenColor_8bpp(HGDI_PEN pen);
+FREERDP_API UINT16 gdi_GetPenColor_16bpp(HGDI_PEN pen);
 FREERDP_API uint32 gdi_GetPenColor_32bpp(HGDI_PEN pen);
 
 #endif /* __GDI_PEN_H */
index 907fac1..ef689aa 100644 (file)
@@ -35,7 +35,7 @@ typedef void (*pBitmap_New)(rdpContext* context, rdpBitmap* bitmap);
 typedef void (*pBitmap_Free)(rdpContext* context, rdpBitmap* bitmap);
 typedef void (*pBitmap_Paint)(rdpContext* context, rdpBitmap* bitmap);
 typedef void (*pBitmap_Decompress)(rdpContext* context, rdpBitmap* bitmap,
-               uint8* data, int width, int height, int bpp, int length,
+               BYTE* data, int width, int height, int bpp, int length,
                BOOL compressed, int codec_id);
 typedef void (*pBitmap_SetSurface)(rdpContext* context, rdpBitmap* bitmap, BOOL primary);
 
@@ -58,7 +58,7 @@ struct rdp_bitmap
        uint32 bpp; /* 22 */
        uint32 flags; /* 23 */
        uint32 length; /* 24 */
-       uint8* data; /* 25 */
+       BYTE* data; /* 25 */
        uint32 paddingB[32 - 26]; /* 26 */
 
        BOOL compressed; /* 32 */
@@ -71,10 +71,10 @@ FREERDP_API void Bitmap_New(rdpContext* context, rdpBitmap* bitmap);
 FREERDP_API void Bitmap_Free(rdpContext* context, rdpBitmap* bitmap);
 FREERDP_API void Bitmap_Register(rdpContext* context, rdpBitmap* bitmap);
 FREERDP_API void Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
-               uint8* data, int width, int height, int bpp, int length, BOOL compressed);
+               BYTE* data, int width, int height, int bpp, int length, BOOL compressed);
 FREERDP_API void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap,
-               uint16 left, uint16 top, uint16 right, uint16 bottom);
-FREERDP_API void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, uint16 width, uint16 height);
+               UINT16 left, UINT16 top, UINT16 right, UINT16 bottom);
+FREERDP_API void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, UINT16 width, UINT16 height);
 FREERDP_API void Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary);
 
 /* Pointer Class */
@@ -102,8 +102,8 @@ struct rdp_pointer
        uint32 xorBpp; /* 20 */
        uint32 lengthAndMask; /* 21 */
        uint32 lengthXorMask; /* 22 */
-       uint8* xorMaskData; /* 23 */
-       uint8* andMaskData; /* 24 */
+       BYTE* xorMaskData; /* 23 */
+       BYTE* andMaskData; /* 24 */
        uint32 paddingB[32 - 25]; /* 25 */
 };
 
@@ -137,7 +137,7 @@ struct rdp_glyph
        uint32 cx; /* 18 */
        uint32 cy; /* 19 */
        uint32 cb; /* 20 */
-       uint8* aj; /* 21 */
+       BYTE* aj; /* 21 */
        uint32 paddingB[32 - 22]; /* 22 */
 };
 
index 0275f09..ec3f012 100644 (file)
@@ -55,10 +55,10 @@ typedef struct rdp_input rdpInput;
 #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH     4
 
 typedef void (*pSynchronizeEvent)(rdpInput* input, uint32 flags);
-typedef void (*pKeyboardEvent)(rdpInput* input, uint16 flags, uint16 code);
-typedef void (*pUnicodeKeyboardEvent)(rdpInput* input, uint16 flags, uint16 code);
-typedef void (*pMouseEvent)(rdpInput* input, uint16 flags, uint16 x, uint16 y);
-typedef void (*pExtendedMouseEvent)(rdpInput* input, uint16 flags, uint16 x, uint16 y);
+typedef void (*pKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code);
+typedef void (*pUnicodeKeyboardEvent)(rdpInput* input, UINT16 flags, UINT16 code);
+typedef void (*pMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
+typedef void (*pExtendedMouseEvent)(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
 
 struct rdp_input
 {
@@ -75,10 +75,10 @@ struct rdp_input
 };
 
 FREERDP_API void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags);
-FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
+FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
 FREERDP_API void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp_scancode);
-FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
-FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
+FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
+FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
 
 #endif /* __INPUT_API_H */
index 120c09a..4c16b3a 100644 (file)
@@ -31,7 +31,7 @@ typedef struct rdp_freerdp_listener freerdp_listener;
 extern "C" {
 #endif
 
-typedef BOOL (*psListenerOpen)(freerdp_listener* instance, const char* bind_address, uint16 port);
+typedef BOOL (*psListenerOpen)(freerdp_listener* instance, const char* bind_address, UINT16 port);
 typedef BOOL (*psListenerOpenLocal)(freerdp_listener* instance, const char* path);
 typedef BOOL (*psListenerGetFileDescriptor)(freerdp_listener* instance, void** rfds, int* rcount);
 typedef BOOL (*psListenerCheckFileDescriptor)(freerdp_listener* instance);
index cfa2112..3139ab2 100644 (file)
@@ -41,8 +41,8 @@ typedef BOOL (*psPeerPostConnect)(freerdp_peer* client);
 typedef BOOL (*psPeerActivate)(freerdp_peer* client);
 typedef BOOL (*psPeerLogon)(freerdp_peer* client, SEC_WINNT_AUTH_IDENTITY* identity, BOOL automatic);
 
-typedef int (*psPeerSendChannelData)(freerdp_peer* client, int channelId, uint8* data, int size);
-typedef int (*psPeerReceiveChannelData)(freerdp_peer* client, int channelId, uint8* data, int size, int flags, int total_size);
+typedef int (*psPeerSendChannelData)(freerdp_peer* client, int channelId, BYTE* data, int size);
+typedef int (*psPeerReceiveChannelData)(freerdp_peer* client, int channelId, BYTE* data, int size, int flags, int total_size);
 
 struct rdp_freerdp_peer
 {
index 5a558a4..50c23fc 100644 (file)
@@ -53,8 +53,8 @@ struct _POINTER_COLOR_UPDATE
        uint32 height;
        uint32 lengthAndMask;
        uint32 lengthXorMask;
-       uint8* xorMaskData;
-       uint8* andMaskData;
+       BYTE* xorMaskData;
+       BYTE* andMaskData;
 };
 typedef struct _POINTER_COLOR_UPDATE POINTER_COLOR_UPDATE;
 
index fcec1bf..346138c 100644 (file)
@@ -42,8 +42,8 @@ struct rdp_brush
        uint32 style;
        uint32 hatch;
        uint32 index;
-       uint8* data;
-       uint8 p8x8[8];
+       BYTE* data;
+       BYTE p8x8[8];
 };
 typedef struct rdp_brush rdpBrush;
 
@@ -190,7 +190,7 @@ struct _MULTI_DRAW_NINE_GRID_ORDER
        uint32 bitmapId;
        uint32 nDeltaEntries;
        uint32 cbData;
-       uint8* codeDeltaList;
+       BYTE* codeDeltaList;
 };
 typedef struct _MULTI_DRAW_NINE_GRID_ORDER MULTI_DRAW_NINE_GRID_ORDER;
 
@@ -311,7 +311,7 @@ struct _GLYPH_INDEX_ORDER
        sint32 x;
        sint32 y;
        uint32 cbData;
-       uint8 data[256];
+       BYTE data[256];
 };
 typedef struct _GLYPH_INDEX_ORDER GLYPH_INDEX_ORDER;
 
@@ -334,7 +334,7 @@ struct _FAST_INDEX_ORDER
        sint32 x;
        sint32 y;
        uint32 cbData;
-       uint8 data[256];
+       BYTE data[256];
 };
 typedef struct _FAST_INDEX_ORDER FAST_INDEX_ORDER;
 
@@ -356,7 +356,7 @@ struct _FAST_GLYPH_ORDER
        sint32 x;
        sint32 y;
        uint32 cbData;
-       uint8 data[256];
+       BYTE data[256];
        void* glyph_data;
 };
 typedef struct _FAST_GLYPH_ORDER FAST_GLYPH_ORDER;
index 6e97136..40b4ea7 100644 (file)
@@ -152,8 +152,8 @@ enum SPI_MASK
 
 struct _RAIL_UNICODE_STRING
 {
-       uint16 length;
-       uint8* string;
+       UINT16 length;
+       BYTE* string;
 };
 typedef struct _RAIL_UNICODE_STRING RAIL_UNICODE_STRING;
 
@@ -181,7 +181,7 @@ typedef struct _RAIL_CLIENT_STATUS_ORDER RAIL_CLIENT_STATUS_ORDER;
 
 struct _RAIL_EXEC_ORDER
 {
-       uint16 flags;
+       UINT16 flags;
        RAIL_UNICODE_STRING exeOrFile;
        RAIL_UNICODE_STRING workingDir;
        RAIL_UNICODE_STRING arguments;
@@ -190,8 +190,8 @@ typedef struct _RAIL_EXEC_ORDER RAIL_EXEC_ORDER;
 
 struct _RAIL_EXEC_RESULT_ORDER
 {
-       uint16 flags;
-       uint16 execResult;
+       UINT16 flags;
+       UINT16 execResult;
        uint32 rawResult;
        RAIL_UNICODE_STRING exeOrFile;
 };
@@ -224,15 +224,15 @@ typedef struct _RAIL_ACTIVATE_ORDER RAIL_ACTIVATE_ORDER;
 struct _RAIL_SYSMENU_ORDER
 {
        uint32 windowId;
-       uint16 left;
-       uint16 top;
+       UINT16 left;
+       UINT16 top;
 };
 typedef struct _RAIL_SYSMENU_ORDER RAIL_SYSMENU_ORDER;
 
 struct _RAIL_SYSCOMMAND_ORDER
 {
        uint32 windowId;
-       uint16 command;
+       UINT16 command;
 };
 typedef struct _RAIL_SYSCOMMAND_ORDER RAIL_SYSCOMMAND_ORDER;
 
@@ -247,14 +247,14 @@ typedef struct _RAIL_NOTIFY_EVENT_ORDER RAIL_NOTIFY_EVENT_ORDER;
 struct _RAIL_MINMAXINFO_ORDER
 {
        uint32 windowId;
-       uint16 maxWidth;
-       uint16 maxHeight;
-       uint16 maxPosX;
-       uint16 maxPosY;
-       uint16 minTrackWidth;
-       uint16 minTrackHeight;
-       uint16 maxTrackWidth;
-       uint16 maxTrackHeight;
+       UINT16 maxWidth;
+       UINT16 maxHeight;
+       UINT16 maxPosX;
+       UINT16 maxPosY;
+       UINT16 minTrackWidth;
+       UINT16 minTrackHeight;
+       UINT16 maxTrackWidth;
+       UINT16 maxTrackHeight;
 };
 typedef struct _RAIL_MINMAXINFO_ORDER RAIL_MINMAXINFO_ORDER;
 
@@ -262,19 +262,19 @@ struct _RAIL_LOCALMOVESIZE_ORDER
 {
        uint32 windowId;
        BOOL isMoveSizeStart;
-       uint16 moveSizeType;
-       uint16 posX;
-       uint16 posY;
+       UINT16 moveSizeType;
+       UINT16 posX;
+       UINT16 posY;
 };
 typedef struct _RAIL_LOCALMOVESIZE_ORDER RAIL_LOCALMOVESIZE_ORDER;
 
 struct _RAIL_WINDOWMOVE_ORDER
 {
        uint32 windowId;
-       uint16 left;
-       uint16 top;
-       uint16 right;
-       uint16 bottom;
+       UINT16 left;
+       UINT16 top;
+       UINT16 right;
+       UINT16 bottom;
 };
 typedef struct _RAIL_WINDOWMOVE_ORDER RAIL_WINDOW_MOVE_ORDER;
 
@@ -288,7 +288,7 @@ struct _RAIL_GET_APPID_RESP_ORDER
 {
        uint32 windowId;
        RAIL_UNICODE_STRING applicationId;
-       uint8 applicationIdBuffer[512];
+       BYTE applicationIdBuffer[512];
 };
 typedef struct _RAIL_GET_APPID_RESP_ORDER RAIL_GET_APPID_RESP_ORDER;
 
index 05a0c7c..e5e9142 100644 (file)
@@ -47,13 +47,13 @@ typedef struct _WINDOW_ICON_CACHE WINDOW_ICON_CACHE;
 struct rdp_icon_cache
 {
        rdpRail* rail;
-       uint8 numCaches;
-       uint16 numCacheEntries;
+       BYTE numCaches;
+       UINT16 numCacheEntries;
        WINDOW_ICON_CACHE* caches;
 };
 
-ICON_INFO* icon_cache_get(rdpIconCache* cache, uint8 id, uint16 index, void** extra);
-void icon_cache_put(rdpIconCache* cache, uint8 id, uint16 index, ICON_INFO* entry, void* extra);
+ICON_INFO* icon_cache_get(rdpIconCache* cache, BYTE id, UINT16 index, void** extra);
+void icon_cache_put(rdpIconCache* cache, BYTE id, UINT16 index, ICON_INFO* entry, void* extra);
 
 rdpIconCache* icon_cache_new(rdpRail* rail);
 void icon_cache_free(rdpIconCache* cache);
index 5f43d4d..cf5944e 100644 (file)
@@ -35,7 +35,7 @@
 typedef void (*railCreateWindow)(rdpRail* rail, rdpWindow* window);
 typedef void (*railDestroyWindow)(rdpRail* rail, rdpWindow* window);
 typedef void (*railMoveWindow)(rdpRail* rail, rdpWindow* window);
-typedef void (*railShowWindow)(rdpRail* rail, rdpWindow* window, uint8 state);
+typedef void (*railShowWindow)(rdpRail* rail, rdpWindow* window, BYTE state);
 typedef void (*railSetWindowText)(rdpRail* rail, rdpWindow* window);
 typedef void (*railSetWindowIcon)(rdpRail* rail, rdpWindow* window, rdpIcon* icon);
 typedef void (*railSetWindowRects)(rdpRail* rail, rdpWindow* window);
index dd4c672..78d6816 100644 (file)
@@ -45,13 +45,13 @@ struct rdp_window
        uint32 ownerWindowId;
        uint32 style;
        uint32 extendedStyle;
-       uint8 showState;
+       BYTE showState;
        RAIL_UNICODE_STRING titleInfo;
        uint32 clientOffsetX;
        uint32 clientOffsetY;
        uint32 clientAreaWidth;
        uint32 clientAreaHeight;
-       uint8 RPContent;
+       BYTE RPContent;
        uint32 rootParentHandle;
        sint32 windowOffsetX;
        sint32 windowOffsetY;
@@ -59,11 +59,11 @@ struct rdp_window
        uint32 windowClientDeltaY;
        uint32 windowWidth;
        uint32 windowHeight;
-       uint16 numWindowRects;
+       UINT16 numWindowRects;
        RECTANGLE_16* windowRects;
        uint32 visibleOffsetX;
        uint32 visibleOffsetY;
-       uint16 numVisibilityRects;
+       UINT16 numVisibilityRects;
        RECTANGLE_16* visibilityRects;
 };
 
index 36603cd..98e2623 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 typedef uint32 RDP_SCANCODE;   /* Our own representation of a RDP protocol scancode */
-#define RDP_SCANCODE_CODE(_rdp_scancode) ((uint8)(_rdp_scancode & 0xFF))
+#define RDP_SCANCODE_CODE(_rdp_scancode) ((BYTE)(_rdp_scancode & 0xFF))
 #define RDP_SCANCODE_EXTENDED(_rdp_scancode) (((_rdp_scancode) & 0x100) ? TRUE : FALSE)
 #define MAKE_RDP_SCANCODE(_code, _extended) (((_code) & 0xFF) | ((_extended) ? 0x100 : 0))
 
index 0a22bd4..0213743 100644 (file)
@@ -75,8 +75,8 @@ struct _CACHE_BITMAP_ORDER
        uint32 bitmapLength;
        uint32 cacheIndex;
        BOOL compressed;
-       uint8 bitmapComprHdr[8];
-       uint8* bitmapDataStream;
+       BYTE bitmapComprHdr[8];
+       BYTE* bitmapDataStream;
 };
 typedef struct _CACHE_BITMAP_ORDER CACHE_BITMAP_ORDER;
 
@@ -96,7 +96,7 @@ struct _CACHE_BITMAP_V2_ORDER
        uint32 cbCompMainBodySize;
        uint32 cbScanWidth;
        uint32 cbUncompressedSize;
-       uint8* bitmapDataStream;
+       BYTE* bitmapDataStream;
 };
 typedef struct _CACHE_BITMAP_V2_ORDER CACHE_BITMAP_V2_ORDER;
 
@@ -107,7 +107,7 @@ struct _BITMAP_DATA_EX
        uint32 width;
        uint32 height;
        uint32 length;
-       uint8* data;
+       BYTE* data;
 };
 typedef struct _BITMAP_DATA_EX BITMAP_DATA_EX;
 
@@ -139,7 +139,7 @@ struct _GLYPH_DATA
        uint32 cx;
        uint32 cy;
        uint32 cb;
-       uint8* aj;
+       BYTE* aj;
 };
 typedef struct _GLYPH_DATA GLYPH_DATA;
 
@@ -148,7 +148,7 @@ struct _CACHE_GLYPH_ORDER
        uint32 cacheId;
        uint32 cGlyphs;
        GLYPH_DATA* glyphData[255];
-       uint8* unicodeCharacters;
+       BYTE* unicodeCharacters;
 };
 typedef struct _CACHE_GLYPH_ORDER CACHE_GLYPH_ORDER;
 
@@ -160,7 +160,7 @@ struct _GLYPH_DATA_V2
        uint32 cx;
        uint32 cy;
        uint32 cb;
-       uint8* aj;
+       BYTE* aj;
 };
 typedef struct _GLYPH_DATA_V2 GLYPH_DATA_V2;
 
@@ -170,7 +170,7 @@ struct _CACHE_GLYPH_V2_ORDER
        uint32 flags;
        uint32 cGlyphs;
        GLYPH_DATA_V2* glyphData[255];
-       uint8* unicodeCharacters;
+       BYTE* unicodeCharacters;
 };
 typedef struct _CACHE_GLYPH_V2_ORDER CACHE_GLYPH_V2_ORDER;
 
@@ -182,7 +182,7 @@ struct _CACHE_BRUSH_ORDER
        uint32 cy;
        uint32 style;
        uint32 length;
-       uint8* data;
+       BYTE* data;
 };
 typedef struct _CACHE_BRUSH_ORDER CACHE_BRUSH_ORDER;
 
index f497cf9..f44aade 100644 (file)
 /* SYSTEM_TIME */
 typedef struct
 {
-       uint16 wYear;
-       uint16 wMonth;
-       uint16 wDayOfWeek;
-       uint16 wDay;
-       uint16 wHour;
-       uint16 wMinute;
-       uint16 wSecond;
-       uint16 wMilliseconds;
+       UINT16 wYear;
+       UINT16 wMonth;
+       UINT16 wDayOfWeek;
+       UINT16 wDay;
+       UINT16 wHour;
+       UINT16 wMinute;
+       UINT16 wSecond;
+       UINT16 wMilliseconds;
 } SYSTEM_TIME;
 
 /* TIME_ZONE_INFORMATION */
@@ -128,7 +128,7 @@ typedef struct
        uint32 cbLen;
        uint32 version;
        uint32 logonId;
-       uint8 securityVerifier[16];
+       BYTE securityVerifier[16];
 } ARC_CS_PRIVATE_PACKET;
 
 /* ARC_SC_PRIVATE_PACKET */
@@ -137,7 +137,7 @@ typedef struct
        uint32 cbLen;
        uint32 version;
        uint32 logonId;
-       uint8 arcRandomBits[16];
+       BYTE arcRandomBits[16];
 } ARC_SC_PRIVATE_PACKET;
 
 /* Certificates */
@@ -145,7 +145,7 @@ typedef struct
 struct rdp_CertBlob
 {
        uint32 length;
-       uint8* data;
+       BYTE* data;
 };
 typedef struct rdp_CertBlob rdpCertBlob;
 
@@ -160,7 +160,7 @@ struct rdp_CertInfo
 {
        BYTE* Modulus;
        DWORD ModulusLength;
-       uint8 exponent[4];
+       BYTE exponent[4];
 };
 typedef struct rdp_CertInfo rdpCertInfo;
 
@@ -177,7 +177,7 @@ struct rdp_key
        DWORD ModulusLength;
        BYTE* PrivateExponent;
        DWORD PrivateExponentLength;
-       uint8 exponent[4];
+       BYTE exponent[4];
 };
 typedef struct rdp_key rdpKey;
 
@@ -205,8 +205,8 @@ struct rdp_ext_set
 
 struct _BITMAP_CACHE_CELL_INFO
 {
-       uint16 numEntries;
-       uint16 maxSize;
+       UINT16 numEntries;
+       UINT16 maxSize;
 };
 typedef struct _BITMAP_CACHE_CELL_INFO BITMAP_CACHE_CELL_INFO;
 
@@ -221,8 +221,8 @@ typedef struct _BITMAP_CACHE_V2_CELL_INFO BITMAP_CACHE_V2_CELL_INFO;
 
 struct _GLYPH_CACHE_DEFINITION
 {
-       uint16 cacheEntries;
-       uint16 cacheMaximumCellSize;
+       UINT16 cacheEntries;
+       UINT16 cacheMaximumCellSize;
 };
 typedef struct _GLYPH_CACHE_DEFINITION GLYPH_CACHE_DEFINITION;
 
@@ -369,8 +369,8 @@ struct rdp_settings
        ALIGN64 BOOL frame_marker; /* 221 */
        ALIGN64 BOOL fastpath_input; /* 222 */
        ALIGN64 BOOL fastpath_output; /* 223 */
-       ALIGN64 uint8* received_caps; /* 224 */
-       ALIGN64 uint8* order_support; /* 225 */
+       ALIGN64 BYTE* received_caps; /* 224 */
+       ALIGN64 BYTE* order_support; /* 225 */
        ALIGN64 BOOL surface_commands; /* 226 */
        ALIGN64 BOOL disable_wallpaper; /* 227 */
        ALIGN64 BOOL disable_full_window_drag; /* 228 */
index b6905c5..b172781 100644 (file)
 #ifdef FREERDP_HAVE_INTTYPES_H
 
 #include <inttypes.h>
-typedef uint8_t uint8;
-typedef int8_t sint8;
-typedef uint16_t uint16;
-typedef int16_t sint16;
 typedef uint32_t uint32;
 typedef int32_t sint32;
 typedef uint64_t uint64;
@@ -51,10 +47,6 @@ typedef int64_t sint64;
 
 #else
 
-typedef unsigned char uint8;
-typedef signed char sint8;
-typedef unsigned short uint16;
-typedef signed short sint16;
 typedef unsigned int uint32;
 typedef signed int sint32;
 #ifdef _WIN32
@@ -67,45 +59,6 @@ typedef signed long long sint64;
 
 #endif /* HAVE_INTTYPES_H */
 
-#ifdef FREERDP_HAVE_STDBOOL_H
-
-#include <stdbool.h>
-
-#ifdef _WIN32
-#define BOOL BOOLEAN
-#else
-typedef int BOOL;
-#endif
-
-#else
-
-#ifndef __cplusplus
-
-#define TRUE   1
-#define FALSE  0
-
-#ifdef _WIN32
-#define BOOL BOOLEAN
-#else
-typedef int BOOL;
-#endif
-
-#else /* ifdef __cplusplus */
-
-#ifndef TRUE
-#define TRUE   1
-#endif
-
-#ifndef FALSE
-#define FALSE  0
-#endif
-
-typedef int BOOL;
-
-#endif /* __cplusplus */
-
-#endif /* FREERDP_HAVE_STDBOOL_H */
-
 #ifndef MIN
 #define MIN(x,y)       (((x) < (y)) ? (x) : (y))
 #endif
@@ -119,35 +72,35 @@ typedef int BOOL;
 typedef struct
 {
        uint32 time_low;
-       uint16 time_mid;
-       uint16 time_hi_and_version;
-       uint8 clock_seq_hi_and_reserved;
-       uint8 clock_seq_low;
-       uint8 node[6];
+       UINT16 time_mid;
+       UINT16 time_hi_and_version;
+       BYTE clock_seq_hi_and_reserved;
+       BYTE clock_seq_low;
+       BYTE node[6];
 } uuid;
 
 struct _RDP_PLUGIN_DATA
 {
-       uint16 size;
+       UINT16 size;
        void* data[4];
 };
 typedef struct _RDP_PLUGIN_DATA RDP_PLUGIN_DATA;
 
 struct _RDP_RECT
 {
-       sint16 x;
-       sint16 y;
-       sint16 width;
-       sint16 height;
+       INT16 x;
+       INT16 y;
+       INT16 width;
+       INT16 height;
 };
 typedef struct _RDP_RECT RDP_RECT;
 
 struct _RECTANGLE_16
 {
-       uint16 left;
-       uint16 top;
-       uint16 right;
-       uint16 bottom;
+       UINT16 left;
+       UINT16 top;
+       UINT16 right;
+       UINT16 bottom;
 };
 typedef struct _RECTANGLE_16 RECTANGLE_16;
 
@@ -158,8 +111,8 @@ typedef void (*RDP_EVENT_CALLBACK) (RDP_EVENT* event);
 
 struct _RDP_EVENT
 {
-       uint16 event_class;
-       uint16 event_type;
+       UINT16 event_class;
+       UINT16 event_type;
        RDP_EVENT_CALLBACK on_event_free_callback;
        void* user_data;
 };
index e968326..24c17a9 100644 (file)
@@ -52,7 +52,7 @@ struct _BITMAP_DATA
        uint32 cbCompMainBodySize;
        uint32 cbScanWidth;
        uint32 cbUncompressedSize;
-       uint8* bitmapDataStream;
+       BYTE* bitmapDataStream;
        BOOL compressed;
 };
 typedef struct _BITMAP_DATA BITMAP_DATA;
@@ -69,9 +69,9 @@ typedef struct _BITMAP_UPDATE BITMAP_UPDATE;
 
 struct _PALETTE_ENTRY
 {
-       uint8 red;
-       uint8 green;
-       uint8 blue;
+       BYTE red;
+       BYTE green;
+       BYTE blue;
 };
 typedef struct _PALETTE_ENTRY PALETTE_ENTRY;
 
@@ -112,7 +112,7 @@ struct _SURFACE_BITS_COMMAND
        uint32 width;
        uint32 height;
        uint32 bitmapDataLength;
-       uint8* bitmapData;
+       BYTE* bitmapData;
 };
 typedef struct _SURFACE_BITS_COMMAND SURFACE_BITS_COMMAND;
 
@@ -141,8 +141,8 @@ typedef void (*pBitmapUpdate)(rdpContext* context, BITMAP_UPDATE* bitmap);
 typedef void (*pPalette)(rdpContext* context, PALETTE_UPDATE* palette);
 typedef void (*pPlaySound)(rdpContext* context, PLAY_SOUND_UPDATE* play_sound);
 
-typedef void (*pRefreshRect)(rdpContext* context, uint8 count, RECTANGLE_16* areas);
-typedef void (*pSuppressOutput)(rdpContext* context, uint8 allow, RECTANGLE_16* area);
+typedef void (*pRefreshRect)(rdpContext* context, BYTE count, RECTANGLE_16* areas);
+typedef void (*pSuppressOutput)(rdpContext* context, BYTE allow, RECTANGLE_16* area);
 
 typedef void (*pSurfaceCommand)(rdpContext* context, STREAM* s);
 typedef void (*pSurfaceBits)(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_command);
index 8abd65b..a87babe 100644 (file)
@@ -26,12 +26,12 @@ union _ADPCM
 {
        struct
        {
-               sint16 last_sample[2];
-               sint16 last_step[2];
+               INT16 last_sample[2];
+               INT16 last_step[2];
        } ima;
        struct
        {
-               uint8 predictor[2];
+               BYTE predictor[2];
                sint32 delta[2];
                sint32 sample1[2];
                sint32 sample2[2];
@@ -42,31 +42,31 @@ typedef union _ADPCM ADPCM;
 typedef struct _FREERDP_DSP_CONTEXT FREERDP_DSP_CONTEXT;
 struct _FREERDP_DSP_CONTEXT
 {
-       uint8* resampled_buffer;
+       BYTE* resampled_buffer;
        uint32 resampled_size;
        uint32 resampled_frames;
        uint32 resampled_maxlength;
 
-       uint8* adpcm_buffer;
+       BYTE* adpcm_buffer;
        uint32 adpcm_size;
        uint32 adpcm_maxlength;
 
        ADPCM adpcm;
 
        void (*resample)(FREERDP_DSP_CONTEXT* context,
-               const uint8* src, int bytes_per_sample,
+               const BYTE* src, int bytes_per_sample,
                uint32 schan, uint32 srate, int sframes,
                uint32 rchan, uint32 rrate);
 
        void (*decode_ima_adpcm)(FREERDP_DSP_CONTEXT* context,
-               const uint8* src, int size, int channels, int block_size);
+               const BYTE* src, int size, int channels, int block_size);
        void (*encode_ima_adpcm)(FREERDP_DSP_CONTEXT* context,
-               const uint8* src, int size, int channels, int block_size);
+               const BYTE* src, int size, int channels, int block_size);
 
        void (*decode_ms_adpcm)(FREERDP_DSP_CONTEXT* context,
-               const uint8* src, int size, int channels, int block_size);
+               const BYTE* src, int size, int channels, int block_size);
        void (*encode_ms_adpcm)(FREERDP_DSP_CONTEXT* context,
-               const uint8* src, int size, int channels, int block_size);
+               const BYTE* src, int size, int channels, int block_size);
 };
 
 FREERDP_API FREERDP_DSP_CONTEXT* freerdp_dsp_context_new(void);
index d9506b6..bf69d5d 100644 (file)
@@ -23,7 +23,7 @@
 #include <freerdp/api.h>
 #include <freerdp/types.h>
 
-FREERDP_API RDP_EVENT* freerdp_event_new(uint16 event_class, uint16 event_type,
+FREERDP_API RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type,
        RDP_EVENT_CALLBACK on_event_free_callback, void* user_data);
 FREERDP_API void freerdp_event_free(RDP_EVENT* event);
 
index 00dfcca..7485f11 100644 (file)
@@ -24,6 +24,6 @@
 
 #define FREERDP_HEXDUMP_LINE_LENGTH    16
 
-FREERDP_API void freerdp_hexdump(uint8* data, int length);
+FREERDP_API void freerdp_hexdump(BYTE* data, int length);
 
 #endif /* __UTILS_HEXDUMP_H */
index 89dc326..36ac8be 100644 (file)
 #define zfree(p) do { if (p != NULL) {free(p); p = NULL;} } while (0)
 
 /* Data maintenance helper only used in URBDRC */      
-#define data_read_uint8(_p, _v) do { _v = \
-       *((uint8 *) (_p)); \
+#define data_read_BYTE(_p, _v) do { _v = \
+       *((BYTE *) (_p)); \
        } while (0)
-#define data_read_uint16(_p, _v) do { _v = \
-       ((uint16) (*((uint8 *) (_p)))) + \
-       ((uint16) (*(((uint8 *) (_p)) + 1)) << 8); \
+#define data_read_UINT16(_p, _v) do { _v = \
+       ((UINT16) (*((BYTE *) (_p)))) + \
+       ((UINT16) (*(((BYTE *) (_p)) + 1)) << 8); \
        } while (0)
 #define data_read_uint32(_p, _v) do { _v = \
-       (uint32) (*((uint8 *) (_p))) + \
-       ((uint32) (*(((uint8 *) (_p)) + 1)) << 8) + \
-       ((uint32) (*(((uint8 *) (_p)) + 2)) << 16) + \
-       ((uint32) (*(((uint8 *) (_p)) + 3)) << 24); \
+       (uint32) (*((BYTE *) (_p))) + \
+       ((uint32) (*(((BYTE *) (_p)) + 1)) << 8) + \
+       ((uint32) (*(((BYTE *) (_p)) + 2)) << 16) + \
+       ((uint32) (*(((BYTE *) (_p)) + 3)) << 24); \
        } while (0)
 #define data_read_uint64(_p, _v) do { _v = \
-       (uint64) (*((uint8 *) (_p))) + \
-       ((uint64) (*(((uint8 *) (_p)) + 1)) << 8) + \
-       ((uint64) (*(((uint8 *) (_p)) + 2)) << 16) + \
-       ((uint64) (*(((uint8 *) (_p)) + 3)) << 24) + \
-       ((uint64) (*(((uint8 *) (_p)) + 4)) << 32) + \
-       ((uint64) (*(((uint8 *) (_p)) + 5)) << 40) + \
-       ((uint64) (*(((uint8 *) (_p)) + 6)) << 48) + \
-       ((uint64) (*(((uint8 *) (_p)) + 7)) << 56); \
+       (uint64) (*((BYTE *) (_p))) + \
+       ((uint64) (*(((BYTE *) (_p)) + 1)) << 8) + \
+       ((uint64) (*(((BYTE *) (_p)) + 2)) << 16) + \
+       ((uint64) (*(((BYTE *) (_p)) + 3)) << 24) + \
+       ((uint64) (*(((BYTE *) (_p)) + 4)) << 32) + \
+       ((uint64) (*(((BYTE *) (_p)) + 5)) << 40) + \
+       ((uint64) (*(((BYTE *) (_p)) + 6)) << 48) + \
+       ((uint64) (*(((BYTE *) (_p)) + 7)) << 56); \
        } while (0)
 
-#define data_write_uint8(_p, _v) do { \
-       *((uint8 *) _p) = (uint8) (_v); \
+#define data_write_BYTE(_p, _v) do { \
+       *((BYTE *) _p) = (BYTE) (_v); \
        } while (0)
-#define data_write_uint16(_p, _v) do { \
-       *((uint8 *) _p) = (uint8) (((uint16) (_v)) & 0xff); \
-       *(((uint8 *) _p) + 1) = (uint8) ((((uint16) (_v)) >> 8) & 0xff); \
+#define data_write_UINT16(_p, _v) do { \
+       *((BYTE *) _p) = (BYTE) (((UINT16) (_v)) & 0xff); \
+       *(((BYTE *) _p) + 1) = (BYTE) ((((UINT16) (_v)) >> 8) & 0xff); \
        } while (0)
 #define data_write_uint32(_p, _v) do { \
-       *((uint8 *) _p) = (uint8) (((uint32) (_v)) & 0xff); \
-       *(((uint8 *) _p) + 1) = (uint8) ((((uint32) (_v)) >> 8) & 0xff); \
-       *(((uint8 *) _p) + 2) = (uint8) ((((uint32) (_v)) >> 16) & 0xff); \
-       *(((uint8 *) _p) + 3) = (uint8) ((((uint32) (_v)) >> 24) & 0xff); \
+       *((BYTE *) _p) = (BYTE) (((uint32) (_v)) & 0xff); \
+       *(((BYTE *) _p) + 1) = (BYTE) ((((uint32) (_v)) >> 8) & 0xff); \
+       *(((BYTE *) _p) + 2) = (BYTE) ((((uint32) (_v)) >> 16) & 0xff); \
+       *(((BYTE *) _p) + 3) = (BYTE) ((((uint32) (_v)) >> 24) & 0xff); \
        } while (0)
 #define data_write_uint64(_p, _v) do { \
-       *((uint8 *) _p) = (uint8) (((uint64) (_v)) & 0xff); \
-       *(((uint8 *) _p) + 1) = (uint8) ((((uint64) (_v)) >> 8) & 0xff); \
-       *(((uint8 *) _p) + 2) = (uint8) ((((uint64) (_v)) >> 16) & 0xff); \
-       *(((uint8 *) _p) + 3) = (uint8) ((((uint64) (_v)) >> 24) & 0xff); \
-       *(((uint8 *) _p) + 4) = (uint8) ((((uint64) (_v)) >> 32) & 0xff); \
-       *(((uint8 *) _p) + 5) = (uint8) ((((uint64) (_v)) >> 40) & 0xff); \
-       *(((uint8 *) _p) + 6) = (uint8) ((((uint64) (_v)) >> 48) & 0xff); \
-       *(((uint8 *) _p) + 7) = (uint8) ((((uint64) (_v)) >> 56) & 0xff); \
+       *((BYTE *) _p) = (BYTE) (((uint64) (_v)) & 0xff); \
+       *(((BYTE *) _p) + 1) = (BYTE) ((((uint64) (_v)) >> 8) & 0xff); \
+       *(((BYTE *) _p) + 2) = (BYTE) ((((uint64) (_v)) >> 16) & 0xff); \
+       *(((BYTE *) _p) + 3) = (BYTE) ((((uint64) (_v)) >> 24) & 0xff); \
+       *(((BYTE *) _p) + 4) = (BYTE) ((((uint64) (_v)) >> 32) & 0xff); \
+       *(((BYTE *) _p) + 5) = (BYTE) ((((uint64) (_v)) >> 40) & 0xff); \
+       *(((BYTE *) _p) + 6) = (BYTE) ((((uint64) (_v)) >> 48) & 0xff); \
+       *(((BYTE *) _p) + 7) = (BYTE) ((((uint64) (_v)) >> 56) & 0xff); \
        } while (0)
 
 typedef struct _MSUSB_INTERFACE_DESCRIPTOR MSUSB_INTERFACE_DESCRIPTOR;
@@ -83,35 +83,35 @@ typedef struct _MSUSB_CONFIG_DESCRIPTOR     MSUSB_CONFIG_DESCRIPTOR;
 
 struct _MSUSB_PIPE_DESCRIPTOR
 {
-       uint16 MaximumPacketSize;
+       UINT16 MaximumPacketSize;
        uint32 MaximumTransferSize;
        uint32 PipeFlags;
        uint32 PipeHandle;
-       uint8  bEndpointAddress;
-       uint8  bInterval;
-       uint8  PipeType;
+       BYTE  bEndpointAddress;
+       BYTE  bInterval;
+       BYTE  PipeType;
        int InitCompleted;
 } __attribute__((packed));
 
 struct _MSUSB_INTERFACE_DESCRIPTOR
 {
-       uint16 Length;
-       uint16 NumberOfPipesExpected;
-       uint8  InterfaceNumber;
-       uint8  AlternateSetting;
+       UINT16 Length;
+       UINT16 NumberOfPipesExpected;
+       BYTE  InterfaceNumber;
+       BYTE  AlternateSetting;
        uint32 NumberOfPipes;
        uint32 InterfaceHandle;
-       uint8  bInterfaceClass;
-       uint8  bInterfaceSubClass;
-       uint8  bInterfaceProtocol;
+       BYTE  bInterfaceClass;
+       BYTE  bInterfaceSubClass;
+       BYTE  bInterfaceProtocol;
        MSUSB_PIPE_DESCRIPTOR ** MsPipes;
        int InitCompleted;
 } __attribute__((packed));
 
 struct _MSUSB_CONFIG_DESCRIPTOR
 {
-       uint16 wTotalLength;
-       uint8  bConfigurationValue;
+       UINT16 wTotalLength;
+       BYTE  bConfigurationValue;
        uint32 ConfigurationHandle;
        uint32 NumInterfaces;
        MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces;
@@ -123,15 +123,15 @@ struct _MSUSB_CONFIG_DESCRIPTOR
 void msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, MSUSB_PIPE_DESCRIPTOR** NewMsPipes, uint32 NewNumberOfPipes);
 
 /* MSUSB_INTERFACE exported functions */
-void msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR* MsConfig, uint8 InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR* NewMsInterface);
-MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(uint8* data, uint32 data_size, int* offset);
-int msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, uint8* data, int* offset);
+void msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR* MsConfig, BYTE InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR* NewMsInterface);
+MSUSB_INTERFACE_DESCRIPTOR* msusb_msinterface_read(BYTE* data, uint32 data_size, int* offset);
+int msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR* MsInterface, BYTE* data, int* offset);
 
 /* MSUSB_CONFIG exported functions */
 MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_new();
 void msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR* MsConfig);
-MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(uint8* data, uint32 data_size, uint32 NumInterfaces);
-int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, uint8* data, int * offset);
+MSUSB_CONFIG_DESCRIPTOR* msusb_msconfig_read(BYTE* data, uint32 data_size, uint32 NumInterfaces);
+int msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR* MsConfg, BYTE* data, int * offset);
 void msusb_msconfig_dump(MSUSB_CONFIG_DESCRIPTOR* MsConfg);
 
 #endif
index 667a0c5..75115c7 100644 (file)
@@ -26,8 +26,8 @@
 struct _pcap_header
 {
        uint32 magic_number;   /* magic number */
-       uint16 version_major;  /* major version number */
-       uint16 version_minor;  /* minor version number */
+       UINT16 version_major;  /* major version number */
+       UINT16 version_minor;  /* minor version number */
        sint32 thiszone;       /* GMT to local correction */
        uint32 sigfigs;        /* accuracy of timestamps */
        uint32 snaplen;        /* max length of captured packets, in octets */
index 8e82901..f50221b 100644 (file)
@@ -24,7 +24,7 @@
 #include <freerdp/rail.h>
 #include <freerdp/utils/stream.h>
 
-FREERDP_API void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, uint16 cbString);
+FREERDP_API void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, UINT16 cbString);
 FREERDP_API void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string);
 FREERDP_API void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string);
 FREERDP_API void rail_write_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string);
index e84ffb2..c904837 100644 (file)
@@ -28,8 +28,8 @@
 struct _STREAM
 {
        int size;
-       uint8* p;
-       uint8* data;
+       BYTE* p;
+       BYTE* data;
 };
 typedef struct _STREAM STREAM;
 
@@ -62,10 +62,10 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size);
 #define stream_get_size(_s) (_s->size)
 #define stream_get_left(_s) (_s->size - (_s->p - _s->data))
 
-#define stream_read_uint8(_s, _v) do { _v = *_s->p++; } while (0)
-#define stream_read_uint16(_s, _v) do { _v = \
-       (uint16)(*_s->p) + \
-       (uint16)(((uint16)(*(_s->p + 1))) << 8); \
+#define stream_read_BYTE(_s, _v) do { _v = *_s->p++; } while (0)
+#define stream_read_UINT16(_s, _v) do { _v = \
+       (UINT16)(*_s->p) + \
+       (UINT16)(((UINT16)(*(_s->p + 1))) << 8); \
        _s->p += 2; } while (0)
 #define stream_read_uint32(_s, _v) do { _v = \
        (uint32)(*_s->p) + \
@@ -88,9 +88,9 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size);
        _s->p += (_n); \
        } while (0)
 
-#define stream_write_uint8(_s, _v) do { \
-       *_s->p++ = (uint8)(_v); } while (0)
-#define stream_write_uint16(_s, _v) do { \
+#define stream_write_BYTE(_s, _v) do { \
+       *_s->p++ = (BYTE)(_v); } while (0)
+#define stream_write_UINT16(_s, _v) do { \
        *_s->p++ = (_v) & 0xFF; \
        *_s->p++ = ((_v) >> 8) & 0xFF; } while (0)
 #define stream_write_uint32(_s, _v) do { \
@@ -120,10 +120,10 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size);
        _s->p += (_n); \
        } while (0)
 
-#define stream_peek_uint8(_s, _v) do { _v = *_s->p; } while (0)
-#define stream_peek_uint16(_s, _v) do { _v = \
-       (uint16)(*_s->p) + \
-       (((uint16)(*(_s->p + 1))) << 8); \
+#define stream_peek_BYTE(_s, _v) do { _v = *_s->p; } while (0)
+#define stream_peek_UINT16(_s, _v) do { _v = \
+       (UINT16)(*_s->p) + \
+       (((UINT16)(*(_s->p + 1))) << 8); \
        } while (0)
 #define stream_peek_uint32(_s, _v) do { _v = \
        (uint32)(*_s->p) + \
@@ -142,14 +142,14 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size);
        (((uint64)(*(_s->p + 7))) << 56); \
        } while (0)
 
-#define stream_seek_uint8(_s)  stream_seek(_s, 1)
-#define stream_seek_uint16(_s) stream_seek(_s, 2)
+#define stream_seek_BYTE(_s)   stream_seek(_s, 1)
+#define stream_seek_UINT16(_s) stream_seek(_s, 2)
 #define stream_seek_uint32(_s) stream_seek(_s, 4)
 #define stream_seek_uint64(_s) stream_seek(_s, 8)
 
-#define stream_read_uint16_be(_s, _v) do { _v = \
-       (((uint16)(*_s->p)) << 8) + \
-       (uint16)(*(_s->p + 1)); \
+#define stream_read_UINT16_be(_s, _v) do { _v = \
+       (((UINT16)(*_s->p)) << 8) + \
+       (UINT16)(*(_s->p + 1)); \
        _s->p += 2; } while (0)
 #define stream_read_uint32_be(_s, _v) do { _v = \
        (((uint32)(*(_s->p))) << 24) + \
@@ -158,12 +158,12 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size);
        (((uint32)(*(_s->p + 3)))); \
        _s->p += 4; } while (0)
 
-#define stream_write_uint16_be(_s, _v) do { \
+#define stream_write_UINT16_be(_s, _v) do { \
        *_s->p++ = ((_v) >> 8) & 0xFF; \
        *_s->p++ = (_v) & 0xFF; } while (0)
 #define stream_write_uint32_be(_s, _v) do { \
-       stream_write_uint16_be(_s, ((_v) >> 16 & 0xFFFF)); \
-       stream_write_uint16_be(_s, ((_v) & 0xFFFF)); \
+       stream_write_UINT16_be(_s, ((_v) >> 16 & 0xFFFF)); \
+       stream_write_UINT16_be(_s, ((_v) & 0xFFFF)); \
        } while (0)
 
 #define stream_copy(_dst, _src, _n) do { \
index 4c486b5..6517ad4 100644 (file)
@@ -24,8 +24,8 @@
 #include <freerdp/types.h>
 
 FREERDP_API int freerdp_tcp_connect(const char* hostname, int port);
-FREERDP_API int freerdp_tcp_read(int sockfd, uint8* data, int length);
-FREERDP_API int freerdp_tcp_write(int sockfd, uint8* data, int length);
+FREERDP_API int freerdp_tcp_read(int sockfd, BYTE* data, int length);
+FREERDP_API int freerdp_tcp_write(int sockfd, BYTE* data, int length);
 FREERDP_API int freerdp_tcp_disconnect(int sockfd);
 
 FREERDP_API int freerdp_tcp_set_no_delay(int sockfd, BOOL no_delay);
index 0e01cc3..baa49ef 100644 (file)
@@ -138,9 +138,9 @@ struct _ICON_INFO
        uint32 cbColorTable;
        uint32 cbBitsMask;
        uint32 cbBitsColor;
-       uint8* bitsMask;
-       uint8* colorTable;
-       uint8* bitsColor;
+       BYTE* bitsMask;
+       BYTE* colorTable;
+       BYTE* bitsColor;
 };
 typedef struct _ICON_INFO ICON_INFO;
 
index 2aec2e3..23d1655 100644 (file)
@@ -38,7 +38,7 @@ void update_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt)
        if (memblt->cacheId == 0xFF)
                bitmap = offscreen_cache_get(cache->offscreen, memblt->cacheIndex);
        else
-               bitmap = bitmap_cache_get(cache->bitmap, (uint8) memblt->cacheId, memblt->cacheIndex);
+               bitmap = bitmap_cache_get(cache->bitmap, (BYTE) memblt->cacheId, memblt->cacheIndex);
 
        memblt->bitmap = bitmap;
        IFCALL(cache->bitmap->MemBlt, context, memblt);
@@ -46,7 +46,7 @@ void update_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt)
 
 void update_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt)
 {
-       uint8 style;
+       BYTE style;
        rdpBitmap* bitmap;
        rdpCache* cache = context->cache;
        rdpBrush* brush = &mem3blt->brush;
@@ -54,7 +54,7 @@ void update_gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt)
        if (mem3blt->cacheId == 0xFF)
                bitmap = offscreen_cache_get(cache->offscreen, mem3blt->cacheIndex);
        else
-               bitmap = bitmap_cache_get(cache->bitmap, (uint8) mem3blt->cacheId, mem3blt->cacheIndex);
+               bitmap = bitmap_cache_get(cache->bitmap, (BYTE) mem3blt->cacheId, mem3blt->cacheIndex);
 
        style = brush->style;
 
index fef92e5..e3da153 100644 (file)
@@ -32,7 +32,7 @@
 
 void update_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt)
 {
-       uint8 style;
+       BYTE style;
        rdpBrush* brush = &patblt->brush;
        rdpCache* cache = context->cache;
 
@@ -56,7 +56,7 @@ void update_gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
 
 void update_gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb)
 {
-       uint8 style;
+       BYTE style;
        rdpBrush* brush = &polygon_cb->brush;
        rdpCache* cache = context->cache;
 
index b074fc4..ea809c3 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <freerdp/cache/glyph.h>
 
-void update_process_glyph(rdpContext* context, uint8* data, int* index,
+void update_process_glyph(rdpContext* context, BYTE* data, int* index,
                int* x, int* y, uint32 cacheId, uint32 ulCharInc, uint32 flAccel)
 {
        int offset;
@@ -72,7 +72,7 @@ void update_process_glyph(rdpContext* context, uint8* data, int* index,
        }
 }
 
-void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 length,
+void update_process_glyph_fragments(rdpContext* context, BYTE* data, uint32 length,
                uint32 cacheId, uint32 ulCharInc, uint32 flAccel, uint32 bgcolor, uint32 fgcolor, int x, int y,
                int bkX, int bkY, int bkWidth, int bkHeight, int opX, int opY, int opWidth, int opHeight)
 {
@@ -80,7 +80,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
        uint32 id;
        uint32 size;
        int index = 0;
-       uint8* fragments;
+       BYTE* fragments;
        rdpGraphics* graphics;
        rdpGlyphCache* glyph_cache;
 
@@ -106,7 +106,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
                                }
 
                                id = data[index + 1];
-                               fragments = (uint8*) glyph_cache_fragment_get(glyph_cache, id, &size);
+                               fragments = (BYTE*) glyph_cache_fragment_get(glyph_cache, id, &size);
 
                                if (fragments != NULL)
                                {
@@ -143,7 +143,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
                                id = data[index + 1];
                                size = data[index + 2];
 
-                               fragments = (uint8*) malloc(size);
+                               fragments = (BYTE*) malloc(size);
                                memcpy(fragments, data, size);
                                glyph_cache_fragment_put(glyph_cache, id, size, fragments);
 
@@ -198,7 +198,7 @@ void update_gdi_fast_index(rdpContext* context, FAST_INDEX_ORDER* fast_index)
 
        if (opBottom == -32768)
        {
-               uint8 flags = (uint8) (opTop & 0x0F);
+               BYTE flags = (BYTE) (opTop & 0x0F);
 
                if (flags & 0x01)
                        opBottom = fast_index->bkBottom;
@@ -238,7 +238,7 @@ void update_gdi_fast_glyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph)
        GLYPH_DATA_V2* glyph_data;
        rdpGlyph* glyph;
        rdpCache* cache = context->cache;
-       uint8 text_data[2];
+       BYTE text_data[2];
 
        opLeft = fast_glyph->opLeft;
        opTop = fast_glyph->opTop;
@@ -249,7 +249,7 @@ void update_gdi_fast_glyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph)
 
        if (opBottom == -32768)
        {
-               uint8 flags = (uint8) (opTop & 0x0F);
+               BYTE flags = (BYTE) (opTop & 0x0F);
 
                if (flags & 0x01)
                        opBottom = fast_glyph->bkBottom;
@@ -417,7 +417,7 @@ void* glyph_cache_fragment_get(rdpGlyphCache* glyph_cache, uint32 index, uint32*
        void* fragment;
 
        fragment = glyph_cache->fragCache.entries[index].fragment;
-       *size = (uint8) glyph_cache->fragCache.entries[index].size;
+       *size = (BYTE) glyph_cache->fragCache.entries[index].size;
 
        if (fragment == NULL)
        {
index 28f1a1c..281082d 100644 (file)
@@ -31,7 +31,7 @@
 void update_gdi_create_offscreen_bitmap(rdpContext* context, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap)
 {
        int i;
-       uint16 index;
+       UINT16 index;
        rdpBitmap* bitmap;
        rdpCache* cache = context->cache;
 
index c6ab043..b5e5877 100644 (file)
@@ -40,8 +40,8 @@
 
 typedef struct wts_data_item
 {
-       uint16 channel_id;
-       uint8* buffer;
+       UINT16 channel_id;
+       BYTE* buffer;
        uint32 length;
 } wts_data_item;
 
@@ -67,7 +67,7 @@ static rdpPeerChannel* wts_get_dvc_channel_by_id(WTSVirtualChannelManager* vcm,
        return channel;
 }
 
-static void wts_queue_receive_data(rdpPeerChannel* channel, const uint8* buffer, uint32 length)
+static void wts_queue_receive_data(rdpPeerChannel* channel, const BYTE* buffer, uint32 length)
 {
        wts_data_item* item;
 
@@ -105,12 +105,12 @@ static int wts_read_variable_uint(STREAM* s, int cbLen, uint32 *val)
                case 0:
                        if (stream_get_left(s) < 1)
                                return 0;
-                       stream_read_uint8(s, *val);
+                       stream_read_BYTE(s, *val);
                        return 1;
                case 1:
                        if (stream_get_left(s) < 2)
                                return 0;
-                       stream_read_uint16(s, *val);
+                       stream_read_UINT16(s, *val);
                        return 2;
                default:
                        if (stream_get_left(s) < 4)
@@ -122,13 +122,13 @@ static int wts_read_variable_uint(STREAM* s, int cbLen, uint32 *val)
 
 static void wts_read_drdynvc_capabilities_response(rdpPeerChannel* channel, uint32 length)
 {
-       uint16 Version;
+       UINT16 Version;
 
        if (length < 3)
                return;
 
-       stream_seek_uint8(channel->receive_data); /* Pad (1 byte) */
-       stream_read_uint16(channel->receive_data, Version);
+       stream_seek_BYTE(channel->receive_data); /* Pad (1 byte) */
+       stream_read_UINT16(channel->receive_data, Version);
 
        DEBUG_DVC("Version: %d", Version);
 
@@ -223,7 +223,7 @@ static void wts_read_drdynvc_pdu(rdpPeerChannel* channel)
                return;
 
        stream_set_pos(channel->receive_data, 0);
-       stream_read_uint8(channel->receive_data, value);
+       stream_read_BYTE(channel->receive_data, value);
 
        length--;
        Cmd = (value & 0xf0) >> 4;
@@ -289,12 +289,12 @@ static int wts_write_variable_uint(STREAM* stream, uint32 val)
        if (val <= 0xFF)
        {
                cb = 0;
-               stream_write_uint8(stream, val);
+               stream_write_BYTE(stream, val);
        }
        else if (val <= 0xFFFF)
        {
                cb = 1;
-               stream_write_uint16(stream, val);
+               stream_write_UINT16(stream, val);
        }
        else
        {
@@ -305,13 +305,13 @@ static int wts_write_variable_uint(STREAM* stream, uint32 val)
        return cb;
 }
 
-static void wts_write_drdynvc_header(STREAM *s, uint8 Cmd, uint32 ChannelId)
+static void wts_write_drdynvc_header(STREAM *s, BYTE Cmd, uint32 ChannelId)
 {
-       uint8* bm;
+       BYTE* bm;
        int cbChId;
 
        stream_get_mark(s, bm);
-       stream_seek_uint8(s);
+       stream_seek_BYTE(s);
        cbChId = wts_write_variable_uint(s, ChannelId);
        *bm = ((Cmd & 0x0F) << 4) | cbChId;
 }
@@ -326,7 +326,7 @@ static void wts_write_drdynvc_create_request(STREAM *s, uint32 ChannelId, const
        stream_write(s, ChannelName, len);
 }
 
-static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, uint8* data, int size, int flags, int total_size)
+static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, BYTE* data, int size, int flags, int total_size)
 {
        if (flags & CHANNEL_FLAG_FIRST)
        {
@@ -354,7 +354,7 @@ static void WTSProcessChannelData(rdpPeerChannel* channel, int channelId, uint8*
        }
 }
 
-static int WTSReceiveChannelData(freerdp_peer* client, int channelId, uint8* data, int size, int flags, int total_size)
+static int WTSReceiveChannelData(freerdp_peer* client, int channelId, BYTE* data, int size, int flags, int total_size)
 {
        int i;
        BOOL result = FALSE;
@@ -462,7 +462,7 @@ BOOL WTSVirtualChannelManagerCheckFileDescriptor(WTSVirtualChannelManager* vcm)
                {
                        vcm->drdynvc_channel = channel;
                        dynvc_caps = 0x00010050; /* DYNVC_CAPS_VERSION1 (4 bytes) */
-                       WTSVirtualChannelWrite(channel, (uint8*) &dynvc_caps, sizeof(dynvc_caps), NULL);
+                       WTSVirtualChannelWrite(channel, (BYTE*) &dynvc_caps, sizeof(dynvc_caps), NULL);
                }
        }
 
@@ -635,7 +635,7 @@ void WTSFreeMemory(
 BOOL WTSVirtualChannelRead(
        /* __in */  void* hChannelHandle,
        /* __in */  uint32 TimeOut,
-       /* __out */ uint8* Buffer,
+       /* __out */ BYTE* Buffer,
        /* __in */  uint32 BufferSize,
        /* __out */ uint32* pBytesRead)
 {
@@ -673,7 +673,7 @@ BOOL WTSVirtualChannelRead(
 
 BOOL WTSVirtualChannelWrite(
        /* __in */  void* hChannelHandle,
-       /* __in */  uint8* Buffer,
+       /* __in */  BYTE* Buffer,
        /* __in */  uint32 Length,
        /* __out */ uint32* pBytesWritten)
 {
@@ -713,7 +713,7 @@ BOOL WTSVirtualChannelWrite(
                        item->buffer = malloc(channel->client->settings->vc_chunk_size);
                        stream_attach(s, item->buffer, channel->client->settings->vc_chunk_size);
 
-                       stream_seek_uint8(s);
+                       stream_seek_BYTE(s);
                        cbChId = wts_write_variable_uint(s, channel->channel_id);
 
                        if (first && (Length > (uint32) stream_get_left(s)))
index 93d4c2e..e58b7e4 100644 (file)
@@ -62,15 +62,15 @@ struct rdp_peer_channel
        WTSVirtualChannelManager* vcm;
        freerdp_peer* client;
        uint32 channel_id;
-       uint16 channel_type;
-       uint16 index;
+       UINT16 channel_type;
+       UINT16 index;
 
        STREAM* receive_data;
        struct wait_obj* receive_event;
        LIST* receive_queue;
        HANDLE mutex;
 
-       uint8 dvc_open_state;
+       BYTE dvc_open_state;
        uint32 dvc_total_length;
 };
 
@@ -82,7 +82,7 @@ struct WTSVirtualChannelManager
        HANDLE mutex;
 
        rdpPeerChannel* drdynvc_channel;
-       uint8 drdynvc_state;
+       BYTE drdynvc_state;
        uint32 dvc_channel_id_seq;
        LIST* dvc_channel_list;
 };
index ff39207..c859bf5 100644 (file)
 
 typedef uint32 PIXEL;
 
-static const uint8 g_MaskBit0 = 0x01; /* Least significant bit */
-static const uint8 g_MaskBit1 = 0x02;
-static const uint8 g_MaskBit2 = 0x04;
-static const uint8 g_MaskBit3 = 0x08;
-static const uint8 g_MaskBit4 = 0x10;
-static const uint8 g_MaskBit5 = 0x20;
-static const uint8 g_MaskBit6 = 0x40;
-static const uint8 g_MaskBit7 = 0x80; /* Most significant bit */
+static const BYTE g_MaskBit0 = 0x01; /* Least significant bit */
+static const BYTE g_MaskBit1 = 0x02;
+static const BYTE g_MaskBit2 = 0x04;
+static const BYTE g_MaskBit3 = 0x08;
+static const BYTE g_MaskBit4 = 0x10;
+static const BYTE g_MaskBit5 = 0x20;
+static const BYTE g_MaskBit6 = 0x40;
+static const BYTE g_MaskBit7 = 0x80; /* Most significant bit */
 
-static const uint8 g_MaskSpecialFgBg1 = 0x03;
-static const uint8 g_MaskSpecialFgBg2 = 0x05;
+static const BYTE g_MaskSpecialFgBg1 = 0x03;
+static const BYTE g_MaskSpecialFgBg2 = 0x05;
 
-static const uint8 g_MaskRegularRunLength = 0x1F;
-static const uint8 g_MaskLiteRunLength = 0x0F;
+static const BYTE g_MaskRegularRunLength = 0x1F;
+static const BYTE g_MaskLiteRunLength = 0x0F;
 
 /**
  * Reads the supplied order header and extracts the compression
  * order code ID.
  */
-static uint32 ExtractCodeId(uint8 bOrderHdr)
+static uint32 ExtractCodeId(BYTE bOrderHdr)
 {
        int code;
 
@@ -115,7 +115,7 @@ static uint32 ExtractCodeId(uint8 bOrderHdr)
 /**
  * Extract the run length of a compression order.
  */
-static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance)
+static uint32 ExtractRunLength(uint32 code, BYTE* pbOrderHdr, uint32* advance)
 {
        uint32 runLength;
        uint32 ladvance;
@@ -178,7 +178,7 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance)
                case MEGA_MEGA_FGBG_IMAGE:
                case MEGA_MEGA_SET_FGBG_IMAGE:
                case MEGA_MEGA_COLOR_IMAGE:
-                       runLength = ((uint16) pbOrderHdr[1]) | ((uint16) (pbOrderHdr[2] << 8));
+                       runLength = ((UINT16) pbOrderHdr[1]) | ((UINT16) (pbOrderHdr[2] << 8));
                        ladvance += 2;
                        break;
        }
@@ -198,7 +198,7 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance)
 #undef WRITEFIRSTLINEFGBGIMAGE
 #undef RLEDECOMPRESS
 #undef RLEEXTRA
-#define DESTWRITEPIXEL(_buf, _pix) (_buf)[0] = (uint8)(_pix)
+#define DESTWRITEPIXEL(_buf, _pix) (_buf)[0] = (BYTE)(_pix)
 #define DESTREADPIXEL(_pix, _buf) _pix = (_buf)[0]
 #define SRCREADPIXEL(_pix, _buf) _pix = (_buf)[0]
 #define DESTNEXTPIXEL(_buf) _buf += 1
@@ -218,9 +218,9 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance)
 #undef WRITEFIRSTLINEFGBGIMAGE
 #undef RLEDECOMPRESS
 #undef RLEEXTRA
-#define DESTWRITEPIXEL(_buf, _pix) ((uint16*)(_buf))[0] = (uint16)(_pix)
-#define DESTREADPIXEL(_pix, _buf) _pix = ((uint16*)(_buf))[0]
-#define SRCREADPIXEL(_pix, _buf) _pix = ((uint16*)(_buf))[0]
+#define DESTWRITEPIXEL(_buf, _pix) ((UINT16*)(_buf))[0] = (UINT16)(_pix)
+#define DESTREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0]
+#define SRCREADPIXEL(_pix, _buf) _pix = ((UINT16*)(_buf))[0]
 #define DESTNEXTPIXEL(_buf) _buf += 2
 #define SRCNEXTPIXEL(_buf) _buf += 2
 #define WRITEFGBGIMAGE WriteFgBgImage16to16
@@ -238,8 +238,8 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance)
 #undef WRITEFIRSTLINEFGBGIMAGE
 #undef RLEDECOMPRESS
 #undef RLEEXTRA
-#define DESTWRITEPIXEL(_buf, _pix) do { (_buf)[0] = (uint8)(_pix);  \
-  (_buf)[1] = (uint8)((_pix) >> 8); (_buf)[2] = (uint8)((_pix) >> 16); } while (0)
+#define DESTWRITEPIXEL(_buf, _pix) do { (_buf)[0] = (BYTE)(_pix);  \
+  (_buf)[1] = (BYTE)((_pix) >> 8); (_buf)[2] = (BYTE)((_pix) >> 16); } while (0)
 #define DESTREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8) | \
   ((_buf)[2] << 16)
 #define SRCREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8) | \
@@ -258,7 +258,7 @@ static uint32 ExtractRunLength(uint32 code, uint8* pbOrderHdr, uint32* advance)
  * decompress an RLE color plane
  * RDP6_BITMAP_STREAM
  */
-static int process_rle_plane(uint8* in, int width, int height, uint8* out, int size)
+static int process_rle_plane(BYTE* in, int width, int height, BYTE* out, int size)
 {
        int indexw;
        int indexh;
@@ -268,10 +268,10 @@ static int process_rle_plane(uint8* in, int width, int height, uint8* out, int s
        int color;
        int x;
        int revcode;
-       uint8* last_line;
-       uint8* this_line;
-       uint8* org_in;
-       uint8* org_out;
+       BYTE* last_line;
+       BYTE* this_line;
+       BYTE* org_in;
+       BYTE* org_out;
 
        org_in = in;
        org_out = out;
@@ -365,7 +365,7 @@ static int process_rle_plane(uint8* in, int width, int height, uint8* out, int s
 /**
  * process a raw color plane
  */
-static int process_raw_plane(uint8* srcData, int width, int height, uint8* dstData, int size)
+static int process_raw_plane(BYTE* srcData, int width, int height, BYTE* dstData, int size)
 {
        int x, y;
 
@@ -384,7 +384,7 @@ static int process_raw_plane(uint8* srcData, int width, int height, uint8* dstDa
  * 4 byte bitmap decompress
  * RDP6_BITMAP_STREAM
  */
-static BOOL bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int height, int size)
+static BOOL bitmap_decompress4(BYTE* srcData, BYTE* dstData, int width, int height, int size)
 {
        int RLE;
        int code;
@@ -439,13 +439,13 @@ static BOOL bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int he
 /**
  * bitmap decompression routine
  */
-BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp)
+BOOL bitmap_decompress(BYTE* srcData, BYTE* dstData, int width, int height, int size, int srcBpp, int dstBpp)
 {
-        uint8 * TmpBfr;
+        BYTE * TmpBfr;
 
        if (srcBpp == 16 && dstBpp == 16)
        {
-               TmpBfr = (uint8*) malloc(width * height * 2);
+               TmpBfr = (BYTE*) malloc(width * height * 2);
                RleDecompress16to16(srcData, size, TmpBfr, width * 2, width, height);
                freerdp_bitmap_flip(TmpBfr, dstData, width * 2, height);
                free(TmpBfr);
@@ -457,21 +457,21 @@ BOOL bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, in
        }
        else if (srcBpp == 15 && dstBpp == 15)
        {
-                TmpBfr = (uint8*) malloc(width * height * 2);
+                TmpBfr = (BYTE*) malloc(width * height * 2);
                 RleDecompress16to16(srcData, size, TmpBfr, width * 2, width, height);
                 freerdp_bitmap_flip(TmpBfr, dstData, width * 2, height);
                 free(TmpBfr);
        }
        else if (srcBpp == 8 && dstBpp == 8)
        {
-                TmpBfr = (uint8*) malloc(width * height);
+                TmpBfr = (BYTE*) malloc(width * height);
                 RleDecompress8to8(srcData, size, TmpBfr, width, width, height);
                 freerdp_bitmap_flip(TmpBfr, dstData, width, height);
                 free(TmpBfr);
        }
        else if (srcBpp == 24 && dstBpp == 24)
        {
-                TmpBfr = (uint8*) malloc(width * height * 3);
+                TmpBfr = (BYTE*) malloc(width * height * 3);
                 RleDecompress24to24(srcData, size, TmpBfr, width * 3, width, height);
                 freerdp_bitmap_flip(TmpBfr, dstData, width * 3, height);
                 free(TmpBfr);
index d64dd56..63637b8 100644 (file)
 #include <freerdp/codec/color.h>
 #include <freerdp/utils/memory.h>
 
-int freerdp_get_pixel(uint8 * data, int x, int y, int width, int height, int bpp)
+int freerdp_get_pixel(BYTE * data, int x, int y, int width, int height, int bpp)
 {
        int start;
        int shift;
-       uint16 *src16;
+       UINT16 *src16;
        uint32 *src32;
        int red, green, blue;
 
@@ -49,7 +49,7 @@ int freerdp_get_pixel(uint8 * data, int x, int y, int width, int height, int bpp
                        return data[y * width + x];
                case 15:
                case 16:
-                       src16 = (uint16*) data;
+                       src16 = (UINT16*) data;
                        return src16[y * width + x];
                case 24:
                        data += y * width * 3;
@@ -68,7 +68,7 @@ int freerdp_get_pixel(uint8 * data, int x, int y, int width, int height, int bpp
        return 0;
 }
 
-void freerdp_set_pixel(uint8* data, int x, int y, int width, int height, int bpp, int pixel)
+void freerdp_set_pixel(BYTE* data, int x, int y, int width, int height, int bpp, int pixel)
 {
        int start;
        int shift;
@@ -91,7 +91,7 @@ void freerdp_set_pixel(uint8* data, int x, int y, int width, int height, int bpp
        }
 }
 
-static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv)
+static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
 {
        *red = *green = *blue = 0;
        *alpha = (clrconv->alpha) ? 0xFF : 0x00;
@@ -142,7 +142,7 @@ static INLINE void freerdp_color_split_rgb(uint32* color, int bpp, uint8* red, u
        }
 }
 
-static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv)
+static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
 {
        *red = *green = *blue = 0;
        *alpha = (clrconv->alpha) ? 0xFF : 0x00;
@@ -193,7 +193,7 @@ static INLINE void freerdp_color_split_bgr(uint32* color, int bpp, uint8* red, u
        }
 }
 
-static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv)
+static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
 {
        switch (bpp)
        {
@@ -234,7 +234,7 @@ static INLINE void freerdp_color_make_rgb(uint32* color, int bpp, uint8* red, ui
        }
 }
 
-static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, uint8* red, uint8* green, uint8* blue, uint8* alpha, HCLRCONV clrconv)
+static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, BYTE* red, BYTE* green, BYTE* blue, BYTE* alpha, HCLRCONV clrconv)
 {
        switch (bpp)
        {
@@ -277,10 +277,10 @@ static INLINE void freerdp_color_make_bgr(uint32* color, int bpp, uint8* red, ui
 
 uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
-       uint8 red = 0;
-       uint8 green = 0;
-       uint8 blue = 0;
-       uint8 alpha = 0xFF;
+       BYTE red = 0;
+       BYTE green = 0;
+       BYTE blue = 0;
+       BYTE alpha = 0xFF;
        uint32 dstColor = 0;
 
        freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
@@ -291,10 +291,10 @@ uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO
 
 uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
-       uint8 red = 0;
-       uint8 green = 0;
-       uint8 blue = 0;
-       uint8 alpha = 0xFF;
+       BYTE red = 0;
+       BYTE green = 0;
+       BYTE blue = 0;
+       BYTE alpha = 0xFF;
        uint32 dstColor = 0;
 
        freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
@@ -305,10 +305,10 @@ uint32 freerdp_color_convert_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO
 
 uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
-       uint8 red = 0;
-       uint8 green = 0;
-       uint8 blue = 0;
-       uint8 alpha = 0xFF;
+       BYTE red = 0;
+       BYTE green = 0;
+       BYTE blue = 0;
+       BYTE alpha = 0xFF;
        uint32 dstColor = 0;
 
        freerdp_color_split_rgb(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
@@ -319,10 +319,10 @@ uint32 freerdp_color_convert_rgb_bgr(uint32 srcColor, int srcBpp, int dstBpp, HC
 
 uint32 freerdp_color_convert_bgr_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
-       uint8 red = 0;
-       uint8 green = 0;
-       uint8 blue = 0;
-       uint8 alpha = 0xFF;
+       BYTE red = 0;
+       BYTE green = 0;
+       BYTE blue = 0;
+       BYTE alpha = 0xFF;
        uint32 dstColor = 0;
 
        freerdp_color_split_bgr(&srcColor, srcBpp, &red, &green, &blue, &alpha, clrconv);
@@ -355,21 +355,21 @@ uint32 freerdp_color_convert_var_bgr(uint32 srcColor, int srcBpp, int dstBpp, HC
                return freerdp_color_convert_rgb_bgr(srcColor, srcBpp, dstBpp, clrconv);
 }
 
-uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
+BYTE* freerdp_image_convert_8bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
        int i;
-       uint8 red;
-       uint8 green;
-       uint8 blue;
+       BYTE red;
+       BYTE green;
+       BYTE blue;
        uint32 pixel;
-       uint8 *src8;
-       uint16 *dst16;
+       BYTE *src8;
+       UINT16 *dst16;
        uint32 *dst32;
 
        if (dstBpp == 8)
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height);
+                       dstData = (BYTE*) malloc(width * height);
 
                memcpy(dstData, srcData, width * height);
                return dstData;
@@ -377,9 +377,9 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int
        else if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555))
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 2);
+                       dstData = (BYTE*) malloc(width * height * 2);
 
-               dst16 = (uint16 *) dstData;
+               dst16 = (UINT16 *) dstData;
                for (i = width * height; i > 0; i--)
                {
                        pixel = *srcData;
@@ -396,9 +396,9 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int
        else if (dstBpp == 16)
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 2);
+                       dstData = (BYTE*) malloc(width * height * 2);
 
-               dst16 = (uint16 *) dstData;
+               dst16 = (UINT16 *) dstData;
                for (i = width * height; i > 0; i--)
                {
                        pixel = *srcData;
@@ -415,9 +415,9 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int
        else if (dstBpp == 32)
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 4);
+                       dstData = (BYTE*) malloc(width * height * 4);
 
-               src8 = (uint8*) srcData;
+               src8 = (BYTE*) srcData;
                dst32 = (uint32*) dstData;
                for (i = width * height; i > 0; i--)
                {
@@ -436,21 +436,21 @@ uint8* freerdp_image_convert_8bpp(uint8* srcData, uint8* dstData, int width, int
        return srcData;
 }
 
-uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
+BYTE* freerdp_image_convert_15bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
        int i;
-       uint8 red;
-       uint8 green;
-       uint8 blue;
+       BYTE red;
+       BYTE green;
+       BYTE blue;
        uint32 pixel;
-       uint16 *src16;
-       uint16 *dst16;
+       UINT16 *src16;
+       UINT16 *dst16;
        uint32 *dst32;
 
        if (dstBpp == 15 || (dstBpp == 16 && clrconv->rgb555))
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 2);
+                       dstData = (BYTE*) malloc(width * height * 2);
 
                memcpy(dstData, srcData, width * height * 2);
 
@@ -459,9 +459,9 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in
        else if (dstBpp == 32)
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 4);
+                       dstData = (BYTE*) malloc(width * height * 4);
 
-               src16 = (uint16 *) srcData;
+               src16 = (UINT16 *) srcData;
                dst32 = (uint32 *) dstData;
                for (i = width * height; i > 0; i--)
                {
@@ -477,10 +477,10 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in
        else if (dstBpp == 16)
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 2);
+                       dstData = (BYTE*) malloc(width * height * 2);
 
-               src16 = (uint16 *) srcData;
-               dst16 = (uint16 *) dstData;
+               src16 = (UINT16 *) srcData;
+               dst16 = (UINT16 *) dstData;
                for (i = width * height; i > 0; i--)
                {
                        pixel = *src16;
@@ -497,7 +497,7 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in
        return srcData;
 }
 
-uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
+BYTE* freerdp_image_convert_16bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
        if (srcBpp == 15)
                return freerdp_image_convert_15bpp(srcData, dstData, width, height, srcBpp, dstBpp, clrconv);
@@ -505,14 +505,14 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in
        if (dstBpp == 16)
        {
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 2);
+                       dstData = (BYTE*) malloc(width * height * 2);
 
                if (clrconv->rgb555)
                {
                        int i;
-                       uint8 red, green, blue;
-                       uint16* src16 = (uint16 *) srcData;
-                       uint16* dst16 = (uint16 *) dstData;
+                       BYTE red, green, blue;
+                       UINT16* src16 = (UINT16 *) srcData;
+                       UINT16* dst16 = (UINT16 *) dstData;
 
                        for (i = width * height; i > 0; i--)
                        {
@@ -533,15 +533,15 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in
        else if (dstBpp == 24)
        {
                int i;
-               uint8 *dst8;
-               uint16 *src16;
-               uint8 red, green, blue;
+               BYTE *dst8;
+               UINT16 *src16;
+               BYTE red, green, blue;
 
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 3);
+                       dstData = (BYTE*) malloc(width * height * 3);
 
-               dst8 = (uint8*) dstData;
-               src16 = (uint16*) srcData;
+               dst8 = (BYTE*) dstData;
+               src16 = (UINT16*) srcData;
 
                for (i = width * height; i > 0; i--)
                {
@@ -567,14 +567,14 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in
        {
                int i;
                uint32 pixel;
-               uint16* src16;
+               UINT16* src16;
                uint32* dst32;
-               uint8 red, green, blue;
+               BYTE red, green, blue;
 
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 4);
+                       dstData = (BYTE*) malloc(width * height * 4);
 
-               src16 = (uint16*) srcData;
+               src16 = (UINT16*) srcData;
                dst32 = (uint32*) dstData;
 
                for (i = width * height; i > 0; i--)
@@ -592,15 +592,15 @@ uint8* freerdp_image_convert_16bpp(uint8* srcData, uint8* dstData, int width, in
        return srcData;
 }
 
-uint8* freerdp_image_convert_24bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
+BYTE* freerdp_image_convert_24bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
        int i;
 
        if (dstBpp == 32)
        {
-               uint8 *dstp;
+               BYTE *dstp;
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 4);
+                       dstData = (BYTE*) malloc(width * height * 4);
 
                dstp = dstData;
                for (i = width * height; i > 0; i--)
@@ -616,19 +616,19 @@ uint8* freerdp_image_convert_24bpp(uint8* srcData, uint8* dstData, int width, in
        return srcData;
 }
 
-uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
+BYTE* freerdp_image_convert_32bpp(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
        if (dstBpp == 16)
        {
                int index;
-               uint16 *dst16;
+               UINT16 *dst16;
                uint32 *src32;
-               uint8 red, green, blue;
+               BYTE red, green, blue;
 
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 2);
+                       dstData = (BYTE*) malloc(width * height * 2);
 
-               dst16 = (uint16*) dstData;
+               dst16 = (UINT16*) dstData;
                src32 = (uint32*) srcData;
 
                for (index = 0; index < width * height; index++)
@@ -642,12 +642,12 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in
        }
        else if (dstBpp == 24)
        {
-               uint8 *dstp;
+               BYTE *dstp;
                int index;
-               uint8 red, green, blue;
+               BYTE red, green, blue;
 
                if (dstData == NULL)
-                       dstData = (uint8*) malloc(width * height * 3);
+                       dstData = (BYTE*) malloc(width * height * 3);
 
                dstp = dstData;
                for (index = 0; index < width * height; index++)
@@ -678,10 +678,10 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in
                if (clrconv->alpha)
                {
                        int x, y;
-                       uint8 *dstp;
+                       BYTE *dstp;
 
                        if (dstData == NULL)
-                               dstData = (uint8*) malloc(width * height * 4);
+                               dstData = (BYTE*) malloc(width * height * 4);
 
                        memcpy(dstData, srcData, width * height * 4);
 
@@ -699,7 +699,7 @@ uint8* freerdp_image_convert_32bpp(uint8* srcData, uint8* dstData, int width, in
                else
                {
                        if (dstData == NULL)
-                               dstData = (uint8*) malloc(width * height * 4);
+                               dstData = (BYTE*) malloc(width * height * 4);
 
                        memcpy(dstData, srcData, width * height * 4);
                }
@@ -719,7 +719,7 @@ p_freerdp_image_convert freerdp_image_convert_[5] =
        freerdp_image_convert_32bpp
 };
 
-uint8* freerdp_image_convert(uint8* srcData, uint8* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
+BYTE* freerdp_image_convert(BYTE* srcData, BYTE* dstData, int width, int height, int srcBpp, int dstBpp, HCLRCONV clrconv)
 {
        p_freerdp_image_convert _p_freerdp_image_convert = freerdp_image_convert_[IBPP(srcBpp)];
 
@@ -729,12 +729,12 @@ uint8* freerdp_image_convert(uint8* srcData, uint8* dstData, int width, int heig
                return 0;
 }
 
-void   freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height)
+void   freerdp_bitmap_flip(BYTE * src, BYTE * dst, int scanLineSz, int height)
 {
        int i;
 
-       uint8 * bottomLine = dst + (scanLineSz * (height - 1));
-       uint8 * topLine = src;
+       BYTE * bottomLine = dst + (scanLineSz * (height - 1));
+       BYTE * topLine = src;
 
        /* Special processing if called for flip-in-place. */
        if (src == dst)
@@ -745,7 +745,7 @@ void   freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height)
                 * fixed size buffers (of max scanline size (or adaptative?) )
                 * -- would be much faster).
                 */
-               uint8 * tmpBfr = malloc(scanLineSz);
+               BYTE * tmpBfr = malloc(scanLineSz);
                int half = height / 2;
                /* Flip buffer in place by line permutations through the temp
                 * scan line buffer.
@@ -781,23 +781,23 @@ void   freerdp_bitmap_flip(uint8 * src, uint8 * dst, int scanLineSz, int height)
 
 }
 
-uint8* freerdp_image_flip(uint8* srcData, uint8* dstData, int width, int height, int bpp)
+BYTE* freerdp_image_flip(BYTE* srcData, BYTE* dstData, int width, int height, int bpp)
 {
        int scanline;
 
        scanline = width * ((bpp + 7) / 8);
 
        if (dstData == NULL)
-               dstData = (uint8*) malloc(width * height * ((bpp + 7) / 8));
+               dstData = (BYTE*) malloc(width * height * ((bpp + 7) / 8));
 
        freerdp_bitmap_flip(srcData, dstData, scanline, height);
        return dstData;
 }
 
-uint8* freerdp_icon_convert(uint8* srcData, uint8* dstData, uint8* mask, int width, int height, int bpp, HCLRCONV clrconv)
+BYTE* freerdp_icon_convert(BYTE* srcData, BYTE* dstData, BYTE* mask, int width, int height, int bpp, HCLRCONV clrconv)
 {
-       uint8* data;
-       uint8 bmask;
+       BYTE* data;
+       BYTE bmask;
        uint32* icon;
        int x, y, bit;
        int maskIndex;
@@ -847,12 +847,12 @@ uint8* freerdp_icon_convert(uint8* srcData, uint8* dstData, uint8* mask, int wid
        return dstData;
 }
 
-uint8* freerdp_glyph_convert(int width, int height, uint8* data)
+BYTE* freerdp_glyph_convert(int width, int height, BYTE* data)
 {
        int x, y;
-       uint8 *srcp;
-       uint8 *dstp;
-       uint8 *dstData;
+       BYTE *srcp;
+       BYTE *dstp;
+       BYTE *dstData;
        int scanline;
 
        /*
@@ -862,7 +862,7 @@ uint8* freerdp_glyph_convert(int width, int height, uint8* data)
         */
 
        scanline = (width + 7) / 8;
-       dstData = (uint8*) malloc(width * height);
+       dstData = (BYTE*) malloc(width * height);
        memset(dstData, 0, width * height);
        dstp = dstData;
 
@@ -884,16 +884,16 @@ uint8* freerdp_glyph_convert(int width, int height, uint8* data)
        return dstData;
 }
 
-uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv)
+BYTE* freerdp_mono_image_convert(BYTE* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv)
 {
        int index;
-       uint16* dst16;
+       UINT16* dst16;
        uint32* dst32;
-       uint8* dstData;
-       uint8 bitMask;
+       BYTE* dstData;
+       BYTE bitMask;
        int bitIndex;
-       uint8 redBg, greenBg, blueBg;
-       uint8 redFg, greenFg, blueFg;
+       BYTE redBg, greenBg, blueBg;
+       BYTE redFg, greenFg, blueFg;
 
        switch (srcBpp)
        {
@@ -946,8 +946,8 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src
                        }
                }
 
-               dstData = (uint8*) malloc(width * height * 2);
-               dst16 = (uint16*) dstData;
+               dstData = (BYTE*) malloc(width * height * 2);
+               dst16 = (UINT16*) dstData;
 
                for (index = height; index > 0; index--)
                {
@@ -971,7 +971,7 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src
        }
        else if (dstBpp == 32)
        {
-               dstData = (uint8*) malloc(width * height * 4);
+               dstData = (BYTE*) malloc(width * height * 4);
                dst32 = (uint32*) dstData;
 
                for (index = height; index > 0; index--)
@@ -999,7 +999,7 @@ uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int src
        return srcData;
 }
 
-void freerdp_alpha_cursor_convert(uint8* alphaData, uint8* xorMask, uint8* andMask, int width, int height, int bpp, HCLRCONV clrconv)
+void freerdp_alpha_cursor_convert(BYTE* alphaData, BYTE* xorMask, BYTE* andMask, int width, int height, int bpp, HCLRCONV clrconv)
 {
        int xpixel;
        int apixel;
@@ -1034,11 +1034,11 @@ void freerdp_alpha_cursor_convert(uint8* alphaData, uint8* xorMask, uint8* andMa
        }
 }
 
-void freerdp_image_swap_color_order(uint8* data, int width, int height)
+void freerdp_image_swap_color_order(BYTE* data, int width, int height)
 {
        int x, y;
        uint32* pixel;
-       uint8 a, r, g, b;
+       BYTE a, r, g, b;
 
        pixel = (uint32*) data;
 
index b6d702a..0d56483 100644 (file)
@@ -22,8 +22,8 @@
 /**
  * Write a foreground/background image to a destination buffer.
  */
-static uint8* WRITEFGBGIMAGE(uint8* pbDest, uint32 rowDelta,
-       uint8 bitmask, PIXEL fgPel, uint32 cBits)
+static BYTE* WRITEFGBGIMAGE(BYTE* pbDest, uint32 rowDelta,
+       BYTE bitmask, PIXEL fgPel, uint32 cBits)
 {
        PIXEL xorPixel;
 
@@ -142,7 +142,7 @@ static uint8* WRITEFGBGIMAGE(uint8* pbDest, uint32 rowDelta,
  * Write a foreground/background image to a destination buffer
  * for the first line of compressed data.
  */
-static uint8* WRITEFIRSTLINEFGBGIMAGE(uint8* pbDest, uint8 bitmask,
+static BYTE* WRITEFIRSTLINEFGBGIMAGE(BYTE* pbDest, BYTE bitmask,
        PIXEL fgPel, uint32 cBits)
 {
        if (bitmask & g_MaskBit0)
@@ -251,19 +251,19 @@ static uint8* WRITEFIRSTLINEFGBGIMAGE(uint8* pbDest, uint8 bitmask,
 /**
  * Decompress an RLE compressed bitmap.
  */
-void RLEDECOMPRESS(uint8* pbSrcBuffer, uint32 cbSrcBuffer, uint8* pbDestBuffer,
+void RLEDECOMPRESS(BYTE* pbSrcBuffer, uint32 cbSrcBuffer, BYTE* pbDestBuffer,
        uint32 rowDelta, uint32 width, uint32 height)
 {
-       uint8* pbSrc = pbSrcBuffer;
-       uint8* pbEnd = pbSrcBuffer + cbSrcBuffer;
-       uint8* pbDest = pbDestBuffer;
+       BYTE* pbSrc = pbSrcBuffer;
+       BYTE* pbEnd = pbSrcBuffer + cbSrcBuffer;
+       BYTE* pbDest = pbDestBuffer;
 
        PIXEL temp;
        PIXEL fgPel = WHITE_PIXEL;
        BOOL fInsertFgPel = FALSE;
        BOOL fFirstLine = TRUE;
 
-       uint8 bitmask;
+       BYTE bitmask;
        PIXEL pixelA, pixelB;
 
        uint32 runLength;
index ad00b75..ddd7c3e 100644 (file)
@@ -124,7 +124,7 @@ do_decompress(char* comp_data, int comp_data_bytes,
 
 /* jpeg decompress */
 BOOL
-jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, int bpp)
+jpeg_decompress(BYTE * input, BYTE * output, int width, int height, int size, int bpp)
 {
        int lwidth;
        int lheight;
@@ -151,7 +151,7 @@ jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size,
 #else
 
 BOOL
-jpeg_decompress(uint8 * input, uint8 * output, int width, int height, int size, int bpp)
+jpeg_decompress(BYTE * input, BYTE * output, int width, int height, int size, int bpp)
 {
        return 0;
 }
index f6f6f66..02b75c0 100644 (file)
 
 #include <freerdp/codec/mppc_dec.h>
 
-static uint8 HuffLenLEC[] = {
+static BYTE HuffLenLEC[] = {
 0x6, 0x6, 0x6, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x9, 0x8, 0x9, 0x9, 0x9, 0x9, 0x8, 0x8, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x8, 0x9, 0x9, 0xa, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0x9, 0xa, 0x9, 0xa, 0x9, 0xa, 0x9, 0x9, 0x9, 0xa, 0xa, 0x9, 0xa, 0x9, 0x9, 0x8, 0x9, 0x9, 0x9, 0x9, 0xa, 0xa, 0xa, 0x9, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x8, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0x7, 0x9, 0x9, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xd, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xb, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0xa, 0x9, 0xa, 0x8, 0x9, 0x9, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0xa, 0xa, 0xa, 0x9, 0x9, 0x8, 0x7, 0xd, 0xd, 0x7, 0x7, 0xa, 0x7, 0x7, 0x6, 0x6, 0x6, 0x6, 0x5, 0x6, 0x6, 0x6, 0x5, 0x6, 0x5, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x8, 0x5, 0x6, 0x7, 0x7 }; 
 
-static uint16 HuffIndexLEC[512] = { 
+static UINT16 HuffIndexLEC[512] = { 
 0x007b, 0xff1f, 0xff0d, 0xfe27, 0xfe00, 0xff05, 0xff17, 0xfe68, 0x00c5, 0xfe07, 0xff13, 0xfec0, 0xff08, 0xfe18, 0xff1b, 0xfeb3, 0xfe03, 0x00a2, 0xfe42, 0xff10, 0xfe0b, 0xfe02, 0xfe91, 0xff19, 0xfe80, 0x00e9, 0xfe3a, 0xff15, 0xfe12, 0x0057, 0xfed7, 0xff1d, 0xff0e, 0xfe35, 0xfe69, 0xff22, 0xff18, 0xfe7a, 0xfe01, 0xff23, 0xff14, 0xfef4, 0xfeb4, 0xfe09, 0xff1c, 0xfec4, 0xff09, 0xfe60, 0xfe70, 0xff12, 0xfe05, 0xfe92, 0xfea1, 0xff1a, 0xfe0f, 0xff07, 0xfe56, 0xff16, 0xff02, 0xfed8, 0xfee8, 0xff1e, 0xfe1d, 0x003b, 0xffff, 0xff06, 0xffff, 0xfe71, 0xfe89, 0xffff, 0xffff, 0xfe2c, 0xfe2b, 0xfe20, 0xffff, 0xfebb, 0xfecf, 0xfe08, 0xffff, 0xfee0, 0xfe0d, 0xffff, 0xfe99, 0xffff, 0xfe04, 0xfeaa, 0xfe49, 0xffff, 0xfe17, 0xfe61, 0xfedf, 0xffff, 0xfeff, 0xfef6, 0xfe4c, 0xffff, 0xffff, 0xfe87, 0xffff, 0xff24, 0xffff, 0xfe3c, 0xfe72, 0xffff, 0xffff, 0xfece, 0xffff, 0xfefe, 0xffff, 0xfe23, 0xfebc, 0xfe0a, 0xfea9, 0xffff, 0xfe11, 0xffff, 0xfe82, 0xffff, 0xfe06, 0xfe9a, 0xfef5, 0xffff, 0xfe22, 0xfe4d, 0xfe5f, 0xffff, 0xff03, 0xfee1, 0xffff, 0xfeca, 0xfecc, 0xffff, 0xfe19, 0xffff, 0xfeb7, 0xffff, 0xffff, 0xfe83, 0xfe29, 0xffff, 0xffff, 0xffff, 0xfe6c, 0xffff, 0xfeed, 0xffff, 0xffff, 0xfe46, 0xfe5c, 0xfe15, 0xffff, 0xfedb, 0xfea6, 0xffff, 0xffff, 0xfe44, 0xffff, 0xfe0c, 0xffff, 0xfe95, 0xfefc, 0xffff, 0xffff, 0xfeb8, 0x16c9, 0xffff, 0xfef0, 0xffff, 0xfe38, 0xffff, 0xffff, 0xfe6d, 0xfe7e, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe5b, 0xfedc, 0xffff, 0xffff, 0xfeec, 0xfe47, 0xfe1f, 0xffff, 0xfe7f, 0xfe96, 0xffff, 0xffff, 0xfea5, 0xffff, 0xfe10, 0xfe40, 0xfe32, 0xfebf, 0xffff, 0xffff, 0xfed4, 0xfef1, 0xffff, 0xffff, 0xffff, 0xfe75, 0xffff, 0xffff, 0xfe8d, 0xfe31, 0xffff, 0xfe65, 0xfe1b, 0xffff, 0xfee4, 0xfefb, 0xffff, 0xffff, 0xfe52, 0xffff, 0xfe0e, 0xffff, 0xfe9d, 0xfeaf, 0xffff, 0xffff, 0xfe51, 0xfed3, 0xffff, 0xff20, 0xffff, 0xfe2f, 0xffff, 0xffff, 0xfec1, 0xfe8c, 0xffff, 0xffff, 0xffff, 0xfe3f, 0xffff, 0xffff, 0xfe76, 0xffff, 0xfefa, 0xfe53, 0xfe25, 0xffff, 0xfe64, 0xfee5, 0xffff, 0xffff, 0xfeae, 0xffff, 0xfe13, 0xffff, 0xfe88, 0xfe9e, 0xffff, 0xfe43, 0xffff, 0xffff, 0xfea4, 0xfe93, 0xffff, 0xffff, 0xffff, 0xfe3d, 0xffff, 0xffff, 0xfeeb, 0xfed9, 0xffff, 0xfe14, 0xfe5a, 0xffff, 0xfe28, 0xfe7d, 0xffff, 0xffff, 0xfe6a, 0xffff, 0xffff, 0xff01, 0xfec6, 0xfec8, 0xffff, 0xffff, 0xfeb5, 0xffff, 0xffff, 0xffff, 0xfe94, 0xfe78, 0xffff, 0xffff, 0xffff, 0xfea3, 0xffff, 0xffff, 0xfeda, 0xfe58, 0xffff, 0xfe1e, 0xfe45, 0xfeea, 0xffff, 0xfe6b, 0xffff, 0xffff, 0xfe37, 0xffff, 0xffff, 0xffff, 0xfe7c, 0xfeb6, 0xffff, 0xffff, 0xfef8, 0xffff, 0xffff, 0xffff, 0xfec7, 0xfe9b, 0xffff, 0xffff, 0xffff, 0xfe50, 0xffff, 0xffff, 0xfead, 0xfee2, 0xffff, 0xfe1a, 0xfe63, 0xfe4e, 0xffff, 0xffff, 0xfef9, 0xffff, 0xfe73, 0xffff, 0xffff, 0xffff, 0xfe30, 0xfe8b, 0xffff, 0xffff, 0xfebd, 0xfe2e, 0x0100, 0xffff, 0xfeee, 0xfed2, 0xffff, 0xffff, 0xffff, 0xfeac, 0xffff, 0xffff, 0xfe9c, 0xfe84, 0xffff, 0xfe24, 0xfe4f, 0xfef7, 0xffff, 0xffff, 0xfee3, 0xfe62, 0xffff, 0xffff, 0xffff, 0xffff, 0xfe8a, 0xfe74, 0xffff, 0xffff, 0xfe3e, 0xffff, 0xffff, 0xffff, 0xfed1, 0xfebe, 0xffff, 0xffff, 0xfe2d, 0xffff, 0xfe4a, 0xfef3, 0xffff, 0xffff, 0xfedd, 0xfe5e, 0xfe16, 0xffff, 0xfe48, 0xfea8, 0xffff, 0xfeab, 0xfe97, 0xffff, 0xffff, 0xfed0, 0xffff, 0xffff, 0xfecd, 0xfeb9, 0xffff, 0xffff, 0xffff, 0xfe2a, 0xffff, 0xffff, 0xfe86, 0xfe6e, 0xffff, 0xffff, 0xffff, 0xfede, 0xffff, 0xffff, 0xfe5d, 0xfe4b, 0xfe21, 0xffff, 0xfeef, 0xfe98, 0xffff, 0xffff, 0xfe81, 0xffff, 0xffff, 0xffff, 0xfea7, 0xffff, 0xfeba, 0xfefd, 0xffff, 0xffff, 0xffff, 0xfecb, 0xffff, 0xffff, 0xfe6f, 0xfe39, 0xffff, 0xffff, 0xffff, 0xfe85, 0xffff, 0x010c, 0xfee6, 0xfe67, 0xfe1c, 0xffff, 0xfe54, 0xfeb2, 0xffff, 0xffff, 0xfe9f, 0xffff, 0xffff, 0xffff, 0xfe59, 0xfeb1, 0xffff, 0xfec2, 0xffff, 0xffff, 0xfe36, 0xfef2, 0xffff, 0xffff, 0xfed6, 0xfe77, 0xffff, 0xffff, 0xffff, 0xfe33, 0xffff, 0xffff, 0xfe8f, 0xfe55, 0xfe26, 0x010a, 0xff04, 0xfee7, 0xffff, 0x0121, 0xfe66, 0xffff, 0xffff, 0xffff, 0xfeb0, 0xfea0, 0xffff, 0x010f, 0xfe90, 0xffff, 0xffff, 0xfed5, 0xffff, 0xffff, 0xfec3, 0xfe34, 0xffff, 0xffff, 0xffff, 0xfe8e, 0xffff, 0x0111, 0xfe79, 0xfe41, 0x010b };
 
-static uint16 LECHTab[] = {511, 0, 508, 448, 494, 347, 486, 482};
+static UINT16 LECHTab[] = {511, 0, 508, 448, 494, 347, 486, 482};
 
-static uint8 HuffLenLOM[] = {
+static BYTE HuffLenLOM[] = {
 0x4, 0x2, 0x3, 0x4, 0x3, 0x4, 0x4, 0x5, 0x4, 0x5, 0x5, 0x6, 0x6, 0x7, 0x7, 0x8, 0x7, 0x8, 0x8, 0x9, 0x9, 0x8, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9, 0x9 };
 
-static uint16 HuffIndexLOM[] = {
+static UINT16 HuffIndexLOM[] = {
 0xfe1, 0xfe0, 0xfe2, 0xfe8, 0xe, 0xfe5, 0xfe4, 0xfea, 0xff1, 0xfe3, 0x15, 0xfe7, 0xfef, 0x46, 0xff0, 0xfed, 0xfff, 0xff7, 0xffb, 0x19, 0xffd, 0xff4, 0x12c, 0xfeb, 0xffe, 0xff6, 0xffa, 0x89, 0xffc, 0xff3, 0xff8, 0xff2 };
 
-static uint8 LOMHTab[] = {0, 4, 10, 19};
+static BYTE LOMHTab[] = {0, 4, 10, 19};
 
-static uint8 CopyOffsetBitsLUT[] = {
+static BYTE CopyOffsetBitsLUT[] = {
 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15 };
 
 static uint32 CopyOffsetBaseLUT[] = {
 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 32769, 49153, 65537 };
 
-static uint8 LOMBitsLUT[] = {
+static BYTE LOMBitsLUT[] = {
 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 6, 6, 8, 8, 14, 14 };
 
-static uint16 LOMBaseLUT[] = {
+static UINT16 LOMBaseLUT[] = {
 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 22, 26, 30, 34, 42, 50, 58, 66, 82, 98, 114, 130, 194, 258, 514, 2, 2 };
 
-uint16 LEChash(uint16 key)
+UINT16 LEChash(UINT16 key)
 {
        return ((key & 0x1ff) ^ (key  >> 9) ^ (key >> 4) ^ (key >> 7));
 }
 
-uint16 LOMhash(uint16 key)
+UINT16 LOMhash(UINT16 key)
 {
        return ((key & 0x1f) ^ (key  >> 5) ^ (key >> 9));
 }
                        
-uint16 miniLEChash(uint16 key)
+UINT16 miniLEChash(UINT16 key)
 {
-       uint16 h;
+       UINT16 h;
        h = ((((key >> 8) ^ (key & 0xff)) >> 2) & 0xf);
        if(key >> 9)
                h = ~h;
        return (h % 12);
 }
 
-uint8 miniLOMhash(uint16 key)
+BYTE miniLOMhash(UINT16 key)
 {
-       uint8 h;
+       BYTE h;
        h = (key >> 4) & 0xf;
        return ((h ^ (h >> 2) ^ (h >> 3)) & 0x3);
 }
 
-uint16 getLECindex(uint16 huff)
+UINT16 getLECindex(UINT16 huff)
 {
-       uint16 h = HuffIndexLEC[LEChash(huff)];
+       UINT16 h = HuffIndexLEC[LEChash(huff)];
        if((h ^ huff) >> 9)
                return h & 0x1ff;
        else
                return HuffIndexLEC[LECHTab[miniLEChash(huff)]];
 }
 
-uint16 getLOMindex(uint16 huff)
+UINT16 getLOMindex(UINT16 huff)
 {
-       uint16 h = HuffIndexLOM[LOMhash(huff)];
+       UINT16 h = HuffIndexLOM[LOMhash(huff)];
        if((h ^ huff) >> 5)
        {       
                return h & 0x1f;
@@ -124,11 +124,11 @@ uint32 transposebits(uint32 x)
                *((uint32*)(_s)) = (*((uint32*)(_s)) << 16) | (_x); } while(0)
 
 #define cache_swap(_s, _i) do { \
-               uint16 t = *(_s); \
+               UINT16 t = *(_s); \
                *(_s) = *((_s) + (_i)); \
                *((_s) + (_i)) = t; } while(0)
 
-int decompress_rdp(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
+int decompress_rdp(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
 {
        int type = ctype & 0x0f;
 
@@ -169,16 +169,16 @@ int decompress_rdp(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, ui
  * @return        True on success, False on failure
  */
 
-int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
+int decompress_rdp_4(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
 {
-       uint8*    history_buf;    /* uncompressed data goes here */
-       uint8*    history_ptr;    /* points to next free slot in history_buf */
+       BYTE*    history_buf;    /* uncompressed data goes here */
+       BYTE*    history_ptr;    /* points to next free slot in history_buf */
        uint32    d32;            /* we process 4 compressed bytes at a time */
-       uint16    copy_offset;    /* location to copy data from */
-       uint16    lom;            /* length of match */
-       uint8*    src_ptr;        /* used while copying compressed data */
-       uint8*    cptr;           /* points to next byte in cbuf */
-       uint8     cur_byte;       /* last byte fetched from cbuf */
+       UINT16    copy_offset;    /* location to copy data from */
+       UINT16    lom;            /* length of match */
+       BYTE*    src_ptr;        /* used while copying compressed data */
+       BYTE*    cptr;           /* points to next byte in cbuf */
+       BYTE     cur_byte;       /* last byte fetched from cbuf */
        int       bits_left;      /* bits left in d34 for processing */
        int       cur_bits_left;  /* bits left in cur_byte for processing */
        int       tmp;
@@ -599,16 +599,16 @@ int decompress_rdp_4(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype,
  * @return        True on success, False on failure
  */
 
-int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
+int decompress_rdp_5(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
 {
-       uint8*    history_buf;    /* uncompressed data goes here */
-       uint8*    history_ptr;    /* points to next free slot in bistory_buf */
+       BYTE*    history_buf;    /* uncompressed data goes here */
+       BYTE*    history_ptr;    /* points to next free slot in bistory_buf */
        uint32    d32;            /* we process 4 compressed bytes at a time */
-       uint16    copy_offset;    /* location to copy data from */
-       uint16    lom;            /* length of match */
-       uint8*    src_ptr;        /* used while copying compressed data */
-       uint8*    cptr;           /* points to next byte in cbuf */
-       uint8     cur_byte;       /* last byte fetched from cbuf */
+       UINT16    copy_offset;    /* location to copy data from */
+       UINT16    lom;            /* length of match */
+       BYTE*    src_ptr;        /* used while copying compressed data */
+       BYTE*    cptr;           /* points to next byte in cbuf */
+       BYTE     cur_byte;       /* last byte fetched from cbuf */
        int       bits_left;      /* bits left in d32 for processing */
        int       cur_bits_left;  /* bits left in cur_byte for processing */
        int       tmp;
@@ -1063,18 +1063,18 @@ int decompress_rdp_5(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype,
  * @return        True on success, False on failure
  */
 
-int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
+int decompress_rdp_6(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
 {
-       uint8*    history_buf;    /* uncompressed data goes here */
-       uint16*   offset_cache;   /* Copy Offset cache */
-       uint8*    history_ptr;    /* points to next free slot in bistory_buf */
+       BYTE*    history_buf;    /* uncompressed data goes here */
+       UINT16*   offset_cache;   /* Copy Offset cache */
+       BYTE*    history_ptr;    /* points to next free slot in bistory_buf */
        uint32    d32;            /* we process 4 compressed bytes at a time */
-       uint16    copy_offset;    /* location to copy data from */
-       uint16    lom;            /* length of match */
-       uint16    LUTIndex;       /* LookUp table Index */
-       uint8*    src_ptr;        /* used while copying compressed data */
-       uint8*    cptr;           /* points to next byte in cbuf */
-       uint8     cur_byte;       /* last byte fetched from cbuf */
+       UINT16    copy_offset;    /* location to copy data from */
+       UINT16    lom;            /* length of match */
+       UINT16    LUTIndex;       /* LookUp table Index */
+       BYTE*    src_ptr;        /* used while copying compressed data */
+       BYTE*    cptr;           /* points to next byte in cbuf */
+       BYTE     cur_byte;       /* last byte fetched from cbuf */
        int       bits_left;      /* bits left in d32 for processing */
        int       cur_bits_left;  /* bits left in cur_byte for processing */
        int       tmp, i;
@@ -1180,7 +1180,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype,
                d32 <<= i;
                bits_left -= i;
                if(i32 < 256)
-                       *history_ptr++ = (uint8)i32;
+                       *history_ptr++ = (BYTE)i32;
                else if(i32 > 256 && i32 < 289)
                {
                        LUTIndex = i32 - 257;
@@ -1398,7 +1398,7 @@ int decompress_rdp_6(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype,
  * @return        True on success, False on failure
  */
 
-int decompress_rdp_61(struct rdp_mppc_dec* dec, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
+int decompress_rdp_61(struct rdp_mppc_dec* dec, BYTE* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
 {
        return FALSE;
 }
@@ -1421,8 +1421,8 @@ struct rdp_mppc_dec* mppc_dec_new(void)
                return NULL;
        }
 
-       ptr->history_buf = (uint8 *) xzalloc(RDP6_HISTORY_BUF_SIZE);
-       ptr->offset_cache = (uint16 *) xzalloc(RDP6_OFFSET_CACHE_SIZE);
+       ptr->history_buf = (BYTE *) xzalloc(RDP6_HISTORY_BUF_SIZE);
+       ptr->offset_cache = (UINT16 *) xzalloc(RDP6_OFFSET_CACHE_SIZE);
        if (!ptr->history_buf)
        {
                printf("mppc_new(): system out of memory\n");
index 59cbc25..14f94e0 100644 (file)
@@ -41,7 +41,7 @@
 #define CRC(crcval, newchar) crcval = (crcval >> 8) ^ crc_table[(crcval ^ newchar) & 0x00ff]
 
 /* CRC16 defs */
-static const uint16 crc_table[256] =
+static const UINT16 crc_table[256] =
 {
        0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
        0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
@@ -462,7 +462,7 @@ struct rdp_mppc_enc* mppc_enc_new(int protocol_type)
                return NULL;
        }
        enc->outputBuffer = enc->outputBufferPlus + 64;
-       enc->hash_table = (uint16*) xzalloc(enc->buf_len * 2);
+       enc->hash_table = (UINT16*) xzalloc(enc->buf_len * 2);
        if (enc->hash_table == NULL)
        {
                free(enc->historyBuffer);
@@ -499,7 +499,7 @@ void mppc_enc_free(struct rdp_mppc_enc* enc)
  * @return  TRUE on success, FALSE on failure
  */
 
-BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len)
+BOOL compress_rdp(struct rdp_mppc_enc* enc, BYTE* srcData, int len)
 {
        if ((enc == NULL) || (srcData == NULL) || (len <= 0) || (len > enc->buf_len))
                return FALSE;
@@ -525,7 +525,7 @@ BOOL compress_rdp(struct rdp_mppc_enc* enc, uint8* srcData, int len)
  * @return  TRUE on success, FALSE on failure
  */
 
-BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len)
+BOOL compress_rdp_4(struct rdp_mppc_enc* enc, BYTE* srcData, int len)
 {
        /* RDP 4.0 encoding not yet implemented */
        return FALSE;
@@ -541,7 +541,7 @@ BOOL compress_rdp_4(struct rdp_mppc_enc* enc, uint8* srcData, int len)
  * @return  TRUE on success, FALSE on failure
  */
 
-BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len)
+BOOL compress_rdp_5(struct rdp_mppc_enc* enc, BYTE* srcData, int len)
 {
        char* outputBuffer;     /* points to enc->outputBuffer */
        char* hptr_end;         /* points to end of history data */
@@ -554,20 +554,20 @@ BOOL compress_rdp_5(struct rdp_mppc_enc* enc, uint8* srcData, int len)
        uint32 copy_offset;     /* pattern match starts here... */
        uint32 lom;             /* ...and matches this many bytes */
        int last_crc_index;     /* don't compute CRC beyond this index */
-       uint16 *hash_table;     /* hash table for pattern matching */
+       UINT16 *hash_table;     /* hash table for pattern matching */
 
        uint32 i;
        uint32 j;
        uint32 k;
        uint32 x;
-       uint8  data;
-       uint16 data16;
+       BYTE  data;
+       UINT16 data16;
        uint32 historyOffset;
-       uint16 crc;
+       UINT16 crc;
        uint32 ctr;
        uint32 saved_ctr;
        uint32 data_end;
-       uint8 byte_val;
+       BYTE byte_val;
 
        crc = 0;
        opb_index = 0;
index 05cad27..1c319b2 100644 (file)
 
 static void nsc_decode(NSC_CONTEXT* context)
 {
-       uint16 x;
-       uint16 y;
-       uint16 rw;
-       uint8 shift;
-       uint8* yplane;
-       uint8* coplane;
-       uint8* cgplane;
-       uint8* aplane;
-       sint16 y_val;
-       sint16 co_val;
-       sint16 cg_val;
-       sint16 r_val;
-       sint16 g_val;
-       sint16 b_val;
-       uint8* bmpdata;
+       UINT16 x;
+       UINT16 y;
+       UINT16 rw;
+       BYTE shift;
+       BYTE* yplane;
+       BYTE* coplane;
+       BYTE* cgplane;
+       BYTE* aplane;
+       INT16 y_val;
+       INT16 co_val;
+       INT16 cg_val;
+       INT16 r_val;
+       INT16 g_val;
+       INT16 b_val;
+       BYTE* bmpdata;
 
        bmpdata = context->bmpdata;
        rw = ROUND_UP_TO(context->width, 8);
@@ -82,9 +82,9 @@ static void nsc_decode(NSC_CONTEXT* context)
                aplane = context->priv->plane_buf[3] + y * context->width; /* A */
                for (x = 0; x < context->width; x++)
                {
-                       y_val = (sint16) *yplane;
-                       co_val = (sint16) (sint8) (*coplane << shift);
-                       cg_val = (sint16) (sint8) (*cgplane << shift);
+                       y_val = (INT16) *yplane;
+                       co_val = (INT16) (INT8) (*coplane << shift);
+                       cg_val = (INT16) (INT8) (*cgplane << shift);
                        r_val = y_val + co_val - cg_val;
                        g_val = y_val + cg_val;
                        b_val = y_val - co_val - cg_val;
@@ -100,11 +100,11 @@ static void nsc_decode(NSC_CONTEXT* context)
        }
 }
 
-static void nsc_rle_decode(uint8* in, uint8* out, uint32 origsz)
+static void nsc_rle_decode(BYTE* in, BYTE* out, uint32 origsz)
 {
        uint32 len;
        uint32 left;
-       uint8 value;
+       BYTE value;
 
        left = origsz;
        while (left > 4)
@@ -146,8 +146,8 @@ static void nsc_rle_decode(uint8* in, uint8* out, uint32 origsz)
 
 static void nsc_rle_decompress_data(NSC_CONTEXT* context)
 {
-       uint16 i;
-       uint8* rle;
+       UINT16 i;
+       BYTE* rle;
        uint32 origsize;
        uint32 planesize;
 
@@ -176,8 +176,8 @@ static void nsc_stream_initialize(NSC_CONTEXT* context, STREAM* s)
        for (i = 0; i < 4; i++)
                stream_read_uint32(s, context->nsc_stream.PlaneByteCount[i]);
 
-       stream_read_uint8(s, context->nsc_stream.ColorLossLevel);
-       stream_read_uint8(s, context->nsc_stream.ChromaSubSamplingLevel);
+       stream_read_BYTE(s, context->nsc_stream.ColorLossLevel);
+       stream_read_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel);
        stream_seek(s, 2);
 
        context->nsc_stream.Planes = stream_get_tail(s);
@@ -210,7 +210,7 @@ static void nsc_context_initialize(NSC_CONTEXT* context, STREAM* s)
        if (length > context->priv->plane_buf_length)
        {
                for (i = 0; i < 4; i++)
-                       context->priv->plane_buf[i] = (uint8*) realloc(context->priv->plane_buf[i], length);
+                       context->priv->plane_buf[i] = (BYTE*) realloc(context->priv->plane_buf[i], length);
                context->priv->plane_buf_length = length;
        }
 
@@ -316,8 +316,8 @@ void nsc_context_set_pixel_format(NSC_CONTEXT* context, RDP_PIXEL_FORMAT pixel_f
        }
 }
 
-void nsc_process_message(NSC_CONTEXT* context, uint16 bpp,
-       uint16 width, uint16 height, uint8* data, uint32 length)
+void nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
+       UINT16 width, UINT16 height, BYTE* data, uint32 length)
 {
        STREAM* s;
 
index d8e7ce6..5e8957f 100644 (file)
@@ -48,7 +48,7 @@ static void nsc_context_initialize_encode(NSC_CONTEXT* context)
        if (length > context->priv->plane_buf_length)
        {
                for (i = 0; i < 5; i++)
-                       context->priv->plane_buf[i] = (uint8*) realloc(context->priv->plane_buf[i], length);
+                       context->priv->plane_buf[i] = (BYTE*) realloc(context->priv->plane_buf[i], length);
                context->priv->plane_buf_length = length;
        }
 
@@ -68,21 +68,21 @@ static void nsc_context_initialize_encode(NSC_CONTEXT* context)
        }
 }
 
-static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int rowstride)
+static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride)
 {
-       uint16 x;
-       uint16 y;
-       uint16 rw;
-       uint8 ccl;
-       uint8* src;
-       uint8* yplane;
-       uint8* coplane;
-       uint8* cgplane;
-       uint8* aplane;
-       sint16 r_val;
-       sint16 g_val;
-       sint16 b_val;
-       uint8 a_val;
+       UINT16 x;
+       UINT16 y;
+       UINT16 rw;
+       BYTE ccl;
+       BYTE* src;
+       BYTE* yplane;
+       BYTE* coplane;
+       BYTE* cgplane;
+       BYTE* aplane;
+       INT16 r_val;
+       INT16 g_val;
+       INT16 b_val;
+       BYTE a_val;
        uint32 tempWidth;
        uint32 tempHeight;
 
@@ -131,23 +131,23 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int
                                        a_val = 0xFF;
                                        break;
                                case RDP_PIXEL_FORMAT_B5G6R5_LE:
-                                       b_val = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
-                                       g_val = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
-                                       r_val = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
+                                       b_val = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
+                                       g_val = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
+                                       r_val = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
                                        a_val = 0xFF;
                                        src += 2;
                                        break;
                                case RDP_PIXEL_FORMAT_R5G6B5_LE:
-                                       r_val = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
-                                       g_val = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
-                                       b_val = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
+                                       r_val = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
+                                       g_val = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
+                                       b_val = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
                                        a_val = 0xFF;
                                        src += 2;
                                        break;
                                case RDP_PIXEL_FORMAT_P4_PLANER:
                                        {
                                                int shift;
-                                               uint8 idx;
+                                               BYTE idx;
 
                                                shift = (7 - (x % 8));
                                                idx = ((*src) >> shift) & 1;
@@ -155,9 +155,9 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int
                                                idx |= (((*(src + 2)) >> shift) & 1) << 2;
                                                idx |= (((*(src + 3)) >> shift) & 1) << 3;
                                                idx *= 3;
-                                               r_val = (sint16) context->palette[idx];
-                                               g_val = (sint16) context->palette[idx + 1];
-                                               b_val = (sint16) context->palette[idx + 2];
+                                               r_val = (INT16) context->palette[idx];
+                                               g_val = (INT16) context->palette[idx + 1];
+                                               b_val = (INT16) context->palette[idx + 2];
                                                if (shift == 0)
                                                        src += 4;
                                        }
@@ -167,9 +167,9 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int
                                        {
                                                int idx = (*src) * 3;
 
-                                               r_val = (sint16) context->palette[idx];
-                                               g_val = (sint16) context->palette[idx + 1];
-                                               b_val = (sint16) context->palette[idx + 2];
+                                               r_val = (INT16) context->palette[idx];
+                                               g_val = (INT16) context->palette[idx + 1];
+                                               b_val = (INT16) context->palette[idx + 2];
                                                src++;
                                        }
                                        a_val = 0xFF;
@@ -178,10 +178,10 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int
                                        r_val = g_val = b_val = a_val = 0;
                                        break;
                        }
-                       *yplane++ = (uint8) ((r_val >> 2) + (g_val >> 1) + (b_val >> 2));
+                       *yplane++ = (BYTE) ((r_val >> 2) + (g_val >> 1) + (b_val >> 2));
                        /* Perform color loss reduction here */
-                       *coplane++ = (uint8) ((r_val - b_val) >> ccl);
-                       *cgplane++ = (uint8) ((-(r_val >> 1) + g_val - (b_val >> 1)) >> ccl);
+                       *coplane++ = (BYTE) ((r_val - b_val) >> ccl);
+                       *cgplane++ = (BYTE) ((-(r_val >> 1) + g_val - (b_val >> 1)) >> ccl);
                        *aplane++ = a_val;
                }
                if (context->nsc_stream.ChromaSubSamplingLevel > 0 && (x % 2) == 1)
@@ -201,14 +201,14 @@ static void nsc_encode_argb_to_aycocg(NSC_CONTEXT* context, uint8* bmpdata, int
 
 static void nsc_encode_subsampling(NSC_CONTEXT* context)
 {
-       uint16 x;
-       uint16 y;
-       uint8* co_dst;
-       uint8* cg_dst;
-       sint8* co_src0;
-       sint8* co_src1;
-       sint8* cg_src0;
-       sint8* cg_src1;
+       UINT16 x;
+       UINT16 y;
+       BYTE* co_dst;
+       BYTE* cg_dst;
+       INT8* co_src0;
+       INT8* co_src1;
+       INT8* cg_src0;
+       INT8* cg_src1;
        uint32 tempWidth;
        uint32 tempHeight;
 
@@ -219,16 +219,16 @@ static void nsc_encode_subsampling(NSC_CONTEXT* context)
        {
                co_dst = context->priv->plane_buf[1] + y * (tempWidth >> 1);
                cg_dst = context->priv->plane_buf[2] + y * (tempWidth >> 1);
-               co_src0 = (sint8*) context->priv->plane_buf[1] + (y << 1) * tempWidth;
+               co_src0 = (INT8*) context->priv->plane_buf[1] + (y << 1) * tempWidth;
                co_src1 = co_src0 + tempWidth;
-               cg_src0 = (sint8*) context->priv->plane_buf[2] + (y << 1) * tempWidth;
+               cg_src0 = (INT8*) context->priv->plane_buf[2] + (y << 1) * tempWidth;
                cg_src1 = cg_src0 + tempWidth;
                for (x = 0; x < tempWidth >> 1; x++)
                {
-                       *co_dst++ = (uint8) (((sint16) *co_src0 + (sint16) *(co_src0 + 1) +
-                               (sint16) *co_src1 + (sint16) *(co_src1 + 1)) >> 2);
-                       *cg_dst++ = (uint8) (((sint16) *cg_src0 + (sint16) *(cg_src0 + 1) +
-                               (sint16) *cg_src1 + (sint16) *(cg_src1 + 1)) >> 2);
+                       *co_dst++ = (BYTE) (((INT16) *co_src0 + (INT16) *(co_src0 + 1) +
+                               (INT16) *co_src1 + (INT16) *(co_src1 + 1)) >> 2);
+                       *cg_dst++ = (BYTE) (((INT16) *cg_src0 + (INT16) *(cg_src0 + 1) +
+                               (INT16) *cg_src1 + (INT16) *(cg_src1 + 1)) >> 2);
                        co_src0 += 2;
                        co_src1 += 2;
                        cg_src0 += 2;
@@ -237,7 +237,7 @@ static void nsc_encode_subsampling(NSC_CONTEXT* context)
        }
 }
 
-void nsc_encode(NSC_CONTEXT* context, uint8* bmpdata, int rowstride)
+void nsc_encode(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride)
 {
        nsc_encode_argb_to_aycocg(context, bmpdata, rowstride);
        if (context->nsc_stream.ChromaSubSamplingLevel > 0)
@@ -246,7 +246,7 @@ void nsc_encode(NSC_CONTEXT* context, uint8* bmpdata, int rowstride)
        }
 }
 
-static uint32 nsc_rle_encode(uint8* in, uint8* out, uint32 origsz)
+static uint32 nsc_rle_encode(BYTE* in, BYTE* out, uint32 origsz)
 {
        uint32 left;
        uint32 runlength = 1;
@@ -302,8 +302,8 @@ static uint32 nsc_rle_encode(uint8* in, uint8* out, uint32 origsz)
 
 static void nsc_rle_compress_data(NSC_CONTEXT* context)
 {
-       uint16 i;
-       uint8* rle;
+       UINT16 i;
+       BYTE* rle;
        uint32 origsize;
        uint32 planesize;
 
@@ -331,7 +331,7 @@ static void nsc_rle_compress_data(NSC_CONTEXT* context)
 }
 
 void nsc_compose_message(NSC_CONTEXT* context, STREAM* s,
-       uint8* bmpdata, int width, int height, int rowstride)
+       BYTE* bmpdata, int width, int height, int rowstride)
 {
        int i;
 
@@ -355,9 +355,9 @@ void nsc_compose_message(NSC_CONTEXT* context, STREAM* s,
        stream_write_uint32(s, context->nsc_stream.PlaneByteCount[1]); /* OrangeChromaPlaneByteCount (4 bytes) */
        stream_write_uint32(s, context->nsc_stream.PlaneByteCount[2]); /* GreenChromaPlaneByteCount (4 bytes) */
        stream_write_uint32(s, context->nsc_stream.PlaneByteCount[3]); /* AlphaPlaneByteCount (4 bytes) */
-       stream_write_uint8(s, context->nsc_stream.ColorLossLevel); /* ColorLossLevel (1 byte) */
-       stream_write_uint8(s, context->nsc_stream.ChromaSubSamplingLevel); /* ChromaSubsamplingLevel (1 byte) */
-       stream_write_uint16(s, 0); /* Reserved (2 bytes) */
+       stream_write_BYTE(s, context->nsc_stream.ColorLossLevel); /* ColorLossLevel (1 byte) */
+       stream_write_BYTE(s, context->nsc_stream.ChromaSubSamplingLevel); /* ChromaSubsamplingLevel (1 byte) */
+       stream_write_UINT16(s, 0); /* Reserved (2 bytes) */
 
        for (i = 0; i < 4; i++)
        {
index 16d13c8..f4c3201 100644 (file)
@@ -20,6 +20,6 @@
 #ifndef __NSC_ENCODE_H
 #define __NSC_ENCODE_H
 
-void nsc_encode(NSC_CONTEXT* context, uint8* bmpdata, int rowstride);
+void nsc_encode(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride);
 
 #endif
index 5551bfc..f84c1b2 100644 (file)
 #include "nsc_types.h"
 #include "nsc_sse2.h"
 
-static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, uint8* bmpdata, int rowstride)
+static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride)
 {
-       uint16 x;
-       uint16 y;
-       uint16 rw;
-       uint8 ccl;
-       uint8* src;
-       uint8* yplane;
-       uint8* coplane;
-       uint8* cgplane;
-       uint8* aplane;
+       UINT16 x;
+       UINT16 y;
+       UINT16 rw;
+       BYTE ccl;
+       BYTE* src;
+       BYTE* yplane;
+       BYTE* coplane;
+       BYTE* cgplane;
+       BYTE* aplane;
        __m128i r_val;
        __m128i g_val;
        __m128i b_val;
@@ -165,7 +165,7 @@ static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, uint8* bmpdata,
                                case RDP_PIXEL_FORMAT_P4_PLANER:
                                        {
                                                int shift;
-                                               uint8 idx[8];
+                                               BYTE idx[8];
 
                                                for (shift = 7; shift >= 0; shift--)
                                                {
@@ -283,14 +283,14 @@ static void nsc_encode_argb_to_aycocg_sse2(NSC_CONTEXT* context, uint8* bmpdata,
 
 static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context)
 {
-       uint16 x;
-       uint16 y;
-       uint8* co_dst;
-       uint8* cg_dst;
-       sint8* co_src0;
-       sint8* co_src1;
-       sint8* cg_src0;
-       sint8* cg_src1;
+       UINT16 x;
+       UINT16 y;
+       BYTE* co_dst;
+       BYTE* cg_dst;
+       INT8* co_src0;
+       INT8* co_src1;
+       INT8* cg_src0;
+       INT8* cg_src1;
        uint32 tempWidth;
        uint32 tempHeight;
        __m128i t;
@@ -304,9 +304,9 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context)
        {
                co_dst = context->priv->plane_buf[1] + y * (tempWidth >> 1);
                cg_dst = context->priv->plane_buf[2] + y * (tempWidth >> 1);
-               co_src0 = (sint8*) context->priv->plane_buf[1] + (y << 1) * tempWidth;
+               co_src0 = (INT8*) context->priv->plane_buf[1] + (y << 1) * tempWidth;
                co_src1 = co_src0 + tempWidth;
-               cg_src0 = (sint8*) context->priv->plane_buf[2] + (y << 1) * tempWidth;
+               cg_src0 = (INT8*) context->priv->plane_buf[2] + (y << 1) * tempWidth;
                cg_src1 = cg_src0 + tempWidth;
                for (x = 0; x < tempWidth >> 1; x += 8)
                {
@@ -333,7 +333,7 @@ static void nsc_encode_subsampling_sse2(NSC_CONTEXT* context)
        }
 }
 
-static void nsc_encode_sse2(NSC_CONTEXT* context, uint8* bmpdata, int rowstride)
+static void nsc_encode_sse2(NSC_CONTEXT* context, BYTE* bmpdata, int rowstride)
 {
        nsc_encode_argb_to_aycocg_sse2(context, bmpdata, rowstride);
        if (context->nsc_stream.ChromaSubSamplingLevel > 0)
index 9f29b72..14bc1f8 100644 (file)
@@ -33,7 +33,7 @@
 
 struct _NSC_CONTEXT_PRIV
 {
-       uint8* plane_buf[5];            /* Decompressed Plane Buffers in the respective order */
+       BYTE* plane_buf[5];             /* Decompressed Plane Buffers in the respective order */
        uint32 plane_buf_length;        /* Lengths of each plane buffer */
 
        /* profilers */
index 86305d6..7d63a2e 100644 (file)
@@ -148,11 +148,11 @@ RFX_CONTEXT* rfx_context_new(void)
        rfx_context_set_pixel_format(context, RDP_PIXEL_FORMAT_B8G8R8A8);
 
        /* align buffers to 16 byte boundary (needed for SSE/SSE2 instructions) */
-       context->priv->y_r_buffer = (sint16*)(((uintptr_t)context->priv->y_r_mem + 16) & ~ 0x0F);
-       context->priv->cb_g_buffer = (sint16*)(((uintptr_t)context->priv->cb_g_mem + 16) & ~ 0x0F);
-       context->priv->cr_b_buffer = (sint16*)(((uintptr_t)context->priv->cr_b_mem + 16) & ~ 0x0F);
+       context->priv->y_r_buffer = (INT16*)(((uintptr_t)context->priv->y_r_mem + 16) & ~ 0x0F);
+       context->priv->cb_g_buffer = (INT16*)(((uintptr_t)context->priv->cb_g_mem + 16) & ~ 0x0F);
+       context->priv->cr_b_buffer = (INT16*)(((uintptr_t)context->priv->cr_b_mem + 16) & ~ 0x0F);
 
-       context->priv->dwt_buffer = (sint16*)(((uintptr_t)context->priv->dwt_mem + 16) & ~ 0x0F);
+       context->priv->dwt_buffer = (INT16*)(((uintptr_t)context->priv->dwt_mem + 16) & ~ 0x0F);
 
        /* create profilers for default decoding routines */
        rfx_profiler_create(context);
@@ -236,7 +236,7 @@ static void rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s)
                return;
        }
 
-       stream_read_uint16(s, context->version); /* version (2 bytes), WF_VERSION_1_0 (0x0100) */
+       stream_read_UINT16(s, context->version); /* version (2 bytes), WF_VERSION_1_0 (0x0100) */
 
        if (context->version != WF_VERSION_1_0)
        {
@@ -249,9 +249,9 @@ static void rfx_process_message_sync(RFX_CONTEXT* context, STREAM* s)
 
 static void rfx_process_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
 {
-       uint8 numCodecs;
+       BYTE numCodecs;
 
-       stream_read_uint8(s, numCodecs); /* numCodecs (1 byte), must be set to 0x01 */
+       stream_read_BYTE(s, numCodecs); /* numCodecs (1 byte), must be set to 0x01 */
 
        if (numCodecs != 1)
        {
@@ -260,18 +260,18 @@ static void rfx_process_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
        }
 
        /* RFX_CODEC_VERSIONT */
-       stream_read_uint8(s, context->codec_id); /* codecId (1 byte) */
-       stream_read_uint8(s, context->codec_version); /* version (2 bytes) */
+       stream_read_BYTE(s, context->codec_id); /* codecId (1 byte) */
+       stream_read_BYTE(s, context->codec_version); /* version (2 bytes) */
 
        DEBUG_RFX("id %d version 0x%X.", context->codec_id, context->codec_version);
 }
 
 static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
 {
-       uint8 channelId;
-       uint8 numChannels;
+       BYTE channelId;
+       BYTE numChannels;
 
-       stream_read_uint8(s, numChannels); /* numChannels (1 byte), must bet set to 0x01 */
+       stream_read_BYTE(s, numChannels); /* numChannels (1 byte), must bet set to 0x01 */
 
        /* In RDVH sessions, numChannels will represent the number of virtual monitors 
         * configured and does not always be set to 0x01 as [MS-RDPRFX] said.
@@ -283,9 +283,9 @@ static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
        }
 
        /* RFX_CHANNELT */
-       stream_read_uint8(s, channelId); /* channelId (1 byte) */
-       stream_read_uint16(s, context->width); /* width (2 bytes) */
-       stream_read_uint16(s, context->height); /* height (2 bytes) */
+       stream_read_BYTE(s, channelId); /* channelId (1 byte) */
+       stream_read_UINT16(s, context->width); /* width (2 bytes) */
+       stream_read_UINT16(s, context->height); /* height (2 bytes) */
 
        /* Now, only the first monitor can be used, therefore the other channels will be ignored. */
        stream_seek(s, 5 * (numChannels - 1));
@@ -296,13 +296,13 @@ static void rfx_process_message_channels(RFX_CONTEXT* context, STREAM* s)
 
 static void rfx_process_message_context(RFX_CONTEXT* context, STREAM* s)
 {
-       uint8 ctxId;
-       uint16 tileSize;
-       uint16 properties;
+       BYTE ctxId;
+       UINT16 tileSize;
+       UINT16 properties;
 
-       stream_read_uint8(s, ctxId); /* ctxId (1 byte), must be set to 0x00 */
-       stream_read_uint16(s, tileSize); /* tileSize (2 bytes), must be set to CT_TILE_64x64 (0x0040) */
-       stream_read_uint16(s, properties); /* properties (2 bytes) */
+       stream_read_BYTE(s, ctxId); /* ctxId (1 byte), must be set to 0x00 */
+       stream_read_UINT16(s, tileSize); /* tileSize (2 bytes), must be set to CT_TILE_64x64 (0x0040) */
+       stream_read_UINT16(s, properties); /* properties (2 bytes) */
 
        DEBUG_RFX("ctxId %d tileSize %d properties 0x%X.", ctxId, tileSize, properties);
 
@@ -335,10 +335,10 @@ static void rfx_process_message_context(RFX_CONTEXT* context, STREAM* s)
 static void rfx_process_message_frame_begin(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s)
 {
        uint32 frameIdx;
-       uint16 numRegions;
+       UINT16 numRegions;
 
        stream_read_uint32(s, frameIdx); /* frameIdx (4 bytes), if codec is in video mode, must be ignored */
-       stream_read_uint16(s, numRegions); /* numRegions (2 bytes) */
+       stream_read_UINT16(s, numRegions); /* numRegions (2 bytes) */
 
        DEBUG_RFX("RFX_FRAME_BEGIN: frameIdx:%d numRegions:%d", frameIdx, numRegions);
 }
@@ -352,8 +352,8 @@ static void rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag
 {
        int i;
 
-       stream_seek_uint8(s); /* regionFlags (1 byte) */
-       stream_read_uint16(s, message->num_rects); /* numRects (2 bytes) */
+       stream_seek_BYTE(s); /* regionFlags (1 byte) */
+       stream_read_UINT16(s, message->num_rects); /* numRects (2 bytes) */
 
        if (message->num_rects < 1)
        {
@@ -370,10 +370,10 @@ static void rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag
        for (i = 0; i < message->num_rects; i++)
        {
                /* RFX_RECT */
-               stream_read_uint16(s, message->rects[i].x); /* x (2 bytes) */
-               stream_read_uint16(s, message->rects[i].y); /* y (2 bytes) */
-               stream_read_uint16(s, message->rects[i].width); /* width (2 bytes) */
-               stream_read_uint16(s, message->rects[i].height); /* height (2 bytes) */
+               stream_read_UINT16(s, message->rects[i].x); /* x (2 bytes) */
+               stream_read_UINT16(s, message->rects[i].y); /* y (2 bytes) */
+               stream_read_UINT16(s, message->rects[i].width); /* width (2 bytes) */
+               stream_read_UINT16(s, message->rects[i].height); /* height (2 bytes) */
 
                DEBUG_RFX("rect %d (%d %d %d %d).",
                        i, message->rects[i].x, message->rects[i].y, message->rects[i].width, message->rects[i].height);
@@ -382,21 +382,21 @@ static void rfx_process_message_region(RFX_CONTEXT* context, RFX_MESSAGE* messag
 
 static void rfx_process_message_tile(RFX_CONTEXT* context, RFX_TILE* tile, STREAM* s)
 {
-       uint8 quantIdxY;
-       uint8 quantIdxCb;
-       uint8 quantIdxCr;
-       uint16 xIdx, yIdx;
-       uint16 YLen, CbLen, CrLen;
+       BYTE quantIdxY;
+       BYTE quantIdxCb;
+       BYTE quantIdxCr;
+       UINT16 xIdx, yIdx;
+       UINT16 YLen, CbLen, CrLen;
 
        /* RFX_TILE */
-       stream_read_uint8(s, quantIdxY); /* quantIdxY (1 byte) */
-       stream_read_uint8(s, quantIdxCb); /* quantIdxCb (1 byte) */
-       stream_read_uint8(s, quantIdxCr); /* quantIdxCr (1 byte) */
-       stream_read_uint16(s, xIdx); /* xIdx (2 bytes) */
-       stream_read_uint16(s, yIdx); /* yIdx (2 bytes) */
-       stream_read_uint16(s, YLen); /* YLen (2 bytes) */
-       stream_read_uint16(s, CbLen); /* CbLen (2 bytes) */
-       stream_read_uint16(s, CrLen); /* CrLen (2 bytes) */
+       stream_read_BYTE(s, quantIdxY); /* quantIdxY (1 byte) */
+       stream_read_BYTE(s, quantIdxCb); /* quantIdxCb (1 byte) */
+       stream_read_BYTE(s, quantIdxCr); /* quantIdxCr (1 byte) */
+       stream_read_UINT16(s, xIdx); /* xIdx (2 bytes) */
+       stream_read_UINT16(s, yIdx); /* yIdx (2 bytes) */
+       stream_read_UINT16(s, YLen); /* YLen (2 bytes) */
+       stream_read_UINT16(s, CbLen); /* CbLen (2 bytes) */
+       stream_read_UINT16(s, CrLen); /* CrLen (2 bytes) */
 
        DEBUG_RFX("quantIdxY:%d quantIdxCb:%d quantIdxCr:%d xIdx:%d yIdx:%d YLen:%d CbLen:%d CrLen:%d",
                quantIdxY, quantIdxCb, quantIdxCr, xIdx, yIdx, YLen, CbLen, CrLen);
@@ -414,15 +414,15 @@ static void rfx_process_message_tile(RFX_CONTEXT* context, RFX_TILE* tile, STREA
 static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* message, STREAM* s)
 {
        int i;
-       uint16 subtype;
+       UINT16 subtype;
        uint32 blockLen;
        uint32 blockType;
        uint32 tilesDataSize;
        uint32* quants;
-       uint8 quant;
+       BYTE quant;
        int pos;
 
-       stream_read_uint16(s, subtype); /* subtype (2 bytes) must be set to CBT_TILESET (0xCAC2) */
+       stream_read_UINT16(s, subtype); /* subtype (2 bytes) must be set to CBT_TILESET (0xCAC2) */
 
        if (subtype != CBT_TILESET)
        {
@@ -430,11 +430,11 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
                return;
        }
 
-       stream_seek_uint16(s); /* idx (2 bytes), must be set to 0x0000 */
-       stream_seek_uint16(s); /* properties (2 bytes) */
+       stream_seek_UINT16(s); /* idx (2 bytes), must be set to 0x0000 */
+       stream_seek_UINT16(s); /* properties (2 bytes) */
 
-       stream_read_uint8(s, context->num_quants); /* numQuant (1 byte) */
-       stream_seek_uint8(s); /* tileSize (1 byte), must be set to 0x40 */
+       stream_read_BYTE(s, context->num_quants); /* numQuant (1 byte) */
+       stream_seek_BYTE(s); /* tileSize (1 byte), must be set to 0x40 */
 
        if (context->num_quants < 1)
        {
@@ -442,7 +442,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
                return;
        }
 
-       stream_read_uint16(s, message->num_tiles); /* numTiles (2 bytes) */
+       stream_read_UINT16(s, message->num_tiles); /* numTiles (2 bytes) */
 
        if (message->num_tiles < 1)
        {
@@ -462,19 +462,19 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
        for (i = 0; i < context->num_quants; i++)
        {
                /* RFX_CODEC_QUANT */
-               stream_read_uint8(s, quant);
+               stream_read_BYTE(s, quant);
                *quants++ = (quant & 0x0F);
                *quants++ = (quant >> 4);
-               stream_read_uint8(s, quant);
+               stream_read_BYTE(s, quant);
                *quants++ = (quant & 0x0F);
                *quants++ = (quant >> 4);
-               stream_read_uint8(s, quant);
+               stream_read_BYTE(s, quant);
                *quants++ = (quant & 0x0F);
                *quants++ = (quant >> 4);
-               stream_read_uint8(s, quant);
+               stream_read_BYTE(s, quant);
                *quants++ = (quant & 0x0F);
                *quants++ = (quant >> 4);
-               stream_read_uint8(s, quant);
+               stream_read_BYTE(s, quant);
                *quants++ = (quant & 0x0F);
                *quants++ = (quant >> 4);
 
@@ -492,7 +492,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
        for (i = 0; i < message->num_tiles; i++)
        {
                /* RFX_TILE */
-               stream_read_uint16(s, blockType); /* blockType (2 bytes), must be set to CBT_TILE (0xCAC3) */
+               stream_read_UINT16(s, blockType); /* blockType (2 bytes), must be set to CBT_TILE (0xCAC3) */
                stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */
 
                pos = stream_get_pos(s) - 6 + blockLen;
@@ -509,7 +509,7 @@ static void rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
        }
 }
 
-RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 length)
+RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, BYTE* data, uint32 length)
 {
        int pos;
        STREAM* s;
@@ -524,7 +524,7 @@ RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 lengt
        while (stream_get_left(s) > 6)
        {
                /* RFX_BLOCKT */
-               stream_read_uint16(s, blockType); /* blockType (2 bytes) */
+               stream_read_UINT16(s, blockType); /* blockType (2 bytes) */
                stream_read_uint32(s, blockLen); /* blockLen (4 bytes) */
 
                DEBUG_RFX("blockType 0x%X blockLen %d", blockType, blockLen);
@@ -593,7 +593,7 @@ RFX_MESSAGE* rfx_process_message(RFX_CONTEXT* context, uint8* data, uint32 lengt
        return message;
 }
 
-uint16 rfx_message_get_tile_count(RFX_MESSAGE* message)
+UINT16 rfx_message_get_tile_count(RFX_MESSAGE* message)
 {
        return message->num_tiles;
 }
@@ -603,7 +603,7 @@ RFX_TILE* rfx_message_get_tile(RFX_MESSAGE* message, int index)
        return message->tiles[index];
 }
 
-uint16 rfx_message_get_rect_count(RFX_MESSAGE* message)
+UINT16 rfx_message_get_rect_count(RFX_MESSAGE* message)
 {
        return message->num_rects;
 }
@@ -631,41 +631,41 @@ void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message)
 
 static void rfx_compose_message_sync(RFX_CONTEXT* context, STREAM* s)
 {
-       stream_write_uint16(s, WBT_SYNC); /* BlockT.blockType */
+       stream_write_UINT16(s, WBT_SYNC); /* BlockT.blockType */
        stream_write_uint32(s, 12); /* BlockT.blockLen */
        stream_write_uint32(s, WF_MAGIC); /* magic */
-       stream_write_uint16(s, WF_VERSION_1_0); /* version */
+       stream_write_UINT16(s, WF_VERSION_1_0); /* version */
 }
 
 static void rfx_compose_message_codec_versions(RFX_CONTEXT* context, STREAM* s)
 {
-       stream_write_uint16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType */
+       stream_write_UINT16(s, WBT_CODEC_VERSIONS); /* BlockT.blockType */
        stream_write_uint32(s, 10); /* BlockT.blockLen */
-       stream_write_uint8(s, 1); /* numCodecs */
-       stream_write_uint8(s, 1); /* codecs.codecId */
-       stream_write_uint16(s, WF_VERSION_1_0); /* codecs.version */
+       stream_write_BYTE(s, 1); /* numCodecs */
+       stream_write_BYTE(s, 1); /* codecs.codecId */
+       stream_write_UINT16(s, WF_VERSION_1_0); /* codecs.version */
 }
 
 static void rfx_compose_message_channels(RFX_CONTEXT* context, STREAM* s)
 {
-       stream_write_uint16(s, WBT_CHANNELS); /* BlockT.blockType */
+       stream_write_UINT16(s, WBT_CHANNELS); /* BlockT.blockType */
        stream_write_uint32(s, 12); /* BlockT.blockLen */
-       stream_write_uint8(s, 1); /* numChannels */
-       stream_write_uint8(s, 0); /* Channel.channelId */
-       stream_write_uint16(s, context->width); /* Channel.width */
-       stream_write_uint16(s, context->height); /* Channel.height */
+       stream_write_BYTE(s, 1); /* numChannels */
+       stream_write_BYTE(s, 0); /* Channel.channelId */
+       stream_write_UINT16(s, context->width); /* Channel.width */
+       stream_write_UINT16(s, context->height); /* Channel.height */
 }
 
 static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s)
 {
-       uint16 properties;
+       UINT16 properties;
 
-       stream_write_uint16(s, WBT_CONTEXT); /* CodecChannelT.blockType */
+       stream_write_UINT16(s, WBT_CONTEXT); /* CodecChannelT.blockType */
        stream_write_uint32(s, 13); /* CodecChannelT.blockLen */
-       stream_write_uint8(s, 1); /* CodecChannelT.codecId */
-       stream_write_uint8(s, 0); /* CodecChannelT.channelId */
-       stream_write_uint8(s, 0); /* ctxId */
-       stream_write_uint16(s, CT_TILE_64x64); /* tileSize */
+       stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
+       stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
+       stream_write_BYTE(s, 0); /* ctxId */
+       stream_write_UINT16(s, CT_TILE_64x64); /* tileSize */
 
        /* properties */
        properties = context->flags; /* flags */
@@ -673,7 +673,7 @@ static void rfx_compose_message_context(RFX_CONTEXT* context, STREAM* s)
        properties |= (CLW_XFORM_DWT_53_A << 5); /* xft */
        properties |= ((context->mode == RLGR1 ? CLW_ENTROPY_RLGR1 : CLW_ENTROPY_RLGR3) << 9); /* et */
        properties |= (SCALAR_QUANTIZATION << 13); /* qt */
-       stream_write_uint16(s, properties);
+       stream_write_UINT16(s, properties);
 
        /* properties in tilesets: note that this has different format from the one in TS_RFX_CONTEXT */
        properties = 1; /* lt */
@@ -701,12 +701,12 @@ static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, STREAM* s)
 {
        stream_check_size(s, 14);
 
-       stream_write_uint16(s, WBT_FRAME_BEGIN); /* CodecChannelT.blockType */
+       stream_write_UINT16(s, WBT_FRAME_BEGIN); /* CodecChannelT.blockType */
        stream_write_uint32(s, 14); /* CodecChannelT.blockLen */
-       stream_write_uint8(s, 1); /* CodecChannelT.codecId */
-       stream_write_uint8(s, 0); /* CodecChannelT.channelId */
+       stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
+       stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
        stream_write_uint32(s, context->frame_idx); /* frameIdx */
-       stream_write_uint16(s, 1); /* numRegions */
+       stream_write_UINT16(s, 1); /* numRegions */
 
        context->frame_idx++;
 }
@@ -720,27 +720,27 @@ static void rfx_compose_message_region(RFX_CONTEXT* context, STREAM* s,
        size = 15 + num_rects * 8;
        stream_check_size(s, size);
 
-       stream_write_uint16(s, WBT_REGION); /* CodecChannelT.blockType */
+       stream_write_UINT16(s, WBT_REGION); /* CodecChannelT.blockType */
        stream_write_uint32(s, size); /* set CodecChannelT.blockLen later */
-       stream_write_uint8(s, 1); /* CodecChannelT.codecId */
-       stream_write_uint8(s, 0); /* CodecChannelT.channelId */
-       stream_write_uint8(s, 1); /* regionFlags */
-       stream_write_uint16(s, num_rects); /* numRects */
+       stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
+       stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
+       stream_write_BYTE(s, 1); /* regionFlags */
+       stream_write_UINT16(s, num_rects); /* numRects */
 
        for (i = 0; i < num_rects; i++)
        {
-               stream_write_uint16(s, rects[i].x);
-               stream_write_uint16(s, rects[i].y);
-               stream_write_uint16(s, rects[i].width);
-               stream_write_uint16(s, rects[i].height);
+               stream_write_UINT16(s, rects[i].x);
+               stream_write_UINT16(s, rects[i].y);
+               stream_write_UINT16(s, rects[i].width);
+               stream_write_UINT16(s, rects[i].height);
        }
 
-       stream_write_uint16(s, CBT_REGION); /* regionType */
-       stream_write_uint16(s, 1); /* numTilesets */
+       stream_write_UINT16(s, CBT_REGION); /* regionType */
+       stream_write_UINT16(s, 1); /* numTilesets */
 }
 
 static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
-       uint8* tile_data, int tile_width, int tile_height, int rowstride,
+       BYTE* tile_data, int tile_width, int tile_height, int rowstride,
        const uint32* quantVals, int quantIdxY, int quantIdxCb, int quantIdxCr,
        int xIdx, int yIdx)
 {
@@ -752,13 +752,13 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
        stream_check_size(s, 19);
        start_pos = stream_get_pos(s);
 
-       stream_write_uint16(s, CBT_TILE); /* BlockT.blockType */
+       stream_write_UINT16(s, CBT_TILE); /* BlockT.blockType */
        stream_seek_uint32(s); /* set BlockT.blockLen later */
-       stream_write_uint8(s, quantIdxY);
-       stream_write_uint8(s, quantIdxCb);
-       stream_write_uint8(s, quantIdxCr);
-       stream_write_uint16(s, xIdx);
-       stream_write_uint16(s, yIdx);
+       stream_write_BYTE(s, quantIdxY);
+       stream_write_BYTE(s, quantIdxCb);
+       stream_write_BYTE(s, quantIdxCr);
+       stream_write_UINT16(s, xIdx);
+       stream_write_UINT16(s, yIdx);
 
        stream_seek(s, 6); /* YLen, CbLen, CrLen */
 
@@ -774,15 +774,15 @@ static void rfx_compose_message_tile(RFX_CONTEXT* context, STREAM* s,
        stream_set_pos(s, start_pos + 2);
        stream_write_uint32(s, 19 + YLen + CbLen + CrLen); /* BlockT.blockLen */
        stream_set_pos(s, start_pos + 13);
-       stream_write_uint16(s, YLen);
-       stream_write_uint16(s, CbLen);
-       stream_write_uint16(s, CrLen);
+       stream_write_UINT16(s, YLen);
+       stream_write_UINT16(s, CbLen);
+       stream_write_UINT16(s, CrLen);
 
        stream_set_pos(s, end_pos);
 }
 
 static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
-       uint8* image_data, int width, int height, int rowstride)
+       BYTE* image_data, int width, int height, int rowstride)
 {
        int size;
        int start_pos, end_pos;
@@ -825,22 +825,22 @@ static void rfx_compose_message_tileset(RFX_CONTEXT* context, STREAM* s,
        stream_check_size(s, size);
        start_pos = stream_get_pos(s);
 
-       stream_write_uint16(s, WBT_EXTENSION); /* CodecChannelT.blockType */
+       stream_write_UINT16(s, WBT_EXTENSION); /* CodecChannelT.blockType */
        stream_seek_uint32(s); /* set CodecChannelT.blockLen later */
-       stream_write_uint8(s, 1); /* CodecChannelT.codecId */
-       stream_write_uint8(s, 0); /* CodecChannelT.channelId */
-       stream_write_uint16(s, CBT_TILESET); /* subtype */
-       stream_write_uint16(s, 0); /* idx */
-       stream_write_uint16(s, context->properties); /* properties */
-       stream_write_uint8(s, numQuants); /* numQuants */
-       stream_write_uint8(s, 0x40); /* tileSize */
-       stream_write_uint16(s, numTiles); /* numTiles */
+       stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
+       stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
+       stream_write_UINT16(s, CBT_TILESET); /* subtype */
+       stream_write_UINT16(s, 0); /* idx */
+       stream_write_UINT16(s, context->properties); /* properties */
+       stream_write_BYTE(s, numQuants); /* numQuants */
+       stream_write_BYTE(s, 0x40); /* tileSize */
+       stream_write_UINT16(s, numTiles); /* numTiles */
        stream_seek_uint32(s); /* set tilesDataSize later */
 
        quantValsPtr = quantVals;
        for (i = 0; i < numQuants * 5; i++)
        {
-               stream_write_uint8(s, quantValsPtr[0] + (quantValsPtr[1] << 4));
+               stream_write_BYTE(s, quantValsPtr[0] + (quantValsPtr[1] << 4));
                quantValsPtr += 2;
        }
 
@@ -874,14 +874,14 @@ static void rfx_compose_message_frame_end(RFX_CONTEXT* context, STREAM* s)
 {
        stream_check_size(s, 8);
 
-       stream_write_uint16(s, WBT_FRAME_END); /* CodecChannelT.blockType */
+       stream_write_UINT16(s, WBT_FRAME_END); /* CodecChannelT.blockType */
        stream_write_uint32(s, 8); /* CodecChannelT.blockLen */
-       stream_write_uint8(s, 1); /* CodecChannelT.codecId */
-       stream_write_uint8(s, 0); /* CodecChannelT.channelId */
+       stream_write_BYTE(s, 1); /* CodecChannelT.codecId */
+       stream_write_BYTE(s, 0); /* CodecChannelT.channelId */
 }
 
 static void rfx_compose_message_data(RFX_CONTEXT* context, STREAM* s,
-       const RFX_RECT* rects, int num_rects, uint8* image_data, int width, int height, int rowstride)
+       const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride)
 {
        rfx_compose_message_frame_begin(context, s);
        rfx_compose_message_region(context, s, rects, num_rects);
@@ -890,7 +890,7 @@ static void rfx_compose_message_data(RFX_CONTEXT* context, STREAM* s,
 }
 
 FREERDP_API void rfx_compose_message(RFX_CONTEXT* context, STREAM* s,
-       const RFX_RECT* rects, int num_rects, uint8* image_data, int width, int height, int rowstride)
+       const RFX_RECT* rects, int num_rects, BYTE* image_data, int width, int height, int rowstride)
 {
        /* Only the first frame should send the RemoteFX header */
        if (context->frame_idx == 0 && !context->header_processed)
index a0051e4..164060f 100644 (file)
@@ -24,7 +24,7 @@
 
 struct _RFX_BITSTREAM
 {
-       uint8* buffer;
+       BYTE* buffer;
        int nbytes;
        int byte_pos;
        int bits_left;
@@ -32,7 +32,7 @@ struct _RFX_BITSTREAM
 typedef struct _RFX_BITSTREAM RFX_BITSTREAM;
 
 #define rfx_bitstream_attach(bs, _buffer, _nbytes) do { \
-       bs->buffer = (uint8*) (_buffer); \
+       bs->buffer = (BYTE*) (_buffer); \
        bs->nbytes = (_nbytes); \
        bs->byte_pos = 0; \
        bs->bits_left = 8; } while (0)
@@ -40,7 +40,7 @@ typedef struct _RFX_BITSTREAM RFX_BITSTREAM;
 #define rfx_bitstream_get_bits(bs, _nbits, _r) do { \
        int nbits = _nbits; \
        int b; \
-       uint16 n = 0; \
+       UINT16 n = 0; \
        while (bs->byte_pos < bs->nbytes && nbits > 0) \
        { \
                b = nbits; \
@@ -60,7 +60,7 @@ typedef struct _RFX_BITSTREAM RFX_BITSTREAM;
        _r = n; } while (0)
 
 #define rfx_bitstream_put_bits(bs, _bits, _nbits) do { \
-       uint16 bits = (_bits); \
+       UINT16 bits = (_bits); \
        int nbits = (_nbits); \
        int b; \
        while (bs->byte_pos < bs->nbytes && nbits > 0) \
index 6f18f8d..cc61b8b 100644 (file)
 
 #include "rfx_decode.h"
 
-static void rfx_decode_format_rgb(sint16* r_buf, sint16* g_buf, sint16* b_buf,
-       RDP_PIXEL_FORMAT pixel_format, uint8* dst_buf)
+static void rfx_decode_format_rgb(INT16* r_buf, INT16* g_buf, INT16* b_buf,
+       RDP_PIXEL_FORMAT pixel_format, BYTE* dst_buf)
 {
-       sint16* r = r_buf;
-       sint16* g = g_buf;
-       sint16* b = b_buf;
-       uint8* dst = dst_buf;
+       INT16* r = r_buf;
+       INT16* g = g_buf;
+       INT16* b = b_buf;
+       BYTE* dst = dst_buf;
        int i;
        
        switch (pixel_format)
@@ -50,35 +50,35 @@ static void rfx_decode_format_rgb(sint16* r_buf, sint16* g_buf, sint16* b_buf,
                case RDP_PIXEL_FORMAT_B8G8R8A8:
                        for (i = 0; i < 4096; i++)
                        {
-                               *dst++ = (uint8) (*b++);
-                               *dst++ = (uint8) (*g++);
-                               *dst++ = (uint8) (*r++);
+                               *dst++ = (BYTE) (*b++);
+                               *dst++ = (BYTE) (*g++);
+                               *dst++ = (BYTE) (*r++);
                                *dst++ = 0xFF;
                        }
                        break;
                case RDP_PIXEL_FORMAT_R8G8B8A8:
                        for (i = 0; i < 4096; i++)
                        {
-                               *dst++ = (uint8) (*r++);
-                               *dst++ = (uint8) (*g++);
-                               *dst++ = (uint8) (*b++);
+                               *dst++ = (BYTE) (*r++);
+                               *dst++ = (BYTE) (*g++);
+                               *dst++ = (BYTE) (*b++);
                                *dst++ = 0xFF;
                        }
                        break;
                case RDP_PIXEL_FORMAT_B8G8R8:
                        for (i = 0; i < 4096; i++)
                        {
-                               *dst++ = (uint8) (*b++);
-                               *dst++ = (uint8) (*g++);
-                               *dst++ = (uint8) (*r++);
+                               *dst++ = (BYTE) (*b++);
+                               *dst++ = (BYTE) (*g++);
+                               *dst++ = (BYTE) (*r++);
                        }
                        break;
                case RDP_PIXEL_FORMAT_R8G8B8:
                        for (i = 0; i < 4096; i++)
                        {
-                               *dst++ = (uint8) (*r++);
-                               *dst++ = (uint8) (*g++);
-                               *dst++ = (uint8) (*b++);
+                               *dst++ = (BYTE) (*r++);
+                               *dst++ = (BYTE) (*g++);
+                               *dst++ = (BYTE) (*b++);
                        }
                        break;
                default:
@@ -88,7 +88,7 @@ static void rfx_decode_format_rgb(sint16* r_buf, sint16* g_buf, sint16* b_buf,
 
 #define MINMAX(_v,_l,_h) ((_v) < (_l) ? (_l) : ((_v) > (_h) ? (_h) : (_v)))
 
-void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf)
+void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf)
 {
        /* sint32 is used intentionally because we calculate with shifted factors! */
        sint32 y, cb, cr;
@@ -101,7 +101,7 @@ void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf
         * 1 sign bit + 10 integer bits + 5 fractional bits
         *
         * However only 7 integer bits will be actually used since the value range is [-128.0, 127.0].
-        * In other words, the decoded coeffectients is scaled by << 5 when intepreted as sint16.
+        * In other words, the decoded coeffectients is scaled by << 5 when intepreted as INT16.
         * It was scaled in the quantization phase, so we must scale it back here.
         */
        for (i = 0; i < 4096; i++)
@@ -150,7 +150,7 @@ void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf
 }
 
 static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantization_values,
-       const uint8* data, int size, sint16* buffer)
+       const BYTE* data, int size, INT16* buffer)
 {
        PROFILER_ENTER(context->priv->prof_rfx_decode_component);
 
@@ -176,7 +176,7 @@ static void rfx_decode_component(RFX_CONTEXT* context, const uint32* quantizatio
 void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in,
        int y_size, const uint32 * y_quants,
        int cb_size, const uint32 * cb_quants,
-       int cr_size, const uint32 * cr_quants, uint8* rgb_buffer)
+       int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer)
 {
        PROFILER_ENTER(context->priv->prof_rfx_decode_rgb);
 
index 6691759..f11e358 100644 (file)
 
 #include <freerdp/codec/rfx.h>
 
-void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf);
+void rfx_decode_ycbcr_to_rgb(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf);
 
 void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in,
        int y_size, const uint32 * y_quants,
        int cb_size, const uint32 * cb_quants,
-       int cr_size, const uint32 * cr_quants, uint8* rgb_buffer);
+       int cr_size, const uint32 * cr_quants, BYTE* rgb_buffer);
 
 #endif /* __RFX_DECODE_H */
 
index 2260a17..e80aa98 100644 (file)
 
 #include "rfx_differential.h"
 
-void rfx_differential_decode(sint16* buffer, int buffer_size)
+void rfx_differential_decode(INT16* buffer, int buffer_size)
 {
-       sint16* src;
-       sint16* dst;
+       INT16* src;
+       INT16* dst;
 
        for (src = buffer, dst = buffer + 1; buffer_size > 1; src++, dst++, buffer_size--)
        {
@@ -38,10 +38,10 @@ void rfx_differential_decode(sint16* buffer, int buffer_size)
        }
 }
 
-void rfx_differential_encode(sint16* buffer, int buffer_size)
+void rfx_differential_encode(INT16* buffer, int buffer_size)
 {
-       sint16 n1, n2;
-       sint16* dst;
+       INT16 n1, n2;
+       INT16* dst;
 
        for (n1 = *buffer, dst = buffer + 1; buffer_size > 1; dst++, buffer_size--)
        {
index 724e589..3f6dbf6 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <freerdp/codec/rfx.h>
 
-void rfx_differential_decode(sint16* buffer, int buffer_size);
-void rfx_differential_encode(sint16* buffer, int buffer_size);
+void rfx_differential_decode(INT16* buffer, int buffer_size);
+void rfx_differential_encode(INT16* buffer, int buffer_size);
 
 #endif /* __RFX_DIFFERENTIAL_H */
index 2e92c9c..0b8448b 100644 (file)
 
 #include "rfx_dwt.h"
 
-static void rfx_dwt_2d_decode_block(sint16* buffer, sint16* idwt, int subband_width)
+static void rfx_dwt_2d_decode_block(INT16* buffer, INT16* idwt, int subband_width)
 {
-       sint16 *dst, *l, *h;
-       sint16 *l_dst, *h_dst;
-       sint16 *hl, *lh, *hh, *ll;
+       INT16 *dst, *l, *h;
+       INT16 *l_dst, *h_dst;
+       INT16 *hl, *lh, *hh, *ll;
        int total_width;
        int x, y;
        int n;
@@ -108,18 +108,18 @@ static void rfx_dwt_2d_decode_block(sint16* buffer, sint16* idwt, int subband_wi
        }
 }
 
-void rfx_dwt_2d_decode(sint16* buffer, sint16* dwt_buffer)
+void rfx_dwt_2d_decode(INT16* buffer, INT16* dwt_buffer)
 {
        rfx_dwt_2d_decode_block(buffer + 3840, dwt_buffer, 8);
        rfx_dwt_2d_decode_block(buffer + 3072, dwt_buffer, 16);
        rfx_dwt_2d_decode_block(buffer, dwt_buffer, 32);
 }
 
-static void rfx_dwt_2d_encode_block(sint16* buffer, sint16* dwt, int subband_width)
+static void rfx_dwt_2d_encode_block(INT16* buffer, INT16* dwt, int subband_width)
 {
-       sint16 *src, *l, *h;
-       sint16 *l_src, *h_src;
-       sint16 *hl, *lh, *hh, *ll;
+       INT16 *src, *l, *h;
+       INT16 *l_src, *h_src;
+       INT16 *hl, *lh, *hh, *ll;
        int total_width;
        int x, y;
        int n;
@@ -190,7 +190,7 @@ static void rfx_dwt_2d_encode_block(sint16* buffer, sint16* dwt, int subband_wid
        }
 }
 
-void rfx_dwt_2d_encode(sint16* buffer, sint16* dwt_buffer)
+void rfx_dwt_2d_encode(INT16* buffer, INT16* dwt_buffer)
 {
        rfx_dwt_2d_encode_block(buffer, dwt_buffer, 32);
        rfx_dwt_2d_encode_block(buffer + 3072, dwt_buffer, 16);
index aa95f67..bf57d01 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <freerdp/codec/rfx.h>
 
-void rfx_dwt_2d_decode(sint16* buffer, sint16* dwt_buffer);
-void rfx_dwt_2d_encode(sint16* buffer, sint16* dwt_buffer);
+void rfx_dwt_2d_decode(INT16* buffer, INT16* dwt_buffer);
+void rfx_dwt_2d_encode(INT16* buffer, INT16* dwt_buffer);
 
 #endif /* __RFX_DWT_H */
index 4ca7656..a95a5d9 100644 (file)
 
 #define MINMAX(_v,_l,_h) ((_v) < (_l) ? (_l) : ((_v) > (_h) ? (_h) : (_v)))
 
-static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height, int rowstride,
-       RDP_PIXEL_FORMAT pixel_format, const uint8* palette, sint16* r_buf, sint16* g_buf, sint16* b_buf)
+static void rfx_encode_format_rgb(const BYTE* rgb_data, int width, int height, int rowstride,
+       RDP_PIXEL_FORMAT pixel_format, const BYTE* palette, INT16* r_buf, INT16* g_buf, INT16* b_buf)
 {
        int x, y;
        int x_exceed;
        int y_exceed;
-       const uint8* src;
-       sint16 r, g, b;
-       sint16 *r_last, *g_last, *b_last;
+       const BYTE* src;
+       INT16 r, g, b;
+       INT16 *r_last, *g_last, *b_last;
 
        x_exceed = 64 - width;
        y_exceed = 64 - height;
@@ -58,52 +58,52 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height,
                        case RDP_PIXEL_FORMAT_B8G8R8A8:
                                for (x = 0; x < width; x++)
                                {
-                                       *b_buf++ = (sint16) (*src++);
-                                       *g_buf++ = (sint16) (*src++);
-                                       *r_buf++ = (sint16) (*src++);
+                                       *b_buf++ = (INT16) (*src++);
+                                       *g_buf++ = (INT16) (*src++);
+                                       *r_buf++ = (INT16) (*src++);
                                        src++;
                                }
                                break;
                        case RDP_PIXEL_FORMAT_R8G8B8A8:
                                for (x = 0; x < width; x++)
                                {
-                                       *r_buf++ = (sint16) (*src++);
-                                       *g_buf++ = (sint16) (*src++);
-                                       *b_buf++ = (sint16) (*src++);
+                                       *r_buf++ = (INT16) (*src++);
+                                       *g_buf++ = (INT16) (*src++);
+                                       *b_buf++ = (INT16) (*src++);
                                        src++;
                                }
                                break;
                        case RDP_PIXEL_FORMAT_B8G8R8:
                                for (x = 0; x < width; x++)
                                {
-                                       *b_buf++ = (sint16) (*src++);
-                                       *g_buf++ = (sint16) (*src++);
-                                       *r_buf++ = (sint16) (*src++);
+                                       *b_buf++ = (INT16) (*src++);
+                                       *g_buf++ = (INT16) (*src++);
+                                       *r_buf++ = (INT16) (*src++);
                                }
                                break;
                        case RDP_PIXEL_FORMAT_R8G8B8:
                                for (x = 0; x < width; x++)
                                {
-                                       *r_buf++ = (sint16) (*src++);
-                                       *g_buf++ = (sint16) (*src++);
-                                       *b_buf++ = (sint16) (*src++);
+                                       *r_buf++ = (INT16) (*src++);
+                                       *g_buf++ = (INT16) (*src++);
+                                       *b_buf++ = (INT16) (*src++);
                                }
                                break;
                        case RDP_PIXEL_FORMAT_B5G6R5_LE:
                                for (x = 0; x < width; x++)
                                {
-                                       *b_buf++ = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
-                                       *g_buf++ = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
-                                       *r_buf++ = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
+                                       *b_buf++ = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
+                                       *g_buf++ = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
+                                       *r_buf++ = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
                                        src += 2;
                                }
                                break;
                        case RDP_PIXEL_FORMAT_R5G6B5_LE:
                                for (x = 0; x < width; x++)
                                {
-                                       *r_buf++ = (sint16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
-                                       *g_buf++ = (sint16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
-                                       *b_buf++ = (sint16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
+                                       *r_buf++ = (INT16) (((*(src + 1)) & 0xF8) | ((*(src + 1)) >> 5));
+                                       *g_buf++ = (INT16) ((((*(src + 1)) & 0x07) << 5) | (((*src) & 0xE0) >> 3));
+                                       *b_buf++ = (INT16) ((((*src) & 0x1F) << 3) | (((*src) >> 2) & 0x07));
                                        src += 2;
                                }
                                break;
@@ -113,7 +113,7 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height,
                                for (x = 0; x < width; x++)
                                {
                                        int shift;
-                                       uint8 idx;
+                                       BYTE idx;
 
                                        shift = (7 - (x % 8));
                                        idx = ((*src) >> shift) & 1;
@@ -121,9 +121,9 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height,
                                        idx |= (((*(src + 2)) >> shift) & 1) << 2;
                                        idx |= (((*(src + 3)) >> shift) & 1) << 3;
                                        idx *= 3;
-                                       *r_buf++ = (sint16) palette[idx];
-                                       *g_buf++ = (sint16) palette[idx + 1];
-                                       *b_buf++ = (sint16) palette[idx + 2];
+                                       *r_buf++ = (INT16) palette[idx];
+                                       *g_buf++ = (INT16) palette[idx + 1];
+                                       *b_buf++ = (INT16) palette[idx + 2];
                                        if (shift == 0)
                                                src += 4;
                                }
@@ -135,9 +135,9 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height,
                                {
                                        int idx = (*src) * 3;
 
-                                       *r_buf++ = (sint16) palette[idx];
-                                       *g_buf++ = (sint16) palette[idx + 1];
-                                       *b_buf++ = (sint16) palette[idx + 2];
+                                       *r_buf++ = (INT16) palette[idx];
+                                       *g_buf++ = (INT16) palette[idx + 1];
+                                       *b_buf++ = (INT16) palette[idx + 2];
                                        src++;
                                }
                                break;
@@ -169,9 +169,9 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height,
 
                while (y_exceed > 0)
                {
-                       memcpy(r_buf, r_last, 64 * sizeof(sint16));
-                       memcpy(g_buf, g_last, 64 * sizeof(sint16));
-                       memcpy(b_buf, b_last, 64 * sizeof(sint16));
+                       memcpy(r_buf, r_last, 64 * sizeof(INT16));
+                       memcpy(g_buf, g_last, 64 * sizeof(INT16));
+                       memcpy(b_buf, b_last, 64 * sizeof(INT16));
                        r_buf += 64;
                        g_buf += 64;
                        b_buf += 64;
@@ -180,7 +180,7 @@ static void rfx_encode_format_rgb(const uint8* rgb_data, int width, int height,
        }
 }
 
-void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf)
+void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf)
 {
        /* sint32 is used intentionally because we calculate with shifted factors! */
        int i;
@@ -193,7 +193,7 @@ void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf
         * 1 sign bit + 10 integer bits + 5 fractional bits
         *
         * However only 7 integer bits will be actually used since the value range is [-128.0, 127.0].
-        * In other words, the encoded coefficients is scaled by << 5 when interpreted as sint16.
+        * In other words, the encoded coefficients is scaled by << 5 when interpreted as INT16.
         * It will be scaled down to original during the quantization phase.
         */
        for (i = 0; i < 4096; i++)
@@ -223,7 +223,7 @@ void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf
 }
 
 static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantization_values,
-       sint16* data, uint8* buffer, int buffer_size, int* size)
+       INT16* data, BYTE* buffer, int buffer_size, int* size)
 {
        PROFILER_ENTER(context->priv->prof_rfx_encode_component);
 
@@ -246,13 +246,13 @@ static void rfx_encode_component(RFX_CONTEXT* context, const uint32* quantizatio
        PROFILER_EXIT(context->priv->prof_rfx_encode_component);
 }
 
-void rfx_encode_rgb(RFX_CONTEXT* context, const uint8* rgb_data, int width, int height, int rowstride,
+void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride,
        const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants,
        STREAM* data_out, int* y_size, int* cb_size, int* cr_size)
 {
-       sint16* y_r_buffer = context->priv->y_r_buffer;
-       sint16* cb_g_buffer = context->priv->cb_g_buffer;
-       sint16* cr_b_buffer = context->priv->cr_b_buffer;
+       INT16* y_r_buffer = context->priv->y_r_buffer;
+       INT16* cb_g_buffer = context->priv->cb_g_buffer;
+       INT16* cr_b_buffer = context->priv->cr_b_buffer;
 
        PROFILER_ENTER(context->priv->prof_rfx_encode_rgb);
 
index f466c52..0203b4f 100644 (file)
@@ -22,9 +22,9 @@
 
 #include <freerdp/codec/rfx.h>
 
-void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf);
+void rfx_encode_rgb_to_ycbcr(INT16* y_r_buf, INT16* cb_g_buf, INT16* cr_b_buf);
 
-void rfx_encode_rgb(RFX_CONTEXT* context, const uint8* rgb_data, int width, int height, int rowstride,
+void rfx_encode_rgb(RFX_CONTEXT* context, const BYTE* rgb_data, int width, int height, int rowstride,
        const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants,
        STREAM* data_out, int* y_size, int* cb_size, int* cr_size);
 
index 1706717..ab313cb 100644 (file)
@@ -36,7 +36,7 @@
 #endif
 
 
-void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sint16 * cr_b_buffer)
+void rfx_decode_YCbCr_to_RGB_NEON(INT16 * y_r_buffer, INT16 * cb_g_buffer, INT16 * cr_b_buffer)
 {
        int16x8_t zero = vdupq_n_s16(0);
        int16x8_t max = vdupq_n_s16(255);
@@ -49,10 +49,10 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin
        int i;
        for (i = 0; i < 4096 / 8; i++)
        {
-               int16x8_t y = vld1q_s16((sint16*)&y_r_buf[i]);
+               int16x8_t y = vld1q_s16((INT16*)&y_r_buf[i]);
                y = vaddq_s16(y, y_add);
 
-               int16x8_t cr = vld1q_s16((sint16*)&cr_b_buf[i]);
+               int16x8_t cr = vld1q_s16((INT16*)&cr_b_buf[i]);
 
                // r = between((y + cr + (cr >> 2) + (cr >> 3) + (cr >> 5)), 0, 255);
                int16x8_t r = vaddq_s16(y, cr);
@@ -60,10 +60,10 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin
                r = vaddq_s16(r, vshrq_n_s16(cr, 3));
                r = vaddq_s16(r, vshrq_n_s16(cr, 5));
                r = vminq_s16(vmaxq_s16(r, zero), max);
-               vst1q_s16((sint16*)&y_r_buf[i], r);
+               vst1q_s16((INT16*)&y_r_buf[i], r);
 
                // cb = cb_g_buf[i];
-               int16x8_t cb = vld1q_s16((sint16*)&cb_g_buf[i]);
+               int16x8_t cb = vld1q_s16((INT16*)&cb_g_buf[i]);
 
                // g = between(y - (cb >> 2) - (cb >> 4) - (cb >> 5) - (cr >> 1) - (cr >> 3) - (cr >> 4) - (cr >> 5), 0, 255);
                int16x8_t g = vsubq_s16(y, vshrq_n_s16(cb, 2));
@@ -74,7 +74,7 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin
                g = vsubq_s16(g, vshrq_n_s16(cr, 4));
                g = vsubq_s16(g, vshrq_n_s16(cr, 5));
                g = vminq_s16(vmaxq_s16(g, zero), max);
-               vst1q_s16((sint16*)&cb_g_buf[i], g);
+               vst1q_s16((INT16*)&cb_g_buf[i], g);
 
                // b = between((y + cb + (cb >> 1) + (cb >> 2) + (cb >> 6)), 0, 255);
                int16x8_t b = vaddq_s16(y, cb);
@@ -82,13 +82,13 @@ void rfx_decode_YCbCr_to_RGB_NEON(sint16 * y_r_buffer, sint16 * cb_g_buffer, sin
                b = vaddq_s16(b, vshrq_n_s16(cb, 2));
                b = vaddq_s16(b, vshrq_n_s16(cb, 6));
                b = vminq_s16(vmaxq_s16(b, zero), max);
-               vst1q_s16((sint16*)&cr_b_buf[i], b);
+               vst1q_s16((INT16*)&cr_b_buf[i], b);
        }
 
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_quantization_decode_block_NEON(sint16 * buffer, const int buffer_size, const uint32 factor)
+rfx_quantization_decode_block_NEON(INT16 * buffer, const int buffer_size, const uint32 factor)
 {
        if (factor <= 6)
                return;
@@ -98,16 +98,16 @@ rfx_quantization_decode_block_NEON(sint16 * buffer, const int buffer_size, const
 
        do
        {
-               int16x8_t val = vld1q_s16((sint16*)buf);
+               int16x8_t val = vld1q_s16((INT16*)buf);
                val = vshlq_s16(val, quantFactors);
-               vst1q_s16((sint16*)buf, val);
+               vst1q_s16((INT16*)buf, val);
                buf++;
        }
        while(buf < buf_end);
 }
 
 void
-rfx_quantization_decode_NEON(sint16 * buffer, const uint32 * quantization_values)
+rfx_quantization_decode_NEON(INT16 * buffer, const uint32 * quantization_values)
 {
        rfx_quantization_decode_block_NEON(buffer, 1024, quantization_values[8]); /* HL1 */
        rfx_quantization_decode_block_NEON(buffer + 1024, 1024, quantization_values[7]); /* LH1 */
@@ -124,12 +124,12 @@ rfx_quantization_decode_NEON(sint16 * buffer, const uint32 * quantization_values
 
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_decode_block_horiz_NEON(sint16 * l, sint16 * h, sint16 * dst, int subband_width)
+rfx_dwt_2d_decode_block_horiz_NEON(INT16 * l, INT16 * h, INT16 * dst, int subband_width)
 {
        int y, n;
-       sint16 * l_ptr = l;
-       sint16 * h_ptr = h;
-       sint16 * dst_ptr = dst;
+       INT16 * l_ptr = l;
+       INT16 * h_ptr = h;
+       INT16 * dst_ptr = dst;
 
        for (y = 0; y < subband_width; y++)
        {
@@ -195,12 +195,12 @@ rfx_dwt_2d_decode_block_horiz_NEON(sint16 * l, sint16 * h, sint16 * dst, int sub
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_decode_block_vert_NEON(sint16 * l, sint16 * h, sint16 * dst, int subband_width)
+rfx_dwt_2d_decode_block_vert_NEON(INT16 * l, INT16 * h, INT16 * dst, int subband_width)
 {
        int x, n;
-       sint16 * l_ptr = l;
-       sint16 * h_ptr = h;
-       sint16 * dst_ptr = dst;
+       INT16 * l_ptr = l;
+       INT16 * h_ptr = h;
+       INT16 * dst_ptr = dst;
 
        int total_width = subband_width + subband_width;
 
@@ -269,10 +269,10 @@ rfx_dwt_2d_decode_block_vert_NEON(sint16 * l, sint16 * h, sint16 * dst, int subb
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_decode_block_NEON(sint16 * buffer, sint16 * idwt, int subband_width)
+rfx_dwt_2d_decode_block_NEON(INT16 * buffer, INT16 * idwt, int subband_width)
 {
-       sint16 * hl, * lh, * hh, * ll;
-       sint16 * l_dst, * h_dst;
+       INT16 * hl, * lh, * hh, * ll;
+       INT16 * l_dst, * h_dst;
 
        /* Inverse DWT in horizontal direction, results in 2 sub-bands in L, H order in tmp buffer idwt. */
        /* The 4 sub-bands are stored in HL(0), LH(1), HH(2), LL(3) order. */
@@ -296,7 +296,7 @@ rfx_dwt_2d_decode_block_NEON(sint16 * buffer, sint16 * idwt, int subband_width)
 }
 
 void
-rfx_dwt_2d_decode_NEON(sint16 * buffer, sint16 * dwt_buffer)
+rfx_dwt_2d_decode_NEON(INT16 * buffer, INT16 * dwt_buffer)
 {
        rfx_dwt_2d_decode_block_NEON(buffer + 3840, dwt_buffer, 8);
        rfx_dwt_2d_decode_block_NEON(buffer + 3072, dwt_buffer, 16);
index eb4e5a2..7032a25 100644 (file)
@@ -81,7 +81,7 @@ RFX_TILE* rfx_pool_get_tile(RFX_POOL* pool)
        if (pool->count < 1)
        {
                tile = xnew(RFX_TILE);
-               tile->data = (uint8*) malloc(4096 * 4); /* 64x64 * 4 */
+               tile->data = (BYTE*) malloc(4096 * 4); /* 64x64 * 4 */
        }
        else
        {
index 9a71db0..f2edfd2 100644 (file)
@@ -23,9 +23,9 @@
 
 #include "rfx_quantization.h"
 
-static void rfx_quantization_decode_block(sint16* buffer, int buffer_size, uint32 factor)
+static void rfx_quantization_decode_block(INT16* buffer, int buffer_size, uint32 factor)
 {
-       sint16* dst;
+       INT16* dst;
 
        if (factor == 0)
                return;
@@ -36,7 +36,7 @@ static void rfx_quantization_decode_block(sint16* buffer, int buffer_size, uint3
        }
 }
 
-void rfx_quantization_decode(sint16* buffer, const uint32* quantization_values)
+void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values)
 {
        /* Scale the values so that they are represented as 11.5 fixed-point number */
        rfx_quantization_decode_block(buffer, 4096, 5);
@@ -53,10 +53,10 @@ void rfx_quantization_decode(sint16* buffer, const uint32* quantization_values)
        rfx_quantization_decode_block(buffer + 4032, 64, quantization_values[0] - 6); /* LL3 */
 }
 
-static void rfx_quantization_encode_block(sint16* buffer, int buffer_size, uint32 factor)
+static void rfx_quantization_encode_block(INT16* buffer, int buffer_size, uint32 factor)
 {
-       sint16* dst;
-       sint16 half;
+       INT16* dst;
+       INT16 half;
 
        if (factor == 0)
                return;
@@ -68,7 +68,7 @@ static void rfx_quantization_encode_block(sint16* buffer, int buffer_size, uint3
        }
 }
 
-void rfx_quantization_encode(sint16* buffer, const uint32* quantization_values)
+void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values)
 {
        rfx_quantization_encode_block(buffer, 1024, quantization_values[8] - 6); /* HL1 */
        rfx_quantization_encode_block(buffer + 1024, 1024, quantization_values[7] - 6); /* LH1 */
index ba9fccb..c6731b1 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <freerdp/codec/rfx.h>
 
-void rfx_quantization_decode(sint16* buffer, const uint32* quantization_values);
-void rfx_quantization_encode(sint16* buffer, const uint32* quantization_values);
+void rfx_quantization_decode(INT16* buffer, const uint32* quantization_values);
+void rfx_quantization_encode(INT16* buffer, const uint32* quantization_values);
 
 #endif /* __RFX_QUANTIZATION_H */
index 9a7b1ba..84d4100 100644 (file)
@@ -63,7 +63,7 @@
                nZeroesWritten = buffer_size; \
        if (nZeroesWritten > 0) \
        { \
-               memset(dst, 0, nZeroesWritten * sizeof(sint16)); \
+               memset(dst, 0, nZeroesWritten * sizeof(INT16)); \
                dst += nZeroesWritten; \
        } \
        buffer_size -= (nZeroes); \
@@ -82,7 +82,7 @@
 }
 
 /* Converts from (2 * magnitude - sign) to integer */
-#define GetIntFrom2MagSign(twoMs) (((twoMs) & 1) ? -1 * (sint16)(((twoMs) + 1) >> 1) : (sint16)((twoMs) >> 1))
+#define GetIntFrom2MagSign(twoMs) (((twoMs) & 1) ? -1 * (INT16)(((twoMs) + 1) >> 1) : (INT16)((twoMs) >> 1))
 
 /*
  * Update the passed parameter and clamp it to the range [0, KPMAX]
                UpdateParam(*krp, vk, *kr); /* at 1, no change! */ \
        }
 
-int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* buffer, int buffer_size)
+int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buffer, int buffer_size)
 {
        int k;
        int kp;
        int kr;
        int krp;
-       uint16 r;
-       sint16* dst;
+       UINT16 r;
+       INT16* dst;
        RFX_BITSTREAM* bs;
 
        int vk;
-       uint16 mag16;
+       UINT16 mag16;
 
        bs = xnew(RFX_BITSTREAM);
        rfx_bitstream_attach(bs, data, data_size);
@@ -259,7 +259,7 @@ int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* bu
 /* Emit a bit (0 or 1), count number of times, to the output bitstream */
 #define OutputBit(count, bit) \
 {      \
-       uint16 _b = (bit ? 0xFFFF : 0); \
+       UINT16 _b = (bit ? 0xFFFF : 0); \
        int _c = (count); \
        for (; _c > 0; _c -= 16) \
                rfx_bitstream_put_bits(bs, _b, (_c > 16 ? 16 : _c)); \
@@ -298,7 +298,7 @@ static void rfx_rlgr_code_gr(RFX_BITSTREAM* bs, int* krp, uint32 val)
        }
 }
 
-int rfx_rlgr_encode(RLGR_MODE mode, const sint16* data, int data_size, uint8* buffer, int buffer_size)
+int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buffer, int buffer_size)
 {
        int k;
        int kp;
index 264beab..07fa895 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <freerdp/codec/rfx.h>
 
-int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* buffer, int buffer_size);
-int rfx_rlgr_encode(RLGR_MODE mode, const sint16* data, int data_size, uint8* buffer, int buffer_size);
+int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* data, int data_size, INT16* buffer, int buffer_size);
+int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, int data_size, BYTE* buffer, int buffer_size);
 
 #endif /* __RFX_RLGR_H */
index bcb32ea..608c531 100644 (file)
@@ -52,7 +52,7 @@ _mm_prefetch_buffer(char * buffer, int num_bytes)
        }
 }
 
-static void rfx_decode_ycbcr_to_rgb_sse2(sint16* y_r_buffer, sint16* cb_g_buffer, sint16* cr_b_buffer)
+static void rfx_decode_ycbcr_to_rgb_sse2(INT16* y_r_buffer, INT16* cb_g_buffer, INT16* cr_b_buffer)
 {      
        __m128i zero = _mm_setzero_si128();
        __m128i max = _mm_set1_epi16(255);
@@ -76,13 +76,13 @@ static void rfx_decode_ycbcr_to_rgb_sse2(sint16* y_r_buffer, sint16* cb_g_buffer
        __m128i b_cb = _mm_set1_epi16(28999);   //  1.770 << 14
        __m128i c4096 = _mm_set1_epi16(4096);
 
-       for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i)))
+       for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i)))
        {
                _mm_prefetch((char*)(&y_r_buf[i]), _MM_HINT_NTA);
                _mm_prefetch((char*)(&cb_g_buf[i]), _MM_HINT_NTA);
                _mm_prefetch((char*)(&cr_b_buf[i]), _MM_HINT_NTA);
        }
-       for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i++)
+       for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i++)
        {
                /*
                In order to use SSE2 signed 16-bit integer multiplication we need to convert
@@ -135,7 +135,7 @@ static void rfx_decode_ycbcr_to_rgb_sse2(sint16* y_r_buffer, sint16* cb_g_buffer
 }
 
 /* The encodec YCbCr coeffectients are represented as 11.5 fixed-point numbers. See rfx_encode.c */
-static void rfx_encode_rgb_to_ycbcr_sse2(sint16* y_r_buffer, sint16* cb_g_buffer, sint16* cr_b_buffer)
+static void rfx_encode_rgb_to_ycbcr_sse2(INT16* y_r_buffer, INT16* cb_g_buffer, INT16* cr_b_buffer)
 {
        __m128i min = _mm_set1_epi16(-128 << 5);
        __m128i max = _mm_set1_epi16(127 << 5);
@@ -163,13 +163,13 @@ static void rfx_encode_rgb_to_ycbcr_sse2(sint16* y_r_buffer, sint16* cb_g_buffer
 
        int i;
 
-       for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i)))
+       for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i += (CACHE_LINE_BYTES / sizeof(__m128i)))
        {
                _mm_prefetch((char*)(&y_r_buf[i]), _MM_HINT_NTA);
                _mm_prefetch((char*)(&cb_g_buf[i]), _MM_HINT_NTA);
                _mm_prefetch((char*)(&cr_b_buf[i]), _MM_HINT_NTA);
        }
-       for (i = 0; i < (4096 * sizeof(sint16) / sizeof(__m128i)); i++)
+       for (i = 0; i < (4096 * sizeof(INT16) / sizeof(__m128i)); i++)
        {
                /*
                In order to use SSE2 signed 16-bit integer multiplication we need to convert
@@ -225,7 +225,7 @@ static void rfx_encode_rgb_to_ycbcr_sse2(sint16* y_r_buffer, sint16* cb_g_buffer
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_quantization_decode_block_sse2(sint16* buffer, const int buffer_size, const uint32 factor)
+rfx_quantization_decode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor)
 {
        __m128i a;
        __m128i * ptr = (__m128i*) buffer;
@@ -244,9 +244,9 @@ rfx_quantization_decode_block_sse2(sint16* buffer, const int buffer_size, const
        } while(ptr < buf_end);
 }
 
-static void rfx_quantization_decode_sse2(sint16* buffer, const uint32* quantization_values)
+static void rfx_quantization_decode_sse2(INT16* buffer, const uint32* quantization_values)
 {
-       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16));
+       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16));
 
        rfx_quantization_decode_block_sse2(buffer, 4096, 5);
 
@@ -263,7 +263,7 @@ static void rfx_quantization_decode_sse2(sint16* buffer, const uint32* quantizat
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_quantization_encode_block_sse2(sint16* buffer, const int buffer_size, const uint32 factor)
+rfx_quantization_encode_block_sse2(INT16* buffer, const int buffer_size, const uint32 factor)
 {
        __m128i a;
        __m128i* ptr = (__m128i*) buffer;
@@ -285,9 +285,9 @@ rfx_quantization_encode_block_sse2(sint16* buffer, const int buffer_size, const
        } while(ptr < buf_end);
 }
 
-static void rfx_quantization_encode_sse2(sint16* buffer, const uint32* quantization_values)
+static void rfx_quantization_encode_sse2(INT16* buffer, const uint32* quantization_values)
 {
-       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16));
+       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16));
 
        rfx_quantization_encode_block_sse2(buffer, 1024, quantization_values[8] - 6); /* HL1 */
        rfx_quantization_encode_block_sse2(buffer + 1024, 1024, quantization_values[7] - 6); /* LH1 */
@@ -304,12 +304,12 @@ static void rfx_quantization_encode_sse2(sint16* buffer, const uint32* quantizat
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_decode_block_horiz_sse2(sint16* l, sint16* h, sint16* dst, int subband_width)
+rfx_dwt_2d_decode_block_horiz_sse2(INT16* l, INT16* h, INT16* dst, int subband_width)
 {
        int y, n;
-       sint16* l_ptr = l;
-       sint16* h_ptr = h;
-       sint16* dst_ptr = dst;
+       INT16* l_ptr = l;
+       INT16* h_ptr = h;
+       INT16* dst_ptr = dst;
        int first;
        int last;
        __m128i l_n;
@@ -388,12 +388,12 @@ rfx_dwt_2d_decode_block_horiz_sse2(sint16* l, sint16* h, sint16* dst, int subban
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_decode_block_vert_sse2(sint16* l, sint16* h, sint16* dst, int subband_width)
+rfx_dwt_2d_decode_block_vert_sse2(INT16* l, INT16* h, INT16* dst, int subband_width)
 {
        int x, n;
-       sint16* l_ptr = l;
-       sint16* h_ptr = h;
-       sint16* dst_ptr = dst;
+       INT16* l_ptr = l;
+       INT16* h_ptr = h;
+       INT16* dst_ptr = dst;
        __m128i l_n;
        __m128i h_n;
        __m128i tmp_n;
@@ -469,12 +469,12 @@ rfx_dwt_2d_decode_block_vert_sse2(sint16* l, sint16* h, sint16* dst, int subband
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_decode_block_sse2(sint16* buffer, sint16* idwt, int subband_width)
+rfx_dwt_2d_decode_block_sse2(INT16* buffer, INT16* idwt, int subband_width)
 {
-       sint16 *hl, *lh, *hh, *ll;
-       sint16 *l_dst, *h_dst;
+       INT16 *hl, *lh, *hh, *ll;
+       INT16 *l_dst, *h_dst;
 
-       _mm_prefetch_buffer((char*) idwt, subband_width * 4 * sizeof(sint16));
+       _mm_prefetch_buffer((char*) idwt, subband_width * 4 * sizeof(INT16));
 
        /* Inverse DWT in horizontal direction, results in 2 sub-bands in L, H order in tmp buffer idwt. */
        /* The 4 sub-bands are stored in HL(0), LH(1), HH(2), LL(3) order. */
@@ -497,9 +497,9 @@ rfx_dwt_2d_decode_block_sse2(sint16* buffer, sint16* idwt, int subband_width)
        rfx_dwt_2d_decode_block_vert_sse2(l_dst, h_dst, buffer, subband_width);
 }
 
-static void rfx_dwt_2d_decode_sse2(sint16* buffer, sint16* dwt_buffer)
+static void rfx_dwt_2d_decode_sse2(INT16* buffer, INT16* dwt_buffer)
 {
-       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16));
+       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16));
        
        rfx_dwt_2d_decode_block_sse2(buffer + 3840, dwt_buffer, 8);
        rfx_dwt_2d_decode_block_sse2(buffer + 3072, dwt_buffer, 16);
@@ -507,7 +507,7 @@ static void rfx_dwt_2d_decode_sse2(sint16* buffer, sint16* dwt_buffer)
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_encode_block_vert_sse2(sint16* src, sint16* l, sint16* h, int subband_width)
+rfx_dwt_2d_encode_block_vert_sse2(INT16* src, INT16* l, INT16* h, int subband_width)
 {
        int total_width;
        int x;
@@ -563,7 +563,7 @@ rfx_dwt_2d_encode_block_vert_sse2(sint16* src, sint16* l, sint16* h, int subband
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_encode_block_horiz_sse2(sint16* src, sint16* l, sint16* h, int subband_width)
+rfx_dwt_2d_encode_block_horiz_sse2(INT16* src, INT16* l, INT16* h, int subband_width)
 {
        int y;
        int n;
@@ -617,12 +617,12 @@ rfx_dwt_2d_encode_block_horiz_sse2(sint16* src, sint16* l, sint16* h, int subban
 }
 
 static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-rfx_dwt_2d_encode_block_sse2(sint16* buffer, sint16* dwt, int subband_width)
+rfx_dwt_2d_encode_block_sse2(INT16* buffer, INT16* dwt, int subband_width)
 {
-       sint16 *hl, *lh, *hh, *ll;
-       sint16 *l_src, *h_src;
+       INT16 *hl, *lh, *hh, *ll;
+       INT16 *l_src, *h_src;
 
-       _mm_prefetch_buffer((char*) dwt, subband_width * 4 * sizeof(sint16));
+       _mm_prefetch_buffer((char*) dwt, subband_width * 4 * sizeof(INT16));
 
        /* DWT in vertical direction, results in 2 sub-bands in L, H order in tmp buffer dwt. */
 
@@ -645,9 +645,9 @@ rfx_dwt_2d_encode_block_sse2(sint16* buffer, sint16* dwt, int subband_width)
        rfx_dwt_2d_encode_block_horiz_sse2(h_src, lh, hh, subband_width);
 }
 
-static void rfx_dwt_2d_encode_sse2(sint16* buffer, sint16* dwt_buffer)
+static void rfx_dwt_2d_encode_sse2(INT16* buffer, INT16* dwt_buffer)
 {
-       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(sint16));
+       _mm_prefetch_buffer((char*) buffer, 4096 * sizeof(INT16));
        
        rfx_dwt_2d_encode_block_sse2(buffer, dwt_buffer, 32);
        rfx_dwt_2d_encode_block_sse2(buffer + 3072, dwt_buffer, 16);
index 64b72fd..223cbf9 100644 (file)
@@ -41,17 +41,17 @@ struct _RFX_CONTEXT_PRIV
 
        RFX_POOL* pool; /* memory pool */
 
-       sint16 y_r_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
-       sint16 cb_g_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
-       sint16 cr_b_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
+       INT16 y_r_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
+       INT16 cb_g_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
+       INT16 cr_b_mem[4096 + 8]; /* 4096 = 64x64 (+ 8x2 = 16 for mem align) */
  
-       sint16* y_r_buffer;
-       sint16* cb_g_buffer;
-       sint16* cr_b_buffer;
+       INT16* y_r_buffer;
+       INT16* cb_g_buffer;
+       INT16* cr_b_buffer;
  
-       sint16 dwt_mem[32 * 32 * 2 * 2 + 8]; /* maximum sub-band width is 32 */
+       INT16 dwt_mem[32 * 32 * 2 * 2 + 8]; /* maximum sub-band width is 32 */
 
-       sint16* dwt_buffer;
+       INT16* dwt_buffer;
 
        /* profilers */
        PROFILER_DEFINE(prof_rfx_decode_rgb);
index dd1f49e..db54dc1 100644 (file)
@@ -36,8 +36,8 @@ static const char* const CTRLACTION_STRINGS[] =
 
 void rdp_write_synchronize_pdu(STREAM* s, rdpSettings* settings)
 {
-       stream_write_uint16(s, SYNCMSGTYPE_SYNC); /* messageType (2 bytes) */
-       stream_write_uint16(s, settings->pdu_source); /* targetUser (2 bytes) */
+       stream_write_UINT16(s, SYNCMSGTYPE_SYNC); /* messageType (2 bytes) */
+       stream_write_UINT16(s, settings->pdu_source); /* targetUser (2 bytes) */
 }
 
 BOOL rdp_recv_synchronize_pdu(rdpRdp* rdp, STREAM* s)
@@ -68,20 +68,20 @@ BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp)
 
 BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint16 messageType;
+       UINT16 messageType;
 
        rdp->finalize_sc_pdus |= FINALIZE_SC_SYNCHRONIZE_PDU;
 
        if (stream_get_left(s) < 4)
                return FALSE;
 
-       stream_read_uint16(s, messageType); /* messageType (2 bytes) */
+       stream_read_UINT16(s, messageType); /* messageType (2 bytes) */
 
        if (messageType != SYNCMSGTYPE_SYNC)
                return FALSE;
 
        /* targetUser (2 bytes) */
-       stream_seek_uint16(s);
+       stream_seek_UINT16(s);
 
        return TRUE;
 }
@@ -97,28 +97,28 @@ BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp)
        return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->user_id);
 }
 
-BOOL rdp_recv_control_pdu(STREAM* s, uint16* action)
+BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action)
 {
        if (stream_get_left(s) < 8)
                return FALSE;
 
-       stream_read_uint16(s, *action); /* action (2 bytes) */
-       stream_seek_uint16(s); /* grantId (2 bytes) */
+       stream_read_UINT16(s, *action); /* action (2 bytes) */
+       stream_seek_UINT16(s); /* grantId (2 bytes) */
        stream_seek_uint32(s); /* controlId (4 bytes) */
 
        return TRUE;
 }
 
-void rdp_write_client_control_pdu(STREAM* s, uint16 action)
+void rdp_write_client_control_pdu(STREAM* s, UINT16 action)
 {
-       stream_write_uint16(s, action); /* action (2 bytes) */
-       stream_write_uint16(s, 0); /* grantId (2 bytes) */
+       stream_write_UINT16(s, action); /* action (2 bytes) */
+       stream_write_UINT16(s, 0); /* grantId (2 bytes) */
        stream_write_uint32(s, 0); /* controlId (4 bytes) */
 }
 
 BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint16 action;
+       UINT16 action;
 
        rdp_recv_control_pdu(s, &action);
 
@@ -142,8 +142,8 @@ BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp)
 
        s = rdp_data_pdu_init(rdp);
 
-       stream_write_uint16(s, CTRLACTION_COOPERATE); /* action (2 bytes) */
-       stream_write_uint16(s, 0); /* grantId (2 bytes) */
+       stream_write_UINT16(s, CTRLACTION_COOPERATE); /* action (2 bytes) */
+       stream_write_UINT16(s, 0); /* grantId (2 bytes) */
        stream_write_uint32(s, 0); /* controlId (4 bytes) */
 
        rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id);
@@ -157,8 +157,8 @@ BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp)
 
        s = rdp_data_pdu_init(rdp);
 
-       stream_write_uint16(s, CTRLACTION_GRANTED_CONTROL); /* action (2 bytes) */
-       stream_write_uint16(s, rdp->mcs->user_id); /* grantId (2 bytes) */
+       stream_write_UINT16(s, CTRLACTION_GRANTED_CONTROL); /* action (2 bytes) */
+       stream_write_UINT16(s, rdp->mcs->user_id); /* grantId (2 bytes) */
        stream_write_uint32(s, 0x03EA); /* controlId (4 bytes) */
 
        rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id);
@@ -166,7 +166,7 @@ BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp)
        return TRUE;
 }
 
-BOOL rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action)
+BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action)
 {
        STREAM* s;
 
@@ -184,19 +184,19 @@ void rdp_write_persistent_list_entry(STREAM* s, uint32 key1, uint32 key2)
 
 void rdp_write_client_persistent_key_list_pdu(STREAM* s, rdpSettings* settings)
 {
-       stream_write_uint16(s, 0); /* numEntriesCache0 (2 bytes) */
-       stream_write_uint16(s, 0); /* numEntriesCache1 (2 bytes) */
-       stream_write_uint16(s, 0); /* numEntriesCache2 (2 bytes) */
-       stream_write_uint16(s, 0); /* numEntriesCache3 (2 bytes) */
-       stream_write_uint16(s, 0); /* numEntriesCache4 (2 bytes) */
-       stream_write_uint16(s, 0); /* totalEntriesCache0 (2 bytes) */
-       stream_write_uint16(s, 0); /* totalEntriesCache1 (2 bytes) */
-       stream_write_uint16(s, 0); /* totalEntriesCache2 (2 bytes) */
-       stream_write_uint16(s, 0); /* totalEntriesCache3 (2 bytes) */
-       stream_write_uint16(s, 0); /* totalEntriesCache4 (2 bytes) */
-       stream_write_uint8(s, PERSIST_FIRST_PDU | PERSIST_LAST_PDU); /* bBitMask (1 byte) */
-       stream_write_uint8(s, 0); /* pad1 (1 byte) */
-       stream_write_uint16(s, 0); /* pad3 (2 bytes) */
+       stream_write_UINT16(s, 0); /* numEntriesCache0 (2 bytes) */
+       stream_write_UINT16(s, 0); /* numEntriesCache1 (2 bytes) */
+       stream_write_UINT16(s, 0); /* numEntriesCache2 (2 bytes) */
+       stream_write_UINT16(s, 0); /* numEntriesCache3 (2 bytes) */
+       stream_write_UINT16(s, 0); /* numEntriesCache4 (2 bytes) */
+       stream_write_UINT16(s, 0); /* totalEntriesCache0 (2 bytes) */
+       stream_write_UINT16(s, 0); /* totalEntriesCache1 (2 bytes) */
+       stream_write_UINT16(s, 0); /* totalEntriesCache2 (2 bytes) */
+       stream_write_UINT16(s, 0); /* totalEntriesCache3 (2 bytes) */
+       stream_write_UINT16(s, 0); /* totalEntriesCache4 (2 bytes) */
+       stream_write_BYTE(s, PERSIST_FIRST_PDU | PERSIST_LAST_PDU); /* bBitMask (1 byte) */
+       stream_write_BYTE(s, 0); /* pad1 (1 byte) */
+       stream_write_UINT16(s, 0); /* pad3 (2 bytes) */
 
        /* entries */
 }
@@ -219,15 +219,15 @@ BOOL rdp_recv_client_font_list_pdu(STREAM* s)
        return TRUE;
 }
 
-void rdp_write_client_font_list_pdu(STREAM* s, uint16 flags)
+void rdp_write_client_font_list_pdu(STREAM* s, UINT16 flags)
 {
-       stream_write_uint16(s, 0); /* numberFonts (2 bytes) */
-       stream_write_uint16(s, 0); /* totalNumFonts (2 bytes) */
-       stream_write_uint16(s, flags); /* listFlags (2 bytes) */
-       stream_write_uint16(s, 50); /* entrySize (2 bytes) */
+       stream_write_UINT16(s, 0); /* numberFonts (2 bytes) */
+       stream_write_UINT16(s, 0); /* totalNumFonts (2 bytes) */
+       stream_write_UINT16(s, flags); /* listFlags (2 bytes) */
+       stream_write_UINT16(s, 50); /* entrySize (2 bytes) */
 }
 
-BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags)
+BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags)
 {
        STREAM* s;
 
@@ -255,10 +255,10 @@ BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s)
 {
        rdp->finalize_sc_pdus |= FINALIZE_SC_FONT_MAP_PDU;
 
-       stream_seek_uint16(s); /* numberEntries (2 bytes) */
-       stream_seek_uint16(s); /* totalNumEntries (2 bytes) */
-       stream_seek_uint16(s); /* mapFlags (2 bytes) */
-       stream_seek_uint16(s); /* entrySize (2 bytes) */
+       stream_seek_UINT16(s); /* numberEntries (2 bytes) */
+       stream_seek_UINT16(s); /* totalNumEntries (2 bytes) */
+       stream_seek_UINT16(s); /* mapFlags (2 bytes) */
+       stream_seek_UINT16(s); /* entrySize (2 bytes) */
 
        return TRUE;
 }
@@ -269,17 +269,17 @@ BOOL rdp_send_server_font_map_pdu(rdpRdp* rdp)
 
        s = rdp_data_pdu_init(rdp);
 
-       stream_write_uint16(s, 0); /* numberEntries (2 bytes) */
-       stream_write_uint16(s, 0); /* totalNumEntries (2 bytes) */
-       stream_write_uint16(s, FONTLIST_FIRST | FONTLIST_LAST); /* mapFlags (2 bytes) */
-       stream_write_uint16(s, 4); /* entrySize (2 bytes) */
+       stream_write_UINT16(s, 0); /* numberEntries (2 bytes) */
+       stream_write_UINT16(s, 0); /* totalNumEntries (2 bytes) */
+       stream_write_UINT16(s, FONTLIST_FIRST | FONTLIST_LAST); /* mapFlags (2 bytes) */
+       stream_write_UINT16(s, 4); /* entrySize (2 bytes) */
 
        return rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_FONT_MAP, rdp->mcs->user_id);
 }
 
 BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s)
 {
-       uint16 lengthSourceDescriptor;
+       UINT16 lengthSourceDescriptor;
 
        /*
         * Windows XP can send short DEACTIVATE_ALL PDU that doesn't contain
@@ -288,7 +288,7 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s)
        if (stream_get_left(s) > 0)
        {
                stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */
-               stream_read_uint16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
+               stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
                stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor (should be 0x00) */
        }
 
@@ -312,15 +312,15 @@ BOOL rdp_send_deactivate_all(rdpRdp* rdp)
        s = rdp_pdu_init(rdp);
 
        stream_write_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */
-       stream_write_uint16(s, 1); /* lengthSourceDescriptor (2 bytes) */
-       stream_write_uint8(s, 0); /* sourceDescriptor (should be 0x00) */
+       stream_write_UINT16(s, 1); /* lengthSourceDescriptor (2 bytes) */
+       stream_write_BYTE(s, 0); /* sourceDescriptor (should be 0x00) */
 
        return rdp_send_pdu(rdp, s, PDU_TYPE_DEACTIVATE_ALL, rdp->mcs->user_id);
 }
 
 BOOL rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint16 action;
+       UINT16 action;
 
        if (!rdp_recv_control_pdu(s, &action))
                return FALSE;
index 563832e..0a23135 100644 (file)
@@ -46,14 +46,14 @@ BOOL rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s);
 BOOL rdp_send_server_synchronize_pdu(rdpRdp* rdp);
 BOOL rdp_recv_client_synchronize_pdu(rdpRdp* rdp, STREAM* s);
 BOOL rdp_send_client_synchronize_pdu(rdpRdp* rdp);
-BOOL rdp_recv_control_pdu(STREAM* s, uint16* action);
+BOOL rdp_recv_control_pdu(STREAM* s, UINT16* action);
 BOOL rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s);
 BOOL rdp_send_server_control_cooperate_pdu(rdpRdp* rdp);
 BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp);
-BOOL rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action);
+BOOL rdp_send_client_control_pdu(rdpRdp* rdp, UINT16 action);
 BOOL rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp);
 BOOL rdp_recv_client_font_list_pdu(STREAM* s);
-BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags);
+BOOL rdp_send_client_font_list_pdu(rdpRdp* rdp, UINT16 flags);
 BOOL rdp_recv_font_map_pdu(rdpRdp* rdp, STREAM* s);
 BOOL rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s);
 BOOL rdp_recv_client_font_map_pdu(rdpRdp* rdp, STREAM* s);
index c5018f9..1bc4c90 100644 (file)
@@ -69,21 +69,21 @@ static const char* const CAPSET_TYPE_STRINGS[] =
 /* CODEC_GUID_JPEG 0x430C9EED1BAF4CE6869ACB8B37B66237*/
 #define CODEC_GUID_JPEG "\xE6\x4C\xAF\x1B\xED\x9E\x0C\x43\x86\x9A\xCB\x8B\x37\xB6\x62\x37"
 
-void rdp_read_capability_set_header(STREAM* s, uint16* length, uint16* type)
+void rdp_read_capability_set_header(STREAM* s, UINT16* length, UINT16* type)
 {
-       stream_read_uint16(s, *type); /* capabilitySetType */
-       stream_read_uint16(s, *length); /* lengthCapability */
+       stream_read_UINT16(s, *type); /* capabilitySetType */
+       stream_read_UINT16(s, *length); /* lengthCapability */
 }
 
-void rdp_write_capability_set_header(STREAM* s, uint16 length, uint16 type)
+void rdp_write_capability_set_header(STREAM* s, UINT16 length, UINT16 type)
 {
-       stream_write_uint16(s, type); /* capabilitySetType */
-       stream_write_uint16(s, length); /* lengthCapability */
+       stream_write_UINT16(s, type); /* capabilitySetType */
+       stream_write_UINT16(s, length); /* lengthCapability */
 }
 
-uint8* rdp_capability_set_start(STREAM* s)
+BYTE* rdp_capability_set_start(STREAM* s)
 {
-       uint8* header;
+       BYTE* header;
 
        stream_get_mark(s, header);
        stream_write_zero(s, CAPSET_HEADER_LENGTH);
@@ -91,10 +91,10 @@ uint8* rdp_capability_set_start(STREAM* s)
        return header;
 }
 
-void rdp_capability_set_finish(STREAM* s, uint8* header, uint16 type)
+void rdp_capability_set_finish(STREAM* s, BYTE* header, UINT16 type)
 {
-       uint16 length;
-       uint8* footer;
+       UINT16 length;
+       BYTE* footer;
 
        footer = s->p;
        length = footer - header;
@@ -111,31 +111,31 @@ void rdp_capability_set_finish(STREAM* s, uint8* header, uint16 type)
  * @param settings settings
  */
 
-void rdp_read_general_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_general_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       uint16 extraFlags;
-       uint8 refreshRectSupport;
-       uint8 suppressOutputSupport;
+       UINT16 extraFlags;
+       BYTE refreshRectSupport;
+       BYTE suppressOutputSupport;
 
        if (settings->server_mode)
        {
-               stream_read_uint16(s, settings->os_major_type); /* osMajorType (2 bytes) */
-               stream_read_uint16(s, settings->os_minor_type); /* osMinorType (2 bytes) */
+               stream_read_UINT16(s, settings->os_major_type); /* osMajorType (2 bytes) */
+               stream_read_UINT16(s, settings->os_minor_type); /* osMinorType (2 bytes) */
        }
        else
        {
-               stream_seek_uint16(s); /* osMajorType (2 bytes) */
-               stream_seek_uint16(s); /* osMinorType (2 bytes) */
+               stream_seek_UINT16(s); /* osMajorType (2 bytes) */
+               stream_seek_UINT16(s); /* osMinorType (2 bytes) */
        }
-       stream_seek_uint16(s); /* protocolVersion (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */
-       stream_seek_uint16(s); /* generalCompressionTypes (2 bytes) */
-       stream_read_uint16(s, extraFlags); /* extraFlags (2 bytes) */
-       stream_seek_uint16(s); /* updateCapabilityFlag (2 bytes) */
-       stream_seek_uint16(s); /* remoteUnshareFlag (2 bytes) */
-       stream_seek_uint16(s); /* generalCompressionLevel (2 bytes) */
-       stream_read_uint8(s, refreshRectSupport); /* refreshRectSupport (1 byte) */
-       stream_read_uint8(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */
+       stream_seek_UINT16(s); /* protocolVersion (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
+       stream_seek_UINT16(s); /* generalCompressionTypes (2 bytes) */
+       stream_read_UINT16(s, extraFlags); /* extraFlags (2 bytes) */
+       stream_seek_UINT16(s); /* updateCapabilityFlag (2 bytes) */
+       stream_seek_UINT16(s); /* remoteUnshareFlag (2 bytes) */
+       stream_seek_UINT16(s); /* generalCompressionLevel (2 bytes) */
+       stream_read_BYTE(s, refreshRectSupport); /* refreshRectSupport (1 byte) */
+       stream_read_BYTE(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */
 
        if (!(extraFlags & FASTPATH_OUTPUT_SUPPORTED))
                settings->fastpath_output = FALSE;
@@ -156,8 +156,8 @@ void rdp_read_general_capability_set(STREAM* s, uint16 length, rdpSettings* sett
 
 void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 extraFlags;
+       BYTE* header;
+       UINT16 extraFlags;
 
        header = rdp_capability_set_start(s);
 
@@ -172,17 +172,17 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
        if (settings->salted_checksum)
                extraFlags |= ENC_SALTED_CHECKSUM;
 
-       stream_write_uint16(s, settings->os_major_type); /* osMajorType (2 bytes) */
-       stream_write_uint16(s, settings->os_minor_type); /* osMinorType (2 bytes) */
-       stream_write_uint16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */
-       stream_write_uint16(s, 0); /* generalCompressionTypes (2 bytes) */
-       stream_write_uint16(s, extraFlags); /* extraFlags (2 bytes) */
-       stream_write_uint16(s, 0); /* updateCapabilityFlag (2 bytes) */
-       stream_write_uint16(s, 0); /* remoteUnshareFlag (2 bytes) */
-       stream_write_uint16(s, 0); /* generalCompressionLevel (2 bytes) */
-       stream_write_uint8(s, settings->refresh_rect); /* refreshRectSupport (1 byte) */
-       stream_write_uint8(s, settings->suppress_output); /* suppressOutputSupport (1 byte) */
+       stream_write_UINT16(s, settings->os_major_type); /* osMajorType (2 bytes) */
+       stream_write_UINT16(s, settings->os_minor_type); /* osMinorType (2 bytes) */
+       stream_write_UINT16(s, CAPS_PROTOCOL_VERSION); /* protocolVersion (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
+       stream_write_UINT16(s, 0); /* generalCompressionTypes (2 bytes) */
+       stream_write_UINT16(s, extraFlags); /* extraFlags (2 bytes) */
+       stream_write_UINT16(s, 0); /* updateCapabilityFlag (2 bytes) */
+       stream_write_UINT16(s, 0); /* remoteUnshareFlag (2 bytes) */
+       stream_write_UINT16(s, 0); /* generalCompressionLevel (2 bytes) */
+       stream_write_BYTE(s, settings->refresh_rect); /* refreshRectSupport (1 byte) */
+       stream_write_BYTE(s, settings->suppress_output); /* suppressOutputSupport (1 byte) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_GENERAL);
 }
@@ -194,27 +194,27 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_bitmap_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
-{
-       uint8 drawingFlags;
-       uint16 desktopWidth;
-       uint16 desktopHeight;
-       uint16 desktopResizeFlag;
-       uint16 preferredBitsPerPixel;
-
-       stream_read_uint16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */
-       stream_seek_uint16(s); /* receive1BitPerPixel (2 bytes) */
-       stream_seek_uint16(s); /* receive4BitsPerPixel (2 bytes) */
-       stream_seek_uint16(s); /* receive8BitsPerPixel (2 bytes) */
-       stream_read_uint16(s, desktopWidth); /* desktopWidth (2 bytes) */
-       stream_read_uint16(s, desktopHeight); /* desktopHeight (2 bytes) */
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
-       stream_read_uint16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */
-       stream_seek_uint16(s); /* bitmapCompressionFlag (2 bytes) */
-       stream_seek_uint8(s); /* highColorFlags (1 byte) */
-       stream_read_uint8(s, drawingFlags); /* drawingFlags (1 byte) */
-       stream_seek_uint16(s); /* multipleRectangleSupport (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsB (2 bytes) */
+void rdp_read_bitmap_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
+{
+       BYTE drawingFlags;
+       UINT16 desktopWidth;
+       UINT16 desktopHeight;
+       UINT16 desktopResizeFlag;
+       UINT16 preferredBitsPerPixel;
+
+       stream_read_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */
+       stream_seek_UINT16(s); /* receive1BitPerPixel (2 bytes) */
+       stream_seek_UINT16(s); /* receive4BitsPerPixel (2 bytes) */
+       stream_seek_UINT16(s); /* receive8BitsPerPixel (2 bytes) */
+       stream_read_UINT16(s, desktopWidth); /* desktopWidth (2 bytes) */
+       stream_read_UINT16(s, desktopHeight); /* desktopHeight (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
+       stream_read_UINT16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */
+       stream_seek_UINT16(s); /* bitmapCompressionFlag (2 bytes) */
+       stream_seek_BYTE(s); /* highColorFlags (1 byte) */
+       stream_read_BYTE(s, drawingFlags); /* drawingFlags (1 byte) */
+       stream_seek_UINT16(s); /* multipleRectangleSupport (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */
 
        if (!settings->server_mode && preferredBitsPerPixel != settings->color_depth)
        {
@@ -242,10 +242,10 @@ void rdp_read_bitmap_capability_set(STREAM* s, uint16 length, rdpSettings* setti
 
 void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint8 drawingFlags = 0;
-       uint16 desktopResizeFlag;
-       uint16 preferredBitsPerPixel;
+       BYTE* header;
+       BYTE drawingFlags = 0;
+       UINT16 desktopResizeFlag;
+       UINT16 preferredBitsPerPixel;
 
        header = rdp_capability_set_start(s);
 
@@ -258,19 +258,19 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
 
        desktopResizeFlag = settings->desktop_resize;
 
-       stream_write_uint16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */
-       stream_write_uint16(s, 1); /* receive1BitPerPixel (2 bytes) */
-       stream_write_uint16(s, 1); /* receive4BitsPerPixel (2 bytes) */
-       stream_write_uint16(s, 1); /* receive8BitsPerPixel (2 bytes) */
-       stream_write_uint16(s, settings->width); /* desktopWidth (2 bytes) */
-       stream_write_uint16(s, settings->height); /* desktopHeight (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
-       stream_write_uint16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */
-       stream_write_uint16(s, 1); /* bitmapCompressionFlag (2 bytes) */
-       stream_write_uint8(s, 0); /* highColorFlags (1 byte) */
-       stream_write_uint8(s, drawingFlags); /* drawingFlags (1 byte) */
-       stream_write_uint16(s, 1); /* multipleRectangleSupport (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsB (2 bytes) */
+       stream_write_UINT16(s, preferredBitsPerPixel); /* preferredBitsPerPixel (2 bytes) */
+       stream_write_UINT16(s, 1); /* receive1BitPerPixel (2 bytes) */
+       stream_write_UINT16(s, 1); /* receive4BitsPerPixel (2 bytes) */
+       stream_write_UINT16(s, 1); /* receive8BitsPerPixel (2 bytes) */
+       stream_write_UINT16(s, settings->width); /* desktopWidth (2 bytes) */
+       stream_write_UINT16(s, settings->height); /* desktopHeight (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, desktopResizeFlag); /* desktopResizeFlag (2 bytes) */
+       stream_write_UINT16(s, 1); /* bitmapCompressionFlag (2 bytes) */
+       stream_write_BYTE(s, 0); /* highColorFlags (1 byte) */
+       stream_write_BYTE(s, drawingFlags); /* drawingFlags (1 byte) */
+       stream_write_UINT16(s, 1); /* multipleRectangleSupport (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsB (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP);
 }
@@ -282,30 +282,30 @@ void rdp_write_bitmap_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_order_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_order_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        int i;
-       uint16 orderFlags;
-       uint8 orderSupport[32];
-       uint16 orderSupportExFlags;
+       UINT16 orderFlags;
+       BYTE orderSupport[32];
+       UINT16 orderSupportExFlags;
 
        stream_seek(s, 16); /* terminalDescriptor (16 bytes) */
        stream_seek_uint32(s); /* pad4OctetsA (4 bytes) */
-       stream_seek_uint16(s); /* desktopSaveXGranularity (2 bytes) */
-       stream_seek_uint16(s); /* desktopSaveYGranularity (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */
-       stream_seek_uint16(s); /* maximumOrderLevel (2 bytes) */
-       stream_seek_uint16(s); /* numberFonts (2 bytes) */
-       stream_read_uint16(s, orderFlags); /* orderFlags (2 bytes) */
+       stream_seek_UINT16(s); /* desktopSaveXGranularity (2 bytes) */
+       stream_seek_UINT16(s); /* desktopSaveYGranularity (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
+       stream_seek_UINT16(s); /* maximumOrderLevel (2 bytes) */
+       stream_seek_UINT16(s); /* numberFonts (2 bytes) */
+       stream_read_UINT16(s, orderFlags); /* orderFlags (2 bytes) */
        stream_read(s, orderSupport, 32); /* orderSupport (32 bytes) */
-       stream_seek_uint16(s); /* textFlags (2 bytes) */
-       stream_read_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */
+       stream_seek_UINT16(s); /* textFlags (2 bytes) */
+       stream_read_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */
        stream_seek_uint32(s); /* pad4OctetsB (4 bytes) */
        stream_seek_uint32(s); /* desktopSaveSize (4 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsC (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsD (2 bytes) */
-       stream_seek_uint16(s); /* textANSICodePage (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsE (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsC (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsD (2 bytes) */
+       stream_seek_UINT16(s); /* textANSICodePage (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsE (2 bytes) */
 
        for (i = 0; i < 32; i++)
        {
@@ -323,10 +323,10 @@ void rdp_read_order_capability_set(STREAM* s, uint16 length, rdpSettings* settin
 
 void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 orderFlags;
-       uint16 orderSupportExFlags;
-       uint16 textANSICodePage;
+       BYTE* header;
+       UINT16 orderFlags;
+       UINT16 orderSupportExFlags;
+       UINT16 textANSICodePage;
 
        header = rdp_capability_set_start(s);
 
@@ -350,21 +350,21 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
 
        stream_write_zero(s, 16); /* terminalDescriptor (16 bytes) */
        stream_write_uint32(s, 0); /* pad4OctetsA (4 bytes) */
-       stream_write_uint16(s, 1); /* desktopSaveXGranularity (2 bytes) */
-       stream_write_uint16(s, 20); /* desktopSaveYGranularity (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */
-       stream_write_uint16(s, 1); /* maximumOrderLevel (2 bytes) */
-       stream_write_uint16(s, 0); /* numberFonts (2 bytes) */
-       stream_write_uint16(s, orderFlags); /* orderFlags (2 bytes) */
+       stream_write_UINT16(s, 1); /* desktopSaveXGranularity (2 bytes) */
+       stream_write_UINT16(s, 20); /* desktopSaveYGranularity (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
+       stream_write_UINT16(s, 1); /* maximumOrderLevel (2 bytes) */
+       stream_write_UINT16(s, 0); /* numberFonts (2 bytes) */
+       stream_write_UINT16(s, orderFlags); /* orderFlags (2 bytes) */
        stream_write(s, settings->order_support, 32); /* orderSupport (32 bytes) */
-       stream_write_uint16(s, 0); /* textFlags (2 bytes) */
-       stream_write_uint16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */
+       stream_write_UINT16(s, 0); /* textFlags (2 bytes) */
+       stream_write_UINT16(s, orderSupportExFlags); /* orderSupportExFlags (2 bytes) */
        stream_write_uint32(s, 0); /* pad4OctetsB (4 bytes) */
        stream_write_uint32(s, 230400); /* desktopSaveSize (4 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsC (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsD (2 bytes) */
-       stream_write_uint16(s, 0); /* textANSICodePage (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsE (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsC (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsD (2 bytes) */
+       stream_write_UINT16(s, 0); /* textANSICodePage (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsE (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_ORDER);
 }
@@ -376,7 +376,7 @@ void rdp_write_order_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        stream_seek_uint32(s); /* pad1 (4 bytes) */
        stream_seek_uint32(s); /* pad2 (4 bytes) */
@@ -384,12 +384,12 @@ void rdp_read_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings*
        stream_seek_uint32(s); /* pad4 (4 bytes) */
        stream_seek_uint32(s); /* pad5 (4 bytes) */
        stream_seek_uint32(s); /* pad6 (4 bytes) */
-       stream_seek_uint16(s); /* Cache0Entries (2 bytes) */
-       stream_seek_uint16(s); /* Cache0MaximumCellSize (2 bytes) */
-       stream_seek_uint16(s); /* Cache1Entries (2 bytes) */
-       stream_seek_uint16(s); /* Cache1MaximumCellSize (2 bytes) */
-       stream_seek_uint16(s); /* Cache2Entries (2 bytes) */
-       stream_seek_uint16(s); /* Cache2MaximumCellSize (2 bytes) */
+       stream_seek_UINT16(s); /* Cache0Entries (2 bytes) */
+       stream_seek_UINT16(s); /* Cache0MaximumCellSize (2 bytes) */
+       stream_seek_UINT16(s); /* Cache1Entries (2 bytes) */
+       stream_seek_UINT16(s); /* Cache1MaximumCellSize (2 bytes) */
+       stream_seek_UINT16(s); /* Cache2Entries (2 bytes) */
+       stream_seek_UINT16(s); /* Cache2MaximumCellSize (2 bytes) */
 }
 
 /**
@@ -402,8 +402,8 @@ void rdp_read_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings*
 void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
 {
        int bpp;
-       uint16 size;
-       uint8* header;
+       UINT16 size;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
@@ -417,16 +417,16 @@ void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
        stream_write_uint32(s, 0); /* pad6 (4 bytes) */
 
        size = bpp * 256;
-       stream_write_uint16(s, 200); /* Cache0Entries (2 bytes) */
-       stream_write_uint16(s, size); /* Cache0MaximumCellSize (2 bytes) */
+       stream_write_UINT16(s, 200); /* Cache0Entries (2 bytes) */
+       stream_write_UINT16(s, size); /* Cache0MaximumCellSize (2 bytes) */
 
        size = bpp * 1024;
-       stream_write_uint16(s, 600); /* Cache1Entries (2 bytes) */
-       stream_write_uint16(s, size); /* Cache1MaximumCellSize (2 bytes) */
+       stream_write_UINT16(s, 600); /* Cache1Entries (2 bytes) */
+       stream_write_UINT16(s, size); /* Cache1MaximumCellSize (2 bytes) */
 
        size = bpp * 4096;
-       stream_write_uint16(s, 1000); /* Cache2Entries (2 bytes) */
-       stream_write_uint16(s, size); /* Cache2MaximumCellSize (2 bytes) */
+       stream_write_UINT16(s, 1000); /* Cache2Entries (2 bytes) */
+       stream_write_UINT16(s, size); /* Cache2MaximumCellSize (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE);
 }
@@ -438,12 +438,12 @@ void rdp_write_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_control_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_control_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint16(s); /* controlFlags (2 bytes) */
-       stream_seek_uint16(s); /* remoteDetachFlag (2 bytes) */
-       stream_seek_uint16(s); /* controlInterest (2 bytes) */
-       stream_seek_uint16(s); /* detachInterest (2 bytes) */
+       stream_seek_UINT16(s); /* controlFlags (2 bytes) */
+       stream_seek_UINT16(s); /* remoteDetachFlag (2 bytes) */
+       stream_seek_UINT16(s); /* controlInterest (2 bytes) */
+       stream_seek_UINT16(s); /* detachInterest (2 bytes) */
 }
 
 /**
@@ -455,14 +455,14 @@ void rdp_read_control_capability_set(STREAM* s, uint16 length, rdpSettings* sett
 
 void rdp_write_control_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
-       stream_write_uint16(s, 0); /* controlFlags (2 bytes) */
-       stream_write_uint16(s, 0); /* remoteDetachFlag (2 bytes) */
-       stream_write_uint16(s, 2); /* controlInterest (2 bytes) */
-       stream_write_uint16(s, 2); /* detachInterest (2 bytes) */
+       stream_write_UINT16(s, 0); /* controlFlags (2 bytes) */
+       stream_write_UINT16(s, 0); /* remoteDetachFlag (2 bytes) */
+       stream_write_UINT16(s, 2); /* controlInterest (2 bytes) */
+       stream_write_UINT16(s, 2); /* detachInterest (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_CONTROL);
 }
@@ -474,12 +474,12 @@ void rdp_write_control_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_window_activation_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_window_activation_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint16(s); /* helpKeyFlag (2 bytes) */
-       stream_seek_uint16(s); /* helpKeyIndexFlag (2 bytes) */
-       stream_seek_uint16(s); /* helpExtendedKeyFlag (2 bytes) */
-       stream_seek_uint16(s); /* windowManagerKeyFlag (2 bytes) */
+       stream_seek_UINT16(s); /* helpKeyFlag (2 bytes) */
+       stream_seek_UINT16(s); /* helpKeyIndexFlag (2 bytes) */
+       stream_seek_UINT16(s); /* helpExtendedKeyFlag (2 bytes) */
+       stream_seek_UINT16(s); /* windowManagerKeyFlag (2 bytes) */
 }
 
 /**
@@ -491,14 +491,14 @@ void rdp_read_window_activation_capability_set(STREAM* s, uint16 length, rdpSett
 
 void rdp_write_window_activation_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
-       stream_write_uint16(s, 0); /* helpKeyFlag (2 bytes) */
-       stream_write_uint16(s, 0); /* helpKeyIndexFlag (2 bytes) */
-       stream_write_uint16(s, 0); /* helpExtendedKeyFlag (2 bytes) */
-       stream_write_uint16(s, 0); /* windowManagerKeyFlag (2 bytes) */
+       stream_write_UINT16(s, 0); /* helpKeyFlag (2 bytes) */
+       stream_write_UINT16(s, 0); /* helpKeyIndexFlag (2 bytes) */
+       stream_write_UINT16(s, 0); /* helpExtendedKeyFlag (2 bytes) */
+       stream_write_UINT16(s, 0); /* windowManagerKeyFlag (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_ACTIVATION);
 }
@@ -510,15 +510,15 @@ void rdp_write_window_activation_capability_set(STREAM* s, rdpSettings* settings
  * @param settings settings
  */
 
-void rdp_read_pointer_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       uint16 colorPointerFlag;
-       uint16 colorPointerCacheSize;
-       uint16 pointerCacheSize;
+       UINT16 colorPointerFlag;
+       UINT16 colorPointerCacheSize;
+       UINT16 pointerCacheSize;
 
-       stream_read_uint16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
-       stream_read_uint16(s, colorPointerCacheSize); /* colorPointerCacheSize (2 bytes) */
-       stream_read_uint16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */
+       stream_read_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
+       stream_read_UINT16(s, colorPointerCacheSize); /* colorPointerCacheSize (2 bytes) */
+       stream_read_UINT16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */
 
        if (colorPointerFlag == FALSE)
                settings->color_pointer = FALSE;
@@ -538,19 +538,19 @@ void rdp_read_pointer_capability_set(STREAM* s, uint16 length, rdpSettings* sett
 
 void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 colorPointerFlag;
+       BYTE* header;
+       UINT16 colorPointerFlag;
 
        header = rdp_capability_set_start(s);
 
        colorPointerFlag = (settings->color_pointer) ? 1 : 0;
 
-       stream_write_uint16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
-       stream_write_uint16(s, settings->pointer_cache_size); /* colorPointerCacheSize (2 bytes) */
+       stream_write_UINT16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
+       stream_write_UINT16(s, settings->pointer_cache_size); /* colorPointerCacheSize (2 bytes) */
 
        if (settings->large_pointer)
        {
-               stream_write_uint16(s, settings->pointer_cache_size); /* pointerCacheSize (2 bytes) */
+               stream_write_UINT16(s, settings->pointer_cache_size); /* pointerCacheSize (2 bytes) */
        }
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_POINTER);
@@ -563,10 +563,10 @@ void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_share_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_share_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint16(s); /* nodeId (2 bytes) */
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+       stream_seek_UINT16(s); /* nodeId (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
 }
 
 /**
@@ -578,15 +578,15 @@ void rdp_read_share_capability_set(STREAM* s, uint16 length, rdpSettings* settin
 
 void rdp_write_share_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 nodeId;
+       BYTE* header;
+       UINT16 nodeId;
 
        header = rdp_capability_set_start(s);
 
        nodeId = (settings->server_mode) ? 0x03EA : 0;
 
-       stream_write_uint16(s, nodeId); /* nodeId (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, nodeId); /* nodeId (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_SHARE);
 }
@@ -598,10 +598,10 @@ void rdp_write_share_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_color_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_color_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint16(s); /* colorTableCacheSize (2 bytes) */
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+       stream_seek_UINT16(s); /* colorTableCacheSize (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
 }
 
 /**
@@ -613,12 +613,12 @@ void rdp_read_color_cache_capability_set(STREAM* s, uint16 length, rdpSettings*
 
 void rdp_write_color_cache_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
-       stream_write_uint16(s, 6); /* colorTableCacheSize (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, 6); /* colorTableCacheSize (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_COLOR_CACHE);
 }
@@ -630,12 +630,12 @@ void rdp_write_color_cache_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_sound_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_sound_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       uint16 soundFlags;
+       UINT16 soundFlags;
 
-       stream_read_uint16(s, soundFlags); /* soundFlags (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */
+       stream_read_UINT16(s, soundFlags); /* soundFlags (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
 
        settings->sound_beeps = (soundFlags & SOUND_BEEPS_FLAG) ? TRUE : FALSE;
 }
@@ -649,15 +649,15 @@ void rdp_read_sound_capability_set(STREAM* s, uint16 length, rdpSettings* settin
 
 void rdp_write_sound_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 soundFlags;
+       BYTE* header;
+       UINT16 soundFlags;
 
        header = rdp_capability_set_start(s);
 
        soundFlags = (settings->sound_beeps) ? SOUND_BEEPS_FLAG : 0;
 
-       stream_write_uint16(s, soundFlags); /* soundFlags (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */
+       stream_write_UINT16(s, soundFlags); /* soundFlags (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_SOUND);
 }
@@ -669,12 +669,12 @@ void rdp_write_sound_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_input_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_input_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       uint16 inputFlags;
+       UINT16 inputFlags;
 
-       stream_read_uint16(s, inputFlags); /* inputFlags (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */
+       stream_read_UINT16(s, inputFlags); /* inputFlags (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
 
        if (settings->server_mode)
        {
@@ -720,8 +720,8 @@ void rdp_read_input_capability_set(STREAM* s, uint16 length, rdpSettings* settin
 
 void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 inputFlags;
+       BYTE* header;
+       UINT16 inputFlags;
 
        header = rdp_capability_set_start(s);
 
@@ -733,8 +733,8 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings)
                inputFlags |= INPUT_FLAG_FASTPATH_INPUT2;
        }
 
-       stream_write_uint16(s, inputFlags); /* inputFlags (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2OctetsA (2 bytes) */
+       stream_write_UINT16(s, inputFlags); /* inputFlags (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2OctetsA (2 bytes) */
        stream_write_uint32(s, settings->kbd_layout); /* keyboardLayout (4 bytes) */
        stream_write_uint32(s, settings->kbd_type); /* keyboardType (4 bytes) */
        stream_write_uint32(s, settings->kbd_subtype); /* keyboardSubType (4 bytes) */
@@ -751,13 +751,13 @@ void rdp_write_input_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_font_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_font_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        if (length > 4)
-               stream_seek_uint16(s); /* fontSupportFlags (2 bytes) */
+               stream_seek_UINT16(s); /* fontSupportFlags (2 bytes) */
 
        if (length > 6)
-               stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+               stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
 }
 
 /**
@@ -769,12 +769,12 @@ void rdp_read_font_capability_set(STREAM* s, uint16 length, rdpSettings* setting
 
 void rdp_write_font_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
-       stream_write_uint16(s, FONTSUPPORT_FONTLIST); /* fontSupportFlags (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, FONTSUPPORT_FONTLIST); /* fontSupportFlags (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_FONT);
 }
@@ -786,7 +786,7 @@ void rdp_write_font_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_brush_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_brush_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        stream_seek_uint32(s); /* brushSupportLevel (4 bytes) */
 }
@@ -800,7 +800,7 @@ void rdp_read_brush_capability_set(STREAM* s, uint16 length, rdpSettings* settin
 
 void rdp_write_brush_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
@@ -816,8 +816,8 @@ void rdp_write_brush_capability_set(STREAM* s, rdpSettings* settings)
  */
 void rdp_read_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definition)
 {
-       stream_read_uint16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */
-       stream_read_uint16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */
+       stream_read_UINT16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */
+       stream_read_UINT16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */
 }
 
 /**
@@ -827,8 +827,8 @@ void rdp_read_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definiti
  */
 void rdp_write_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definition)
 {
-       stream_write_uint16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */
-       stream_write_uint16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */
+       stream_write_UINT16(s, cache_definition->cacheEntries); /* cacheEntries (2 bytes) */
+       stream_write_UINT16(s, cache_definition->cacheMaximumCellSize); /* cacheMaximumCellSize (2 bytes) */
 }
 
 /**
@@ -838,14 +838,14 @@ void rdp_write_cache_definition(STREAM* s, GLYPH_CACHE_DEFINITION* cache_definit
  * @param settings settings
  */
 
-void rdp_read_glyph_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_glyph_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       uint16 glyphSupportLevel;
+       UINT16 glyphSupportLevel;
 
        stream_seek(s, 40); /* glyphCache (40 bytes) */
        stream_seek_uint32(s); /* fragCache (4 bytes) */
-       stream_read_uint16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+       stream_read_UINT16(s, glyphSupportLevel); /* glyphSupportLevel (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
 
        settings->glyphSupportLevel = glyphSupportLevel;
 }
@@ -859,7 +859,7 @@ void rdp_read_glyph_cache_capability_set(STREAM* s, uint16 length, rdpSettings*
 
 void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
@@ -877,9 +877,9 @@ void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings)
 
        rdp_write_cache_definition(s, settings->fragCache);  /* fragCache (4 bytes) */
 
-       stream_write_uint16(s, settings->glyphSupportLevel); /* glyphSupportLevel (2 bytes) */
+       stream_write_UINT16(s, settings->glyphSupportLevel); /* glyphSupportLevel (2 bytes) */
 
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_GLYPH_CACHE);
 }
@@ -891,13 +891,13 @@ void rdp_write_glyph_cache_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        uint32 offscreenSupportLevel;
 
        stream_read_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */
-       stream_read_uint16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */
-       stream_read_uint16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */
+       stream_read_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */
+       stream_read_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */
 
        if (offscreenSupportLevel & TRUE)
                settings->offscreen_bitmap_cache = TRUE;
@@ -912,7 +912,7 @@ void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, uint16 length, rd
 
 void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 offscreenSupportLevel = FALSE;
 
        header = rdp_capability_set_start(s);
@@ -921,8 +921,8 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set
                offscreenSupportLevel = TRUE;
 
        stream_write_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */
-       stream_write_uint16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */
-       stream_write_uint16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */
+       stream_write_UINT16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */
+       stream_write_UINT16(s, settings->offscreen_bitmap_cache_entries); /* offscreenCacheEntries (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_OFFSCREEN_CACHE);
 }
@@ -934,13 +934,13 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set
  * @param settings settings
  */
 
-void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       uint8 cacheVersion;
+       BYTE cacheVersion;
 
-       stream_read_uint8(s, cacheVersion); /* cacheVersion (1 byte) */
-       stream_seek_uint8(s); /* pad1 (1 byte) */
-       stream_seek_uint16(s); /* pad2 (2 bytes) */
+       stream_read_BYTE(s, cacheVersion); /* cacheVersion (1 byte) */
+       stream_seek_BYTE(s); /* pad1 (1 byte) */
+       stream_seek_UINT16(s); /* pad2 (2 bytes) */
 
        if (cacheVersion & BITMAP_CACHE_V2)
                settings->persistent_bitmap_cache = TRUE;
@@ -955,13 +955,13 @@ void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, uint16 length,
 
 void rdp_write_bitmap_cache_host_support_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
-       stream_write_uint8(s, BITMAP_CACHE_V2); /* cacheVersion (1 byte) */
-       stream_write_uint8(s, 0); /* pad1 (1 byte) */
-       stream_write_uint16(s, 0); /* pad2 (2 bytes) */
+       stream_write_BYTE(s, BITMAP_CACHE_V2); /* cacheVersion (1 byte) */
+       stream_write_BYTE(s, 0); /* pad1 (1 byte) */
+       stream_write_UINT16(s, 0); /* pad2 (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_BITMAP_CACHE_HOST_SUPPORT);
 }
@@ -986,11 +986,11 @@ void rdp_write_bitmap_cache_cell_info(STREAM* s, BITMAP_CACHE_V2_CELL_INFO* cell
  * @param settings settings
  */
 
-void rdp_read_bitmap_cache_v2_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_bitmap_cache_v2_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint16(s); /* cacheFlags (2 bytes) */
-       stream_seek_uint8(s); /* pad2 (1 byte) */
-       stream_seek_uint8(s); /* numCellCaches (1 byte) */
+       stream_seek_UINT16(s); /* cacheFlags (2 bytes) */
+       stream_seek_BYTE(s); /* pad2 (1 byte) */
+       stream_seek_BYTE(s); /* numCellCaches (1 byte) */
        stream_seek(s, 4); /* bitmapCache0CellInfo (4 bytes) */
        stream_seek(s, 4); /* bitmapCache1CellInfo (4 bytes) */
        stream_seek(s, 4); /* bitmapCache2CellInfo (4 bytes) */
@@ -1008,8 +1008,8 @@ void rdp_read_bitmap_cache_v2_capability_set(STREAM* s, uint16 length, rdpSettin
 
 void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 cacheFlags;
+       BYTE* header;
+       UINT16 cacheFlags;
 
        header = rdp_capability_set_start(s);
 
@@ -1018,9 +1018,9 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings)
        if (settings->persistent_bitmap_cache)
                cacheFlags |= PERSISTENT_KEYS_EXPECTED_FLAG;
 
-       stream_write_uint16(s, cacheFlags); /* cacheFlags (2 bytes) */
-       stream_write_uint8(s, 0); /* pad2 (1 byte) */
-       stream_write_uint8(s, settings->bitmapCacheV2NumCells); /* numCellCaches (1 byte) */
+       stream_write_UINT16(s, cacheFlags); /* cacheFlags (2 bytes) */
+       stream_write_BYTE(s, 0); /* pad2 (1 byte) */
+       stream_write_BYTE(s, settings->bitmapCacheV2NumCells); /* numCellCaches (1 byte) */
        rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[0]); /* bitmapCache0CellInfo (4 bytes) */
        rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[1]); /* bitmapCache1CellInfo (4 bytes) */
        rdp_write_bitmap_cache_cell_info(s, &settings->bitmapCacheV2CellInfo[2]); /* bitmapCache2CellInfo (4 bytes) */
@@ -1038,7 +1038,7 @@ void rdp_write_bitmap_cache_v2_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_virtual_channel_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_virtual_channel_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        uint32 flags;
        uint32 VCChunkSize;
@@ -1063,7 +1063,7 @@ void rdp_read_virtual_channel_capability_set(STREAM* s, uint16 length, rdpSettin
 
 void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 flags;
 
        header = rdp_capability_set_start(s);
@@ -1083,13 +1083,13 @@ void rdp_write_virtual_channel_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        uint32 drawNineGridSupportLevel;
 
        stream_read_uint32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */
-       stream_read_uint16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */
-       stream_read_uint16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */
+       stream_read_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */
+       stream_read_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */
 
        if ((drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED) ||
                        (drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED_V2))
@@ -1105,7 +1105,7 @@ void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, uint16 length, rdpS
 
 void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 drawNineGridSupportLevel;
 
        header = rdp_capability_set_start(s);
@@ -1113,34 +1113,34 @@ void rdp_write_draw_nine_grid_cache_capability_set(STREAM* s, rdpSettings* setti
        drawNineGridSupportLevel = (settings->draw_nine_grid) ? DRAW_NINEGRID_SUPPORTED_V2 : DRAW_NINEGRID_NO_SUPPORT;
 
        stream_write_uint32(s, drawNineGridSupportLevel); /* drawNineGridSupportLevel (4 bytes) */
-       stream_write_uint16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */
-       stream_write_uint16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */
+       stream_write_UINT16(s, settings->draw_nine_grid_cache_size); /* drawNineGridCacheSize (2 bytes) */
+       stream_write_UINT16(s, settings->draw_nine_grid_cache_entries); /* drawNineGridCacheEntries (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_DRAW_NINE_GRID_CACHE);
 }
 
-void rdp_write_gdiplus_cache_entries(STREAM* s, uint16 gce, uint16 bce, uint16 pce, uint16 ice, uint16 ace)
+void rdp_write_gdiplus_cache_entries(STREAM* s, UINT16 gce, UINT16 bce, UINT16 pce, UINT16 ice, UINT16 ace)
 {
-       stream_write_uint16(s, gce); /* gdipGraphicsCacheEntries (2 bytes) */
-       stream_write_uint16(s, bce); /* gdipBrushCacheEntries (2 bytes) */
-       stream_write_uint16(s, pce); /* gdipPenCacheEntries (2 bytes) */
-       stream_write_uint16(s, ice); /* gdipImageCacheEntries (2 bytes) */
-       stream_write_uint16(s, ace); /* gdipImageAttributesCacheEntries (2 bytes) */
+       stream_write_UINT16(s, gce); /* gdipGraphicsCacheEntries (2 bytes) */
+       stream_write_UINT16(s, bce); /* gdipBrushCacheEntries (2 bytes) */
+       stream_write_UINT16(s, pce); /* gdipPenCacheEntries (2 bytes) */
+       stream_write_UINT16(s, ice); /* gdipImageCacheEntries (2 bytes) */
+       stream_write_UINT16(s, ace); /* gdipImageAttributesCacheEntries (2 bytes) */
 }
 
-void rdp_write_gdiplus_cache_chunk_size(STREAM* s, uint16 gccs, uint16 obccs, uint16 opccs, uint16 oiaccs)
+void rdp_write_gdiplus_cache_chunk_size(STREAM* s, UINT16 gccs, UINT16 obccs, UINT16 opccs, UINT16 oiaccs)
 {
-       stream_write_uint16(s, gccs); /* gdipGraphicsCacheChunkSize (2 bytes) */
-       stream_write_uint16(s, obccs); /* gdipObjectBrushCacheChunkSize (2 bytes) */
-       stream_write_uint16(s, opccs); /* gdipObjectPenCacheChunkSize (2 bytes) */
-       stream_write_uint16(s, oiaccs); /* gdipObjectImageAttributesCacheChunkSize (2 bytes) */
+       stream_write_UINT16(s, gccs); /* gdipGraphicsCacheChunkSize (2 bytes) */
+       stream_write_UINT16(s, obccs); /* gdipObjectBrushCacheChunkSize (2 bytes) */
+       stream_write_UINT16(s, opccs); /* gdipObjectPenCacheChunkSize (2 bytes) */
+       stream_write_UINT16(s, oiaccs); /* gdipObjectImageAttributesCacheChunkSize (2 bytes) */
 }
 
-void rdp_write_gdiplus_image_cache_properties(STREAM* s, uint16 oiccs, uint16 oicts, uint16 oicms)
+void rdp_write_gdiplus_image_cache_properties(STREAM* s, UINT16 oiccs, UINT16 oicts, UINT16 oicms)
 {
-       stream_write_uint16(s, oiccs); /* gdipObjectImageCacheChunkSize (2 bytes) */
-       stream_write_uint16(s, oicts); /* gdipObjectImageCacheTotalSize (2 bytes) */
-       stream_write_uint16(s, oicms); /* gdipObjectImageCacheMaxSize (2 bytes) */
+       stream_write_UINT16(s, oiccs); /* gdipObjectImageCacheChunkSize (2 bytes) */
+       stream_write_UINT16(s, oicts); /* gdipObjectImageCacheTotalSize (2 bytes) */
+       stream_write_UINT16(s, oicms); /* gdipObjectImageCacheMaxSize (2 bytes) */
 }
 
 /**
@@ -1150,7 +1150,7 @@ void rdp_write_gdiplus_image_cache_properties(STREAM* s, uint16 oiccs, uint16 oi
  * @param settings settings
  */
 
-void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        uint32 drawGDIPlusSupportLevel;
        uint32 drawGdiplusCacheLevel;
@@ -1178,7 +1178,7 @@ void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, uint16 length, rdpSet
 
 void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 drawGDIPlusSupportLevel;
        uint32 drawGdiplusCacheLevel;
 
@@ -1204,7 +1204,7 @@ void rdp_write_draw_gdiplus_cache_capability_set(STREAM* s, rdpSettings* setting
  * @param settings settings
  */
 
-void rdp_read_remote_programs_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_remote_programs_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        uint32 railSupportLevel;
 
@@ -1229,7 +1229,7 @@ void rdp_read_remote_programs_capability_set(STREAM* s, uint16 length, rdpSettin
 
 void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 railSupportLevel;
 
        header = rdp_capability_set_start(s);
@@ -1251,11 +1251,11 @@ void rdp_write_remote_programs_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_window_list_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_window_list_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        stream_seek_uint32(s); /* wndSupportLevel (4 bytes) */
-       stream_seek_uint8(s); /* numIconCaches (1 byte) */
-       stream_seek_uint16(s); /* numIconCacheEntries (2 bytes) */
+       stream_seek_BYTE(s); /* numIconCaches (1 byte) */
+       stream_seek_UINT16(s); /* numIconCacheEntries (2 bytes) */
 }
 
 /**
@@ -1267,7 +1267,7 @@ void rdp_read_window_list_capability_set(STREAM* s, uint16 length, rdpSettings*
 
 void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 wndSupportLevel;
 
        header = rdp_capability_set_start(s);
@@ -1275,8 +1275,8 @@ void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings)
        wndSupportLevel = WINDOW_LEVEL_SUPPORTED_EX;
 
        stream_write_uint32(s, wndSupportLevel); /* wndSupportLevel (4 bytes) */
-       stream_write_uint8(s, settings->num_icon_caches); /* numIconCaches (1 byte) */
-       stream_write_uint16(s, settings->num_icon_cache_entries); /* numIconCacheEntries (2 bytes) */
+       stream_write_BYTE(s, settings->num_icon_caches); /* numIconCaches (1 byte) */
+       stream_write_UINT16(s, settings->num_icon_cache_entries); /* numIconCacheEntries (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_WINDOW);
 }
@@ -1288,9 +1288,9 @@ void rdp_write_window_list_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_desktop_composition_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_desktop_composition_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint16(s); /* compDeskSupportLevel (2 bytes) */
+       stream_seek_UINT16(s); /* compDeskSupportLevel (2 bytes) */
 }
 
 /**
@@ -1302,14 +1302,14 @@ void rdp_read_desktop_composition_capability_set(STREAM* s, uint16 length, rdpSe
 
 void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 compDeskSupportLevel;
+       BYTE* header;
+       UINT16 compDeskSupportLevel;
 
        header = rdp_capability_set_start(s);
 
        compDeskSupportLevel = (settings->desktop_composition) ? COMPDESK_SUPPORTED : COMPDESK_NOT_SUPPORTED;
 
-       stream_write_uint16(s, compDeskSupportLevel); /* compDeskSupportLevel (2 bytes) */
+       stream_write_UINT16(s, compDeskSupportLevel); /* compDeskSupportLevel (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_COMP_DESK);
 }
@@ -1321,7 +1321,7 @@ void rdp_write_desktop_composition_capability_set(STREAM* s, rdpSettings* settin
  * @param settings settings
  */
 
-void rdp_read_multifragment_update_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        stream_read_uint32(s, settings->multifrag_max_request_size); /* MaxRequestSize (4 bytes) */
 }
@@ -1335,7 +1335,7 @@ void rdp_read_multifragment_update_capability_set(STREAM* s, uint16 length, rdpS
 
 void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
 
@@ -1351,9 +1351,9 @@ void rdp_write_multifragment_update_capability_set(STREAM* s, rdpSettings* setti
  * @param settings settings
  */
 
-void rdp_read_large_pointer_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_large_pointer_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint16(s); /* largePointerSupportFlags (2 bytes) */
+       stream_seek_UINT16(s); /* largePointerSupportFlags (2 bytes) */
 }
 
 /**
@@ -1365,14 +1365,14 @@ void rdp_read_large_pointer_capability_set(STREAM* s, uint16 length, rdpSettings
 
 void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint16 largePointerSupportFlags;
+       BYTE* header;
+       UINT16 largePointerSupportFlags;
 
        header = rdp_capability_set_start(s);
 
        largePointerSupportFlags = (settings->large_pointer) ? LARGE_POINTER_FLAG_96x96 : 0;
 
-       stream_write_uint16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */
+       stream_write_UINT16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */
 
        rdp_capability_set_finish(s, header, CAPSET_TYPE_LARGE_POINTER);
 }
@@ -1384,7 +1384,7 @@ void rdp_write_large_pointer_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_surface_commands_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_surface_commands_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        stream_seek_uint32(s); /* cmdFlags (4 bytes) */
        stream_seek_uint32(s); /* reserved (4 bytes) */
@@ -1401,7 +1401,7 @@ void rdp_read_surface_commands_capability_set(STREAM* s, uint16 length, rdpSetti
 
 void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 cmdFlags;
 
        header = rdp_capability_set_start(s);
@@ -1423,12 +1423,12 @@ void rdp_write_surface_commands_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_bitmap_codecs_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       uint8 bitmapCodecCount;
-       uint16 codecPropertiesLength;
+       BYTE bitmapCodecCount;
+       UINT16 codecPropertiesLength;
 
-       stream_read_uint8(s, bitmapCodecCount); /* bitmapCodecCount (1 byte) */
+       stream_read_BYTE(s, bitmapCodecCount); /* bitmapCodecCount (1 byte) */
 
        if (settings->server_mode)
        {
@@ -1442,22 +1442,22 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings
                if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_REMOTEFX, 16) == 0)
                {
                        stream_seek(s, 16); /* codecGUID (16 bytes) */
-                       stream_read_uint8(s, settings->rfx_codec_id);
+                       stream_read_BYTE(s, settings->rfx_codec_id);
                        settings->rfx_codec = TRUE;
                }
                else if (settings->server_mode && strncmp((char*)stream_get_tail(s), CODEC_GUID_NSCODEC, 16) == 0)
                {
                        stream_seek(s, 16); /*codec GUID (16 bytes) */
-                       stream_read_uint8(s, settings->ns_codec_id);
+                       stream_read_BYTE(s, settings->ns_codec_id);
                        settings->ns_codec = TRUE;
                }
                else
                {
                        stream_seek(s, 16); /* codecGUID (16 bytes) */
-                       stream_seek_uint8(s); /* codecID (1 byte) */
+                       stream_seek_BYTE(s); /* codecID (1 byte) */
                }
 
-               stream_read_uint16(s, codecPropertiesLength); /* codecPropertiesLength (2 bytes) */
+               stream_read_UINT16(s, codecPropertiesLength); /* codecPropertiesLength (2 bytes) */
                stream_seek(s, codecPropertiesLength); /* codecProperties */
 
                bitmapCodecCount--;
@@ -1472,12 +1472,12 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings
 void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
 {
        uint32 captureFlags;
-       uint8 codecMode;
+       BYTE codecMode;
 
        captureFlags = settings->rfx_codec_only ? CARDP_CAPS_CAPTURE_NON_CAC : 0;
        codecMode = settings->rfx_codec_mode;
 
-       stream_write_uint16(s, 49); /* codecPropertiesLength */
+       stream_write_UINT16(s, 49); /* codecPropertiesLength */
 
        /* TS_RFX_CLNT_CAPS_CONTAINER */
        stream_write_uint32(s, 49); /* length */
@@ -1485,33 +1485,33 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
        stream_write_uint32(s, 37); /* capsLength */
 
        /* TS_RFX_CAPS */
-       stream_write_uint16(s, CBY_CAPS); /* blockType */
+       stream_write_UINT16(s, CBY_CAPS); /* blockType */
        stream_write_uint32(s, 8); /* blockLen */
-       stream_write_uint16(s, 1); /* numCapsets */
+       stream_write_UINT16(s, 1); /* numCapsets */
 
        /* TS_RFX_CAPSET */
-       stream_write_uint16(s, CBY_CAPSET); /* blockType */
+       stream_write_UINT16(s, CBY_CAPSET); /* blockType */
        stream_write_uint32(s, 29); /* blockLen */
-       stream_write_uint8(s, 0x01); /* codecId (MUST be set to 0x01) */
-       stream_write_uint16(s, CLY_CAPSET); /* capsetType */
-       stream_write_uint16(s, 2); /* numIcaps */
-       stream_write_uint16(s, 8); /* icapLen */
+       stream_write_BYTE(s, 0x01); /* codecId (MUST be set to 0x01) */
+       stream_write_UINT16(s, CLY_CAPSET); /* capsetType */
+       stream_write_UINT16(s, 2); /* numIcaps */
+       stream_write_UINT16(s, 8); /* icapLen */
 
        /* TS_RFX_ICAP (RLGR1) */
-       stream_write_uint16(s, CLW_VERSION_1_0); /* version */
-       stream_write_uint16(s, CT_TILE_64x64); /* tileSize */
-       stream_write_uint8(s, codecMode); /* flags */
-       stream_write_uint8(s, CLW_COL_CONV_ICT); /* colConvBits */
-       stream_write_uint8(s, CLW_XFORM_DWT_53_A); /* transformBits */
-       stream_write_uint8(s, CLW_ENTROPY_RLGR1); /* entropyBits */
+       stream_write_UINT16(s, CLW_VERSION_1_0); /* version */
+       stream_write_UINT16(s, CT_TILE_64x64); /* tileSize */
+       stream_write_BYTE(s, codecMode); /* flags */
+       stream_write_BYTE(s, CLW_COL_CONV_ICT); /* colConvBits */
+       stream_write_BYTE(s, CLW_XFORM_DWT_53_A); /* transformBits */
+       stream_write_BYTE(s, CLW_ENTROPY_RLGR1); /* entropyBits */
 
        /* TS_RFX_ICAP (RLGR3) */
-       stream_write_uint16(s, CLW_VERSION_1_0); /* version */
-       stream_write_uint16(s, CT_TILE_64x64); /* tileSize */
-       stream_write_uint8(s, codecMode); /* flags */
-       stream_write_uint8(s, CLW_COL_CONV_ICT); /* colConvBits */
-       stream_write_uint8(s, CLW_XFORM_DWT_53_A); /* transformBits */
-       stream_write_uint8(s, CLW_ENTROPY_RLGR3); /* entropyBits */
+       stream_write_UINT16(s, CLW_VERSION_1_0); /* version */
+       stream_write_UINT16(s, CT_TILE_64x64); /* tileSize */
+       stream_write_BYTE(s, codecMode); /* flags */
+       stream_write_BYTE(s, CLW_COL_CONV_ICT); /* colConvBits */
+       stream_write_BYTE(s, CLW_XFORM_DWT_53_A); /* transformBits */
+       stream_write_BYTE(s, CLW_ENTROPY_RLGR3); /* entropyBits */
 }
 
 /**
@@ -1521,18 +1521,18 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
  */
 void rdp_write_nsc_client_capability_container(STREAM* s, rdpSettings* settings)
 {
-       stream_write_uint16(s, 3); /* codecPropertiesLength */
+       stream_write_UINT16(s, 3); /* codecPropertiesLength */
 
        /* TS_NSCODEC_CAPABILITYSET */
-       stream_write_uint8(s, 1);  /* fAllowDynamicFidelity */
-       stream_write_uint8(s, 1);  /* fAllowSubsampling */
-       stream_write_uint8(s, 3);  /* colorLossLevel */
+       stream_write_BYTE(s, 1);  /* fAllowDynamicFidelity */
+       stream_write_BYTE(s, 1);  /* fAllowSubsampling */
+       stream_write_BYTE(s, 3);  /* colorLossLevel */
 }
 
 void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings)
 {
-       stream_write_uint16(s, 1); /* codecPropertiesLength */
-       stream_write_uint8(s, settings->jpeg_quality);
+       stream_write_UINT16(s, 1); /* codecPropertiesLength */
+       stream_write_BYTE(s, settings->jpeg_quality);
 }
 
 /**
@@ -1542,14 +1542,14 @@ void rdp_write_jpeg_client_capability_container(STREAM* s, rdpSettings* settings
  */
 void rdp_write_rfx_server_capability_container(STREAM* s, rdpSettings* settings)
 {
-       stream_write_uint16(s, 4); /* codecPropertiesLength */
+       stream_write_UINT16(s, 4); /* codecPropertiesLength */
        stream_write_uint32(s, 0); /* reserved */
 }
 
 void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings)
 {
-       stream_write_uint16(s, 1); /* codecPropertiesLength */
-       stream_write_uint8(s, 75);
+       stream_write_UINT16(s, 1); /* codecPropertiesLength */
+       stream_write_BYTE(s, 75);
 }
 
 /**
@@ -1559,7 +1559,7 @@ void rdp_write_jpeg_server_capability_container(STREAM* s, rdpSettings* settings
  */
 void rdp_write_nsc_server_capability_container(STREAM* s, rdpSettings* settings)
 {
-       stream_write_uint16(s, 4); /* codecPropertiesLength */
+       stream_write_UINT16(s, 4); /* codecPropertiesLength */
        stream_write_uint32(s, 0); /* reserved */
 }
 
@@ -1572,8 +1572,8 @@ void rdp_write_nsc_server_capability_container(STREAM* s, rdpSettings* settings)
 
 void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
-       uint8 bitmapCodecCount;
+       BYTE* header;
+       BYTE bitmapCodecCount;
 
        header = rdp_capability_set_start(s);
 
@@ -1586,7 +1586,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
        if (settings->jpeg_codec)
                bitmapCodecCount++;
 
-       stream_write_uint8(s, bitmapCodecCount);
+       stream_write_BYTE(s, bitmapCodecCount);
 
        if (settings->rfx_codec)
        {
@@ -1594,12 +1594,12 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
 
                if (settings->server_mode)
                {
-                       stream_write_uint8(s, 0); /* codecID is defined by the client */
+                       stream_write_BYTE(s, 0); /* codecID is defined by the client */
                        rdp_write_rfx_server_capability_container(s, settings);
                }
                else
                {
-                       stream_write_uint8(s, CODEC_ID_REMOTEFX); /* codecID */
+                       stream_write_BYTE(s, CODEC_ID_REMOTEFX); /* codecID */
                        rdp_write_rfx_client_capability_container(s, settings);
                }
        }
@@ -1608,12 +1608,12 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
                stream_write(s, CODEC_GUID_NSCODEC, 16);
                if (settings->server_mode)
                {
-                       stream_write_uint8(s, 0); /* codecID is defined by the client */
+                       stream_write_BYTE(s, 0); /* codecID is defined by the client */
                        rdp_write_nsc_server_capability_container(s, settings);
                }
                else
                {
-                       stream_write_uint8(s, CODEC_ID_NSCODEC); /* codecID */
+                       stream_write_BYTE(s, CODEC_ID_NSCODEC); /* codecID */
                        rdp_write_nsc_client_capability_container(s, settings);
                }
        }
@@ -1622,12 +1622,12 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
                stream_write(s, CODEC_GUID_JPEG, 16);
                if (settings->server_mode)
                {
-                       stream_write_uint8(s, 0); /* codecID is defined by the client */
+                       stream_write_BYTE(s, 0); /* codecID is defined by the client */
                        rdp_write_jpeg_server_capability_container(s, settings);
                }
                else
                {
-                       stream_write_uint8(s, CODEC_ID_JPEG); /* codecID */
+                       stream_write_BYTE(s, CODEC_ID_JPEG); /* codecID */
                        rdp_write_jpeg_client_capability_container(s, settings);
                }
        }
@@ -1640,7 +1640,7 @@ void rdp_write_bitmap_codecs_capability_set(STREAM* s, rdpSettings* settings)
  * @param settings settings
  */
 
-void rdp_read_frame_acknowledge_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_frame_acknowledge_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
        if (settings->server_mode)
        {
@@ -1652,17 +1652,17 @@ void rdp_read_frame_acknowledge_capability_set(STREAM* s, uint16 length, rdpSett
        }
 }
 
-void rdp_read_bitmap_cache_v3_codec_id_capability_set(STREAM* s, uint16 length, rdpSettings* settings)
+void rdp_read_bitmap_cache_v3_codec_id_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
 {
-       stream_seek_uint8(s); /* (1 byte) */
+       stream_seek_BYTE(s); /* (1 byte) */
 }
 
 void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
 
        header = rdp_capability_set_start(s);
-       stream_write_uint8(s, settings->v3_codec_id);
+       stream_write_BYTE(s, settings->v3_codec_id);
        rdp_capability_set_finish(s, header, 6);
 }
 
@@ -1675,7 +1675,7 @@ void rdp_write_bitmap_cache_v3_codec_id_capability_set(STREAM* s, rdpSettings* s
 
 void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings)
 {
-       uint8* header;
+       BYTE* header;
        uint32 frame_acknowledge;
 
        header = rdp_capability_set_start(s);
@@ -1686,11 +1686,11 @@ void rdp_write_frame_acknowledge_capability_set(STREAM* s, rdpSettings* settings
        rdp_capability_set_finish(s, header, CAPSET_TYPE_FRAME_ACKNOWLEDGE);
 }
 
-BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 numberCapabilities)
+BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, UINT16 numberCapabilities)
 {
-       uint16 type;
-       uint16 length;
-       uint8 *bm, *em;
+       UINT16 type;
+       UINT16 length;
+       BYTE *bm, *em;
 
        while (numberCapabilities > 0)
        {
@@ -1845,15 +1845,15 @@ BOOL rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 numberCap
 
 BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
 {
-       uint16 length;
-       uint16 channelId;
-       uint16 pduType;
-       uint16 pduLength;
-       uint16 pduSource;
-       uint16 numberCapabilities;
-       uint16 lengthSourceDescriptor;
-       uint16 lengthCombinedCapabilities;
-       uint16 securityFlags;
+       UINT16 length;
+       UINT16 channelId;
+       UINT16 pduType;
+       UINT16 pduLength;
+       UINT16 pduSource;
+       UINT16 numberCapabilities;
+       UINT16 lengthSourceDescriptor;
+       UINT16 lengthCombinedCapabilities;
+       UINT16 securityFlags;
 
        if (!rdp_read_header(rdp, s, &length, &channelId))
                return FALSE;
@@ -1895,10 +1895,10 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
        }
 
        stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */
-       stream_read_uint16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
-       stream_read_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
+       stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
+       stream_read_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
        stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor */
-       stream_read_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
+       stream_read_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
        stream_seek(s, 2); /* pad2Octets (2 bytes) */
 
        /* capabilitySets */
@@ -1915,20 +1915,20 @@ BOOL rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
 
 void rdp_write_demand_active(STREAM* s, rdpSettings* settings)
 {
-       uint8 *bm, *em, *lm;
-       uint16 numberCapabilities;
-       uint16 lengthCombinedCapabilities;
+       BYTE *bm, *em, *lm;
+       UINT16 numberCapabilities;
+       UINT16 lengthCombinedCapabilities;
 
        stream_write_uint32(s, settings->share_id); /* shareId (4 bytes) */
-       stream_write_uint16(s, 4); /* lengthSourceDescriptor (2 bytes) */
+       stream_write_UINT16(s, 4); /* lengthSourceDescriptor (2 bytes) */
 
        stream_get_mark(s, lm);
-       stream_seek_uint16(s); /* lengthCombinedCapabilities (2 bytes) */
+       stream_seek_UINT16(s); /* lengthCombinedCapabilities (2 bytes) */
        stream_write(s, "RDP", 4); /* sourceDescriptor */
 
        stream_get_mark(s, bm);
-       stream_seek_uint16(s); /* numberCapabilities (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_seek_UINT16(s); /* numberCapabilities (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 
        numberCapabilities = 14;
        rdp_write_general_capability_set(s, settings);
@@ -1956,10 +1956,10 @@ void rdp_write_demand_active(STREAM* s, rdpSettings* settings)
 
        stream_set_mark(s, lm); /* go back to lengthCombinedCapabilities */
        lengthCombinedCapabilities = (em - bm);
-       stream_write_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
+       stream_write_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
 
        stream_set_mark(s, bm); /* go back to numberCapabilities */
-       stream_write_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
+       stream_write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
 
        stream_set_mark(s, em);
 
@@ -1983,15 +1983,15 @@ BOOL rdp_send_demand_active(rdpRdp* rdp)
 
 BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
 {
-       uint16 length;
-       uint16 channelId;
-       uint16 pduType;
-       uint16 pduLength;
-       uint16 pduSource;
-       uint16 lengthSourceDescriptor;
-       uint16 lengthCombinedCapabilities;
-       uint16 numberCapabilities;
-       uint16 securityFlags;
+       UINT16 length;
+       UINT16 channelId;
+       UINT16 pduType;
+       UINT16 pduLength;
+       UINT16 pduSource;
+       UINT16 lengthSourceDescriptor;
+       UINT16 lengthCombinedCapabilities;
+       UINT16 numberCapabilities;
+       UINT16 securityFlags;
 
        if (!rdp_read_header(rdp, s, &length, &channelId))
                return FALSE;
@@ -2021,11 +2021,11 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
                return FALSE;
 
        stream_seek_uint32(s); /* shareId (4 bytes) */
-       stream_seek_uint16(s); /* originatorId (2 bytes) */
-       stream_read_uint16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
-       stream_read_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
+       stream_seek_UINT16(s); /* originatorId (2 bytes) */
+       stream_read_UINT16(s, lengthSourceDescriptor); /* lengthSourceDescriptor (2 bytes) */
+       stream_read_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
        stream_seek(s, lengthSourceDescriptor); /* sourceDescriptor */
-       stream_read_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
+       stream_read_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
        stream_seek(s, 2); /* pad2Octets (2 bytes) */
 
        if (!rdp_read_capability_sets(s, rdp->settings, numberCapabilities))
@@ -2036,24 +2036,24 @@ BOOL rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
 
 void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
 {
-       uint8 *bm, *em, *lm;
-       uint16 numberCapabilities;
-       uint16 lengthSourceDescriptor;
-       uint16 lengthCombinedCapabilities;
+       BYTE *bm, *em, *lm;
+       UINT16 numberCapabilities;
+       UINT16 lengthSourceDescriptor;
+       UINT16 lengthCombinedCapabilities;
 
        lengthSourceDescriptor = sizeof(SOURCE_DESCRIPTOR);
 
        stream_write_uint32(s, settings->share_id); /* shareId (4 bytes) */
-       stream_write_uint16(s, 0x03EA); /* originatorId (2 bytes) */
-       stream_write_uint16(s, lengthSourceDescriptor);/* lengthSourceDescriptor (2 bytes) */
+       stream_write_UINT16(s, 0x03EA); /* originatorId (2 bytes) */
+       stream_write_UINT16(s, lengthSourceDescriptor);/* lengthSourceDescriptor (2 bytes) */
 
        stream_get_mark(s, lm);
-       stream_seek_uint16(s); /* lengthCombinedCapabilities (2 bytes) */
+       stream_seek_UINT16(s); /* lengthCombinedCapabilities (2 bytes) */
        stream_write(s, SOURCE_DESCRIPTOR, lengthSourceDescriptor); /* sourceDescriptor */
 
        stream_get_mark(s, bm);
-       stream_seek_uint16(s); /* numberCapabilities (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_seek_UINT16(s); /* numberCapabilities (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 
        /* Capability Sets */
        numberCapabilities = 15;
@@ -2146,10 +2146,10 @@ void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)
 
        stream_set_mark(s, lm); /* go back to lengthCombinedCapabilities */
        lengthCombinedCapabilities = (em - bm);
-       stream_write_uint16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
+       stream_write_UINT16(s, lengthCombinedCapabilities); /* lengthCombinedCapabilities (2 bytes) */
 
        stream_set_mark(s, bm); /* go back to numberCapabilities */
-       stream_write_uint16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
+       stream_write_UINT16(s, numberCapabilities); /* numberCapabilities (2 bytes) */
 
        stream_set_mark(s, em);
 }
index 8870cee..5f893a9 100644 (file)
@@ -131,7 +131,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info)
 {
        STREAM* s;
        int length;
-       uint8 padding;
+       BYTE padding;
        uint32 version;
        int modulus_length;
        int exponent_length;
@@ -185,7 +185,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info)
        /* skip zero padding, if any */
        do
        {
-               stream_peek_uint8(s, padding);
+               stream_peek_BYTE(s, padding);
 
                if (padding == 0)
                {
@@ -250,7 +250,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain)
 
 static BOOL certificate_process_server_public_key(rdpCertificate* certificate, STREAM* s, uint32 length)
 {
-       uint8 magic[4];
+       BYTE magic[4];
        uint32 keylen;
        uint32 bitlen;
        uint32 datalen;
@@ -279,13 +279,13 @@ static BOOL certificate_process_server_public_key(rdpCertificate* certificate, S
        return TRUE;
 }
 
-static BOOL certificate_process_server_public_signature(rdpCertificate* certificate, uint8* sigdata, int sigdatalen, STREAM* s, uint32 siglen)
+static BOOL certificate_process_server_public_signature(rdpCertificate* certificate, BYTE* sigdata, int sigdatalen, STREAM* s, uint32 siglen)
 {
        int i, sum;
        CryptoMd5 md5ctx;
-       uint8 sig[TSSK_KEY_LENGTH];
-       uint8 encsig[TSSK_KEY_LENGTH + 8];
-       uint8 md5hash[CRYPTO_MD5_DIGEST_LENGTH];
+       BYTE sig[TSSK_KEY_LENGTH];
+       BYTE encsig[TSSK_KEY_LENGTH + 8];
+       BYTE md5hash[CRYPTO_MD5_DIGEST_LENGTH];
 
        md5ctx = crypto_md5_init();
        crypto_md5_update(md5ctx, sigdata, sigdatalen);
@@ -348,7 +348,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate
        uint32 wPublicKeyBlobLen;
        uint32 wSignatureBlobType;
        uint32 wSignatureBlobLen;
-       uint8* sigdata;
+       BYTE* sigdata;
        int sigdatalen;
 
        /* -4, because we need to include dwVersion */
@@ -362,7 +362,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate
                return FALSE;
        }
 
-       stream_read_uint16(s, wPublicKeyBlobType);
+       stream_read_UINT16(s, wPublicKeyBlobType);
 
        if (wPublicKeyBlobType != BB_RSA_KEY_BLOB)
        {
@@ -370,7 +370,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate
                return FALSE;
        }
 
-       stream_read_uint16(s, wPublicKeyBlobLen);
+       stream_read_UINT16(s, wPublicKeyBlobLen);
 
        if (!certificate_process_server_public_key(certificate, s, wPublicKeyBlobLen))
        {
@@ -379,7 +379,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate
        }
 
        sigdatalen = stream_get_tail(s) - sigdata;
-       stream_read_uint16(s, wSignatureBlobType);
+       stream_read_UINT16(s, wSignatureBlobType);
 
        if (wSignatureBlobType != BB_RSA_SIGNATURE_BLOB)
        {
@@ -387,7 +387,7 @@ BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate
                return FALSE;
        }
 
-       stream_read_uint16(s, wSignatureBlobLen);
+       stream_read_UINT16(s, wSignatureBlobLen);
 
        if (wSignatureBlobLen != 72)
        {
@@ -428,7 +428,7 @@ BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate,
 
                DEBUG_CERTIFICATE("\nX.509 Certificate #%d, length:%d", i + 1, certLength);
 
-               certificate->x509_cert_chain->array[i].data = (uint8*) malloc(certLength);
+               certificate->x509_cert_chain->array[i].data = (BYTE*) malloc(certLength);
                stream_read(s, certificate->x509_cert_chain->array[i].data, certLength);
                certificate->x509_cert_chain->array[i].length = certLength;
 
@@ -458,7 +458,7 @@ BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate,
  * @param length certificate length
  */
 
-BOOL certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length)
+BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length)
 {
        STREAM* s;
        uint32 dwVersion;
index 387846b..e1349dc 100644 (file)
@@ -49,7 +49,7 @@ void certificate_free_x509_certificate_chain(rdpX509CertChain* x509_cert_chain);
 
 BOOL certificate_read_server_proprietary_certificate(rdpCertificate* certificate, STREAM* s);
 BOOL certificate_read_server_x509_certificate_chain(rdpCertificate* certificate, STREAM* s);
-BOOL certificate_read_server_certificate(rdpCertificate* certificate, uint8* server_cert, int length);
+BOOL certificate_read_server_certificate(rdpCertificate* certificate, BYTE* server_cert, int length);
 
 rdpCertificate* certificate_new();
 void certificate_free(rdpCertificate* certificate);
index 893371d..a93bca6 100644 (file)
@@ -34,7 +34,7 @@
 #include "rdp.h"
 #include "channel.h"
 
-BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size)
+BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size)
 {
        STREAM* s;
        uint32 flags;
@@ -92,7 +92,7 @@ BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size)
        return TRUE;
 }
 
-void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id)
+void freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id)
 {
        uint32 length;
        uint32 flags;
@@ -106,7 +106,7 @@ void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id)
                channel_id, stream_get_tail(s), chunk_length, flags, length);
 }
 
-void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, uint16 channel_id)
+void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, UINT16 channel_id)
 {
        uint32 length;
        uint32 flags;
index bdc4c22..0e8d8fe 100644 (file)
@@ -20,8 +20,8 @@
 #ifndef __CHANNEL_H
 #define __CHANNEL_H
 
-BOOL freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size);
-void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id);
-void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, uint16 channel_id);
+BOOL freerdp_channel_send(rdpRdp* rdp, UINT16 channel_id, BYTE* data, int size);
+void freerdp_channel_process(freerdp* instance, STREAM* s, UINT16 channel_id);
+void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, UINT16 channel_id);
 
 #endif /* __CHANNEL_H */
index 701cdb8..90c6231 100644 (file)
@@ -204,11 +204,11 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
 
 static BOOL rdp_client_establish_keys(rdpRdp* rdp)
 {
-       uint8 client_random[CLIENT_RANDOM_LENGTH];
-       uint8 crypt_client_random[256 + 8];
+       BYTE client_random[CLIENT_RANDOM_LENGTH];
+       BYTE crypt_client_random[256 + 8];
        uint32 key_len;
-       uint8* mod;
-       uint8* exp;
+       BYTE* mod;
+       BYTE* exp;
        uint32 length;
        STREAM* s;
 
@@ -251,7 +251,7 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp)
 
        if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS)
        {
-               uint8 fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
+               BYTE fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
                rdp->fips_encrypt = crypto_des3_encrypt_init(rdp->fips_encrypt_key, fips_ivec);
                rdp->fips_decrypt = crypto_des3_decrypt_init(rdp->fips_decrypt_key, fips_ivec);
 
@@ -267,12 +267,12 @@ static BOOL rdp_client_establish_keys(rdpRdp* rdp)
 
 static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
 {
-       uint8 client_random[64]; /* Should be only 32 after successful decryption, but on failure might take up to 64 bytes. */
-       uint8 crypt_client_random[256 + 8];
+       BYTE client_random[64]; /* Should be only 32 after successful decryption, but on failure might take up to 64 bytes. */
+       BYTE crypt_client_random[256 + 8];
        uint32 rand_len, key_len;
-       uint16 channel_id, length, sec_flags;
-       uint8* mod;
-       uint8* priv_exp;
+       UINT16 channel_id, length, sec_flags;
+       BYTE* mod;
+       BYTE* priv_exp;
 
        if (rdp->settings->encryption == FALSE)
        {
@@ -323,7 +323,7 @@ static BOOL rdp_server_establish_keys(rdpRdp* rdp, STREAM* s)
 
        if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS)
        {
-               uint8 fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
+               BYTE fips_ivec[8] = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
                rdp->fips_encrypt = crypto_des3_encrypt_init(rdp->fips_encrypt_key, fips_ivec);
                rdp->fips_decrypt = crypto_des3_decrypt_init(rdp->fips_decrypt_key, fips_ivec);
 
@@ -372,7 +372,7 @@ BOOL rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s)
 BOOL rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s)
 {
        int i;
-       uint16 channel_id;
+       UINT16 channel_id;
        BOOL all_joined = TRUE;
 
        if (!mcs_recv_channel_join_confirm(rdp->mcs, s, &channel_id))
@@ -456,9 +456,9 @@ BOOL rdp_client_connect_license(rdpRdp* rdp, STREAM* s)
 
 BOOL rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
 {
-       uint8* mark;
-       uint16 width;
-       uint16 height;
+       BYTE* mark;
+       UINT16 width;
+       UINT16 height;
 
        width = rdp->settings->width;
        height = rdp->settings->height;
@@ -636,7 +636,7 @@ BOOL rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s)
 BOOL rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s)
 {
        int i;
-       uint16 channel_id;
+       UINT16 channel_id;
        BOOL all_joined = TRUE;
 
        if (!mcs_recv_channel_join_request(rdp->mcs, s, &channel_id))
index 86f4f29..b799e37 100644 (file)
@@ -70,12 +70,12 @@ static const char* const FASTPATH_UPDATETYPE_STRINGS[] =
  * This function assumes that at least two bytes are available in the stream
  * and doesn't touch third byte.
  */
-uint16 fastpath_header_length(STREAM* s)
+UINT16 fastpath_header_length(STREAM* s)
 {
-       uint8 length1;
+       BYTE length1;
 
-       stream_seek_uint8(s);
-       stream_read_uint8(s, length1);
+       stream_seek_BYTE(s);
+       stream_read_BYTE(s, length1);
        stream_rewind(s, 2);
 
        return ((length1 & 0x80) != 0 ? 3 : 2);
@@ -87,12 +87,12 @@ uint16 fastpath_header_length(STREAM* s)
  * @param encryptionFlags
  * @return length
  */
-uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s)
+UINT16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s)
 {
-       uint8 header;
-       uint16 length;
+       BYTE header;
+       UINT16 length;
 
-       stream_read_uint8(s, header);
+       stream_read_BYTE(s, header);
 
        if (fastpath != NULL)
        {
@@ -105,32 +105,32 @@ uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s)
        return length;
 }
 
-static INLINE void fastpath_read_update_header(STREAM* s, uint8* updateCode, uint8* fragmentation, uint8* compression)
+static INLINE void fastpath_read_update_header(STREAM* s, BYTE* updateCode, BYTE* fragmentation, BYTE* compression)
 {
-       uint8 updateHeader;
+       BYTE updateHeader;
 
-       stream_read_uint8(s, updateHeader);
+       stream_read_BYTE(s, updateHeader);
        *updateCode = updateHeader & 0x0F;
        *fragmentation = (updateHeader >> 4) & 0x03;
        *compression = (updateHeader >> 6) & 0x03;
 }
 
-static INLINE void fastpath_write_update_header(STREAM* s, uint8 updateCode, uint8 fragmentation, uint8 compression)
+static INLINE void fastpath_write_update_header(STREAM* s, BYTE updateCode, BYTE fragmentation, BYTE compression)
 {
-       uint8 updateHeader = 0;
+       BYTE updateHeader = 0;
 
        updateHeader |= updateCode & 0x0F;
        updateHeader |= (fragmentation & 0x03) << 4;
        updateHeader |= (compression & 0x03) << 6;
-       stream_write_uint8(s, updateHeader);
+       stream_write_BYTE(s, updateHeader);
 }
 
-uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s)
+UINT16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s)
 {
-       uint8 header;
-       uint16 length;
+       BYTE header;
+       UINT16 length;
 
-       stream_read_uint8(s, header);
+       stream_read_BYTE(s, header);
 
        if (fastpath != NULL)
        {
@@ -146,9 +146,9 @@ uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s)
 static BOOL fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s)
 {
        rdpUpdate* update = fastpath->rdp->update;
-       uint16 numberOrders;
+       UINT16 numberOrders;
 
-       stream_read_uint16(s, numberOrders); /* numberOrders (2 bytes) */
+       stream_read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */
 
        while (numberOrders > 0)
        {
@@ -162,11 +162,11 @@ static BOOL fastpath_recv_orders(rdpFastPath* fastpath, STREAM* s)
 
 static void fastpath_recv_update_common(rdpFastPath* fastpath, STREAM* s)
 {
-       uint16 updateType;
+       UINT16 updateType;
        rdpUpdate* update = fastpath->rdp->update;
        rdpContext* context = update->context;
 
-       stream_read_uint16(s, updateType); /* updateType (2 bytes) */
+       stream_read_UINT16(s, updateType); /* updateType (2 bytes) */
 
        switch (updateType)
        {
@@ -184,10 +184,10 @@ static void fastpath_recv_update_common(rdpFastPath* fastpath, STREAM* s)
 
 static void fastpath_recv_update_synchronize(rdpFastPath* fastpath, STREAM* s)
 {
-       stream_seek_uint16(s); /* size (2 bytes), must be set to zero */
+       stream_seek_UINT16(s); /* size (2 bytes), must be set to zero */
 }
 
-static BOOL fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uint32 size, STREAM* s)
+static BOOL fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, uint32 size, STREAM* s)
 {
        rdpUpdate* update = fastpath->rdp->update;
        rdpContext* context = fastpath->rdp->update->context;
@@ -259,13 +259,13 @@ static BOOL fastpath_recv_update(rdpFastPath* fastpath, uint8 updateCode, uint32
 
 static BOOL fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s)
 {
-       uint16 size;
+       UINT16 size;
        int next_pos;
        uint32 totalSize;
-       uint8 updateCode;
-       uint8 fragmentation;
-       uint8 compression;
-       uint8 compressionFlags;
+       BYTE updateCode;
+       BYTE fragmentation;
+       BYTE compression;
+       BYTE compressionFlags;
        STREAM* update_stream;
        STREAM* comp_stream;
        rdpRdp  *rdp;
@@ -277,11 +277,11 @@ static BOOL fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s)
        fastpath_read_update_header(s, &updateCode, &fragmentation, &compression);
 
        if (compression == FASTPATH_OUTPUT_COMPRESSION_USED)
-               stream_read_uint8(s, compressionFlags);
+               stream_read_BYTE(s, compressionFlags);
        else
                compressionFlags = 0;
 
-       stream_read_uint16(s, size);
+       stream_read_UINT16(s, size);
        next_pos = stream_get_pos(s) + size;
        comp_stream = s;
 
@@ -358,14 +358,14 @@ BOOL fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s)
        return TRUE;
 }
 
-static BOOL fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8* eventCode)
+static BOOL fastpath_read_input_event_header(STREAM* s, BYTE* eventFlags, BYTE* eventCode)
 {
-       uint8 eventHeader;
+       BYTE eventHeader;
 
        if (stream_get_left(s) < 1)
                return FALSE;
 
-       stream_read_uint8(s, eventHeader); /* eventHeader (1 byte) */
+       stream_read_BYTE(s, eventHeader); /* eventHeader (1 byte) */
 
        *eventFlags = (eventHeader & 0x1F);
        *eventCode = (eventHeader >> 5);
@@ -373,15 +373,15 @@ static BOOL fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8
        return TRUE;
 }
 
-static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
+static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
 {
-       uint16 flags;
-       uint16 code;
+       UINT16 flags;
+       UINT16 code;
 
        if (stream_get_left(s) < 1)
                return FALSE;
 
-       stream_read_uint8(s, code); /* keyCode (1 byte) */
+       stream_read_BYTE(s, code); /* keyCode (1 byte) */
 
        flags = 0;
        if ((eventFlags & FASTPATH_INPUT_KBDFLAGS_RELEASE))
@@ -397,58 +397,58 @@ static BOOL fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s,
        return TRUE;
 }
 
-static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
+static BOOL fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
 {
-       uint16 pointerFlags;
-       uint16 xPos;
-       uint16 yPos;
+       UINT16 pointerFlags;
+       UINT16 xPos;
+       UINT16 yPos;
 
        if (stream_get_left(s) < 6)
                return FALSE;
 
-       stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */
-       stream_read_uint16(s, xPos); /* xPos (2 bytes) */
-       stream_read_uint16(s, yPos); /* yPos (2 bytes) */
+       stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */
+       stream_read_UINT16(s, xPos); /* xPos (2 bytes) */
+       stream_read_UINT16(s, yPos); /* yPos (2 bytes) */
 
        IFCALL(fastpath->rdp->input->MouseEvent, fastpath->rdp->input, pointerFlags, xPos, yPos);
 
        return TRUE;
 }
 
-static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
+static BOOL fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
 {
-       uint16 pointerFlags;
-       uint16 xPos;
-       uint16 yPos;
+       UINT16 pointerFlags;
+       UINT16 xPos;
+       UINT16 yPos;
 
        if (stream_get_left(s) < 6)
                return FALSE;
 
-       stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */
-       stream_read_uint16(s, xPos); /* xPos (2 bytes) */
-       stream_read_uint16(s, yPos); /* yPos (2 bytes) */
+       stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */
+       stream_read_UINT16(s, xPos); /* xPos (2 bytes) */
+       stream_read_UINT16(s, yPos); /* yPos (2 bytes) */
 
        IFCALL(fastpath->rdp->input->ExtendedMouseEvent, fastpath->rdp->input, pointerFlags, xPos, yPos);
 
        return TRUE;
 }
 
-static BOOL fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
+static BOOL fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
 {
        IFCALL(fastpath->rdp->input->SynchronizeEvent, fastpath->rdp->input, eventFlags);
 
        return TRUE;
 }
 
-static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
+static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, BYTE eventFlags)
 {
-       uint16 unicodeCode;
-       uint16 flags;
+       UINT16 unicodeCode;
+       UINT16 flags;
 
        if (stream_get_left(s) < 2)
                return FALSE;
 
-       stream_read_uint16(s, unicodeCode); /* unicodeCode (2 bytes) */
+       stream_read_UINT16(s, unicodeCode); /* unicodeCode (2 bytes) */
 
        flags = 0;
        if ((eventFlags & FASTPATH_INPUT_KBDFLAGS_RELEASE))
@@ -463,8 +463,8 @@ static BOOL fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s,
 
 static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s)
 {
-       uint8 eventFlags;
-       uint8 eventCode;
+       BYTE eventFlags;
+       BYTE eventCode;
 
        if (!fastpath_read_input_event_header(s, &eventFlags, &eventCode))
                return FALSE;
@@ -506,7 +506,7 @@ static BOOL fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s)
 
 BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s)
 {
-       uint8 i;
+       BYTE i;
 
        if (fastpath->numberEvents == 0)
        {
@@ -518,7 +518,7 @@ BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s)
                if (stream_get_left(s) < 1)
                        return FALSE;
 
-               stream_read_uint8(s, fastpath->numberEvents); /* eventHeader (1 byte) */
+               stream_read_BYTE(s, fastpath->numberEvents); /* eventHeader (1 byte) */
        }
 
        for (i = 0; i < fastpath->numberEvents; i++)
@@ -545,7 +545,7 @@ static uint32 fastpath_get_sec_bytes(rdpRdp* rdp)
        return sec_bytes;
 }
 
-STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 eventCode)
+STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode)
 {
        rdpRdp *rdp;
        STREAM* s;
@@ -560,15 +560,15 @@ STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 e
                        rdp->sec_flags |= SEC_SECURE_CHECKSUM;
        }
        stream_seek(s, fastpath_get_sec_bytes(rdp));
-       stream_write_uint8(s, eventFlags | (eventCode << 5)); /* eventHeader (1 byte) */
+       stream_write_BYTE(s, eventFlags | (eventCode << 5)); /* eventHeader (1 byte) */
        return s;
 }
 
 BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s)
 {
        rdpRdp *rdp;
-       uint16 length;
-       uint8 eventHeader;
+       UINT16 length;
+       BYTE eventHeader;
        int sec_bytes;
 
        rdp = fastpath->rdp;
@@ -588,7 +588,7 @@ BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s)
                eventHeader |= (FASTPATH_INPUT_SECURE_CHECKSUM << 6);
 
        stream_set_pos(s, 0);
-       stream_write_uint8(s, eventHeader);
+       stream_write_BYTE(s, eventHeader);
        sec_bytes = fastpath_get_sec_bytes(fastpath->rdp);
        /*
         * We always encode length in two bytes, eventhough we could use
@@ -596,12 +596,12 @@ BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s)
         * because we can leave room for fixed-length header, store all
         * the data first and then store the header.
         */
-       stream_write_uint16_be(s, 0x8000 | length);
+       stream_write_UINT16_be(s, 0x8000 | length);
 
        if (sec_bytes > 0)
        {
-               uint8* fpInputEvents;
-               uint16 fpInputEvents_length;
+               BYTE* fpInputEvents;
+               UINT16 fpInputEvents_length;
 
                fpInputEvents = stream_get_tail(s) + sec_bytes;
                fpInputEvents_length = length - 3 - sec_bytes;
@@ -631,13 +631,13 @@ STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath)
        return s;
 }
 
-BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s)
+BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s)
 {
        rdpRdp* rdp;
-       uint8* bm;
-       uint8* ptr_to_crypt;
-       uint8* ptr_sig;
-       uint8* holdp;
+       BYTE* bm;
+       BYTE* ptr_to_crypt;
+       BYTE* ptr_sig;
+       BYTE* holdp;
        int fragment;
        int sec_bytes;
        int try_comp;
@@ -648,11 +648,11 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s
        int dlen;
        int bytes_to_crypt;
        BOOL result;
-       uint16 pduLength;
-       uint16 maxLength;
+       UINT16 pduLength;
+       UINT16 maxLength;
        uint32 totalLength;
-       uint8 fragmentation;
-       uint8 header;
+       BYTE fragmentation;
+       BYTE header;
        STREAM* update;
        STREAM* comp_update;
        STREAM* ls;
@@ -686,7 +686,7 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s
                                        pdu_data_bytes = rdp->mppc_enc->bytes_in_opb;
                                        comp_flags = FASTPATH_OUTPUT_COMPRESSION_USED;
                                        header_bytes = 7 + sec_bytes;
-                                       bm = (uint8*) (rdp->mppc_enc->outputBuffer - header_bytes);
+                                       bm = (BYTE*) (rdp->mppc_enc->outputBuffer - header_bytes);
                                        stream_attach(comp_update, bm, pdu_data_bytes + header_bytes);
                                        ls = comp_update;
                                }
@@ -707,9 +707,9 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s
                header = 0;
                if (sec_bytes > 0)
                        header |= (FASTPATH_OUTPUT_ENCRYPTED << 6);
-               stream_write_uint8(ls, header); /* fpOutputHeader (1 byte) */
-               stream_write_uint8(ls, 0x80 | (pduLength >> 8)); /* length1 */
-               stream_write_uint8(ls, pduLength & 0xFF); /* length2 */
+               stream_write_BYTE(ls, header); /* fpOutputHeader (1 byte) */
+               stream_write_BYTE(ls, 0x80 | (pduLength >> 8)); /* length1 */
+               stream_write_BYTE(ls, pduLength & 0xFF); /* length2 */
 
                if (sec_bytes > 0)
                        stream_seek(ls, sec_bytes);
@@ -719,13 +719,13 @@ BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s
                /* extra byte if compressed */
                if (ls == comp_update)
                {
-                       stream_write_uint8(ls, cflags);
+                       stream_write_BYTE(ls, cflags);
                        bytes_to_crypt = pdu_data_bytes + 4;
                }
                else
                        bytes_to_crypt = pdu_data_bytes + 3;
 
-               stream_write_uint16(ls, pdu_data_bytes);
+               stream_write_UINT16(ls, pdu_data_bytes);
 
                stream_attach(update, bm, pduLength);
                stream_seek(update, pduLength);
index d7104cb..4870205 100644 (file)
@@ -97,24 +97,24 @@ enum FASTPATH_INPUT_KBDFLAGS
 struct rdp_fastpath
 {
        rdpRdp* rdp;
-       uint8 encryptionFlags;
-       uint8 numberEvents;
+       BYTE encryptionFlags;
+       BYTE numberEvents;
        STREAM* updateData;
 };
 
-uint16 fastpath_header_length(STREAM* s);
-uint16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s);
-uint16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s);
+UINT16 fastpath_header_length(STREAM* s);
+UINT16 fastpath_read_header(rdpFastPath* fastpath, STREAM* s);
+UINT16 fastpath_read_header_rdp(rdpFastPath* fastpath, STREAM* s);
 BOOL fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s);
 BOOL fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s);
 
-STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 eventCode);
+STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, BYTE eventFlags, BYTE eventCode);
 BOOL fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s);
 
 STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath);
-BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, uint8 updateCode, STREAM* s);
+BOOL fastpath_send_update_pdu(rdpFastPath* fastpath, BYTE updateCode, STREAM* s);
 
-BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, uint16 frameAction, uint32 frameId);
+BOOL fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, UINT16 frameAction, uint32 frameId);
 
 rdpFastPath* fastpath_new(rdpRdp* rdp);
 void fastpath_free(rdpFastPath* fastpath);
index 8738346..b1c3d44 100644 (file)
@@ -132,7 +132,7 @@ BOOL freerdp_connect(freerdp* instance)
                        {
                                pcap_get_next_record_header(update->pcap_rfx, &record);
 
-                               s->data = (uint8*) realloc(s->data, record.length);
+                               s->data = (BYTE*) realloc(s->data, record.length);
                                record.data = s->data;
                                s->size = record.length;
 
@@ -182,7 +182,7 @@ BOOL freerdp_check_fds(freerdp* instance)
        return TRUE;
 }
 
-static int freerdp_send_channel_data(freerdp* instance, int channel_id, uint8* data, int size)
+static int freerdp_send_channel_data(freerdp* instance, int channel_id, BYTE* data, int size)
 {
        return rdp_send_channel_data(instance->context->rdp, channel_id, data, size);
 }
index d466ca4..85d4d08 100644 (file)
  * { itu-t(0) recommendation(0) t(20) t124(124) version(0) 1 }
  * v.1 of ITU-T Recommendation T.124 (Feb 1998): "Generic Conference Control"
  */
-uint8 t124_02_98_oid[6] = { 0, 0, 20, 124, 0, 1 };
+BYTE t124_02_98_oid[6] = { 0, 0, 20, 124, 0, 1 };
 
-uint8 h221_cs_key[4] = "Duca";
-uint8 h221_sc_key[4] = "McDn";
+BYTE h221_cs_key[4] = "Duca";
+BYTE h221_sc_key[4] = "McDn";
 
 /**
  * Read a GCC Conference Create Request.\n
@@ -140,10 +140,10 @@ uint8 h221_sc_key[4] = "McDn";
 
 BOOL gcc_read_conference_create_request(STREAM* s, rdpSettings* settings)
 {
-       uint16 length;
-       uint8 choice;
-       uint8 number;
-       uint8 selection;
+       UINT16 length;
+       BYTE choice;
+       BYTE number;
+       BYTE selection;
 
        /* ConnectData */
        if (!per_read_choice(s, &choice))
@@ -209,7 +209,7 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data)
        per_write_selection(s, 0x08); /* select optional userData from ConferenceCreateRequest */
 
        /* ConferenceCreateRequest::conferenceName */
-       per_write_numeric_string(s, (uint8*)"1", 1, 1); /* ConferenceName::numeric */
+       per_write_numeric_string(s, (BYTE*)"1", 1, 1); /* ConferenceName::numeric */
        per_write_padding(s, 1); /* padding */
 
        /* UserData (SET OF SEQUENCE) */
@@ -225,12 +225,12 @@ void gcc_write_conference_create_request(STREAM* s, STREAM* user_data)
 
 BOOL gcc_read_conference_create_response(STREAM* s, rdpSettings* settings)
 {
-       uint16 length;
+       UINT16 length;
        uint32 tag;
-       uint16 nodeID;
-       uint8 result;
-       uint8 choice;
-       uint8 number;
+       UINT16 nodeID;
+       BYTE result;
+       BYTE choice;
+       BYTE number;
 
        /* ConnectData */
        per_read_choice(s, &choice);
@@ -308,8 +308,8 @@ void gcc_write_conference_create_response(STREAM* s, STREAM* user_data)
 
 BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings* settings, int length)
 {
-       uint16 type;
-       uint16 blockLength;
+       UINT16 type;
+       UINT16 blockLength;
        int pos;
 
        while (length > 0)
@@ -370,10 +370,10 @@ void gcc_write_client_data_blocks(STREAM* s, rdpSettings* settings)
 
 BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings* settings, int length)
 {
-       uint16 type;
-       uint16 offset = 0;
-       uint16 blockLength;
-       uint8* holdp;
+       UINT16 type;
+       UINT16 offset = 0;
+       UINT16 blockLength;
+       BYTE* holdp;
 
        while (offset < length)
        {
@@ -429,10 +429,10 @@ void gcc_write_server_data_blocks(STREAM* s, rdpSettings* settings)
        gcc_write_server_security_data(s, settings);
 }
 
-BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length)
+BOOL gcc_read_user_data_header(STREAM* s, UINT16* type, UINT16* length)
 {
-       stream_read_uint16(s, *type); /* type */
-       stream_read_uint16(s, *length); /* length */
+       stream_read_UINT16(s, *type); /* type */
+       stream_read_UINT16(s, *length); /* length */
 
        if (*length < 4)
                return FALSE;
@@ -451,10 +451,10 @@ BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length)
  * @param length data block length
  */
 
-void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length)
+void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length)
 {
-       stream_write_uint16(s, type); /* type */
-       stream_write_uint16(s, length); /* length */
+       stream_write_UINT16(s, type); /* type */
+       stream_write_UINT16(s, length); /* length */
 }
 
 /**
@@ -464,16 +464,16 @@ void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length)
  * @param settings rdp settings
  */
 
-BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLength)
+BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
 {
        char* str;
        uint32 version;
        uint32 color_depth;
-       uint16 colorDepth = 0;
-       uint16 postBeta2ColorDepth = 0;
-       uint16 highColorDepth = 0;
-       uint16 supportedColorDepths = 0;
-       uint16 earlyCapabilityFlags = 0;
+       UINT16 colorDepth = 0;
+       UINT16 postBeta2ColorDepth = 0;
+       UINT16 highColorDepth = 0;
+       UINT16 supportedColorDepths = 0;
+       UINT16 earlyCapabilityFlags = 0;
        uint32 serverSelectedProtocol = 0;
 
        /* Length of all required fields, until imeFileName */
@@ -483,10 +483,10 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen
        stream_read_uint32(s, version); /* version */
        settings->rdp_version = (version == RDP_VERSION_4 ? 4 : 7);
 
-       stream_read_uint16(s, settings->width); /* desktopWidth */
-       stream_read_uint16(s, settings->height); /* desktopHeight */
-       stream_read_uint16(s, colorDepth); /* colorDepth */
-       stream_seek_uint16(s); /* SASSequence (Secure Access Sequence) */
+       stream_read_UINT16(s, settings->width); /* desktopWidth */
+       stream_read_UINT16(s, settings->height); /* desktopHeight */
+       stream_read_UINT16(s, colorDepth); /* colorDepth */
+       stream_seek_UINT16(s); /* SASSequence (Secure Access Sequence) */
        stream_read_uint32(s, settings->kbd_layout); /* keyboardLayout */
        stream_read_uint32(s, settings->client_build); /* clientBuild */
 
@@ -516,12 +516,12 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen
        {
                if (blockLength < 2)
                        break;
-               stream_read_uint16(s, postBeta2ColorDepth); /* postBeta2ColorDepth */
+               stream_read_UINT16(s, postBeta2ColorDepth); /* postBeta2ColorDepth */
                blockLength -= 2;
 
                if (blockLength < 2)
                        break;
-               stream_seek_uint16(s); /* clientProductID */
+               stream_seek_UINT16(s); /* clientProductID */
                blockLength -= 2;
 
                if (blockLength < 4)
@@ -531,17 +531,17 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen
 
                if (blockLength < 2)
                        break;
-               stream_read_uint16(s, highColorDepth); /* highColorDepth */
+               stream_read_UINT16(s, highColorDepth); /* highColorDepth */
                blockLength -= 2;
 
                if (blockLength < 2)
                        break;
-               stream_read_uint16(s, supportedColorDepths); /* supportedColorDepths */
+               stream_read_UINT16(s, supportedColorDepths); /* supportedColorDepths */
                blockLength -= 2;
 
                if (blockLength < 2)
                        break;
-               stream_read_uint16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */
+               stream_read_UINT16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */
                blockLength -= 2;
 
                if (blockLength < 64)
@@ -555,12 +555,12 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, uint16 blockLen
 
                if (blockLength < 1)
                        break;
-               stream_read_uint8(s, settings->performance_flags); /* connectionType */
+               stream_read_BYTE(s, settings->performance_flags); /* connectionType */
                blockLength -= 1;
 
                if (blockLength < 1)
                        break;
-               stream_seek_uint8(s); /* pad1octet */
+               stream_seek_BYTE(s); /* pad1octet */
                blockLength -= 1;
 
                if (blockLength < 4)
@@ -634,10 +634,10 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
        uint32 version;
        WCHAR* clientName;
        int clientNameLength;
-       uint8 connectionType;
-       uint16 highColorDepth;
-       uint16 supportedColorDepths;
-       uint16 earlyCapabilityFlags;
+       BYTE connectionType;
+       UINT16 highColorDepth;
+       UINT16 supportedColorDepths;
+       UINT16 earlyCapabilityFlags;
        WCHAR* clientDigProductId;
        int clientDigProductIdLength;
 
@@ -649,10 +649,10 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
        clientDigProductIdLength = freerdp_AsciiToUnicodeAlloc(settings->client_product_id, &clientDigProductId, 0);
 
        stream_write_uint32(s, version); /* version */
-       stream_write_uint16(s, settings->width); /* desktopWidth */
-       stream_write_uint16(s, settings->height); /* desktopHeight */
-       stream_write_uint16(s, RNS_UD_COLOR_8BPP); /* colorDepth, ignored because of postBeta2ColorDepth */
-       stream_write_uint16(s, RNS_UD_SAS_DEL); /* SASSequence (Secure Access Sequence) */
+       stream_write_UINT16(s, settings->width); /* desktopWidth */
+       stream_write_UINT16(s, settings->height); /* desktopHeight */
+       stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* colorDepth, ignored because of postBeta2ColorDepth */
+       stream_write_UINT16(s, RNS_UD_SAS_DEL); /* SASSequence (Secure Access Sequence) */
        stream_write_uint32(s, settings->kbd_layout); /* keyboardLayout */
        stream_write_uint32(s, settings->client_build); /* clientBuild */
 
@@ -674,8 +674,8 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
 
        stream_write_zero(s, 64); /* imeFileName */
 
-       stream_write_uint16(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth */
-       stream_write_uint16(s, 1); /* clientProductID */
+       stream_write_UINT16(s, RNS_UD_COLOR_8BPP); /* postBeta2ColorDepth */
+       stream_write_UINT16(s, 1); /* clientProductID */
        stream_write_uint32(s, 0); /* serialNumber (should be initialized to 0) */
 
        highColorDepth = MIN(settings->color_depth, 24);
@@ -700,10 +700,10 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
                earlyCapabilityFlags |= RNS_UD_CS_WANT_32BPP_SESSION;
        }
 
-       stream_write_uint16(s, highColorDepth); /* highColorDepth */
-       stream_write_uint16(s, supportedColorDepths); /* supportedColorDepths */
+       stream_write_UINT16(s, highColorDepth); /* highColorDepth */
+       stream_write_UINT16(s, supportedColorDepths); /* supportedColorDepths */
 
-       stream_write_uint16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */
+       stream_write_UINT16(s, earlyCapabilityFlags); /* earlyCapabilityFlags */
 
        /* clientDigProductId (64 bytes, null-terminated unicode, truncated to 30 characters) */
        if (clientDigProductIdLength > 62)
@@ -716,8 +716,8 @@ void gcc_write_client_core_data(STREAM* s, rdpSettings* settings)
        stream_write_zero(s, 64 - clientDigProductIdLength - 2);
        free(clientDigProductId);
 
-       stream_write_uint8(s, connectionType); /* connectionType */
-       stream_write_uint8(s, 0); /* pad1octet */
+       stream_write_BYTE(s, connectionType); /* connectionType */
+       stream_write_BYTE(s, 0); /* pad1octet */
 
        stream_write_uint32(s, settings->selected_protocol); /* serverSelectedProtocol */
 }
@@ -753,7 +753,7 @@ void gcc_write_server_core_data(STREAM* s, rdpSettings* settings)
  * @param settings rdp settings
  */
 
-BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, uint16 blockLength)
+BOOL gcc_read_client_security_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
 {
        if (blockLength < 8)
                return FALSE;
@@ -797,7 +797,7 @@ void gcc_write_client_security_data(STREAM* s, rdpSettings* settings)
 
 BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings)
 {
-       uint8* data;
+       BYTE* data;
        uint32 length;
 
        stream_read_uint32(s, settings->encryption_method); /* encryptionMethod */
@@ -848,7 +848,7 @@ BOOL gcc_read_server_security_data(STREAM* s, rdpSettings* settings)
        return TRUE;
 }
 
-static const uint8 initial_signature[] =
+static const BYTE initial_signature[] =
 {
        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
@@ -865,7 +865,7 @@ static const uint8 initial_signature[] =
  * Yes, Terminal Services Private Key is publicly available.
  */
 
-const uint8 tssk_modulus[] =
+const BYTE tssk_modulus[] =
 {
        0x3d, 0x3a, 0x5e, 0xbd, 0x72, 0x43, 0x3e, 0xc9,
        0x4d, 0xbb, 0xc1, 0x1e, 0x4a, 0xba, 0x5f, 0xcb,
@@ -877,7 +877,7 @@ const uint8 tssk_modulus[] =
        0x20, 0x93, 0x09, 0x5f, 0x05, 0x6d, 0xea, 0x87
 };
 
-const uint8 tssk_privateExponent[] =
+const BYTE tssk_privateExponent[] =
 {
        0x87, 0xa7, 0x19, 0x32, 0xda, 0x11, 0x87, 0x55,
        0x58, 0x00, 0x16, 0x16, 0x25, 0x65, 0x68, 0xf8,
@@ -889,7 +889,7 @@ const uint8 tssk_privateExponent[] =
        0xc7, 0x10, 0x01, 0x13, 0xe7, 0x3f, 0xf3, 0x5f
 };
 
-const uint8 tssk_exponent[] =
+const BYTE tssk_exponent[] =
 {
        0x5b, 0x7b, 0x88, 0xc0
 };
@@ -897,10 +897,10 @@ const uint8 tssk_exponent[] =
 void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
 {
        CryptoMd5 md5;
-       uint8* sigData;
+       BYTE* sigData;
        int expLen, keyLen, sigDataLen;
-       uint8 encryptedSignature[TSSK_KEY_LENGTH];
-       uint8 signature[sizeof(initial_signature)];
+       BYTE encryptedSignature[TSSK_KEY_LENGTH];
+       BYTE signature[sizeof(initial_signature)];
        uint32 headerLen, serverRandomLen, serverCertLen, wPublicKeyBlobLen;
 
        if (!settings->encryption)
@@ -986,9 +986,9 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
        stream_write_uint32(s, CERT_CHAIN_VERSION_1); /* dwVersion (4 bytes) */
        stream_write_uint32(s, SIGNATURE_ALG_RSA); /* dwSigAlgId */
        stream_write_uint32(s, KEY_EXCHANGE_ALG_RSA); /* dwKeyAlgId */
-       stream_write_uint16(s, BB_RSA_KEY_BLOB); /* wPublicKeyBlobType */
+       stream_write_UINT16(s, BB_RSA_KEY_BLOB); /* wPublicKeyBlobType */
 
-       stream_write_uint16(s, wPublicKeyBlobLen); /* wPublicKeyBlobLen */
+       stream_write_UINT16(s, wPublicKeyBlobLen); /* wPublicKeyBlobLen */
        stream_write(s, "RSA1", 4); /* magic */
        stream_write_uint32(s, keyLen + 8); /* keylen */
        stream_write_uint32(s, keyLen * 8); /* bitlen */
@@ -1000,8 +1000,8 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
 
        sigDataLen = stream_get_tail(s) - sigData;
 
-       stream_write_uint16(s, BB_RSA_SIGNATURE_BLOB); /* wSignatureBlobType */
-       stream_write_uint16(s, keyLen + 8); /* wSignatureBlobLen */
+       stream_write_UINT16(s, BB_RSA_SIGNATURE_BLOB); /* wSignatureBlobType */
+       stream_write_UINT16(s, keyLen + 8); /* wSignatureBlobLen */
 
        memcpy(signature, initial_signature, sizeof(initial_signature));
 
@@ -1023,7 +1023,7 @@ void gcc_write_server_security_data(STREAM* s, rdpSettings* settings)
  * @param settings rdp settings
  */
 
-BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, uint16 blockLength)
+BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
 {
        int i;
 
@@ -1058,7 +1058,7 @@ BOOL gcc_read_client_network_data(STREAM* s, rdpSettings* settings, uint16 block
 void gcc_write_client_network_data(STREAM* s, rdpSettings* settings)
 {
        int i;
-       uint16 length;
+       UINT16 length;
 
        if (settings->num_channels > 0)
        {
@@ -1080,12 +1080,12 @@ void gcc_write_client_network_data(STREAM* s, rdpSettings* settings)
 BOOL gcc_read_server_network_data(STREAM* s, rdpSettings* settings)
 {
        int i;
-       uint16 MCSChannelId;
-       uint16 channelCount;
-       uint16 channelId;
+       UINT16 MCSChannelId;
+       UINT16 channelCount;
+       UINT16 channelId;
 
-       stream_read_uint16(s, MCSChannelId); /* MCSChannelId */
-       stream_read_uint16(s, channelCount); /* channelCount */
+       stream_read_UINT16(s, MCSChannelId); /* MCSChannelId */
+       stream_read_UINT16(s, channelCount); /* channelCount */
 
        if (channelCount != settings->num_channels)
        {
@@ -1095,7 +1095,7 @@ BOOL gcc_read_server_network_data(STREAM* s, rdpSettings* settings)
 
        for (i = 0; i < channelCount; i++)
        {
-               stream_read_uint16(s, channelId); /* channelId */
+               stream_read_UINT16(s, channelId); /* channelId */
                settings->channels[i].channel_id = channelId;
        }
 
@@ -1111,16 +1111,16 @@ void gcc_write_server_network_data(STREAM* s, rdpSettings* settings)
 
        gcc_write_user_data_header(s, SC_NET, 8 + settings->num_channels * 2 + (settings->num_channels % 2 == 1 ? 2 : 0));
 
-       stream_write_uint16(s, MCS_GLOBAL_CHANNEL_ID); /* MCSChannelId */
-       stream_write_uint16(s, settings->num_channels); /* channelCount */
+       stream_write_UINT16(s, MCS_GLOBAL_CHANNEL_ID); /* MCSChannelId */
+       stream_write_UINT16(s, settings->num_channels); /* channelCount */
 
        for (i = 0; i < settings->num_channels; i++)
        {
-               stream_write_uint16(s, settings->channels[i].channel_id);
+               stream_write_UINT16(s, settings->channels[i].channel_id);
        }
 
        if (settings->num_channels % 2 == 1)
-               stream_write_uint16(s, 0);
+               stream_write_UINT16(s, 0);
 }
 
 /**
@@ -1130,7 +1130,7 @@ void gcc_write_server_network_data(STREAM* s, rdpSettings* settings)
  * @param settings rdp settings
  */
 
-BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, uint16 blockLength)
+BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
 {
        uint32 flags;
 
@@ -1174,7 +1174,7 @@ void gcc_write_client_cluster_data(STREAM* s, rdpSettings* settings)
  * @param settings rdp settings
  */
 
-BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, uint16 blockLength)
+BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
 {
        printf("CS_MONITOR\n");
        return TRUE;
@@ -1190,7 +1190,7 @@ BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings* settings, uint16 block
 void gcc_write_client_monitor_data(STREAM* s, rdpSettings* settings)
 {
        int i;
-       uint16 length;
+       UINT16 length;
        uint32 left, top, right, bottom, flags;
 
        if (settings->num_monitors > 1)
index 1726c9b..7117992 100644 (file)
@@ -89,23 +89,23 @@ BOOL gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length);
 void gcc_write_client_data_blocks(STREAM* s, rdpSettings *settings);
 BOOL gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length);
 void gcc_write_server_data_blocks(STREAM* s, rdpSettings *settings);
-BOOL gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length);
-void gcc_write_user_data_header(STREAM* s, uint16 type, uint16 length);
-BOOL gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
+BOOL gcc_read_user_data_header(STREAM* s, UINT16* type, UINT16* length);
+void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length);
+BOOL gcc_read_client_core_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
 void gcc_write_client_core_data(STREAM* s, rdpSettings *settings);
 BOOL gcc_read_server_core_data(STREAM* s, rdpSettings *settings);
 void gcc_write_server_core_data(STREAM* s, rdpSettings *settings);
-BOOL gcc_read_client_security_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
+BOOL gcc_read_client_security_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
 void gcc_write_client_security_data(STREAM* s, rdpSettings *settings);
 BOOL gcc_read_server_security_data(STREAM* s, rdpSettings *settings);
 void gcc_write_server_security_data(STREAM* s, rdpSettings *settings);
-BOOL gcc_read_client_network_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
+BOOL gcc_read_client_network_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
 void gcc_write_client_network_data(STREAM* s, rdpSettings *settings);
 BOOL gcc_read_server_network_data(STREAM* s, rdpSettings *settings);
 void gcc_write_server_network_data(STREAM* s, rdpSettings *settings);
-BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
+BOOL gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
 void gcc_write_client_cluster_data(STREAM* s, rdpSettings *settings);
-BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, uint16 blockLength);
+BOOL gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, UINT16 blockLength);
 void gcc_write_client_monitor_data(STREAM* s, rdpSettings *settings);
 
 #endif /* __GCC_H */
index fce8108..05bf2e5 100644 (file)
@@ -62,7 +62,7 @@ void Bitmap_Free(rdpContext* context, rdpBitmap* bitmap)
        }
 }
 
-void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, uint16 left, uint16 top, uint16 right, uint16 bottom)
+void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, UINT16 left, UINT16 top, UINT16 right, UINT16 bottom)
 {
        bitmap->left = left;
        bitmap->top = top;
@@ -70,7 +70,7 @@ void Bitmap_SetRectangle(rdpContext* context, rdpBitmap* bitmap, uint16 left, ui
        bitmap->bottom = bottom;
 }
 
-void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, uint16 width, uint16 height)
+void Bitmap_SetDimensions(rdpContext* context, rdpBitmap* bitmap, UINT16 width, UINT16 height)
 {
        bitmap->width = width;
        bitmap->height = height;
index 2534414..da25709 100644 (file)
@@ -409,11 +409,11 @@ void http_response_print(HttpResponse* http_response)
 
 HttpResponse* http_response_recv(rdpTls* tls)
 {
-       uint8* p;
+       BYTE* p;
        int nbytes;
        int length;
        int status;
-       uint8* buffer;
+       BYTE* buffer;
        char* content;
        char* header_end;
        HttpResponse* http_response;
@@ -432,7 +432,7 @@ HttpResponse* http_response_recv(rdpTls* tls)
                if (status > 0)
                {
                        nbytes += status;
-                       p = (uint8*) &buffer[nbytes];
+                       p = (BYTE*) &buffer[nbytes];
                }
                else if (status == 0)
                {
@@ -492,7 +492,7 @@ HttpResponse* http_response_recv(rdpTls* tls)
                {
                        length *= 2;
                        buffer = realloc(buffer, length);
-                       p = (uint8*) &buffer[nbytes];
+                       p = (BYTE*) &buffer[nbytes];
                }
        }
 
index 445678f..cf43e18 100644 (file)
@@ -110,13 +110,13 @@ void rdp_write_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
 
 BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
 {
-       uint16 clientAddressFamily;
-       uint16 cbClientAddress;
-       uint16 cbClientDir;
-       uint16 cbAutoReconnectLen;
+       UINT16 clientAddressFamily;
+       UINT16 cbClientAddress;
+       UINT16 cbClientDir;
+       UINT16 cbAutoReconnectLen;
 
-       stream_read_uint16(s, clientAddressFamily); /* clientAddressFamily */
-       stream_read_uint16(s, cbClientAddress); /* cbClientAddress */
+       stream_read_UINT16(s, clientAddressFamily); /* clientAddressFamily */
+       stream_read_UINT16(s, cbClientAddress); /* cbClientAddress */
 
        settings->ipv6 = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? TRUE : FALSE);
 
@@ -126,7 +126,7 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
        freerdp_UnicodeToAsciiAlloc((WCHAR*) stream_get_tail(s), &settings->ip_address, cbClientAddress / 2);
        stream_seek(s, cbClientAddress);
 
-       stream_read_uint16(s, cbClientDir); /* cbClientDir */
+       stream_read_UINT16(s, cbClientDir); /* cbClientDir */
 
        if (stream_get_left(s) < cbClientDir)
                return FALSE;
@@ -143,7 +143,7 @@ BOOL rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
        stream_seek_uint32(s); /* clientSessionId, should be set to 0 */
        stream_read_uint32(s, settings->performance_flags); /* performanceFlags */
 
-       stream_read_uint16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */
+       stream_read_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */
 
        if (cbAutoReconnectLen > 0)
                return rdp_read_client_auto_reconnect_cookie(s, settings); /* autoReconnectCookie */
@@ -178,26 +178,26 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings)
 
        cbAutoReconnectLen = (int) settings->client_auto_reconnect_cookie->cbLen;
 
-       stream_write_uint16(s, clientAddressFamily); /* clientAddressFamily */
+       stream_write_UINT16(s, clientAddressFamily); /* clientAddressFamily */
 
-       stream_write_uint16(s, cbClientAddress + 2); /* cbClientAddress */
+       stream_write_UINT16(s, cbClientAddress + 2); /* cbClientAddress */
 
        if (cbClientAddress > 0)
                stream_write(s, clientAddress, cbClientAddress); /* clientAddress */
-       stream_write_uint16(s, 0);
+       stream_write_UINT16(s, 0);
 
-       stream_write_uint16(s, cbClientDir + 2); /* cbClientDir */
+       stream_write_UINT16(s, cbClientDir + 2); /* cbClientDir */
 
        if (cbClientDir > 0)
                stream_write(s, clientDir, cbClientDir); /* clientDir */
-       stream_write_uint16(s, 0);
+       stream_write_UINT16(s, 0);
 
        rdp_write_client_time_zone(s, settings); /* clientTimeZone */
 
        stream_write_uint32(s, 0); /* clientSessionId, should be set to 0 */
        stream_write_uint32(s, settings->performance_flags); /* performanceFlags */
 
-       stream_write_uint16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */
+       stream_write_UINT16(s, cbAutoReconnectLen); /* cbAutoReconnectLen */
 
        if (cbAutoReconnectLen > 0)
                rdp_write_client_auto_reconnect_cookie(s, settings); /* autoReconnectCookie */
@@ -219,11 +219,11 @@ void rdp_write_extended_info_packet(STREAM* s, rdpSettings* settings)
 BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
 {
        uint32 flags;
-       uint16 cbDomain;
-       uint16 cbUserName;
-       uint16 cbPassword;
-       uint16 cbAlternateShell;
-       uint16 cbWorkingDir;
+       UINT16 cbDomain;
+       UINT16 cbUserName;
+       UINT16 cbPassword;
+       UINT16 cbAlternateShell;
+       UINT16 cbWorkingDir;
 
        stream_seek_uint32(s); /* CodePage */
        stream_read_uint32(s, flags); /* flags */
@@ -233,11 +233,11 @@ BOOL rdp_read_info_packet(STREAM* s, rdpSettings* settings)
        settings->console_audio = ((flags & INFO_REMOTECONSOLEAUDIO) ? TRUE : FALSE);
        settings->compression = ((flags & INFO_COMPRESSION) ? TRUE : FALSE);
 
-       stream_read_uint16(s, cbDomain); /* cbDomain */
-       stream_read_uint16(s, cbUserName); /* cbUserName */
-       stream_read_uint16(s, cbPassword); /* cbPassword */
-       stream_read_uint16(s, cbAlternateShell); /* cbAlternateShell */
-       stream_read_uint16(s, cbWorkingDir); /* cbWorkingDir */
+       stream_read_UINT16(s, cbDomain); /* cbDomain */
+       stream_read_UINT16(s, cbUserName); /* cbUserName */
+       stream_read_UINT16(s, cbPassword); /* cbPassword */
+       stream_read_UINT16(s, cbAlternateShell); /* cbAlternateShell */
+       stream_read_UINT16(s, cbWorkingDir); /* cbWorkingDir */
 
        if (stream_get_left(s) < cbDomain + 2)
                return FALSE;
@@ -373,31 +373,31 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
        stream_write_uint32(s, 0); /* CodePage */
        stream_write_uint32(s, flags); /* flags */
 
-       stream_write_uint16(s, cbDomain); /* cbDomain */
-       stream_write_uint16(s, cbUserName); /* cbUserName */
-       stream_write_uint16(s, cbPassword); /* cbPassword */
-       stream_write_uint16(s, cbAlternateShell); /* cbAlternateShell */
-       stream_write_uint16(s, cbWorkingDir); /* cbWorkingDir */
+       stream_write_UINT16(s, cbDomain); /* cbDomain */
+       stream_write_UINT16(s, cbUserName); /* cbUserName */
+       stream_write_UINT16(s, cbPassword); /* cbPassword */
+       stream_write_UINT16(s, cbAlternateShell); /* cbAlternateShell */
+       stream_write_UINT16(s, cbWorkingDir); /* cbWorkingDir */
 
        if (cbDomain > 0)
                stream_write(s, domain, cbDomain);
-       stream_write_uint16(s, 0);
+       stream_write_UINT16(s, 0);
 
        if (cbUserName > 0)
                stream_write(s, userName, cbUserName);
-       stream_write_uint16(s, 0);
+       stream_write_UINT16(s, 0);
 
        if (cbPassword > 0)
                stream_write(s, password, cbPassword);
-       stream_write_uint16(s, 0);
+       stream_write_UINT16(s, 0);
 
        if (cbAlternateShell > 0)
                stream_write(s, alternateShell, cbAlternateShell);
-       stream_write_uint16(s, 0);
+       stream_write_UINT16(s, 0);
 
        if (cbWorkingDir > 0)
                stream_write(s, workingDir, cbWorkingDir);
-       stream_write_uint16(s, 0);
+       stream_write_UINT16(s, 0);
 
        free(domain);
        free(userName);
@@ -420,9 +420,9 @@ void rdp_write_info_packet(STREAM* s, rdpSettings* settings)
 
 BOOL rdp_recv_client_info(rdpRdp* rdp, STREAM* s)
 {
-       uint16 length;
-       uint16 channelId;
-       uint16 securityFlags;
+       UINT16 length;
+       UINT16 channelId;
+       UINT16 securityFlags;
 
        if (!rdp_read_header(rdp, s, &length, &channelId))
                return FALSE;
@@ -485,7 +485,7 @@ void rdp_recv_logon_info_v2(rdpRdp* rdp, STREAM* s)
        uint32 cbDomain;
        uint32 cbUserName;
 
-       stream_seek_uint16(s); /* version (2 bytes) */
+       stream_seek_UINT16(s); /* version (2 bytes) */
        stream_seek_uint32(s); /* size (4 bytes) */
        stream_seek_uint32(s); /* sessionId (4 bytes) */
        stream_read_uint32(s, cbDomain); /* cbDomain (4 bytes) */
@@ -513,9 +513,9 @@ void rdp_recv_logon_info_extended(rdpRdp* rdp, STREAM* s)
 {
        uint32 cbFieldData;
        uint32 fieldsPresent;
-       uint16 Length;
+       UINT16 Length;
 
-       stream_read_uint16(s, Length); /* The total size in bytes of this structure */
+       stream_read_UINT16(s, Length); /* The total size in bytes of this structure */
        stream_read_uint32(s, fieldsPresent); /* fieldsPresent (4 bytes) */
 
        /* logonFields */
index 6838400..61f7766 100644 (file)
 
 #include "input.h"
 
-void rdp_write_client_input_pdu_header(STREAM* s, uint16 number)
+void rdp_write_client_input_pdu_header(STREAM* s, UINT16 number)
 {
-       stream_write_uint16(s, 1); /* numberEvents (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, 1); /* numberEvents (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 }
 
-void rdp_write_input_event_header(STREAM* s, uint32 time, uint16 type)
+void rdp_write_input_event_header(STREAM* s, uint32 time, UINT16 type)
 {
        stream_write_uint32(s, time); /* eventTime (4 bytes) */
-       stream_write_uint16(s, type); /* messageType (2 bytes) */
+       stream_write_UINT16(s, type); /* messageType (2 bytes) */
 }
 
-STREAM* rdp_client_input_pdu_init(rdpRdp* rdp, uint16 type)
+STREAM* rdp_client_input_pdu_init(rdpRdp* rdp, UINT16 type)
 {
        STREAM* s;
        s = rdp_data_pdu_init(rdp);
@@ -53,7 +53,7 @@ void rdp_send_client_input_pdu(rdpRdp* rdp, STREAM* s)
 
 void input_write_synchronize_event(STREAM* s, uint32 flags)
 {
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
        stream_write_uint32(s, flags); /* toggleFlags (4 bytes) */
 }
 
@@ -67,14 +67,14 @@ void input_send_synchronize_event(rdpInput* input, uint32 flags)
        rdp_send_client_input_pdu(rdp, s);
 }
 
-void input_write_keyboard_event(STREAM* s, uint16 flags, uint16 code)
+void input_write_keyboard_event(STREAM* s, UINT16 flags, UINT16 code)
 {
-       stream_write_uint16(s, flags); /* keyboardFlags (2 bytes) */
-       stream_write_uint16(s, code); /* keyCode (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, flags); /* keyboardFlags (2 bytes) */
+       stream_write_UINT16(s, code); /* keyCode (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 }
 
-void input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        STREAM* s;
        rdpRdp* rdp = input->context->rdp;
@@ -84,17 +84,17 @@ void input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
        rdp_send_client_input_pdu(rdp, s);
 }
 
-void input_write_unicode_keyboard_event(STREAM* s, uint16 flags, uint16 code)
+void input_write_unicode_keyboard_event(STREAM* s, UINT16 flags, UINT16 code)
 {
-       stream_write_uint16(s, flags); /* keyboardFlags (2 bytes) */
-       stream_write_uint16(s, code); /* unicodeCode (2 bytes) */
-       stream_write_uint16(s, 0); /* pad2Octets (2 bytes) */
+       stream_write_UINT16(s, flags); /* keyboardFlags (2 bytes) */
+       stream_write_UINT16(s, code); /* unicodeCode (2 bytes) */
+       stream_write_UINT16(s, 0); /* pad2Octets (2 bytes) */
 }
 
-void input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        STREAM* s;
-       uint16 keyboardFlags = 0;
+       UINT16 keyboardFlags = 0;
        rdpRdp* rdp = input->context->rdp;
 
        /*
@@ -113,14 +113,14 @@ void input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 cod
        rdp_send_client_input_pdu(rdp, s);
 }
 
-void input_write_mouse_event(STREAM* s, uint16 flags, uint16 x, uint16 y)
+void input_write_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16 y)
 {
-       stream_write_uint16(s, flags); /* pointerFlags (2 bytes) */
-       stream_write_uint16(s, x); /* xPos (2 bytes) */
-       stream_write_uint16(s, y); /* yPos (2 bytes) */
+       stream_write_UINT16(s, flags); /* pointerFlags (2 bytes) */
+       stream_write_UINT16(s, x); /* xPos (2 bytes) */
+       stream_write_UINT16(s, y); /* yPos (2 bytes) */
 }
 
-void input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        STREAM* s;
        rdpRdp* rdp = input->context->rdp;
@@ -130,14 +130,14 @@ void input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
        rdp_send_client_input_pdu(rdp, s);
 }
 
-void input_write_extended_mouse_event(STREAM* s, uint16 flags, uint16 x, uint16 y)
+void input_write_extended_mouse_event(STREAM* s, UINT16 flags, UINT16 x, UINT16 y)
 {
-       stream_write_uint16(s, flags); /* pointerFlags (2 bytes) */
-       stream_write_uint16(s, x); /* xPos (2 bytes) */
-       stream_write_uint16(s, y); /* yPos (2 bytes) */
+       stream_write_UINT16(s, flags); /* pointerFlags (2 bytes) */
+       stream_write_UINT16(s, x); /* xPos (2 bytes) */
+       stream_write_UINT16(s, y); /* yPos (2 bytes) */
 }
 
-void input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        STREAM* s;
        rdpRdp* rdp = input->context->rdp;
@@ -153,36 +153,36 @@ void input_send_fastpath_synchronize_event(rdpInput* input, uint32 flags)
        rdpRdp* rdp = input->context->rdp;
 
        /* The FastPath Synchronization eventFlags has identical values as SlowPath */
-       s = fastpath_input_pdu_init(rdp->fastpath, (uint8) flags, FASTPATH_INPUT_EVENT_SYNC);
+       s = fastpath_input_pdu_init(rdp->fastpath, (BYTE) flags, FASTPATH_INPUT_EVENT_SYNC);
        fastpath_send_input_pdu(rdp->fastpath, s);
 }
 
-void input_send_fastpath_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        STREAM* s;
-       uint8 eventFlags = 0;
+       BYTE eventFlags = 0;
        rdpRdp* rdp = input->context->rdp;
 
        eventFlags |= (flags & KBD_FLAGS_RELEASE) ? FASTPATH_INPUT_KBDFLAGS_RELEASE : 0;
        eventFlags |= (flags & KBD_FLAGS_EXTENDED) ? FASTPATH_INPUT_KBDFLAGS_EXTENDED : 0;
        s = fastpath_input_pdu_init(rdp->fastpath, eventFlags, FASTPATH_INPUT_EVENT_SCANCODE);
-       stream_write_uint8(s, code); /* keyCode (1 byte) */
+       stream_write_BYTE(s, code); /* keyCode (1 byte) */
        fastpath_send_input_pdu(rdp->fastpath, s);
 }
 
-void input_send_fastpath_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        STREAM* s;
-       uint8 eventFlags = 0;
+       BYTE eventFlags = 0;
        rdpRdp* rdp = input->context->rdp;
 
        eventFlags |= (flags & KBD_FLAGS_RELEASE) ? FASTPATH_INPUT_KBDFLAGS_RELEASE : 0;
        s = fastpath_input_pdu_init(rdp->fastpath, eventFlags, FASTPATH_INPUT_EVENT_UNICODE);
-       stream_write_uint16(s, code); /* unicodeCode (2 bytes) */
+       stream_write_UINT16(s, code); /* unicodeCode (2 bytes) */
        fastpath_send_input_pdu(rdp->fastpath, s);
 }
 
-void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        STREAM* s;
        rdpRdp* rdp = input->context->rdp;
@@ -192,7 +192,7 @@ void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, ui
        fastpath_send_input_pdu(rdp->fastpath, s);
 }
 
-void input_send_fastpath_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        STREAM* s;
        rdpRdp* rdp = input->context->rdp;
@@ -219,13 +219,13 @@ static BOOL input_recv_sync_event(rdpInput* input, STREAM* s)
 
 static BOOL input_recv_keyboard_event(rdpInput* input, STREAM* s)
 {
-       uint16 keyboardFlags, keyCode;
+       UINT16 keyboardFlags, keyCode;
 
        if (stream_get_left(s) < 6)
                return FALSE;
 
-       stream_read_uint16(s, keyboardFlags); /* keyboardFlags (2 bytes) */
-       stream_read_uint16(s, keyCode); /* keyCode (2 bytes) */
+       stream_read_UINT16(s, keyboardFlags); /* keyboardFlags (2 bytes) */
+       stream_read_UINT16(s, keyCode); /* keyCode (2 bytes) */
        stream_seek(s, 2); /* pad2Octets (2 bytes) */
 
        IFCALL(input->KeyboardEvent, input, keyboardFlags, keyCode);
@@ -235,13 +235,13 @@ static BOOL input_recv_keyboard_event(rdpInput* input, STREAM* s)
 
 static BOOL input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s)
 {
-       uint16 keyboardFlags, unicodeCode;
+       UINT16 keyboardFlags, unicodeCode;
 
        if (stream_get_left(s) < 6)
                return FALSE;
 
-       stream_read_uint16(s, keyboardFlags); /* keyboardFlags (2 bytes) */
-       stream_read_uint16(s, unicodeCode); /* unicodeCode (2 bytes) */
+       stream_read_UINT16(s, keyboardFlags); /* keyboardFlags (2 bytes) */
+       stream_read_UINT16(s, unicodeCode); /* unicodeCode (2 bytes) */
        stream_seek(s, 2); /* pad2Octets (2 bytes) */
 
        /*
@@ -264,14 +264,14 @@ static BOOL input_recv_unicode_keyboard_event(rdpInput* input, STREAM* s)
 
 static BOOL input_recv_mouse_event(rdpInput* input, STREAM* s)
 {
-       uint16 pointerFlags, xPos, yPos;
+       UINT16 pointerFlags, xPos, yPos;
 
        if (stream_get_left(s) < 6)
                return FALSE;
 
-       stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */
-       stream_read_uint16(s, xPos); /* xPos (2 bytes) */
-       stream_read_uint16(s, yPos); /* yPos (2 bytes) */
+       stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */
+       stream_read_UINT16(s, xPos); /* xPos (2 bytes) */
+       stream_read_UINT16(s, yPos); /* yPos (2 bytes) */
 
        IFCALL(input->MouseEvent, input, pointerFlags, xPos, yPos);
 
@@ -280,14 +280,14 @@ static BOOL input_recv_mouse_event(rdpInput* input, STREAM* s)
 
 static BOOL input_recv_extended_mouse_event(rdpInput* input, STREAM* s)
 {
-       uint16 pointerFlags, xPos, yPos;
+       UINT16 pointerFlags, xPos, yPos;
 
        if (stream_get_left(s) < 6)
                return FALSE;
 
-       stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */
-       stream_read_uint16(s, xPos); /* xPos (2 bytes) */
-       stream_read_uint16(s, yPos); /* yPos (2 bytes) */
+       stream_read_UINT16(s, pointerFlags); /* pointerFlags (2 bytes) */
+       stream_read_UINT16(s, xPos); /* xPos (2 bytes) */
+       stream_read_UINT16(s, yPos); /* yPos (2 bytes) */
 
        IFCALL(input->ExtendedMouseEvent, input, pointerFlags, xPos, yPos);
 
@@ -296,13 +296,13 @@ static BOOL input_recv_extended_mouse_event(rdpInput* input, STREAM* s)
 
 static BOOL input_recv_event(rdpInput* input, STREAM* s)
 {
-       uint16 messageType;
+       UINT16 messageType;
 
        if (stream_get_left(s) < 4)
                return FALSE;
 
        stream_seek(s, 4); /* eventTime (4 bytes), ignored by the server */
-       stream_read_uint16(s, messageType); /* messageType (2 bytes) */
+       stream_read_UINT16(s, messageType); /* messageType (2 bytes) */
 
        switch (messageType)
        {
@@ -343,12 +343,12 @@ static BOOL input_recv_event(rdpInput* input, STREAM* s)
 
 BOOL input_recv(rdpInput* input, STREAM* s)
 {
-       uint16 i, numberEvents;
+       UINT16 i, numberEvents;
 
        if (stream_get_left(s) < 4)
                return FALSE;
 
-       stream_read_uint16(s, numberEvents); /* numberEvents (2 bytes) */
+       stream_read_UINT16(s, numberEvents); /* numberEvents (2 bytes) */
        stream_seek(s, 2); /* pad2Octets (2 bytes) */
 
        /* Each input event uses 6 exactly bytes. */
@@ -391,7 +391,7 @@ void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags)
        IFCALL(input->SynchronizeEvent, input, flags);
 }
 
-void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void freerdp_input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        IFCALL(input->KeyboardEvent, input, flags, code);
 }
@@ -404,17 +404,17 @@ void freerdp_input_send_keyboard_event_ex(rdpInput* input, BOOL down, uint32 rdp
                        RDP_SCANCODE_CODE(rdp_scancode));
 }
 
-void freerdp_input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void freerdp_input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        IFCALL(input->UnicodeKeyboardEvent, input, flags, code);
 }
 
-void freerdp_input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void freerdp_input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        IFCALL(input->MouseEvent, input, flags, x, y);
 }
 
-void freerdp_input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void freerdp_input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        IFCALL(input->ExtendedMouseEvent, input, flags, x, y);
 }
index 7919695..804eb3f 100644 (file)
 #define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH     4
 
 void input_send_synchronize_event(rdpInput* input, uint32 flags);
-void input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
-void input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
+void input_send_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void input_send_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void input_send_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
+void input_send_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
 
 void input_send_fastpath_synchronize_event(rdpInput* input, uint32 flags);
-void input_send_fastpath_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void input_send_fastpath_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void input_send_fastpath_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
-void input_send_fastpath_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
+void input_send_fastpath_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void input_send_fastpath_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void input_send_fastpath_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
+void input_send_fastpath_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
 
 BOOL input_recv(rdpInput* input, STREAM* s);
 
index 8e3781d..3b0d3fb 100644 (file)
@@ -81,12 +81,12 @@ static const char* const  state_transitions[] =
  * @param wMsgSize message size
  */
 
-void license_read_preamble(STREAM* s, uint8* bMsgType, uint8* flags, uint16* wMsgSize)
+void license_read_preamble(STREAM* s, BYTE* bMsgType, BYTE* flags, UINT16* wMsgSize)
 {
        /* preamble (4 bytes) */
-       stream_read_uint8(s, *bMsgType); /* bMsgType (1 byte) */
-       stream_read_uint8(s, *flags); /* flags (1 byte) */
-       stream_read_uint16(s, *wMsgSize); /* wMsgSize (2 bytes) */
+       stream_read_BYTE(s, *bMsgType); /* bMsgType (1 byte) */
+       stream_read_BYTE(s, *flags); /* flags (1 byte) */
+       stream_read_UINT16(s, *wMsgSize); /* wMsgSize (2 bytes) */
 }
 
 /**
@@ -98,12 +98,12 @@ void license_read_preamble(STREAM* s, uint8* bMsgType, uint8* flags, uint16* wMs
  * @param wMsgSize message size
  */
 
-void license_write_preamble(STREAM* s, uint8 bMsgType, uint8 flags, uint16 wMsgSize)
+void license_write_preamble(STREAM* s, BYTE bMsgType, BYTE flags, UINT16 wMsgSize)
 {
        /* preamble (4 bytes) */
-       stream_write_uint8(s, bMsgType); /* bMsgType (1 byte) */
-       stream_write_uint8(s, flags); /* flags (1 byte) */
-       stream_write_uint16(s, wMsgSize); /* wMsgSize (2 bytes) */
+       stream_write_BYTE(s, bMsgType); /* bMsgType (1 byte) */
+       stream_write_BYTE(s, flags); /* flags (1 byte) */
+       stream_write_UINT16(s, wMsgSize); /* wMsgSize (2 bytes) */
 }
 
 /**
@@ -127,12 +127,12 @@ STREAM* license_send_stream_init(rdpLicense* license)
  * @param s stream
  */
 
-BOOL license_send(rdpLicense* license, STREAM* s, uint8 type)
+BOOL license_send(rdpLicense* license, STREAM* s, BYTE type)
 {
        int length;
-       uint8 flags;
-       uint16 wMsgSize;
-       uint16 sec_flags;
+       BYTE flags;
+       UINT16 wMsgSize;
+       UINT16 sec_flags;
 
        DEBUG_LICENSE("Sending %s Packet", LICENSE_MESSAGE_STRINGS[type & 0x1F]);
 
@@ -172,12 +172,12 @@ BOOL license_send(rdpLicense* license, STREAM* s, uint8 type)
 
 BOOL license_recv(rdpLicense* license, STREAM* s)
 {
-       uint16 length;
-       uint16 channelId;
-       uint16 sec_flags;
-       uint8 flags;
-       uint8 bMsgType;
-       uint16 wMsgSize;
+       UINT16 length;
+       UINT16 channelId;
+       UINT16 sec_flags;
+       BYTE flags;
+       BYTE bMsgType;
+       UINT16 wMsgSize;
 
        if (!rdp_read_header(license->rdp, s, &length, &channelId))
        {
@@ -295,7 +295,7 @@ void license_generate_keys(rdpLicense* license)
 void license_generate_hwid(rdpLicense* license)
 {
        CryptoMd5 md5;
-       uint8* mac_address;
+       BYTE* mac_address;
 
        memset(license->hwid, 0, HWID_LENGTH);
        mac_address = license->rdp->transport->tcp->mac_address;
@@ -307,11 +307,11 @@ void license_generate_hwid(rdpLicense* license)
 
 void license_encrypt_premaster_secret(rdpLicense* license)
 {
-       uint8* encrypted_premaster_secret;
+       BYTE* encrypted_premaster_secret;
 #if 0
        int key_length;
-       uint8* modulus;
-       uint8* exponent;
+       BYTE* modulus;
+       BYTE* exponent;
        rdpCertificate *certificate;
 
        if (license->server_certificate->length)
@@ -331,7 +331,7 @@ void license_encrypt_premaster_secret(rdpLicense* license)
        freerdp_hexdump(exponent, 4);
 #endif
 
-       encrypted_premaster_secret = (uint8*) malloc(MODULUS_MAX_SIZE);
+       encrypted_premaster_secret = (BYTE*) malloc(MODULUS_MAX_SIZE);
        memset(encrypted_premaster_secret, 0, MODULUS_MAX_SIZE);
 
        crypto_rsa_public_encrypt(license->premaster_secret, PREMASTER_SECRET_LENGTH,
@@ -341,7 +341,7 @@ void license_encrypt_premaster_secret(rdpLicense* license)
        license->encrypted_premaster_secret->length = PREMASTER_SECRET_LENGTH;
        license->encrypted_premaster_secret->data = encrypted_premaster_secret;
 #else
-       encrypted_premaster_secret = (uint8*) malloc(MODULUS_MAX_SIZE);
+       encrypted_premaster_secret = (BYTE*) malloc(MODULUS_MAX_SIZE);
        memset(encrypted_premaster_secret, 0, MODULUS_MAX_SIZE);
 
        license->encrypted_premaster_secret->type = BB_RANDOM_BLOB;
@@ -355,7 +355,7 @@ void license_decrypt_platform_challenge(rdpLicense* license)
        CryptoRc4 rc4;
 
        license->platform_challenge->data =
-                       (uint8*) malloc(license->encrypted_platform_challenge->length);
+                       (BYTE*) malloc(license->encrypted_platform_challenge->length);
        license->platform_challenge->length =
                        license->encrypted_platform_challenge->length;
 
@@ -390,12 +390,12 @@ void license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo)
 
        stream_read_uint32(s, productInfo->cbCompanyName); /* cbCompanyName (4 bytes) */
 
-       productInfo->pbCompanyName = (uint8*) malloc(productInfo->cbCompanyName);
+       productInfo->pbCompanyName = (BYTE*) malloc(productInfo->cbCompanyName);
        stream_read(s, productInfo->pbCompanyName, productInfo->cbCompanyName);
 
        stream_read_uint32(s, productInfo->cbProductId); /* cbProductId (4 bytes) */
 
-       productInfo->pbProductId = (uint8*) malloc(productInfo->cbProductId);
+       productInfo->pbProductId = (BYTE*) malloc(productInfo->cbProductId);
        stream_read(s, productInfo->pbProductId, productInfo->cbProductId);
 }
 
@@ -446,10 +446,10 @@ void license_free_product_info(PRODUCT_INFO* productInfo)
 
 void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob)
 {
-       uint16 wBlobType;
+       UINT16 wBlobType;
 
-       stream_read_uint16(s, wBlobType); /* wBlobType (2 bytes) */
-       stream_read_uint16(s, blob->length); /* wBlobLen (2 bytes) */
+       stream_read_UINT16(s, wBlobType); /* wBlobType (2 bytes) */
+       stream_read_UINT16(s, blob->length); /* wBlobLen (2 bytes) */
 
        /*
         * Server can choose to not send data by setting len to 0.
@@ -464,7 +464,7 @@ void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob)
        }
 
        blob->type = wBlobType;
-       blob->data = (uint8*) malloc(blob->length);
+       blob->data = (BYTE*) malloc(blob->length);
 
        stream_read(s, blob->data, blob->length); /* blobData */
 }
@@ -478,8 +478,8 @@ void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob)
 
 void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob)
 {
-       stream_write_uint16(s, blob->type); /* wBlobType (2 bytes) */
-       stream_write_uint16(s, blob->length); /* wBlobLen (2 bytes) */
+       stream_write_UINT16(s, blob->type); /* wBlobType (2 bytes) */
+       stream_write_UINT16(s, blob->length); /* wBlobLen (2 bytes) */
 
        if (blob->length > 0)
                stream_write(s, blob->data, blob->length); /* blobData */
@@ -487,11 +487,11 @@ void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob)
 
 void license_write_padded_binary_blob(STREAM* s, LICENSE_BLOB* blob)
 {
-       uint16 pad_len;
+       UINT16 pad_len;
 
        pad_len = 72 % blob->length;
-       stream_write_uint16(s, blob->type); /* wBlobType (2 bytes) */
-       stream_write_uint16(s, blob->length + pad_len); /* wBlobLen (2 bytes) */
+       stream_write_UINT16(s, blob->type); /* wBlobType (2 bytes) */
+       stream_write_UINT16(s, blob->length + pad_len); /* wBlobLen (2 bytes) */
 
        if (blob->length > 0)
                stream_write(s, blob->data, blob->length); /* blobData */
@@ -505,7 +505,7 @@ void license_write_padded_binary_blob(STREAM* s, LICENSE_BLOB* blob)
  * @return new license binary blob
  */
 
-LICENSE_BLOB* license_new_binary_blob(uint16 type)
+LICENSE_BLOB* license_new_binary_blob(UINT16 type)
 {
        LICENSE_BLOB* blob;
 
@@ -740,9 +740,9 @@ void license_read_error_alert_packet(rdpLicense* license, STREAM* s)
 
 void license_write_platform_id(rdpLicense* license, STREAM* s)
 {
-       stream_write_uint8(s, 0); /* Client Operating System Version */
-       stream_write_uint8(s, 0); /* Independent Software Vendor (ISV) */
-       stream_write_uint16(s, 0); /* Client Software Build */
+       stream_write_BYTE(s, 0); /* Client Operating System Version */
+       stream_write_BYTE(s, 0); /* Independent Software Vendor (ISV) */
+       stream_write_UINT16(s, 0); /* Client Software Build */
 }
 
 /**
@@ -780,10 +780,10 @@ void license_send_new_license_request_packet(rdpLicense* license)
        else
                username = "username";
 
-       license->client_user_name->data = (uint8*) username;
+       license->client_user_name->data = (BYTE*) username;
        license->client_user_name->length = strlen(username) + 1;
 
-       license->client_machine_name->data = (uint8*) license->rdp->settings->client_hostname;
+       license->client_machine_name->data = (BYTE*) license->rdp->settings->client_hostname;
        license->client_machine_name->length = strlen(license->rdp->settings->client_hostname) + 1;
 
        license_write_new_license_request_packet(license, s);
@@ -805,7 +805,7 @@ void license_send_new_license_request_packet(rdpLicense* license)
  * @param mac_data signature
  */
 
-void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, uint8* mac_data)
+void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, BYTE* mac_data)
 {
        /* EncryptedPlatformChallengeResponse */
        license_write_binary_blob(s, license->encrypted_platform_challenge);
@@ -827,22 +827,22 @@ void license_send_platform_challenge_response_packet(rdpLicense* license)
 {
        STREAM* s;
        int length;
-       uint8* buffer;
+       BYTE* buffer;
        CryptoRc4 rc4;
-       uint8 mac_data[16];
+       BYTE mac_data[16];
 
        s = license_send_stream_init(license);
        DEBUG_LICENSE("Sending Platform Challenge Response Packet");
 
        license->encrypted_platform_challenge->type = BB_DATA_BLOB;
        length = license->platform_challenge->length + HWID_LENGTH;
-       buffer = (uint8*) malloc(length);
+       buffer = (BYTE*) malloc(length);
        memcpy(buffer, license->platform_challenge->data, license->platform_challenge->length);
        memcpy(&buffer[license->platform_challenge->length], license->hwid, HWID_LENGTH);
        security_mac_data(license->mac_salt_key, buffer, length, mac_data);
        free(buffer);
 
-       buffer = (uint8*) malloc(HWID_LENGTH);
+       buffer = (BYTE*) malloc(HWID_LENGTH);
        rc4 = crypto_rc4_init(license->licensing_encryption_key, LICENSING_ENCRYPTION_KEY_LENGTH);
        crypto_rc4(rc4, HWID_LENGTH, license->hwid, buffer);
        crypto_rc4_free(rc4);
index f90412f..4eb1bf8 100644 (file)
@@ -102,16 +102,16 @@ typedef struct
 {
        uint32 dwVersion;
        uint32 cbCompanyName;
-       uint8* pbCompanyName;
+       BYTE* pbCompanyName;
        uint32 cbProductId;
-       uint8* pbProductId;
+       BYTE* pbProductId;
 } PRODUCT_INFO;
 
 typedef struct
 {
-       uint16 type;
-       uint16 length;
-       uint8* data;
+       UINT16 type;
+       UINT16 length;
+       BYTE* data;
 } LICENSE_BLOB;
 
 typedef struct
@@ -133,16 +133,16 @@ struct rdp_license
        LICENSE_STATE state;
        struct rdp_rdp* rdp;
        struct rdp_certificate* certificate;
-       uint8 hwid[HWID_LENGTH];
-       uint8 modulus[MODULUS_MAX_SIZE];
-       uint8 exponent[EXPONENT_MAX_SIZE];
-       uint8 client_random[CLIENT_RANDOM_LENGTH];
-       uint8 server_random[SERVER_RANDOM_LENGTH];
-       uint8 master_secret[MASTER_SECRET_LENGTH];
-       uint8 premaster_secret[PREMASTER_SECRET_LENGTH];
-       uint8 session_key_blob[SESSION_KEY_BLOB_LENGTH];
-       uint8 mac_salt_key[MAC_SALT_KEY_LENGTH];
-       uint8 licensing_encryption_key[LICENSING_ENCRYPTION_KEY_LENGTH];
+       BYTE hwid[HWID_LENGTH];
+       BYTE modulus[MODULUS_MAX_SIZE];
+       BYTE exponent[EXPONENT_MAX_SIZE];
+       BYTE client_random[CLIENT_RANDOM_LENGTH];
+       BYTE server_random[SERVER_RANDOM_LENGTH];
+       BYTE master_secret[MASTER_SECRET_LENGTH];
+       BYTE premaster_secret[PREMASTER_SECRET_LENGTH];
+       BYTE session_key_blob[SESSION_KEY_BLOB_LENGTH];
+       BYTE mac_salt_key[MAC_SALT_KEY_LENGTH];
+       BYTE licensing_encryption_key[LICENSING_ENCRYPTION_KEY_LENGTH];
        PRODUCT_INFO* product_info;
        LICENSE_BLOB* error_info;
        LICENSE_BLOB* key_exchange_list;
@@ -157,7 +157,7 @@ struct rdp_license
 };
 
 BOOL license_recv(rdpLicense* license, STREAM* s);
-BOOL license_send(rdpLicense* license, STREAM* s, uint8 type);
+BOOL license_send(rdpLicense* license, STREAM* s, BYTE type);
 STREAM* license_send_stream_init(rdpLicense* license);
 
 void license_generate_randoms(rdpLicense* license);
@@ -170,7 +170,7 @@ PRODUCT_INFO* license_new_product_info();
 void license_free_product_info(PRODUCT_INFO* productInfo);
 void license_read_product_info(STREAM* s, PRODUCT_INFO* productInfo);
 
-LICENSE_BLOB* license_new_binary_blob(uint16 type);
+LICENSE_BLOB* license_new_binary_blob(UINT16 type);
 void license_free_binary_blob(LICENSE_BLOB* blob);
 void license_read_binary_blob(STREAM* s, LICENSE_BLOB* blob);
 void license_write_binary_blob(STREAM* s, LICENSE_BLOB* blob);
@@ -188,7 +188,7 @@ void license_read_error_alert_packet(rdpLicense* license, STREAM* s);
 void license_write_new_license_request_packet(rdpLicense* license, STREAM* s);
 void license_send_new_license_request_packet(rdpLicense* license);
 
-void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, uint8* mac_data);
+void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, BYTE* mac_data);
 void license_send_platform_challenge_response_packet(rdpLicense* license);
 
 BOOL license_send_valid_client_error_packet(rdpLicense* license);
index ba268a6..a124a36 100644 (file)
@@ -73,7 +73,7 @@ static const char *inet_ntop(int af, const void* src, char* dst, socklen_t cnt)
 #endif
 #endif
 
-static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_address, uint16 port)
+static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_address, UINT16 port)
 {
        rdpListener* listener = (rdpListener*) instance->listener;
        int status;
index ee95a03..bdeb6f4 100644 (file)
  *
  */
 
-static const uint8 callingDomainSelector[1] = "\x01";
-static const uint8 calledDomainSelector[1] = "\x01";
+static const BYTE callingDomainSelector[1] = "\x01";
+static const BYTE calledDomainSelector[1] = "\x01";
 
 /*
 static const char* const mcs_result_enumerated[] =
@@ -189,9 +189,9 @@ static const char* const mcs_result_enumerated[] =
  * @return
  */
 
-BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length)
+BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length)
 {
-       uint8 choice;
+       BYTE choice;
        enum DomainMCSPDU MCSPDU;
 
        *length = tpkt_read_header(s);
@@ -216,7 +216,7 @@ BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, u
  * @param length TPKT length
  */
 
-void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, uint16 length, uint8 options)
+void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options)
 {
        tpkt_write_header(s, length);
        tpdu_write_data(s);
@@ -446,7 +446,7 @@ BOOL mcs_send_connect_initial(rdpMcs* mcs)
 {
        STREAM* s;
        int length;
-       uint8 *bm, *em;
+       BYTE *bm, *em;
        STREAM* gcc_CCrq;
        STREAM* client_data;
        int status;
@@ -488,7 +488,7 @@ BOOL mcs_send_connect_initial(rdpMcs* mcs)
 BOOL mcs_recv_connect_response(rdpMcs* mcs, STREAM* s)
 {
        int length;
-       uint8 result;
+       BYTE result;
        uint32 calledConnectId;
 
        tpkt_read_header(s);
@@ -524,7 +524,7 @@ BOOL mcs_send_connect_response(rdpMcs* mcs)
 {
        STREAM* s;
        int length;
-       uint8 *bm, *em;
+       BYTE *bm, *em;
        STREAM* gcc_CCrsp;
        STREAM* server_data;
 
@@ -565,7 +565,7 @@ BOOL mcs_send_connect_response(rdpMcs* mcs)
 
 BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s)
 {
-       uint16 length;
+       UINT16 length;
        enum DomainMCSPDU MCSPDU;
 
        MCSPDU = DomainMCSPDU_ErectDomainRequest;
@@ -584,7 +584,7 @@ BOOL mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s)
 BOOL mcs_send_erect_domain_request(rdpMcs* mcs)
 {
        STREAM* s;
-       uint16 length = 12;
+       UINT16 length = 12;
        s = transport_send_stream_init(mcs->transport, length);
 
        mcs_write_domain_mcspdu_header(s, DomainMCSPDU_ErectDomainRequest, length, 0);
@@ -607,7 +607,7 @@ BOOL mcs_send_erect_domain_request(rdpMcs* mcs)
 
 BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s)
 {
-       uint16 length;
+       UINT16 length;
        enum DomainMCSPDU MCSPDU;
 
        MCSPDU = DomainMCSPDU_AttachUserRequest;
@@ -626,7 +626,7 @@ BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s)
 BOOL mcs_send_attach_user_request(rdpMcs* mcs)
 {
        STREAM* s;
-       uint16 length = 8;
+       UINT16 length = 8;
        s = transport_send_stream_init(mcs->transport, length);
 
        mcs_write_domain_mcspdu_header(s, DomainMCSPDU_AttachUserRequest, length, 0);
@@ -645,8 +645,8 @@ BOOL mcs_send_attach_user_request(rdpMcs* mcs)
 
 BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s)
 {
-       uint16 length;
-       uint8 result;
+       UINT16 length;
+       BYTE result;
        enum DomainMCSPDU MCSPDU;
 
        MCSPDU = DomainMCSPDU_AttachUserConfirm;
@@ -668,7 +668,7 @@ BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s)
 BOOL mcs_send_attach_user_confirm(rdpMcs* mcs)
 {
        STREAM* s;
-       uint16 length = 11;
+       UINT16 length = 11;
        
        s = transport_send_stream_init(mcs->transport, length);
 
@@ -690,11 +690,11 @@ BOOL mcs_send_attach_user_confirm(rdpMcs* mcs)
  * @param s stream
  */
 
-BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id)
+BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, UINT16* channel_id)
 {
-       uint16 length;
+       UINT16 length;
        enum DomainMCSPDU MCSPDU;
-       uint16 user_id;
+       UINT16 user_id;
 
        MCSPDU = DomainMCSPDU_ChannelJoinRequest;
        if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length))
@@ -717,10 +717,10 @@ BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id)
  * @param channel_id channel id
  */
 
-BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id)
+BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channel_id)
 {
        STREAM* s;
-       uint16 length = 12;
+       UINT16 length = 12;
        s = transport_send_stream_init(mcs->transport, 12);
 
        mcs_write_domain_mcspdu_header(s, DomainMCSPDU_ChannelJoinRequest, length, 0);
@@ -740,12 +740,12 @@ BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id)
  * @param mcs mcs module
  */
 
-BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id)
+BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, UINT16* channel_id)
 {
-       uint16 length;
-       uint8 result;
-       uint16 initiator;
-       uint16 requested;
+       UINT16 length;
+       BYTE result;
+       UINT16 initiator;
+       UINT16 requested;
        enum DomainMCSPDU MCSPDU;
 
        MCSPDU = DomainMCSPDU_ChannelJoinConfirm;
@@ -766,10 +766,10 @@ BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id)
  * @param mcs mcs module
  */
 
-BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id)
+BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channel_id)
 {
        STREAM* s;
-       uint16 length = 15;
+       UINT16 length = 15;
        s = transport_send_stream_init(mcs->transport, 15);
 
        mcs_write_domain_mcspdu_header(s, DomainMCSPDU_ChannelJoinConfirm, length, 2);
@@ -792,7 +792,7 @@ BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id)
 BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs)
 {
        STREAM* s;
-       uint16 length = 9;
+       UINT16 length = 9;
        s = transport_send_stream_init(mcs->transport, 9);
 
        mcs_write_domain_mcspdu_header(s, DomainMCSPDU_DisconnectProviderUltimatum, length, 1);
index 8206063..7276eda 100644 (file)
@@ -112,7 +112,7 @@ typedef struct
 
 struct rdp_mcs
 {
-       uint16 user_id;
+       UINT16 user_id;
        struct rdp_transport* transport;
        DomainParameters domainParameters;
        DomainParameters targetParameters;
@@ -142,13 +142,13 @@ BOOL mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s);
 BOOL mcs_send_attach_user_request(rdpMcs* mcs);
 BOOL mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s);
 BOOL mcs_send_attach_user_confirm(rdpMcs* mcs);
-BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id);
-BOOL mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id);
-BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id);
-BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id);
+BOOL mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, UINT16* channel_id);
+BOOL mcs_send_channel_join_request(rdpMcs* mcs, UINT16 channel_id);
+BOOL mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, UINT16* channel_id);
+BOOL mcs_send_channel_join_confirm(rdpMcs* mcs, UINT16 channel_id);
 BOOL mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs);
-BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, uint16* length);
-void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, uint16 length, uint8 options);
+BOOL mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU, UINT16* length);
+void mcs_write_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU domainMCSPDU, UINT16 length, BYTE options);
 
 rdpMcs* mcs_new(rdpTransport* transport);
 void mcs_free(rdpMcs* mcs);
index 61faf11..86cb444 100644 (file)
@@ -235,7 +235,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego)
 {
        STREAM* s;
        uint32 cbSize;
-       uint16 cchPCB = 0;
+       UINT16 cchPCB = 0;
        WCHAR* wszPCB = NULL;
 
        if (!nego->send_preconnection_pdu)
@@ -251,7 +251,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego)
 
        if (nego->preconnection_blob)
        {
-               cchPCB = (uint16) freerdp_AsciiToUnicodeAlloc(nego->preconnection_blob, &wszPCB, 0);
+               cchPCB = (UINT16) freerdp_AsciiToUnicodeAlloc(nego->preconnection_blob, &wszPCB, 0);
                cchPCB += 1; /* zero-termination */
                cbSize += cchPCB * 2;
        }
@@ -261,7 +261,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego)
        stream_write_uint32(s, 0); /* Flags */
        stream_write_uint32(s, PRECONNECTION_PDU_V2); /* Version */
        stream_write_uint32(s, nego->preconnection_id); /* Id */
-       stream_write_uint16(s, cchPCB); /* cchPCB */
+       stream_write_UINT16(s, cchPCB); /* cchPCB */
 
        if (wszPCB)
        {
@@ -413,8 +413,8 @@ BOOL nego_recv_response(rdpNego* nego)
 
 BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra)
 {
-       uint8 li;
-       uint8 type;
+       BYTE li;
+       BYTE type;
        rdpNego* nego = (rdpNego*) extra;
 
        if (tpkt_read_header(s) == 0)
@@ -426,7 +426,7 @@ BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra)
        {
                /* rdpNegData (optional) */
 
-               stream_read_uint8(s, type); /* Type */
+               stream_read_BYTE(s, type); /* Type */
 
                switch (type)
                {
@@ -482,9 +482,9 @@ BOOL nego_recv(rdpTransport* transport, STREAM* s, void* extra)
 
 BOOL nego_read_request(rdpNego* nego, STREAM* s)
 {
-       uint8 li;
-       uint8 c;
-       uint8 type;
+       BYTE li;
+       BYTE c;
+       BYTE type;
 
        tpkt_read_header(s);
        li = tpdu_read_connection_request(s);
@@ -500,17 +500,17 @@ BOOL nego_read_request(rdpNego* nego, STREAM* s)
                /* Optional routingToken or cookie, ending with CR+LF */
                while (stream_get_left(s) > 0)
                {
-                       stream_read_uint8(s, c);
+                       stream_read_BYTE(s, c);
 
                        if (c != '\x0D')
                                continue;
 
-                       stream_peek_uint8(s, c);
+                       stream_peek_BYTE(s, c);
 
                        if (c != '\x0A')
                                continue;
 
-                       stream_seek_uint8(s);
+                       stream_seek_BYTE(s);
                        break;
                }
        }
@@ -519,7 +519,7 @@ BOOL nego_read_request(rdpNego* nego, STREAM* s)
        {
                /* rdpNegData (optional) */
 
-               stream_read_uint8(s, type); /* Type */
+               stream_read_BYTE(s, type); /* Type */
 
                if (type != TYPE_RDP_NEG_REQ)
                {
@@ -561,7 +561,7 @@ BOOL nego_send_negotiation_request(rdpNego* nego)
 {
        STREAM* s;
        int length;
-       uint8 *bm, *em;
+       BYTE *bm, *em;
 
        s = transport_send_stream_init(nego->transport, 256);
        length = TPDU_CONNECTION_REQUEST_LENGTH;
@@ -577,9 +577,9 @@ BOOL nego_send_negotiation_request(rdpNego* nego)
        {
                int cookie_length = strlen(nego->cookie);
                stream_write(s, "Cookie: mstshash=", 17);
-               stream_write(s, (uint8*) nego->cookie, cookie_length);
-               stream_write_uint8(s, 0x0D); /* CR */
-               stream_write_uint8(s, 0x0A); /* LF */
+               stream_write(s, (BYTE*) nego->cookie, cookie_length);
+               stream_write_BYTE(s, 0x0D); /* CR */
+               stream_write_BYTE(s, 0x0A); /* LF */
                length += cookie_length + 19;
        }
 
@@ -588,9 +588,9 @@ BOOL nego_send_negotiation_request(rdpNego* nego)
        if (nego->requested_protocols > PROTOCOL_RDP)
        {
                /* RDP_NEG_DATA must be present for TLS and NLA */
-               stream_write_uint8(s, TYPE_RDP_NEG_REQ);
-               stream_write_uint8(s, 0); /* flags, must be set to zero */
-               stream_write_uint16(s, 8); /* RDP_NEG_DATA length (8) */
+               stream_write_BYTE(s, TYPE_RDP_NEG_REQ);
+               stream_write_BYTE(s, 0); /* flags, must be set to zero */
+               stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */
                stream_write_uint32(s, nego->requested_protocols); /* requestedProtocols */
                length += 8;
        }
@@ -615,13 +615,13 @@ BOOL nego_send_negotiation_request(rdpNego* nego)
 
 void nego_process_negotiation_request(rdpNego* nego, STREAM* s)
 {
-       uint8 flags;
-       uint16 length;
+       BYTE flags;
+       UINT16 length;
 
        DEBUG_NEGO("RDP_NEG_REQ");
 
-       stream_read_uint8(s, flags);
-       stream_read_uint16(s, length);
+       stream_read_BYTE(s, flags);
+       stream_read_UINT16(s, length);
        stream_read_uint32(s, nego->requested_protocols);
 
        DEBUG_NEGO("requested_protocols: %d", nego->requested_protocols);
@@ -637,12 +637,12 @@ void nego_process_negotiation_request(rdpNego* nego, STREAM* s)
 
 void nego_process_negotiation_response(rdpNego* nego, STREAM* s)
 {
-       uint16 length;
+       UINT16 length;
 
        DEBUG_NEGO("RDP_NEG_RSP");
 
-       stream_read_uint8(s, nego->flags);
-       stream_read_uint16(s, length);
+       stream_read_BYTE(s, nego->flags);
+       stream_read_UINT16(s, length);
        stream_read_uint32(s, nego->selected_protocol);
 
        nego->state = NEGO_STATE_FINAL;
@@ -656,14 +656,14 @@ void nego_process_negotiation_response(rdpNego* nego, STREAM* s)
 
 void nego_process_negotiation_failure(rdpNego* nego, STREAM* s)
 {
-       uint8 flags;
-       uint16 length;
+       BYTE flags;
+       UINT16 length;
        uint32 failureCode;
 
        DEBUG_NEGO("RDP_NEG_FAILURE");
 
-       stream_read_uint8(s, flags);
-       stream_read_uint16(s, length);
+       stream_read_BYTE(s, flags);
+       stream_read_UINT16(s, length);
        stream_read_uint32(s, failureCode);
 
        switch (failureCode)
@@ -699,8 +699,8 @@ void nego_process_negotiation_failure(rdpNego* nego, STREAM* s)
 BOOL nego_send_negotiation_response(rdpNego* nego)
 {
        STREAM* s;
-       uint8* bm;
-       uint8* em;
+       BYTE* bm;
+       BYTE* em;
        int length;
        BOOL status;
        rdpSettings* settings;
@@ -716,17 +716,17 @@ BOOL nego_send_negotiation_response(rdpNego* nego)
        if (nego->selected_protocol > PROTOCOL_RDP)
        {
                /* RDP_NEG_DATA must be present for TLS and NLA */
-               stream_write_uint8(s, TYPE_RDP_NEG_RSP);
-               stream_write_uint8(s, EXTENDED_CLIENT_DATA_SUPPORTED); /* flags */
-               stream_write_uint16(s, 8); /* RDP_NEG_DATA length (8) */
+               stream_write_BYTE(s, TYPE_RDP_NEG_RSP);
+               stream_write_BYTE(s, EXTENDED_CLIENT_DATA_SUPPORTED); /* flags */
+               stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */
                stream_write_uint32(s, nego->selected_protocol); /* selectedProtocol */
                length += 8;
        }
        else if (!settings->rdp_security)
        {
-               stream_write_uint8(s, TYPE_RDP_NEG_FAILURE);
-               stream_write_uint8(s, 0); /* flags */
-               stream_write_uint16(s, 8); /* RDP_NEG_DATA length (8) */
+               stream_write_BYTE(s, TYPE_RDP_NEG_FAILURE);
+               stream_write_BYTE(s, 0); /* flags */
+               stream_write_UINT16(s, 8); /* RDP_NEG_DATA length (8) */
                /*
                 * TODO: Check for other possibilities,
                 *       like SSL_NOT_ALLOWED_BY_SERVER.
index ce8bcd1..1416af0 100644 (file)
@@ -92,7 +92,7 @@ struct rdp_nego
        uint32 selected_protocol;
        uint32 requested_protocols;
        BOOL security_layer_negotiation_enabled;
-       uint8 enabled_protocols[3];
+       BYTE enabled_protocols[3];
 
        rdpTransport* transport;
 };
index 5ef0d24..f28ca1e 100644 (file)
@@ -96,7 +96,7 @@ static const char* const ALTSEC_DRAWING_ORDER_STRINGS[] =
 
 #endif /* WITH_DEBUG_ORDERS */
 
-static const uint8 PRIMARY_DRAWING_ORDER_FIELD_BYTES[] =
+static const BYTE PRIMARY_DRAWING_ORDER_FIELD_BYTES[] =
 {
        DSTBLT_ORDER_FIELD_BYTES,
        PATBLT_ORDER_FIELD_BYTES,
@@ -127,86 +127,86 @@ static const uint8 PRIMARY_DRAWING_ORDER_FIELD_BYTES[] =
 
 #define PRIMARY_DRAWING_ORDER_COUNT    (ARRAY_SIZE(PRIMARY_DRAWING_ORDER_FIELD_BYTES))
 
-static const uint8 CBR2_BPP[] =
+static const BYTE CBR2_BPP[] =
 {
                0, 0, 0, 8, 16, 24, 32
 };
 
-static const uint8 CBR23_BPP[] =
+static const BYTE CBR23_BPP[] =
 {
                0, 0, 0, 8, 16, 24, 32
 };
 
-static const uint8 BMF_BPP[] =
+static const BYTE BMF_BPP[] =
 {
                0, 1, 0, 8, 16, 24, 32
 };
 
 static INLINE void update_read_coord(STREAM* s, sint32* coord, BOOL delta)
 {
-       sint8 lsi8;
-       sint16 lsi16;
+       INT8 lsi8;
+       INT16 lsi16;
 
        if (delta)
        {
-               stream_read_uint8(s, lsi8);
+               stream_read_BYTE(s, lsi8);
                *coord += lsi8;
        }
        else
        {
-               stream_read_uint16(s, lsi16);
+               stream_read_UINT16(s, lsi16);
                *coord = lsi16;
        }
 }
 
 static INLINE void update_read_color(STREAM* s, uint32* color)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color = byte;
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color |= (byte << 8);
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color |= (byte << 16);
 }
 
 static INLINE void update_read_colorref(STREAM* s, uint32* color)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color = byte;
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color |= (byte << 8);
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color |= (byte << 16);
-       stream_seek_uint8(s);
+       stream_seek_BYTE(s);
 }
 
 static INLINE void update_read_color_quad(STREAM* s, uint32* color)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color = (byte << 16);
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color |= (byte << 8);
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
        *color |= byte;
-       stream_seek_uint8(s);
+       stream_seek_BYTE(s);
 }
 
 static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte & 0x80)
        {
                *value = (byte & 0x7F) << 8;
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                *value |= byte;
        }
        else
@@ -217,10 +217,10 @@ static INLINE void update_read_2byte_unsigned(STREAM* s, uint32* value)
 
 static INLINE void update_read_2byte_signed(STREAM* s, sint32* value)
 {
-       uint8 byte;
+       BYTE byte;
        BOOL negative;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        negative = (byte & 0x40) ? TRUE : FALSE;
 
@@ -228,7 +228,7 @@ static INLINE void update_read_2byte_signed(STREAM* s, sint32* value)
 
        if (byte & 0x80)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                *value = (*value << 8) | byte;
        }
 
@@ -238,10 +238,10 @@ static INLINE void update_read_2byte_signed(STREAM* s, sint32* value)
 
 static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value)
 {
-       uint8 byte;
-       uint8 count;
+       BYTE byte;
+       BYTE count;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        count = (byte & 0xC0) >> 6;
 
@@ -253,25 +253,25 @@ static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value)
 
                case 1:
                        *value = (byte & 0x3F) << 8;
-                       stream_read_uint8(s, byte);
+                       stream_read_BYTE(s, byte);
                        *value |= byte;
                        break;
 
                case 2:
                        *value = (byte & 0x3F) << 16;
-                       stream_read_uint8(s, byte);
+                       stream_read_BYTE(s, byte);
                        *value |= (byte << 8);
-                       stream_read_uint8(s, byte);
+                       stream_read_BYTE(s, byte);
                        *value |= byte;
                        break;
 
                case 3:
                        *value = (byte & 0x3F) << 24;
-                       stream_read_uint8(s, byte);
+                       stream_read_BYTE(s, byte);
                        *value |= (byte << 16);
-                       stream_read_uint8(s, byte);
+                       stream_read_BYTE(s, byte);
                        *value |= (byte << 8);
-                       stream_read_uint8(s, byte);
+                       stream_read_BYTE(s, byte);
                        *value |= byte;
                        break;
 
@@ -282,9 +282,9 @@ static INLINE void update_read_4byte_unsigned(STREAM* s, uint32* value)
 
 static INLINE void update_read_delta(STREAM* s, sint32* value)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte & 0x40)
                *value = (byte | ~0x3F);
@@ -293,46 +293,46 @@ static INLINE void update_read_delta(STREAM* s, sint32* value)
 
        if (byte & 0x80)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                *value = (*value << 8) | byte;
        }
 }
 
-static INLINE void update_read_glyph_delta(STREAM* s, uint16* value)
+static INLINE void update_read_glyph_delta(STREAM* s, UINT16* value)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte == 0x80)
-               stream_read_uint16(s, *value);
+               stream_read_UINT16(s, *value);
        else
                *value = (byte & 0x3F);
 }
 
 static INLINE void update_seek_glyph_delta(STREAM* s)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte & 0x80)
-               stream_seek_uint8(s);
+               stream_seek_BYTE(s);
 }
 
-static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlags)
+static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, BYTE fieldFlags)
 {
        if (fieldFlags & ORDER_FIELD_01)
-               stream_read_uint8(s, brush->x);
+               stream_read_BYTE(s, brush->x);
 
        if (fieldFlags & ORDER_FIELD_02)
-               stream_read_uint8(s, brush->y);
+               stream_read_BYTE(s, brush->y);
 
        if (fieldFlags & ORDER_FIELD_03)
-               stream_read_uint8(s, brush->style);
+               stream_read_BYTE(s, brush->style);
 
        if (fieldFlags & ORDER_FIELD_04)
-               stream_read_uint8(s, brush->hatch);
+               stream_read_BYTE(s, brush->hatch);
 
        if (brush->style & CACHED_BRUSH)
        {
@@ -346,14 +346,14 @@ static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlag
 
        if (fieldFlags & ORDER_FIELD_05)
        {
-               brush->data = (uint8*) brush->p8x8;
-               stream_read_uint8(s, brush->data[7]);
-               stream_read_uint8(s, brush->data[6]);
-               stream_read_uint8(s, brush->data[5]);
-               stream_read_uint8(s, brush->data[4]);
-               stream_read_uint8(s, brush->data[3]);
-               stream_read_uint8(s, brush->data[2]);
-               stream_read_uint8(s, brush->data[1]);
+               brush->data = (BYTE*) brush->p8x8;
+               stream_read_BYTE(s, brush->data[7]);
+               stream_read_BYTE(s, brush->data[6]);
+               stream_read_BYTE(s, brush->data[5]);
+               stream_read_BYTE(s, brush->data[4]);
+               stream_read_BYTE(s, brush->data[3]);
+               stream_read_BYTE(s, brush->data[2]);
+               stream_read_BYTE(s, brush->data[1]);
                brush->data[0] = brush->hatch;
        }
 }
@@ -361,8 +361,8 @@ static INLINE void update_read_brush(STREAM* s, rdpBrush* brush, uint8 fieldFlag
 static INLINE void update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, int number)
 {
        int i;
-       uint8 flags = 0;
-       uint8* zeroBits;
+       BYTE flags = 0;
+       BYTE* zeroBits;
        int zeroBitsSize;
 
        if (number > 45)
@@ -403,11 +403,11 @@ static INLINE void update_read_delta_rects(STREAM* s, DELTA_RECT* rectangles, in
        }
 }
 
-static INLINE void update_read_delta_points(STREAM* s, DELTA_POINT* points, int number, sint16 x, sint16 y)
+static INLINE void update_read_delta_points(STREAM* s, DELTA_POINT* points, int number, INT16 x, INT16 y)
 {
        int i;
-       uint8 flags = 0;
-       uint8* zeroBits;
+       BYTE flags = 0;
+       BYTE* zeroBits;
        int zeroBitsSize;
 
        zeroBitsSize = ((number + 3) / 4);
@@ -449,7 +449,7 @@ void update_read_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, DSTBLT_ORDER* ds
                update_read_coord(s, &dstblt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, dstblt->bRop);
+               stream_read_BYTE(s, dstblt->bRop);
 }
 
 void update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* patblt)
@@ -467,7 +467,7 @@ void update_read_patblt_order(STREAM* s, ORDER_INFO* orderInfo, PATBLT_ORDER* pa
                update_read_coord(s, &patblt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, patblt->bRop);
+               stream_read_BYTE(s, patblt->bRop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
                update_read_color(s, &patblt->backColor);
@@ -493,7 +493,7 @@ void update_read_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* sc
                update_read_coord(s, &scrblt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, scrblt->bRop);
+               stream_read_BYTE(s, scrblt->bRop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
                update_read_coord(s, &scrblt->nXSrc, orderInfo->deltaCoordinates);
@@ -504,7 +504,7 @@ void update_read_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, SCRBLT_ORDER* sc
 
 void update_read_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, OPAQUE_RECT_ORDER* opaque_rect)
 {
-       uint8 byte;
+       BYTE byte;
 
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
                update_read_coord(s, &opaque_rect->nLeftRect, orderInfo->deltaCoordinates);
@@ -520,19 +520,19 @@ void update_read_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, OPAQUE_RECT
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                opaque_rect->color = (opaque_rect->color & 0xFFFFFF00) | byte;
        }
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                opaque_rect->color = (opaque_rect->color & 0xFFFF00FF) | (byte << 8);
        }
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                opaque_rect->color = (opaque_rect->color & 0xFF00FFFF) | (byte << 16);
        }
 }
@@ -552,7 +552,7 @@ void update_read_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, DRAW_NIN
                update_read_coord(s, &draw_nine_grid->srcBottom, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint16(s, draw_nine_grid->bitmapId);
+               stream_read_UINT16(s, draw_nine_grid->bitmapId);
 }
 
 void update_read_multi_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DSTBLT_ORDER* multi_dstblt)
@@ -570,14 +570,14 @@ void update_read_multi_dstblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_DSTB
                update_read_coord(s, &multi_dstblt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, multi_dstblt->bRop);
+               stream_read_BYTE(s, multi_dstblt->bRop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, multi_dstblt->numRectangles);
+               stream_read_BYTE(s, multi_dstblt->numRectangles);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
        {
-               stream_read_uint16(s, multi_dstblt->cbData);
+               stream_read_UINT16(s, multi_dstblt->cbData);
                update_read_delta_rects(s, multi_dstblt->rectangles, multi_dstblt->numRectangles);
        }
 }
@@ -597,7 +597,7 @@ void update_read_multi_patblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_PATB
                update_read_coord(s, &multi_patblt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, multi_patblt->bRop);
+               stream_read_BYTE(s, multi_patblt->bRop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
                update_read_color(s, &multi_patblt->backColor);
@@ -608,11 +608,11 @@ void update_read_multi_patblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_PATB
        update_read_brush(s, &multi_patblt->brush, orderInfo->fieldFlags >> 7);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_13)
-               stream_read_uint8(s, multi_patblt->numRectangles);
+               stream_read_BYTE(s, multi_patblt->numRectangles);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_14)
        {
-               stream_read_uint16(s, multi_patblt->cbData);
+               stream_read_UINT16(s, multi_patblt->cbData);
                update_read_delta_rects(s, multi_patblt->rectangles, multi_patblt->numRectangles);
        }
 }
@@ -632,7 +632,7 @@ void update_read_multi_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_SCRB
                update_read_coord(s, &multi_scrblt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, multi_scrblt->bRop);
+               stream_read_BYTE(s, multi_scrblt->bRop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
                update_read_coord(s, &multi_scrblt->nXSrc, orderInfo->deltaCoordinates);
@@ -641,18 +641,18 @@ void update_read_multi_scrblt_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_SCRB
                update_read_coord(s, &multi_scrblt->nYSrc, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_08)
-               stream_read_uint8(s, multi_scrblt->numRectangles);
+               stream_read_BYTE(s, multi_scrblt->numRectangles);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_09)
        {
-               stream_read_uint16(s, multi_scrblt->cbData);
+               stream_read_UINT16(s, multi_scrblt->cbData);
                update_read_delta_rects(s, multi_scrblt->rectangles, multi_scrblt->numRectangles);
        }
 }
 
 void update_read_multi_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect)
 {
-       uint8 byte;
+       BYTE byte;
 
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
                update_read_coord(s, &multi_opaque_rect->nLeftRect, orderInfo->deltaCoordinates);
@@ -668,28 +668,28 @@ void update_read_multi_opaque_rect_order(STREAM* s, ORDER_INFO* orderInfo, MULTI
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                multi_opaque_rect->color = (multi_opaque_rect->color & 0xFFFFFF00) | byte;
        }
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                multi_opaque_rect->color = (multi_opaque_rect->color & 0xFFFF00FF) | (byte << 8);
        }
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                multi_opaque_rect->color = (multi_opaque_rect->color & 0xFF00FFFF) | (byte << 16);
        }
 
        if (orderInfo->fieldFlags & ORDER_FIELD_08)
-               stream_read_uint8(s, multi_opaque_rect->numRectangles);
+               stream_read_BYTE(s, multi_opaque_rect->numRectangles);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_09)
        {
-               stream_read_uint16(s, multi_opaque_rect->cbData);
+               stream_read_UINT16(s, multi_opaque_rect->cbData);
                update_read_delta_rects(s, multi_opaque_rect->rectangles, multi_opaque_rect->numRectangles);
        }
 }
@@ -709,14 +709,14 @@ void update_read_multi_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, MU
                update_read_coord(s, &multi_draw_nine_grid->srcBottom, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint16(s, multi_draw_nine_grid->bitmapId);
+               stream_read_UINT16(s, multi_draw_nine_grid->bitmapId);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, multi_draw_nine_grid->nDeltaEntries);
+               stream_read_BYTE(s, multi_draw_nine_grid->nDeltaEntries);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
        {
-               stream_read_uint16(s, multi_draw_nine_grid->cbData);
+               stream_read_UINT16(s, multi_draw_nine_grid->cbData);
                stream_seek(s, multi_draw_nine_grid->cbData);
        }
 }
@@ -724,7 +724,7 @@ void update_read_multi_draw_nine_grid_order(STREAM* s, ORDER_INFO* orderInfo, MU
 void update_read_line_to_order(STREAM* s, ORDER_INFO* orderInfo, LINE_TO_ORDER* line_to)
 {
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
-               stream_read_uint16(s, line_to->backMode);
+               stream_read_UINT16(s, line_to->backMode);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_02)
                update_read_coord(s, &line_to->nXStart, orderInfo->deltaCoordinates);
@@ -742,13 +742,13 @@ void update_read_line_to_order(STREAM* s, ORDER_INFO* orderInfo, LINE_TO_ORDER*
                update_read_color(s, &line_to->backColor);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
-               stream_read_uint8(s, line_to->bRop2);
+               stream_read_BYTE(s, line_to->bRop2);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_08)
-               stream_read_uint8(s, line_to->penStyle);
+               stream_read_BYTE(s, line_to->penStyle);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_09)
-               stream_read_uint8(s, line_to->penWidth);
+               stream_read_BYTE(s, line_to->penWidth);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_10)
                update_read_color(s, &line_to->penColor);
@@ -763,20 +763,20 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER
                update_read_coord(s, &polyline->yStart, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_03)
-               stream_read_uint8(s, polyline->bRop2);
+               stream_read_BYTE(s, polyline->bRop2);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_04)
-               stream_seek_uint16(s);
+               stream_seek_UINT16(s);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
                update_read_color(s, &polyline->penColor);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, polyline->numPoints);
+               stream_read_BYTE(s, polyline->numPoints);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
        {
-               stream_read_uint8(s, polyline->cbData);
+               stream_read_BYTE(s, polyline->cbData);
 
                if (polyline->points == NULL)
                        polyline->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polyline->numPoints);
@@ -790,7 +790,7 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER
 void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* memblt)
 {
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
-               stream_read_uint16(s, memblt->cacheId);
+               stream_read_UINT16(s, memblt->cacheId);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_02)
                update_read_coord(s, &memblt->nLeftRect, orderInfo->deltaCoordinates);
@@ -805,7 +805,7 @@ void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* me
                update_read_coord(s, &memblt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, memblt->bRop);
+               stream_read_BYTE(s, memblt->bRop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
                update_read_coord(s, &memblt->nXSrc, orderInfo->deltaCoordinates);
@@ -814,7 +814,7 @@ void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* me
                update_read_coord(s, &memblt->nYSrc, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_09)
-               stream_read_uint16(s, memblt->cacheIndex);
+               stream_read_UINT16(s, memblt->cacheIndex);
 
        memblt->colorIndex = (memblt->cacheId >> 8);
        memblt->cacheId = (memblt->cacheId & 0xFF);
@@ -823,7 +823,7 @@ void update_read_memblt_order(STREAM* s, ORDER_INFO* orderInfo, MEMBLT_ORDER* me
 void update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER* mem3blt)
 {
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
-               stream_read_uint16(s, mem3blt->cacheId);
+               stream_read_UINT16(s, mem3blt->cacheId);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_02)
                update_read_coord(s, &mem3blt->nLeftRect, orderInfo->deltaCoordinates);
@@ -838,7 +838,7 @@ void update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER*
                update_read_coord(s, &mem3blt->nHeight, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, mem3blt->bRop);
+               stream_read_BYTE(s, mem3blt->bRop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
                update_read_coord(s, &mem3blt->nXSrc, orderInfo->deltaCoordinates);
@@ -855,7 +855,7 @@ void update_read_mem3blt_order(STREAM* s, ORDER_INFO* orderInfo, MEM3BLT_ORDER*
        update_read_brush(s, &mem3blt->brush, orderInfo->fieldFlags >> 10);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_16)
-               stream_read_uint16(s, mem3blt->cacheIndex);
+               stream_read_UINT16(s, mem3blt->cacheIndex);
 
        mem3blt->colorIndex = (mem3blt->cacheId >> 8);
        mem3blt->cacheId = (mem3blt->cacheId & 0xFF);
@@ -879,22 +879,22 @@ void update_read_save_bitmap_order(STREAM* s, ORDER_INFO* orderInfo, SAVE_BITMAP
                update_read_coord(s, &save_bitmap->nBottomRect, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, save_bitmap->operation);
+               stream_read_BYTE(s, save_bitmap->operation);
 }
 
 void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX_ORDER* glyph_index)
 {
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
-               stream_read_uint8(s, glyph_index->cacheId);
+               stream_read_BYTE(s, glyph_index->cacheId);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_02)
-               stream_read_uint8(s, glyph_index->flAccel);
+               stream_read_BYTE(s, glyph_index->flAccel);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_03)
-               stream_read_uint8(s, glyph_index->ulCharInc);
+               stream_read_BYTE(s, glyph_index->ulCharInc);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_04)
-               stream_read_uint8(s, glyph_index->fOpRedundant);
+               stream_read_BYTE(s, glyph_index->fOpRedundant);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
                update_read_color(s, &glyph_index->backColor);
@@ -903,40 +903,40 @@ void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX
                update_read_color(s, &glyph_index->foreColor);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
-               stream_read_uint16(s, glyph_index->bkLeft);
+               stream_read_UINT16(s, glyph_index->bkLeft);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_08)
-               stream_read_uint16(s, glyph_index->bkTop);
+               stream_read_UINT16(s, glyph_index->bkTop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_09)
-               stream_read_uint16(s, glyph_index->bkRight);
+               stream_read_UINT16(s, glyph_index->bkRight);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_10)
-               stream_read_uint16(s, glyph_index->bkBottom);
+               stream_read_UINT16(s, glyph_index->bkBottom);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_11)
-               stream_read_uint16(s, glyph_index->opLeft);
+               stream_read_UINT16(s, glyph_index->opLeft);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_12)
-               stream_read_uint16(s, glyph_index->opTop);
+               stream_read_UINT16(s, glyph_index->opTop);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_13)
-               stream_read_uint16(s, glyph_index->opRight);
+               stream_read_UINT16(s, glyph_index->opRight);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_14)
-               stream_read_uint16(s, glyph_index->opBottom);
+               stream_read_UINT16(s, glyph_index->opBottom);
 
        update_read_brush(s, &glyph_index->brush, orderInfo->fieldFlags >> 14);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_20)
-               stream_read_uint16(s, glyph_index->x);
+               stream_read_UINT16(s, glyph_index->x);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_21)
-               stream_read_uint16(s, glyph_index->y);
+               stream_read_UINT16(s, glyph_index->y);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_22)
        {
-               stream_read_uint8(s, glyph_index->cbData);
+               stream_read_BYTE(s, glyph_index->cbData);
                memcpy(glyph_index->data, s->p, glyph_index->cbData);
                stream_seek(s, glyph_index->cbData);
        }
@@ -945,12 +945,12 @@ void update_read_glyph_index_order(STREAM* s, ORDER_INFO* orderInfo, GLYPH_INDEX
 void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_ORDER* fast_index)
 {
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
-               stream_read_uint8(s, fast_index->cacheId);
+               stream_read_BYTE(s, fast_index->cacheId);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_02)
        {
-               stream_read_uint8(s, fast_index->ulCharInc);
-               stream_read_uint8(s, fast_index->flAccel);
+               stream_read_BYTE(s, fast_index->ulCharInc);
+               stream_read_BYTE(s, fast_index->flAccel);
        }
 
        if (orderInfo->fieldFlags & ORDER_FIELD_03)
@@ -991,7 +991,7 @@ void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O
 
        if (orderInfo->fieldFlags & ORDER_FIELD_15)
        {
-               stream_read_uint8(s, fast_index->cbData);
+               stream_read_BYTE(s, fast_index->cbData);
                memcpy(fast_index->data, s->p, fast_index->cbData);
                stream_seek(s, fast_index->cbData);
        }
@@ -1000,15 +1000,15 @@ void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O
 void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_ORDER* fast_glyph)
 {
        GLYPH_DATA_V2* glyph;
-       uint8* phold;
+       BYTE* phold;
 
        if (orderInfo->fieldFlags & ORDER_FIELD_01)
-               stream_read_uint8(s, fast_glyph->cacheId);
+               stream_read_BYTE(s, fast_glyph->cacheId);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_02)
        {
-               stream_read_uint8(s, fast_glyph->ulCharInc);
-               stream_read_uint8(s, fast_glyph->flAccel);
+               stream_read_BYTE(s, fast_glyph->ulCharInc);
+               stream_read_BYTE(s, fast_glyph->flAccel);
        }
 
        if (orderInfo->fieldFlags & ORDER_FIELD_03)
@@ -1049,7 +1049,7 @@ void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O
 
        if (orderInfo->fieldFlags & ORDER_FIELD_15)
        {
-               stream_read_uint8(s, fast_glyph->cbData);
+               stream_read_BYTE(s, fast_glyph->cbData);
                memcpy(fast_glyph->data, s->p, fast_glyph->cbData);
                phold = s->p;
                stream_seek(s, 1);
@@ -1064,7 +1064,7 @@ void update_read_fast_glyph_order(STREAM* s, ORDER_INFO* orderInfo, FAST_GLYPH_O
                        update_read_2byte_unsigned(s, &glyph->cy);
                        glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy;
                        glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0;
-                       glyph->aj = (uint8*) malloc(glyph->cb);
+                       glyph->aj = (BYTE*) malloc(glyph->cb);
                        stream_read(s, glyph->aj, glyph->cb);
                        fast_glyph->glyph_data = glyph;
                }
@@ -1081,20 +1081,20 @@ void update_read_polygon_sc_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_SC_O
                update_read_coord(s, &polygon_sc->yStart, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_03)
-               stream_read_uint8(s, polygon_sc->bRop2);
+               stream_read_BYTE(s, polygon_sc->bRop2);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_04)
-               stream_read_uint8(s, polygon_sc->fillMode);
+               stream_read_BYTE(s, polygon_sc->fillMode);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
                update_read_color(s, &polygon_sc->brushColor);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, polygon_sc->numPoints);
+               stream_read_BYTE(s, polygon_sc->numPoints);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
        {
-               stream_read_uint8(s, polygon_sc->cbData);
+               stream_read_BYTE(s, polygon_sc->cbData);
 
                if (polygon_sc->points == NULL)
                        polygon_sc->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polygon_sc->numPoints);
@@ -1114,10 +1114,10 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O
                update_read_coord(s, &polygon_cb->yStart, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_03)
-               stream_read_uint8(s, polygon_cb->bRop2);
+               stream_read_BYTE(s, polygon_cb->bRop2);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_04)
-               stream_read_uint8(s, polygon_cb->fillMode);
+               stream_read_BYTE(s, polygon_cb->fillMode);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
                update_read_color(s, &polygon_cb->backColor);
@@ -1128,11 +1128,11 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O
        update_read_brush(s, &polygon_cb->brush, orderInfo->fieldFlags >> 6);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_12)
-               stream_read_uint8(s, polygon_cb->numPoints);
+               stream_read_BYTE(s, polygon_cb->numPoints);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_13)
        {
-               stream_read_uint8(s, polygon_cb->cbData);
+               stream_read_BYTE(s, polygon_cb->cbData);
 
                if (polygon_cb->points == NULL)
                        polygon_cb->points = (DELTA_POINT*) malloc(sizeof(DELTA_POINT) * polygon_cb->numPoints);
@@ -1161,10 +1161,10 @@ void update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_O
                update_read_coord(s, &ellipse_sc->bottomRect, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, ellipse_sc->bRop2);
+               stream_read_BYTE(s, ellipse_sc->bRop2);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, ellipse_sc->fillMode);
+               stream_read_BYTE(s, ellipse_sc->fillMode);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
                update_read_color(s, &ellipse_sc->color);
@@ -1185,10 +1185,10 @@ void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_O
                update_read_coord(s, &ellipse_cb->bottomRect, orderInfo->deltaCoordinates);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_05)
-               stream_read_uint8(s, ellipse_cb->bRop2);
+               stream_read_BYTE(s, ellipse_cb->bRop2);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_06)
-               stream_read_uint8(s, ellipse_cb->fillMode);
+               stream_read_BYTE(s, ellipse_cb->fillMode);
 
        if (orderInfo->fieldFlags & ORDER_FIELD_07)
                update_read_color(s, &ellipse_cb->backColor);
@@ -1201,21 +1201,21 @@ void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_O
 
 /* Secondary Drawing Orders */
 
-void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, uint16 flags)
+void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags)
 {
-       stream_read_uint8(s, cache_bitmap_order->cacheId); /* cacheId (1 byte) */
-       stream_seek_uint8(s); /* pad1Octet (1 byte) */
-       stream_read_uint8(s, cache_bitmap_order->bitmapWidth); /* bitmapWidth (1 byte) */
-       stream_read_uint8(s, cache_bitmap_order->bitmapHeight); /* bitmapHeight (1 byte) */
-       stream_read_uint8(s, cache_bitmap_order->bitmapBpp); /* bitmapBpp (1 byte) */
-       stream_read_uint16(s, cache_bitmap_order->bitmapLength); /* bitmapLength (2 bytes) */
-       stream_read_uint16(s, cache_bitmap_order->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_read_BYTE(s, cache_bitmap_order->cacheId); /* cacheId (1 byte) */
+       stream_seek_BYTE(s); /* pad1Octet (1 byte) */
+       stream_read_BYTE(s, cache_bitmap_order->bitmapWidth); /* bitmapWidth (1 byte) */
+       stream_read_BYTE(s, cache_bitmap_order->bitmapHeight); /* bitmapHeight (1 byte) */
+       stream_read_BYTE(s, cache_bitmap_order->bitmapBpp); /* bitmapBpp (1 byte) */
+       stream_read_UINT16(s, cache_bitmap_order->bitmapLength); /* bitmapLength (2 bytes) */
+       stream_read_UINT16(s, cache_bitmap_order->cacheIndex); /* cacheIndex (2 bytes) */
 
        if (compressed)
        {
                if ((flags & NO_BITMAP_COMPRESSION_HDR) == 0)
                {
-                       uint8* bitmapComprHdr = (uint8*) &(cache_bitmap_order->bitmapComprHdr);
+                       BYTE* bitmapComprHdr = (BYTE*) &(cache_bitmap_order->bitmapComprHdr);
                        stream_read(s, bitmapComprHdr, 8); /* bitmapComprHdr (8 bytes) */
                        cache_bitmap_order->bitmapLength -= 8;
                }
@@ -1230,9 +1230,9 @@ void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_
        cache_bitmap_order->compressed = compressed;
 }
 
-void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, uint16 flags)
+void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags)
 {
-       uint8 bitsPerPixelId;
+       BYTE bitsPerPixelId;
 
        cache_bitmap_v2_order->cacheId = flags & 0x0003;
        cache_bitmap_v2_order->flags = (flags & 0xFF80) >> 7;
@@ -1267,10 +1267,10 @@ void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b
        {
                if (!(cache_bitmap_v2_order->flags & CBR2_NO_BITMAP_COMPRESSION_HDR))
                {
-                       stream_read_uint16(s, cache_bitmap_v2_order->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */
-                       stream_read_uint16(s, cache_bitmap_v2_order->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */
-                       stream_read_uint16(s, cache_bitmap_v2_order->cbScanWidth); /* cbScanWidth (2 bytes) */
-                       stream_read_uint16(s, cache_bitmap_v2_order->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */
+                       stream_read_UINT16(s, cache_bitmap_v2_order->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */
+                       stream_read_UINT16(s, cache_bitmap_v2_order->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */
+                       stream_read_UINT16(s, cache_bitmap_v2_order->cbScanWidth); /* cbScanWidth (2 bytes) */
+                       stream_read_UINT16(s, cache_bitmap_v2_order->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */
                        cache_bitmap_v2_order->bitmapLength = cache_bitmap_v2_order->cbCompMainBodySize;
                }
 
@@ -1285,9 +1285,9 @@ void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b
        cache_bitmap_v2_order->compressed = compressed;
 }
 
-void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, uint16 flags)
+void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags)
 {
-       uint8 bitsPerPixelId;
+       BYTE bitsPerPixelId;
        BITMAP_DATA_EX* bitmapData;
 
        cache_bitmap_v3_order->cacheId = flags & 0x00000003;
@@ -1296,35 +1296,35 @@ void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_b
        bitsPerPixelId = (flags & 0x00000078) >> 3;
        cache_bitmap_v3_order->bpp = CBR23_BPP[bitsPerPixelId];
 
-       stream_read_uint16(s, cache_bitmap_v3_order->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_read_UINT16(s, cache_bitmap_v3_order->cacheIndex); /* cacheIndex (2 bytes) */
        stream_read_uint32(s, cache_bitmap_v3_order->key1); /* key1 (4 bytes) */
        stream_read_uint32(s, cache_bitmap_v3_order->key2); /* key2 (4 bytes) */
 
        bitmapData = &cache_bitmap_v3_order->bitmapData;
 
-       stream_read_uint8(s, bitmapData->bpp);
-       stream_seek_uint8(s); /* reserved1 (1 byte) */
-       stream_seek_uint8(s); /* reserved2 (1 byte) */
-       stream_read_uint8(s, bitmapData->codecID); /* codecID (1 byte) */
-       stream_read_uint16(s, bitmapData->width); /* width (2 bytes) */
-       stream_read_uint16(s, bitmapData->height); /* height (2 bytes) */
+       stream_read_BYTE(s, bitmapData->bpp);
+       stream_seek_BYTE(s); /* reserved1 (1 byte) */
+       stream_seek_BYTE(s); /* reserved2 (1 byte) */
+       stream_read_BYTE(s, bitmapData->codecID); /* codecID (1 byte) */
+       stream_read_UINT16(s, bitmapData->width); /* width (2 bytes) */
+       stream_read_UINT16(s, bitmapData->height); /* height (2 bytes) */
        stream_read_uint32(s, bitmapData->length); /* length (4 bytes) */
 
        if (bitmapData->data == NULL)
-               bitmapData->data = (uint8*) malloc(bitmapData->length);
+               bitmapData->data = (BYTE*) malloc(bitmapData->length);
        else
-               bitmapData->data = (uint8*) realloc(bitmapData->data, bitmapData->length);
+               bitmapData->data = (BYTE*) realloc(bitmapData->data, bitmapData->length);
 
        stream_read(s, bitmapData->data, bitmapData->length);
 }
 
-void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, uint16 flags)
+void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags)
 {
        int i;
        uint32* colorTable;
 
-       stream_read_uint8(s, cache_color_table_order->cacheIndex); /* cacheIndex (1 byte) */
-       stream_read_uint8(s, cache_color_table_order->numberColors); /* numberColors (2 bytes) */
+       stream_read_BYTE(s, cache_color_table_order->cacheIndex); /* cacheIndex (1 byte) */
+       stream_read_BYTE(s, cache_color_table_order->numberColors); /* numberColors (2 bytes) */
 
        colorTable = cache_color_table_order->colorTable;
 
@@ -1341,14 +1341,14 @@ void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cac
        cache_color_table_order->colorTable = colorTable;
 }
 
-void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, uint16 flags)
+void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags)
 {
        int i;
-       sint16 lsi16;
+       INT16 lsi16;
        GLYPH_DATA* glyph;
 
-       stream_read_uint8(s, cache_glyph_order->cacheId); /* cacheId (1 byte) */
-       stream_read_uint8(s, cache_glyph_order->cGlyphs); /* cGlyphs (1 byte) */
+       stream_read_BYTE(s, cache_glyph_order->cacheId); /* cacheId (1 byte) */
+       stream_read_BYTE(s, cache_glyph_order->cGlyphs); /* cGlyphs (1 byte) */
 
        for (i = 0; i < (int) cache_glyph_order->cGlyphs; i++)
        {
@@ -1358,18 +1358,18 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord
                }
                glyph = cache_glyph_order->glyphData[i];
 
-               stream_read_uint16(s, glyph->cacheIndex);
-               stream_read_uint16(s, lsi16);
+               stream_read_UINT16(s, glyph->cacheIndex);
+               stream_read_UINT16(s, lsi16);
                glyph->x = lsi16;
-               stream_read_uint16(s, lsi16);
+               stream_read_UINT16(s, lsi16);
                glyph->y = lsi16;
-               stream_read_uint16(s, glyph->cx);
-               stream_read_uint16(s, glyph->cy);
+               stream_read_UINT16(s, glyph->cx);
+               stream_read_UINT16(s, glyph->cy);
 
                glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy;
                glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0;
 
-               glyph->aj = (uint8*) malloc(glyph->cb);
+               glyph->aj = (BYTE*) malloc(glyph->cb);
 
                stream_read(s, glyph->aj, glyph->cb);
        }
@@ -1378,7 +1378,7 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord
                stream_seek(s, cache_glyph_order->cGlyphs * 2);
 }
 
-void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, uint16 flags)
+void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags)
 {
        int i;
        GLYPH_DATA_V2* glyph;
@@ -1395,7 +1395,7 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly
                }
                glyph = cache_glyph_v2_order->glyphData[i];
 
-               stream_read_uint8(s, glyph->cacheIndex);
+               stream_read_BYTE(s, glyph->cacheIndex);
                update_read_2byte_signed(s, &glyph->x);
                update_read_2byte_signed(s, &glyph->y);
                update_read_2byte_unsigned(s, &glyph->cx);
@@ -1404,7 +1404,7 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly
                glyph->cb = ((glyph->cx + 7) / 8) * glyph->cy;
                glyph->cb += ((glyph->cb % 4) > 0) ? 4 - (glyph->cb % 4) : 0;
 
-               glyph->aj = (uint8*) malloc(glyph->cb);
+               glyph->aj = (BYTE*) malloc(glyph->cb);
 
                stream_read(s, glyph->aj, glyph->cb);
        }
@@ -1413,12 +1413,12 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly
                stream_seek(s, cache_glyph_v2_order->cGlyphs * 2);
 }
 
-void update_decompress_brush(STREAM* s, uint8* output, uint8 bpp)
+void update_decompress_brush(STREAM* s, BYTE* output, BYTE bpp)
 {
        int index;
        int x, y, k;
-       uint8 byte = 0;
-       uint8* palette;
+       BYTE byte = 0;
+       BYTE* palette;
        int bytesPerPixel;
 
        palette = s->p + 16;
@@ -1429,7 +1429,7 @@ void update_decompress_brush(STREAM* s, uint8* output, uint8 bpp)
                for (x = 0; x < 8; x++)
                {
                        if ((x % 4) == 0)
-                               stream_read_uint8(s, byte);
+                               stream_read_BYTE(s, byte);
 
                        index = ((byte >> ((3 - (x % 4)) * 2)) & 0x03);
 
@@ -1441,28 +1441,28 @@ void update_decompress_brush(STREAM* s, uint8* output, uint8 bpp)
        }
 }
 
-void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, uint16 flags)
+void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags)
 {
        int i;
        int size;
-       uint8 iBitmapFormat;
+       BYTE iBitmapFormat;
        BOOL compressed = FALSE;
 
-       stream_read_uint8(s, cache_brush_order->index); /* cacheEntry (1 byte) */
+       stream_read_BYTE(s, cache_brush_order->index); /* cacheEntry (1 byte) */
 
-       stream_read_uint8(s, iBitmapFormat); /* iBitmapFormat (1 byte) */
+       stream_read_BYTE(s, iBitmapFormat); /* iBitmapFormat (1 byte) */
        cache_brush_order->bpp = BMF_BPP[iBitmapFormat];
 
-       stream_read_uint8(s, cache_brush_order->cx); /* cx (1 byte) */
-       stream_read_uint8(s, cache_brush_order->cy); /* cy (1 byte) */
-       stream_read_uint8(s, cache_brush_order->style); /* style (1 byte) */
-       stream_read_uint8(s, cache_brush_order->length); /* iBytes (1 byte) */
+       stream_read_BYTE(s, cache_brush_order->cx); /* cx (1 byte) */
+       stream_read_BYTE(s, cache_brush_order->cy); /* cy (1 byte) */
+       stream_read_BYTE(s, cache_brush_order->style); /* style (1 byte) */
+       stream_read_BYTE(s, cache_brush_order->length); /* iBytes (1 byte) */
 
        if ((cache_brush_order->cx == 8) && (cache_brush_order->cy == 8))
        {
                size = (cache_brush_order->bpp == 1) ? 8 : 8 * 8 * cache_brush_order->bpp;
 
-               cache_brush_order->data = (uint8*) malloc(size);
+               cache_brush_order->data = (BYTE*) malloc(size);
 
                if (cache_brush_order->bpp == 1)
                {
@@ -1476,7 +1476,7 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord
 
                        for (i = 7; i >= 0; i--)
                        {
-                               stream_read_uint8(s, cache_brush_order->data[i]);
+                               stream_read_BYTE(s, cache_brush_order->data[i]);
                        }
                }
                else
@@ -1511,23 +1511,23 @@ void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_ord
 
 void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap)
 {
-       uint16 flags;
+       UINT16 flags;
        BOOL deleteListPresent;
        OFFSCREEN_DELETE_LIST* deleteList;
 
-       stream_read_uint16(s, flags); /* flags (2 bytes) */
+       stream_read_UINT16(s, flags); /* flags (2 bytes) */
        create_offscreen_bitmap->id = flags & 0x7FFF;
        deleteListPresent = (flags & 0x8000) ? TRUE : FALSE;
 
-       stream_read_uint16(s, create_offscreen_bitmap->cx); /* cx (2 bytes) */
-       stream_read_uint16(s, create_offscreen_bitmap->cy); /* cy (2 bytes) */
+       stream_read_UINT16(s, create_offscreen_bitmap->cx); /* cx (2 bytes) */
+       stream_read_UINT16(s, create_offscreen_bitmap->cy); /* cy (2 bytes) */
 
        deleteList = &(create_offscreen_bitmap->deleteList);
        if (deleteListPresent)
        {
                int i;
 
-               stream_read_uint16(s, deleteList->cIndices);
+               stream_read_UINT16(s, deleteList->cIndices);
 
                if (deleteList->cIndices > deleteList->sIndices)
                {
@@ -1537,7 +1537,7 @@ void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA
 
                for (i = 0; i < (int) deleteList->cIndices; i++)
                {
-                       stream_read_uint16(s, deleteList->indices[i]);
+                       stream_read_UINT16(s, deleteList->indices[i]);
                }
        }
        else
@@ -1548,22 +1548,22 @@ void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA
 
 void update_read_switch_surface_order(STREAM* s, SWITCH_SURFACE_ORDER* switch_surface)
 {
-       stream_read_uint16(s, switch_surface->bitmapId); /* bitmapId (2 bytes) */
+       stream_read_UINT16(s, switch_surface->bitmapId); /* bitmapId (2 bytes) */
 }
 
 void update_read_create_nine_grid_bitmap_order(STREAM* s, CREATE_NINE_GRID_BITMAP_ORDER* create_nine_grid_bitmap)
 {
        NINE_GRID_BITMAP_INFO* nineGridInfo;
 
-       stream_read_uint8(s, create_nine_grid_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */
-       stream_read_uint16(s, create_nine_grid_bitmap->bitmapId); /* bitmapId (2 bytes) */
+       stream_read_BYTE(s, create_nine_grid_bitmap->bitmapBpp); /* bitmapBpp (1 byte) */
+       stream_read_UINT16(s, create_nine_grid_bitmap->bitmapId); /* bitmapId (2 bytes) */
 
        nineGridInfo = &(create_nine_grid_bitmap->nineGridInfo);
        stream_read_uint32(s, nineGridInfo->flFlags); /* flFlags (4 bytes) */
-       stream_read_uint16(s, nineGridInfo->ulLeftWidth); /* ulLeftWidth (2 bytes) */
-       stream_read_uint16(s, nineGridInfo->ulRightWidth); /* ulRightWidth (2 bytes) */
-       stream_read_uint16(s, nineGridInfo->ulTopHeight); /* ulTopHeight (2 bytes) */
-       stream_read_uint16(s, nineGridInfo->ulBottomHeight); /* ulBottomHeight (2 bytes) */
+       stream_read_UINT16(s, nineGridInfo->ulLeftWidth); /* ulLeftWidth (2 bytes) */
+       stream_read_UINT16(s, nineGridInfo->ulRightWidth); /* ulRightWidth (2 bytes) */
+       stream_read_UINT16(s, nineGridInfo->ulTopHeight); /* ulTopHeight (2 bytes) */
+       stream_read_UINT16(s, nineGridInfo->ulBottomHeight); /* ulBottomHeight (2 bytes) */
        update_read_colorref(s, &nineGridInfo->crTransparent); /* crTransparent (4 bytes) */
 }
 
@@ -1574,33 +1574,33 @@ void update_read_frame_marker_order(STREAM* s, FRAME_MARKER_ORDER* frame_marker)
 
 void update_read_stream_bitmap_first_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_first)
 {
-       stream_read_uint8(s, stream_bitmap_first->bitmapFlags); /* bitmapFlags (1 byte) */
-       stream_read_uint8(s, stream_bitmap_first->bitmapBpp); /* bitmapBpp (1 byte) */
-       stream_read_uint16(s, stream_bitmap_first->bitmapType); /* bitmapType (2 bytes) */
-       stream_read_uint16(s, stream_bitmap_first->bitmapWidth); /* bitmapWidth (2 bytes) */
-       stream_read_uint16(s, stream_bitmap_first->bitmapHeight); /* bitmapHeigth (2 bytes) */
+       stream_read_BYTE(s, stream_bitmap_first->bitmapFlags); /* bitmapFlags (1 byte) */
+       stream_read_BYTE(s, stream_bitmap_first->bitmapBpp); /* bitmapBpp (1 byte) */
+       stream_read_UINT16(s, stream_bitmap_first->bitmapType); /* bitmapType (2 bytes) */
+       stream_read_UINT16(s, stream_bitmap_first->bitmapWidth); /* bitmapWidth (2 bytes) */
+       stream_read_UINT16(s, stream_bitmap_first->bitmapHeight); /* bitmapHeigth (2 bytes) */
 
        if (stream_bitmap_first->bitmapFlags & STREAM_BITMAP_V2)
                stream_read_uint32(s, stream_bitmap_first->bitmapSize); /* bitmapSize (4 bytes) */
        else
-               stream_read_uint16(s, stream_bitmap_first->bitmapSize); /* bitmapSize (2 bytes) */
+               stream_read_UINT16(s, stream_bitmap_first->bitmapSize); /* bitmapSize (2 bytes) */
 
-       stream_read_uint16(s, stream_bitmap_first->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */
+       stream_read_UINT16(s, stream_bitmap_first->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */
        stream_seek(s, stream_bitmap_first->bitmapBlockSize); /* bitmapBlock */
 }
 
 void update_read_stream_bitmap_next_order(STREAM* s, STREAM_BITMAP_FIRST_ORDER* stream_bitmap_next)
 {
-       stream_read_uint8(s, stream_bitmap_next->bitmapFlags); /* bitmapFlags (1 byte) */
-       stream_read_uint16(s, stream_bitmap_next->bitmapType); /* bitmapType (2 bytes) */
-       stream_read_uint16(s, stream_bitmap_next->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */
+       stream_read_BYTE(s, stream_bitmap_next->bitmapFlags); /* bitmapFlags (1 byte) */
+       stream_read_UINT16(s, stream_bitmap_next->bitmapType); /* bitmapType (2 bytes) */
+       stream_read_UINT16(s, stream_bitmap_next->bitmapBlockSize); /* bitmapBlockSize (2 bytes) */
        stream_seek(s, stream_bitmap_next->bitmapBlockSize); /* bitmapBlock */
 }
 
 void update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* draw_gdiplus_first)
 {
-       stream_seek_uint8(s); /* pad1Octet (1 byte) */
-       stream_read_uint16(s, draw_gdiplus_first->cbSize); /* cbSize (2 bytes) */
+       stream_seek_BYTE(s); /* pad1Octet (1 byte) */
+       stream_read_UINT16(s, draw_gdiplus_first->cbSize); /* cbSize (2 bytes) */
        stream_read_uint32(s, draw_gdiplus_first->cbTotalSize); /* cbTotalSize (4 bytes) */
        stream_read_uint32(s, draw_gdiplus_first->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */
        stream_seek(s, draw_gdiplus_first->cbSize); /* emfRecords */
@@ -1608,15 +1608,15 @@ void update_read_draw_gdiplus_first_order(STREAM* s, DRAW_GDIPLUS_FIRST_ORDER* d
 
 void update_read_draw_gdiplus_next_order(STREAM* s, DRAW_GDIPLUS_NEXT_ORDER* draw_gdiplus_next)
 {
-       stream_seek_uint8(s); /* pad1Octet (1 byte) */
-       stream_read_uint16(s, draw_gdiplus_next->cbSize); /* cbSize (2 bytes) */
+       stream_seek_BYTE(s); /* pad1Octet (1 byte) */
+       stream_read_UINT16(s, draw_gdiplus_next->cbSize); /* cbSize (2 bytes) */
        stream_seek(s, draw_gdiplus_next->cbSize); /* emfRecords */
 }
 
 void update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_gdiplus_end)
 {
-       stream_seek_uint8(s); /* pad1Octet (1 byte) */
-       stream_read_uint16(s, draw_gdiplus_end->cbSize); /* cbSize (2 bytes) */
+       stream_seek_BYTE(s); /* pad1Octet (1 byte) */
+       stream_read_UINT16(s, draw_gdiplus_end->cbSize); /* cbSize (2 bytes) */
        stream_read_uint32(s, draw_gdiplus_end->cbTotalSize); /* cbTotalSize (4 bytes) */
        stream_read_uint32(s, draw_gdiplus_end->cbTotalEmfSize); /* cbTotalEmfSize (4 bytes) */
        stream_seek(s, draw_gdiplus_end->cbSize); /* emfRecords */
@@ -1624,37 +1624,37 @@ void update_read_draw_gdiplus_end_order(STREAM* s, DRAW_GDIPLUS_END_ORDER* draw_
 
 void update_read_draw_gdiplus_cache_first_order(STREAM* s, DRAW_GDIPLUS_CACHE_FIRST_ORDER* draw_gdiplus_cache_first)
 {
-       stream_read_uint8(s, draw_gdiplus_cache_first->flags); /* flags (1 byte) */
-       stream_read_uint16(s, draw_gdiplus_cache_first->cacheType); /* cacheType (2 bytes) */
-       stream_read_uint16(s, draw_gdiplus_cache_first->cacheIndex); /* cacheIndex (2 bytes) */
-       stream_read_uint16(s, draw_gdiplus_cache_first->cbSize); /* cbSize (2 bytes) */
+       stream_read_BYTE(s, draw_gdiplus_cache_first->flags); /* flags (1 byte) */
+       stream_read_UINT16(s, draw_gdiplus_cache_first->cacheType); /* cacheType (2 bytes) */
+       stream_read_UINT16(s, draw_gdiplus_cache_first->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_read_UINT16(s, draw_gdiplus_cache_first->cbSize); /* cbSize (2 bytes) */
        stream_read_uint32(s, draw_gdiplus_cache_first->cbTotalSize); /* cbTotalSize (4 bytes) */
        stream_seek(s, draw_gdiplus_cache_first->cbSize); /* emfRecords */
 }
 
 void update_read_draw_gdiplus_cache_next_order(STREAM* s, DRAW_GDIPLUS_CACHE_NEXT_ORDER* draw_gdiplus_cache_next)
 {
-       stream_read_uint8(s, draw_gdiplus_cache_next->flags); /* flags (1 byte) */
-       stream_read_uint16(s, draw_gdiplus_cache_next->cacheType); /* cacheType (2 bytes) */
-       stream_read_uint16(s, draw_gdiplus_cache_next->cacheIndex); /* cacheIndex (2 bytes) */
-       stream_read_uint16(s, draw_gdiplus_cache_next->cbSize); /* cbSize (2 bytes) */
+       stream_read_BYTE(s, draw_gdiplus_cache_next->flags); /* flags (1 byte) */
+       stream_read_UINT16(s, draw_gdiplus_cache_next->cacheType); /* cacheType (2 bytes) */
+       stream_read_UINT16(s, draw_gdiplus_cache_next->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_read_UINT16(s, draw_gdiplus_cache_next->cbSize); /* cbSize (2 bytes) */
        stream_seek(s, draw_gdiplus_cache_next->cbSize); /* emfRecords */
 }
 
 void update_read_draw_gdiplus_cache_end_order(STREAM* s, DRAW_GDIPLUS_CACHE_END_ORDER* draw_gdiplus_cache_end)
 {
-       stream_read_uint8(s, draw_gdiplus_cache_end->flags); /* flags (1 byte) */
-       stream_read_uint16(s, draw_gdiplus_cache_end->cacheType); /* cacheType (2 bytes) */
-       stream_read_uint16(s, draw_gdiplus_cache_end->cacheIndex); /* cacheIndex (2 bytes) */
-       stream_read_uint16(s, draw_gdiplus_cache_end->cbSize); /* cbSize (2 bytes) */
+       stream_read_BYTE(s, draw_gdiplus_cache_end->flags); /* flags (1 byte) */
+       stream_read_UINT16(s, draw_gdiplus_cache_end->cacheType); /* cacheType (2 bytes) */
+       stream_read_UINT16(s, draw_gdiplus_cache_end->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_read_UINT16(s, draw_gdiplus_cache_end->cbSize); /* cbSize (2 bytes) */
        stream_read_uint32(s, draw_gdiplus_cache_end->cbTotalSize); /* cbTotalSize (4 bytes) */
        stream_seek(s, draw_gdiplus_cache_end->cbSize); /* emfRecords */
 }
 
-void update_read_field_flags(STREAM* s, uint32* fieldFlags, uint8 flags, uint8 fieldBytes)
+void update_read_field_flags(STREAM* s, uint32* fieldFlags, BYTE flags, BYTE fieldBytes)
 {
        int i;
-       uint8 byte;
+       BYTE byte;
 
        if (flags & ORDER_ZERO_FIELD_BYTE_BIT0)
                fieldBytes--;
@@ -1670,16 +1670,16 @@ void update_read_field_flags(STREAM* s, uint32* fieldFlags, uint8 flags, uint8 f
        *fieldFlags = 0;
        for (i = 0; i < fieldBytes; i++)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                *fieldFlags |= byte << (i * 8);
        }
 }
 
 void update_read_bounds(STREAM* s, rdpBounds* bounds)
 {
-       uint8 flags;
+       BYTE flags;
 
-       stream_read_uint8(s, flags); /* field flags */
+       stream_read_BYTE(s, flags); /* field flags */
 
        if (flags & BOUND_LEFT)
                update_read_coord(s, &bounds->left, FALSE);
@@ -1702,7 +1702,7 @@ void update_read_bounds(STREAM* s, rdpBounds* bounds)
                update_read_coord(s, &bounds->bottom, TRUE);
 }
 
-BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags)
+BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, BYTE flags)
 {
        ORDER_INFO* orderInfo;
        rdpContext* context = update->context;
@@ -1711,7 +1711,7 @@ BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags)
        orderInfo = &(primary->order_info);
 
        if (flags & ORDER_TYPE_CHANGE)
-               stream_read_uint8(s, orderInfo->orderType); /* orderType (1 byte) */
+               stream_read_BYTE(s, orderInfo->orderType); /* orderType (1 byte) */
 
        if (orderInfo->orderType >= PRIMARY_DRAWING_ORDER_COUNT)
        {
@@ -1860,20 +1860,20 @@ BOOL update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags)
        return TRUE;
 }
 
-void update_recv_secondary_order(rdpUpdate* update, STREAM* s, uint8 flags)
+void update_recv_secondary_order(rdpUpdate* update, STREAM* s, BYTE flags)
 {
-       uint8* next;
-       uint8 orderType;
-       uint16 extraFlags;
-       uint16 orderLength;
+       BYTE* next;
+       BYTE orderType;
+       UINT16 extraFlags;
+       UINT16 orderLength;
        rdpContext* context = update->context;
        rdpSecondaryUpdate* secondary = update->secondary;
 
-       stream_read_uint16(s, orderLength); /* orderLength (2 bytes) */
-       stream_read_uint16(s, extraFlags); /* extraFlags (2 bytes) */
-       stream_read_uint8(s, orderType); /* orderType (1 byte) */
+       stream_read_UINT16(s, orderLength); /* orderLength (2 bytes) */
+       stream_read_UINT16(s, extraFlags); /* extraFlags (2 bytes) */
+       stream_read_BYTE(s, orderType); /* orderType (1 byte) */
 
-       next = s->p + ((sint16) orderLength) + 7;
+       next = s->p + ((INT16) orderLength) + 7;
 
 #ifdef WITH_DEBUG_ORDERS
        if (orderType < SECONDARY_DRAWING_ORDER_COUNT)
@@ -1939,9 +1939,9 @@ void update_recv_secondary_order(rdpUpdate* update, STREAM* s, uint8 flags)
        s->p = next;
 }
 
-void update_recv_altsec_order(rdpUpdate* update, STREAM* s, uint8 flags)
+void update_recv_altsec_order(rdpUpdate* update, STREAM* s, BYTE flags)
 {
-       uint8 orderType;
+       BYTE orderType;
        rdpContext* context = update->context;
        rdpAltSecUpdate* altsec = update->altsec;
 
@@ -2030,9 +2030,9 @@ void update_recv_altsec_order(rdpUpdate* update, STREAM* s, uint8 flags)
 
 BOOL update_recv_order(rdpUpdate* update, STREAM* s)
 {
-       uint8 controlFlags;
+       BYTE controlFlags;
 
-       stream_read_uint8(s, controlFlags); /* controlFlags (1 byte) */
+       stream_read_BYTE(s, controlFlags); /* controlFlags (1 byte) */
 
        if (!(controlFlags & ORDER_STANDARD))
                update_recv_altsec_order(update, s, controlFlags);
index c6b7e2d..b75bb1d 100644 (file)
@@ -209,13 +209,13 @@ void update_read_polygon_cb_order(STREAM* s, ORDER_INFO* orderInfo, POLYGON_CB_O
 void update_read_ellipse_sc_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_SC_ORDER* ellipse_sc);
 void update_read_ellipse_cb_order(STREAM* s, ORDER_INFO* orderInfo, ELLIPSE_CB_ORDER* ellipse_cb);
 
-void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, uint16 flags);
-void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, uint16 flags);
-void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, uint16 flags);
-void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, uint16 flags);
-void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, uint16 flags);
-void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, uint16 flags);
-void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, uint16 flags);
+void update_read_cache_bitmap_order(STREAM* s, CACHE_BITMAP_ORDER* cache_bitmap_order, BOOL compressed, UINT16 flags);
+void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, BOOL compressed, UINT16 flags);
+void update_read_cache_bitmap_v3_order(STREAM* s, CACHE_BITMAP_V3_ORDER* cache_bitmap_v3_order, BOOL compressed, UINT16 flags);
+void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cache_color_table_order, UINT16 flags);
+void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_order, UINT16 flags);
+void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_glyph_v2_order, UINT16 flags);
+void update_read_cache_brush_order(STREAM* s, CACHE_BRUSH_ORDER* cache_brush_order, UINT16 flags);
 
 void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMAP_ORDER* create_offscreen_bitmap);
 void update_read_switch_surface_order(STREAM* s, SWITCH_SURFACE_ORDER* switch_surface);
index 7feae92..ed8f9a5 100644 (file)
@@ -67,11 +67,11 @@ static BOOL freerdp_peer_check_fds(freerdp_peer* client)
 
 static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
 {
-       uint8 type;
-       uint16 length;
+       BYTE type;
+       UINT16 length;
        uint32 share_id;
-       uint8 compressed_type;
-       uint16 compressed_len;
+       BYTE compressed_type;
+       UINT16 compressed_len;
 
        if (!rdp_read_share_data_header(s, &length, &type, &share_id, &compressed_type, &compressed_len))
                return FALSE;
@@ -156,12 +156,12 @@ static BOOL peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
 static BOOL peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
 {
        rdpRdp* rdp;
-       uint16 length;
-       uint16 pduType;
-       uint16 pduLength;
-       uint16 pduSource;
-       uint16 channelId;
-       uint16 securityFlags;
+       UINT16 length;
+       UINT16 pduType;
+       UINT16 pduLength;
+       UINT16 pduSource;
+       UINT16 channelId;
+       UINT16 securityFlags;
 
        rdp = client->context->rdp;
 
@@ -215,7 +215,7 @@ static BOOL peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
 static BOOL peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s)
 {
        rdpRdp* rdp;
-       uint16 length;
+       UINT16 length;
        rdpFastPath* fastpath;
 
        rdp = client->context->rdp;
@@ -350,7 +350,7 @@ static void freerdp_peer_disconnect(freerdp_peer* client)
        transport_disconnect(client->context->rdp->transport);
 }
 
-static int freerdp_peer_send_channel_data(freerdp_peer* client, int channelId, uint8* data, int size)
+static int freerdp_peer_send_channel_data(freerdp_peer* client, int channelId, BYTE* data, int size)
 {
        return rdp_send_channel_data(client->context->rdp, channelId, data, size);
 }
index 207ec74..4b16778 100644 (file)
@@ -75,10 +75,10 @@ static const char* const DATA_PDU_TYPE_STRINGS[] =
  * @param flags security flags
  */
 
-void rdp_read_security_header(STREAM* s, uint16* flags)
+void rdp_read_security_header(STREAM* s, UINT16* flags)
 {
        /* Basic Security Header */
-       stream_read_uint16(s, *flags); /* flags */
+       stream_read_UINT16(s, *flags); /* flags */
        stream_seek(s, 2); /* flagsHi (unused) */
 }
 
@@ -89,60 +89,60 @@ void rdp_read_security_header(STREAM* s, uint16* flags)
  * @param flags security flags
  */
 
-void rdp_write_security_header(STREAM* s, uint16 flags)
+void rdp_write_security_header(STREAM* s, UINT16 flags)
 {
        /* Basic Security Header */
-       stream_write_uint16(s, flags); /* flags */
-       stream_write_uint16(s, 0); /* flagsHi (unused) */
+       stream_write_UINT16(s, flags); /* flags */
+       stream_write_UINT16(s, 0); /* flagsHi (unused) */
 }
 
-BOOL rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id)
+BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT16* channel_id)
 {
        /* Share Control Header */
-       stream_read_uint16(s, *length); /* totalLength */
+       stream_read_UINT16(s, *length); /* totalLength */
 
        if (*length - 2 > stream_get_left(s))
                return FALSE;
 
-       stream_read_uint16(s, *type); /* pduType */
+       stream_read_UINT16(s, *type); /* pduType */
        *type &= 0x0F; /* type is in the 4 least significant bits */
 
        if (*length > 4)
-               stream_read_uint16(s, *channel_id); /* pduSource */
+               stream_read_UINT16(s, *channel_id); /* pduSource */
        else /* Windows XP can send such short DEACTIVATE_ALL PDUs. */
                *channel_id = 0;
 
        return TRUE;
 }
 
-void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint16 channel_id)
+void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT16 channel_id)
 {
        length -= RDP_PACKET_HEADER_MAX_LENGTH;
 
        /* Share Control Header */
-       stream_write_uint16(s, length); /* totalLength */
-       stream_write_uint16(s, type | 0x10); /* pduType */
-       stream_write_uint16(s, channel_id); /* pduSource */
+       stream_write_UINT16(s, length); /* totalLength */
+       stream_write_UINT16(s, type | 0x10); /* pduType */
+       stream_write_UINT16(s, channel_id); /* pduSource */
 }
 
-BOOL rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id,
-                                       uint8 *compressed_type, uint16 *compressed_len)
+BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, uint32* share_id,
+                                       BYTE *compressed_type, UINT16 *compressed_len)
 {
        if (stream_get_left(s) < 12)
                return FALSE;
 
        /* Share Data Header */
        stream_read_uint32(s, *share_id); /* shareId (4 bytes) */
-       stream_seek_uint8(s); /* pad1 (1 byte) */
-       stream_seek_uint8(s); /* streamId (1 byte) */
-       stream_read_uint16(s, *length); /* uncompressedLength (2 bytes) */
-       stream_read_uint8(s, *type); /* pduType2, Data PDU Type (1 byte) */
-       stream_read_uint8(s, *compressed_type); /* compressedType (1 byte) */
-       stream_read_uint16(s, *compressed_len); /* compressedLength (2 bytes) */
+       stream_seek_BYTE(s); /* pad1 (1 byte) */
+       stream_seek_BYTE(s); /* streamId (1 byte) */
+       stream_read_UINT16(s, *length); /* uncompressedLength (2 bytes) */
+       stream_read_BYTE(s, *type); /* pduType2, Data PDU Type (1 byte) */
+       stream_read_BYTE(s, *compressed_type); /* compressedType (1 byte) */
+       stream_read_UINT16(s, *compressed_len); /* compressedLength (2 bytes) */
        return TRUE;
 }
 
-void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 share_id)
+void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, uint32 share_id)
 {
        length -= RDP_PACKET_HEADER_MAX_LENGTH;
        length -= RDP_SHARE_CONTROL_HEADER_LENGTH;
@@ -150,12 +150,12 @@ void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 sh
 
        /* Share Data Header */
        stream_write_uint32(s, share_id); /* shareId (4 bytes) */
-       stream_write_uint8(s, 0); /* pad1 (1 byte) */
-       stream_write_uint8(s, STREAM_LOW); /* streamId (1 byte) */
-       stream_write_uint16(s, length); /* uncompressedLength (2 bytes) */
-       stream_write_uint8(s, type); /* pduType2, Data PDU Type (1 byte) */
-       stream_write_uint8(s, 0); /* compressedType (1 byte) */
-       stream_write_uint16(s, 0); /* compressedLength (2 bytes) */
+       stream_write_BYTE(s, 0); /* pad1 (1 byte) */
+       stream_write_BYTE(s, STREAM_LOW); /* streamId (1 byte) */
+       stream_write_UINT16(s, length); /* uncompressedLength (2 bytes) */
+       stream_write_BYTE(s, type); /* pduType2, Data PDU Type (1 byte) */
+       stream_write_BYTE(s, 0); /* compressedType (1 byte) */
+       stream_write_UINT16(s, 0); /* compressedLength (2 bytes) */
 }
 
 static int rdp_security_stream_init(rdpRdp* rdp, STREAM* s)
@@ -222,9 +222,9 @@ STREAM* rdp_data_pdu_init(rdpRdp* rdp)
  * @param channel_id channel id
  */
 
-BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id)
+BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id)
 {
-       uint16 initiator;
+       UINT16 initiator;
        enum DomainMCSPDU MCSPDU;
 
        MCSPDU = (rdp->settings->server_mode) ? DomainMCSPDU_SendDataRequest : DomainMCSPDU_SendDataIndication;
@@ -240,7 +240,7 @@ BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id)
 
        if (MCSPDU == DomainMCSPDU_DisconnectProviderUltimatum)
        {
-               uint8 reason;
+               BYTE reason;
 
                (void) per_read_enumerated(s, &reason, 0);
                DEBUG_RDP("DisconnectProviderUltimatum from server, reason code 0x%02x\n", reason);
@@ -269,7 +269,7 @@ BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id)
  * @param channel_id channel id
  */
 
-void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id)
+void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id)
 {
        int body_length;
        enum DomainMCSPDU MCSPDU;
@@ -289,7 +289,7 @@ void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id)
        mcs_write_domain_mcspdu_header(s, MCSPDU, length, 0);
        per_write_integer16(s, rdp->mcs->user_id, MCS_BASE_CHANNEL_ID); /* initiator */
        per_write_integer16(s, channel_id, 0); /* channelId */
-       stream_write_uint8(s, 0x70); /* dataPriority + segmentation */
+       stream_write_BYTE(s, 0x70); /* dataPriority + segmentation */
        /*
         * We always encode length in two bytes, eventhough we could use
         * only one byte if length <= 0x7F. It is just easier that way,
@@ -297,12 +297,12 @@ void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id)
         * the data first and then store the header.
         */
        length = (length - RDP_PACKET_HEADER_MAX_LENGTH) | 0x8000;
-       stream_write_uint16_be(s, length); /* userData (OCTET_STRING) */
+       stream_write_UINT16_be(s, length); /* userData (OCTET_STRING) */
 }
 
 static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length)
 {
-       uint8* data;
+       BYTE* data;
        uint32 sec_flags;
        uint32 pad = 0;
 
@@ -319,8 +319,8 @@ static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length)
                                data = s->p + 12;
 
                                length = length - (data - s->data);
-                               stream_write_uint16(s, 0x10); /* length */
-                               stream_write_uint8(s, 0x1); /* TSFIPS_VERSION 1*/
+                               stream_write_UINT16(s, 0x10); /* length */
+                               stream_write_BYTE(s, 0x1); /* TSFIPS_VERSION 1*/
 
                                /* handle padding */
                                pad = 8 - (length % 8);
@@ -330,7 +330,7 @@ static uint32 rdp_security_stream_out(rdpRdp* rdp, STREAM* s, int length)
                                if (pad)
                                        memset(data+length, 0, pad);
 
-                               stream_write_uint8(s, pad);
+                               stream_write_BYTE(s, pad);
 
                                security_hmac_signature(data, length, s->p, rdp);
                                stream_seek(s, 8);
@@ -385,11 +385,11 @@ static uint32 rdp_get_sec_bytes(rdpRdp* rdp)
  * @param channel_id channel id
  */
 
-BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id)
+BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id)
 {
-       uint16 length;
+       UINT16 length;
        uint32 sec_bytes;
-       uint8* sec_hold;
+       BYTE* sec_hold;
 
        length = stream_get_length(s);
        stream_set_pos(s, 0);
@@ -410,11 +410,11 @@ BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id)
        return TRUE;
 }
 
-BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id)
+BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id)
 {
-       uint16 length;
+       UINT16 length;
        uint32 sec_bytes;
-       uint8* sec_hold;
+       BYTE* sec_hold;
 
        length = stream_get_length(s);
        stream_set_pos(s, 0);
@@ -437,11 +437,11 @@ BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id)
        return TRUE;
 }
 
-BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id)
+BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id)
 {
-       uint16 length;
+       UINT16 length;
        uint32 sec_bytes;
-       uint8* sec_hold;
+       BYTE* sec_hold;
 
        length = stream_get_length(s);
        stream_set_pos(s, 0);
@@ -475,11 +475,11 @@ void rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s)
 
 BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint8 type;
-       uint16 length;
+       BYTE type;
+       UINT16 length;
        uint32 share_id;
-       uint8 compressed_type;
-       uint16 compressed_len;
+       BYTE compressed_type;
+       UINT16 compressed_len;
        uint32 roff;
        uint32 rlen;
        STREAM* comp_stream;
@@ -609,9 +609,9 @@ BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
 
 BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint16 type;
-       uint16 length;
-       uint16 channelId;
+       UINT16 type;
+       UINT16 length;
+       UINT16 channelId;
 
        rdp_read_share_control_header(s, &length, &type, &channelId);
 
@@ -637,19 +637,19 @@ BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s)
  * @param length int
  */
 
-BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags)
+BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags)
 {
-       uint8 cmac[8], wmac[8];
+       BYTE cmac[8], wmac[8];
 
        if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS)
        {
-               uint16 len;
-               uint8 version, pad;
-               uint8 *sig;
+               UINT16 len;
+               BYTE version, pad;
+               BYTE *sig;
 
-               stream_read_uint16(s, len); /* 0x10 */
-               stream_read_uint8(s, version); /* 0x1 */
-               stream_read_uint8(s, pad);
+               stream_read_UINT16(s, len); /* 0x10 */
+               stream_read_BYTE(s, version); /* 0x1 */
+               stream_read_BYTE(s, pad);
 
                sig = s->p;
                stream_seek(s, 8);      /* signature */
@@ -703,13 +703,13 @@ BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags)
 
 static BOOL rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint16 length;
-       uint16 pduType;
-       uint16 pduLength;
-       uint16 pduSource;
-       uint16 channelId;
-       uint16 securityFlags;
-       uint8* nextp;
+       UINT16 length;
+       UINT16 pduType;
+       UINT16 pduLength;
+       UINT16 pduSource;
+       UINT16 channelId;
+       UINT16 securityFlags;
+       BYTE* nextp;
 
        if (!rdp_read_header(rdp, s, &length, &channelId))
        {
@@ -786,7 +786,7 @@ static BOOL rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
 
 static BOOL rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint16 length;
+       UINT16 length;
        rdpFastPath* fastpath;
 
        fastpath = rdp->fastpath;
@@ -883,7 +883,7 @@ static BOOL rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra)
        return TRUE;
 }
 
-int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size)
+int rdp_send_channel_data(rdpRdp* rdp, int channel_id, BYTE* data, int size)
 {
        return freerdp_channel_send(rdp, channel_id, data, size);
 }
index 1ff51dd..35a73fa 100644 (file)
@@ -143,47 +143,47 @@ struct rdp_rdp
        uint32 sec_flags;
        BOOL do_crypt;
        BOOL do_secure_checksum;
-       uint8 sign_key[16];
-       uint8 decrypt_key[16];
-       uint8 encrypt_key[16];
-       uint8 decrypt_update_key[16];
-       uint8 encrypt_update_key[16];
+       BYTE sign_key[16];
+       BYTE decrypt_key[16];
+       BYTE encrypt_key[16];
+       BYTE decrypt_update_key[16];
+       BYTE encrypt_update_key[16];
        int rc4_key_len;
-       uint8 fips_sign_key[20];
-       uint8 fips_encrypt_key[24];
-       uint8 fips_decrypt_key[24];
+       BYTE fips_sign_key[20];
+       BYTE fips_encrypt_key[24];
+       BYTE fips_decrypt_key[24];
        uint32 errorInfo;
        uint32 finalize_sc_pdus;
        BOOL disconnect;
 };
 
-void rdp_read_security_header(STREAM* s, uint16* flags);
-void rdp_write_security_header(STREAM* s, uint16 flags);
+void rdp_read_security_header(STREAM* s, UINT16* flags);
+void rdp_write_security_header(STREAM* s, UINT16 flags);
 
-BOOL rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, uint16* channel_id);
-void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint16 channel_id);
+BOOL rdp_read_share_control_header(STREAM* s, UINT16* length, UINT16* type, UINT16* channel_id);
+void rdp_write_share_control_header(STREAM* s, UINT16 length, UINT16 type, UINT16 channel_id);
 
-BOOL rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint32* share_id, 
-                       uint8 *compressed_type, uint16 *compressed_len);
+BOOL rdp_read_share_data_header(STREAM* s, UINT16* length, BYTE* type, uint32* share_id, 
+                       BYTE *compressed_type, UINT16 *compressed_len);
 
-void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 share_id);
+void rdp_write_share_data_header(STREAM* s, UINT16 length, BYTE type, uint32 share_id);
 
 STREAM* rdp_send_stream_init(rdpRdp* rdp);
 
-BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_id);
-void rdp_write_header(rdpRdp* rdp, STREAM* s, uint16 length, uint16 channel_id);
+BOOL rdp_read_header(rdpRdp* rdp, STREAM* s, UINT16* length, UINT16* channel_id);
+void rdp_write_header(rdpRdp* rdp, STREAM* s, UINT16 length, UINT16 channel_id);
 
 STREAM* rdp_pdu_init(rdpRdp* rdp);
-BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id);
+BOOL rdp_send_pdu(rdpRdp* rdp, STREAM* s, UINT16 type, UINT16 channel_id);
 
 STREAM* rdp_data_pdu_init(rdpRdp* rdp);
-BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id);
+BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id);
 BOOL rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s);
 
-BOOL rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id);
+BOOL rdp_send(rdpRdp* rdp, STREAM* s, UINT16 channel_id);
 void rdp_recv(rdpRdp* rdp);
 
-int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size);
+int rdp_send_channel_data(rdpRdp* rdp, int channel_id, BYTE* data, int size);
 
 BOOL rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s);
 
@@ -199,6 +199,6 @@ void rdp_free(rdpRdp* rdp);
 #define DEBUG_RDP(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__)
 #endif
 
-BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, uint16 securityFlags);
+BOOL rdp_decrypt(rdpRdp* rdp, STREAM* s, int length, UINT16 securityFlags);
 
 #endif /* __RDP_H */
index a16dd59..64699d8 100644 (file)
@@ -61,12 +61,12 @@ void rdp_print_redirection_flags(uint32 flags)
 
 BOOL rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
 {
-       uint16 flags;
-       uint16 length;
+       UINT16 flags;
+       UINT16 length;
        rdpRedirection* redirection = rdp->redirection;
 
-       stream_read_uint16(s, flags); /* flags (2 bytes) */
-       stream_read_uint16(s, length); /* length (2 bytes) */
+       stream_read_UINT16(s, flags); /* flags (2 bytes) */
+       stream_read_UINT16(s, length); /* length (2 bytes) */
        stream_read_uint32(s, redirection->sessionID); /* sessionID (4 bytes) */
        stream_read_uint32(s, redirection->flags); /* redirFlags (4 bytes) */
 
@@ -172,9 +172,9 @@ BOOL rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s)
 
 BOOL rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s)
 {
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
        rdp_recv_server_redirection_pdu(rdp, s);
-       stream_seek_uint8(s); /* pad2Octets (1 byte) */
+       stream_seek_BYTE(s); /* pad2Octets (1 byte) */
        return TRUE;
 }
 
index bef70f0..07e5427 100644 (file)
@@ -213,7 +213,7 @@ BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc)
 {
        STREAM* s;
        int ntlm_token_length;
-       uint8* ntlm_token_data;
+       BYTE* ntlm_token_data;
        HttpResponse* http_response;
        rdpNtlm* ntlm = rpc->ntlm_http_out->ntlm;
 
@@ -235,7 +235,7 @@ BOOL rpc_ntlm_http_out_connect(rdpRpc* rpc)
        http_response = http_response_recv(rpc->tls_out);
 
        ntlm_token_data = NULL;
-       crypto_base64_decode((uint8*) http_response->AuthParam, strlen(http_response->AuthParam),
+       crypto_base64_decode((BYTE*) http_response->AuthParam, strlen(http_response->AuthParam),
                        &ntlm_token_data, &ntlm_token_length);
 
        ntlm->inputBuffer.pvBuffer = ntlm_token_data;
@@ -263,7 +263,7 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc)
 {
        STREAM* s;
        int ntlm_token_length;
-       uint8* ntlm_token_data;
+       BYTE* ntlm_token_data;
        HttpResponse* http_response;
        rdpNtlm* ntlm = rpc->ntlm_http_in->ntlm;
 
@@ -285,7 +285,7 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc)
        http_response = http_response_recv(rpc->tls_in);
 
        ntlm_token_data = NULL;
-       crypto_base64_decode((uint8*) http_response->AuthParam, strlen(http_response->AuthParam),
+       crypto_base64_decode((BYTE*) http_response->AuthParam, strlen(http_response->AuthParam),
                        &ntlm_token_data, &ntlm_token_length);
 
        ntlm->inputBuffer.pvBuffer = ntlm_token_data;
@@ -311,20 +311,20 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc)
 
 void rpc_pdu_header_read(STREAM* s, RPC_PDU_HEADER* header)
 {
-       stream_read_uint8(s, header->rpc_vers); /* rpc_vers (1 byte) */
-       stream_read_uint8(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */
-       stream_read_uint8(s, header->ptype); /* PTYPE (1 byte) */
-       stream_read_uint8(s, header->pfc_flags); /* pfc_flags (1 byte) */
-       stream_read_uint8(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */
-       stream_read_uint8(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */
-       stream_read_uint8(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */
-       stream_read_uint8(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */
-       stream_read_uint16(s, header->frag_length); /* frag_length (2 bytes) */
-       stream_read_uint16(s, header->auth_length); /* auth_length (2 bytes) */
+       stream_read_BYTE(s, header->rpc_vers); /* rpc_vers (1 byte) */
+       stream_read_BYTE(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */
+       stream_read_BYTE(s, header->ptype); /* PTYPE (1 byte) */
+       stream_read_BYTE(s, header->pfc_flags); /* pfc_flags (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */
+       stream_read_UINT16(s, header->frag_length); /* frag_length (2 bytes) */
+       stream_read_UINT16(s, header->auth_length); /* auth_length (2 bytes) */
        stream_read_uint32(s, header->call_id); /* call_id (4 bytes) */
 }
 
-int rpc_out_write(rdpRpc* rpc, uint8* data, int length)
+int rpc_out_write(rdpRpc* rpc, BYTE* data, int length)
 {
        int status;
 
@@ -339,7 +339,7 @@ int rpc_out_write(rdpRpc* rpc, uint8* data, int length)
        return status;
 }
 
-int rpc_in_write(rdpRpc* rpc, uint8* data, int length)
+int rpc_in_write(rdpRpc* rpc, BYTE* data, int length)
 {
        int status;
 
@@ -472,7 +472,7 @@ BOOL rpc_send_bind_pdu(rdpRpc* rpc)
        if (bind_pdu->auth_verifier.auth_pad_length > 0)
                stream_write(pdu, bind_pdu->auth_verifier.auth_pad, bind_pdu->auth_verifier.auth_pad_length);
 
-       stream_write(pdu, &bind_pdu->auth_verifier.auth_type, 8); /* assumed that uint8 pointer is 32bit long (4 bytes) */
+       stream_write(pdu, &bind_pdu->auth_verifier.auth_type, 8); /* assumed that BYTE pointer is 32bit long (4 bytes) */
        stream_write(pdu, bind_pdu->auth_verifier.auth_value, bind_pdu->auth_length);
        stream_seal(pdu);
 
@@ -486,11 +486,11 @@ BOOL rpc_send_bind_pdu(rdpRpc* rpc)
 
 int rpc_recv_bind_ack_pdu(rdpRpc* rpc)
 {
-       uint8* p;
+       BYTE* p;
        STREAM* s;
        int status;
-       uint8* pdu;
-       uint8* auth_data;
+       BYTE* pdu;
+       BYTE* auth_data;
        RPC_PDU_HEADER header;
        int pdu_length = 0x8FFF;
 
@@ -585,11 +585,11 @@ BOOL rpc_send_rpc_auth_3_pdu(rdpRpc* rpc)
        return TRUE;
 }
 
-int rpc_out_read(rdpRpc* rpc, uint8* data, int length)
+int rpc_out_read(rdpRpc* rpc, BYTE* data, int length)
 {
        STREAM* s;
        int status;
-       uint8* pdu;
+       BYTE* pdu;
        int content_length;
        RPC_PDU_HEADER header;
 
@@ -661,7 +661,7 @@ int rpc_out_read(rdpRpc* rpc, uint8* data, int length)
        return header.frag_length;
 }
 
-int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum)
+int rpc_tsg_write(rdpRpc* rpc, BYTE* data, int length, UINT16 opnum)
 {
        int i;
        int status;
@@ -672,7 +672,7 @@ int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum)
        SECURITY_STATUS encrypt_status;
        rpcconn_request_hdr_t* request_pdu;
 
-       uint8 auth_pad_length = 16 - ((24 + length + 8 + 16) % 16);
+       BYTE auth_pad_length = 16 - ((24 + length + 8 + 16) % 16);
 
        ntlm = rpc->ntlm;
 
@@ -773,17 +773,17 @@ int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum)
        return length;
 }
 
-int rpc_read(rdpRpc* rpc, uint8* data, int length)
+int rpc_read(rdpRpc* rpc, BYTE* data, int length)
 {
        int status;
        int read = 0;
        int data_length;
-       uint16 frag_length;
-       uint16 auth_length;
-       uint8 auth_pad_length;
+       UINT16 frag_length;
+       UINT16 auth_length;
+       BYTE auth_pad_length;
        uint32 call_id = -1;
        int rpc_length = length + 0xFF;
-       uint8* rpc_data = malloc(rpc_length);
+       BYTE* rpc_data = malloc(rpc_length);
 
        if (rpc_data == NULL)
        {
@@ -825,8 +825,8 @@ int rpc_read(rdpRpc* rpc, uint8* data, int length)
                        return status;
                }
 
-               frag_length = *(uint16*)(rpc_data + 8);
-               auth_length = *(uint16*)(rpc_data + 10);
+               frag_length = *(UINT16*)(rpc_data + 8);
+               auth_length = *(UINT16*)(rpc_data + 10);
                call_id = *(uint32*)(rpc_data + 12);
                status = *(uint32*)(rpc_data + 16); /* alloc_hint */
                auth_pad_length = *(rpc_data + frag_length - auth_length - 6); /* -6 = -8 + 2 (sec_trailer + 2) */
index 03bf81c..0f9926f 100644 (file)
@@ -44,18 +44,18 @@ typedef struct rdp_ntlm_http rdpNtlmHttp;
 
 struct _rpc_pdu_header
 {
-       uint8 rpc_vers;
-       uint8 rpc_vers_minor;
-       uint8 ptype;
-       uint8 pfc_flags;
-       uint8 packed_drep[4];
-       uint16 frag_length;
-       uint16 auth_length;
+       BYTE rpc_vers;
+       BYTE rpc_vers_minor;
+       BYTE ptype;
+       BYTE pfc_flags;
+       BYTE packed_drep[4];
+       UINT16 frag_length;
+       UINT16 auth_length;
        uint32 call_id;
 };
 typedef struct _rpc_pdu_header RPC_PDU_HEADER;
 
-typedef   uint16   p_context_id_t;
+typedef   UINT16   p_context_id_t;
 
 typedef struct   {
        uuid            if_uuid;
@@ -64,16 +64,16 @@ typedef struct   {
 
 typedef struct {
        p_context_id_t  p_cont_id;
-       uint8                   n_transfer_syn;     /* number of items */
-       uint8                   reserved;           /* alignment pad, m.b.z. */
+       BYTE                    n_transfer_syn;     /* number of items */
+       BYTE                    reserved;           /* alignment pad, m.b.z. */
        p_syntax_id_t   abstract_syntax;    /* transfer syntax list */
        p_syntax_id_t*  transfer_syntaxes; /*size_is(n_transfer_syn)*/
 } p_cont_elem_t;
 
 typedef struct {
-       uint8                   n_context_elem;      /* number of items */
-       uint8                   reserved;            /* alignment pad, m.b.z. */
-       uint16                  reserved2;           /* alignment pad, m.b.z. */
+       BYTE                    n_context_elem;      /* number of items */
+       BYTE                    reserved;            /* alignment pad, m.b.z. */
+       UINT16                  reserved2;           /* alignment pad, m.b.z. */
        p_cont_elem_t*  p_cont_elem;          /*size_is(n_cont_elem)*/
 } p_cont_list_t;
 
@@ -101,25 +101,25 @@ typedef struct {
 /* Same order and number of elements as in bind request */
 
 typedef struct {
-       uint8           n_results;      /* count */
-       uint8           reserved;       /* alignment pad, m.b.z. */
-       uint16          reserved2;       /* alignment pad, m.b.z. */
+       BYTE            n_results;      /* count */
+       BYTE            reserved;       /* alignment pad, m.b.z. */
+       UINT16          reserved2;       /* alignment pad, m.b.z. */
        p_result_t*     p_results; /*size_is(n_results)*/
 } p_result_list_t;
 
 typedef struct {
-       uint8   major;
-       uint8   minor;
+       BYTE   major;
+       BYTE   minor;
 } version_t;
 typedef   version_t   p_rt_version_t;
 
 typedef struct {
-       uint8                   n_protocols;   /* count */
+       BYTE                    n_protocols;   /* count */
        p_rt_version_t* p_protocols;   /* size_is(n_protocols) */
 } p_rt_versions_supported_t;
 
 typedef struct {
-       uint16  length;
+       UINT16  length;
        char*   port_spec; /* port string spec; size_is(length) */
 } port_any_t;
 
@@ -132,15 +132,15 @@ typedef struct {
 #define USER_DATA_NOT_READABLE          6 /* not used */
 #define NO_PSAP_AVAILABLE               7 /* not used */
 
-typedef  uint16 rpcrt_reason_code_t;/* 0..65535 */
+typedef  UINT16 rpcrt_reason_code_t;/* 0..65535 */
 
 typedef  struct {
-       uint8   rpc_vers;
-       uint8   rpc_vers_minor;
-       uint8   reserved[2];/* must be zero */
-       uint8   packed_drep[4];
+       BYTE    rpc_vers;
+       BYTE    rpc_vers_minor;
+       BYTE    reserved[2];/* must be zero */
+       BYTE    packed_drep[4];
        uint32  reject_status;
-       uint8   reserved2[4];
+       BYTE    reserved2[4];
 } rpcrt_optional_data_t;
 
 typedef struct {
@@ -156,13 +156,13 @@ typedef struct {
 typedef struct{
        /* restore 4 byte alignment */
 
-       uint8*  auth_pad; /* align(4); size_is(auth_pad_length) */
-       uint8   auth_type;       /* :01  which authent service */
-       uint8   auth_level;      /* :01  which level within service */
-       uint8   auth_pad_length; /* :01 */
-       uint8   auth_reserved;   /* :01 reserved, m.b.z. */
+       BYTE*   auth_pad; /* align(4); size_is(auth_pad_length) */
+       BYTE    auth_type;       /* :01  which authent service */
+       BYTE    auth_level;      /* :01  which level within service */
+       BYTE    auth_pad_length; /* :01 */
+       BYTE    auth_reserved;   /* :01 reserved, m.b.z. */
        uint32  auth_context_id; /* :04 */
-       uint8*  auth_value; /* credentials; size_is(auth_length) */
+       BYTE*   auth_value; /* credentials; size_is(auth_length) */
 } auth_verifier_co_t;
 
 /* Connection-oriented PDU Definitions */
@@ -171,19 +171,19 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;          /* 00:01 RPC version */
-       uint8  rpc_vers_minor ;       /* 01:01 minor version */
-       uint8  PTYPE; /* 02:01 alter context PDU */
-       uint8  pfc_flags;             /* 03:01 flags */
-       uint8  packed_drep[4];        /* 04:04 NDR data rep format label*/
-       uint16 frag_length;           /* 08:02 total length of fragment */
-       uint16 auth_length;           /* 10:02 length of auth_value */
+       BYTE  rpc_vers;          /* 00:01 RPC version */
+       BYTE  rpc_vers_minor ;       /* 01:01 minor version */
+       BYTE  PTYPE; /* 02:01 alter context PDU */
+       BYTE  pfc_flags;             /* 03:01 flags */
+       BYTE  packed_drep[4];        /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;           /* 08:02 total length of fragment */
+       UINT16 auth_length;           /* 10:02 length of auth_value */
        uint32  call_id;              /* 12:04 call identifier */
 
        /* end common fields */
 
-       uint16 max_xmit_frag;         /* ignored */
-       uint16 max_recv_frag;         /* ignored */
+       UINT16 max_xmit_frag;         /* ignored */
+       UINT16 max_recv_frag;         /* ignored */
        uint32 assoc_group_id;        /* ignored */
 
        /* presentation context list */
@@ -201,26 +201,26 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8   rpc_vers;       /* 00:01 RPC version */
-       uint8   rpc_vers_minor;      /* 01:01 minor version */
-       uint8   PTYPE; /* 02:01 alter
+       BYTE    rpc_vers;       /* 00:01 RPC version */
+       BYTE    rpc_vers_minor;      /* 01:01 minor version */
+       BYTE    PTYPE; /* 02:01 alter
                                                                                                 context response PDU */
-       uint8   pfc_flags;          /* 03:01 flags */
-       uint8   packed_drep[4];     /* 04:04 NDR data rep format label*/
-       uint16  frag_length;        /* 08:02 total length of fragment */
-       uint16  auth_length;        /* 10:02 length of auth_value */
+       BYTE    pfc_flags;          /* 03:01 flags */
+       BYTE    packed_drep[4];     /* 04:04 NDR data rep format label*/
+       UINT16  frag_length;        /* 08:02 total length of fragment */
+       UINT16  auth_length;        /* 10:02 length of auth_value */
        uint32  call_id;           /* 12:04 call identifier */
 
        /* end common fields */
 
-       uint16          max_xmit_frag;      /* ignored */
-       uint16          max_recv_frag;      /* ignored */
+       UINT16          max_xmit_frag;      /* ignored */
+       UINT16          max_recv_frag;      /* ignored */
        uint32          assoc_group_id;     /* ignored */
        port_any_t      sec_addr;        /* ignored */
 
        /* restore 4-octet alignment */
 
-       uint8*          pad2; /* size_is(align(4)) */
+       BYTE*           pad2; /* size_is(align(4)) */
 
        /* presentation context result list, including hints */
 
@@ -237,19 +237,19 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;        /* 00:01 RPC version */
-       uint8  rpc_vers_minor;      /* 01:01 minor version */
-       uint8  PTYPE;        /* 02:01 bind PDU */
-       uint8  pfc_flags;           /* 03:01 flags */
-       uint8    packed_drep[4];      /* 04:04 NDR data rep format label*/
-       uint16 frag_length;         /* 08:02 total length of fragment */
-       uint16 auth_length;         /* 10:02 length of auth_value */
+       BYTE  rpc_vers;        /* 00:01 RPC version */
+       BYTE  rpc_vers_minor;      /* 01:01 minor version */
+       BYTE  PTYPE;        /* 02:01 bind PDU */
+       BYTE  pfc_flags;           /* 03:01 flags */
+       BYTE    packed_drep[4];      /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;         /* 08:02 total length of fragment */
+       UINT16 auth_length;         /* 10:02 length of auth_value */
        uint32  call_id;            /* 12:04 call identifier */
 
        /* end common fields */
 
-       uint16 max_xmit_frag;     /* 16:02 max transmit frag size, bytes */
-       uint16 max_recv_frag;     /* 18:02 max receive  frag size, bytes */
+       UINT16 max_xmit_frag;     /* 16:02 max transmit frag size, bytes */
+       UINT16 max_recv_frag;     /* 18:02 max receive  frag size, bytes */
        uint32 assoc_group_id;    /* 20:04 incarnation of client-server
                                                                                                                * assoc group */
        /* presentation context list */
@@ -266,26 +266,26 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;       /* 00:01 RPC version */
-       uint8  rpc_vers_minor ;    /* 01:01 minor version */
-       uint8  PTYPE;   /* 02:01 bind ack PDU */
-       uint8  pfc_flags;          /* 03:01 flags */
-       uint8    packed_drep[4];     /* 04:04 NDR data rep format label*/
-       uint16 frag_length;        /* 08:02 total length of fragment */
-       uint16 auth_length;        /* 10:02 length of auth_value */
+       BYTE  rpc_vers;       /* 00:01 RPC version */
+       BYTE  rpc_vers_minor ;    /* 01:01 minor version */
+       BYTE  PTYPE;   /* 02:01 bind ack PDU */
+       BYTE  pfc_flags;          /* 03:01 flags */
+       BYTE    packed_drep[4];     /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;        /* 08:02 total length of fragment */
+       UINT16 auth_length;        /* 10:02 length of auth_value */
        uint32  call_id;           /* 12:04 call identifier */
 
        /* end common fields */
 
-       uint16 max_xmit_frag;      /* 16:02 max transmit frag size */
-       uint16 max_recv_frag;      /* 18:02 max receive  frag size */
+       UINT16 max_xmit_frag;      /* 16:02 max transmit frag size */
+       UINT16 max_recv_frag;      /* 18:02 max receive  frag size */
        uint32 assoc_group_id;     /* 20:04 returned assoc_group_id */
        port_any_t sec_addr;        /* 24:yy optional secondary address
                                                                 * for process incarnation; local port
                                                                 * part of address only */
        /* restore 4-octet alignment */
 
-       uint8* pad2; /* size_is(align(4)) */
+       BYTE* pad2; /* size_is(align(4)) */
 
        /* presentation context result list, including hints */
 
@@ -301,19 +301,19 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;       /* 00:01 RPC version */
-       uint8  rpc_vers_minor ;    /* 01:01 minor version */
-       uint8  PTYPE;   /* 02:01 bind ack PDU */
-       uint8  pfc_flags;          /* 03:01 flags */
-       uint8    packed_drep[4];     /* 04:04 NDR data rep format label*/
-       uint16 frag_length;        /* 08:02 total length of fragment */
-       uint16 auth_length;        /* 10:02 length of auth_value */
+       BYTE  rpc_vers;       /* 00:01 RPC version */
+       BYTE  rpc_vers_minor ;    /* 01:01 minor version */
+       BYTE  PTYPE;   /* 02:01 bind ack PDU */
+       BYTE  pfc_flags;          /* 03:01 flags */
+       BYTE    packed_drep[4];     /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;        /* 08:02 total length of fragment */
+       UINT16 auth_length;        /* 10:02 length of auth_value */
        uint32  call_id;           /* 12:04 call identifier */
 
        /* end common fields */
 
-       uint16 max_xmit_frag;      /* 16:02 max transmit frag size */
-       uint16 max_recv_frag;      /* 18:02 max receive  frag size */
+       UINT16 max_xmit_frag;      /* 16:02 max transmit frag size */
+       UINT16 max_recv_frag;      /* 18:02 max receive  frag size */
 
        /* optional authentication verifier */
        /* following fields present iff auth_length != 0 */
@@ -325,18 +325,18 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;       /* 00:01 RPC version */
-       uint8  rpc_vers_minor ;    /* 01:01 minor version */
-       uint8  PTYPE;   /* 02:01 bind nak PDU */
-       uint8  pfc_flags;          /* 03:01 flags */
-       uint8    packed_drep[4];     /* 04:04 NDR data rep format label*/
-       uint16 frag_length;        /* 08:02 total length of fragment */
-       uint16 auth_length;        /* 10:02 length of auth_value */
+       BYTE  rpc_vers;       /* 00:01 RPC version */
+       BYTE  rpc_vers_minor ;    /* 01:01 minor version */
+       BYTE  PTYPE;   /* 02:01 bind nak PDU */
+       BYTE  pfc_flags;          /* 03:01 flags */
+       BYTE    packed_drep[4];     /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;        /* 08:02 total length of fragment */
+       UINT16 auth_length;        /* 10:02 length of auth_value */
        uint32  call_id;           /* 12:04 call identifier */
 
        /* end common fields */
 
-       /*p_reject_reason_t*/uint16 provider_reject_reason; /* 16:02 presentation (TODO search definition of p_reject_reason_t)
+       /*p_reject_reason_t*/UINT16 provider_reject_reason; /* 16:02 presentation (TODO search definition of p_reject_reason_t)
                                                                                                  context reject */
 
        p_rt_versions_supported_t versions; /* 18:yy array of protocol
@@ -348,13 +348,13 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;        /* 00:01 RPC version */
-       uint8  rpc_vers_minor;       /* 01:01 minor version */
-       uint8  PTYPE;    /* 02:01 CO cancel PDU */
-       uint8  pfc_flags;            /* 03:01 flags */
-       uint8    packed_drep[4];       /* 04:04 NDR data rep format label*/
-       uint16 frag_length;          /* 08:02 total length of fragment */
-       uint16 auth_length;          /* 10:02 length of auth_value */
+       BYTE  rpc_vers;        /* 00:01 RPC version */
+       BYTE  rpc_vers_minor;       /* 01:01 minor version */
+       BYTE  PTYPE;    /* 02:01 CO cancel PDU */
+       BYTE  pfc_flags;            /* 03:01 flags */
+       BYTE    packed_drep[4];       /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;          /* 08:02 total length of fragment */
+       UINT16 auth_length;          /* 10:02 length of auth_value */
        uint32  call_id;             /* 12:04 call identifier */
 
        /* end common fields */
@@ -370,13 +370,13 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;        /* 00:01 RPC version */
-       uint8  rpc_vers_minor;      /* 01:01 minor version */
-       uint8  PTYPE;       /* 02:01 fault PDU */
-       uint8  pfc_flags;           /* 03:01 flags */
-       uint8   packed_drep[4];      /* 04:04 NDR data rep format label*/
-       uint16 frag_length;         /* 08:02 total length of fragment */
-       uint16 auth_length;         /* 10:02 length of auth_value */
+       BYTE  rpc_vers;        /* 00:01 RPC version */
+       BYTE  rpc_vers_minor;      /* 01:01 minor version */
+       BYTE  PTYPE;       /* 02:01 fault PDU */
+       BYTE  pfc_flags;           /* 03:01 flags */
+       BYTE   packed_drep[4];      /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;         /* 08:02 total length of fragment */
+       UINT16 auth_length;         /* 10:02 length of auth_value */
        uint32  call_id;            /* 12:04 call identifier */
 
        /* end common fields */
@@ -388,8 +388,8 @@ typedef struct {
 
        /* needed for response or fault */
 
-       uint8  cancel_count;      /* 22:01 received cancel count */
-       uint8  reserved;         /* 23:01 reserved, m.b.z. */
+       BYTE  cancel_count;      /* 22:01 received cancel count */
+       BYTE  reserved;         /* 23:01 reserved, m.b.z. */
 
        /* fault code  */
 
@@ -397,13 +397,13 @@ typedef struct {
 
        /* always pad to next 8-octet boundary */
 
-       uint8  reserved2[4];     /* 28:04 reserved padding, m.b.z. */
+       BYTE  reserved2[4];     /* 28:04 reserved padding, m.b.z. */
 
        /* stub data here, 8-octet aligned
                   .
                   .
                   .                          */
-       uint8* stub_data;
+       BYTE* stub_data;
 
        /* optional authentication verifier */
        /* following fields present iff auth_length != 0 */
@@ -416,13 +416,13 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;        /* 00:01 RPC version */
-       uint8  rpc_vers_minor;      /* 01:01 minor version */
-       uint8  PTYPE;    /* 02:01 orphaned PDU */
-       uint8  pfc_flags;           /* 03:01 flags */
-       uint8  packed_drep[4];      /* 04:04 NDR data rep format label*/
-       uint16 frag_length;         /* 08:02 total length of fragment */
-       uint16 auth_length;         /* 10:02 length of auth_value */
+       BYTE  rpc_vers;        /* 00:01 RPC version */
+       BYTE  rpc_vers_minor;      /* 01:01 minor version */
+       BYTE  PTYPE;    /* 02:01 orphaned PDU */
+       BYTE  pfc_flags;           /* 03:01 flags */
+       BYTE  packed_drep[4];      /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;         /* 08:02 total length of fragment */
+       UINT16 auth_length;         /* 10:02 length of auth_value */
        uint32  call_id;            /* 12:04 call identifier */
 
        /* end common fields */
@@ -438,13 +438,13 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;       /* 00:01 RPC version */
-       uint8  rpc_vers_minor;     /* 01:01 minor version */
-       uint8  PTYPE;   /* 02:01 request PDU */
-       uint8  pfc_flags;          /* 03:01 flags */
-       uint8  packed_drep[4];     /* 04:04 NDR data rep format label*/
-       uint16 frag_length;        /* 08:02 total length of fragment */
-       uint16 auth_length;        /* 10:02 length of auth_value */
+       BYTE  rpc_vers;       /* 00:01 RPC version */
+       BYTE  rpc_vers_minor;     /* 01:01 minor version */
+       BYTE  PTYPE;   /* 02:01 request PDU */
+       BYTE  pfc_flags;          /* 03:01 flags */
+       BYTE  packed_drep[4];     /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;        /* 08:02 total length of fragment */
+       UINT16 auth_length;        /* 10:02 length of auth_value */
        uint32  call_id;           /* 12:04 call identifier */
 
        /* end common fields */
@@ -453,7 +453,7 @@ typedef struct {
 
        uint32  alloc_hint;        /* 16:04 allocation hint */
        p_context_id_t p_cont_id;  /* 20:02 pres context, i.e. data rep */
-       uint16 opnum;              /* 22:02 operation #
+       UINT16 opnum;              /* 22:02 operation #
                                                                 * within the interface */
 
        /* optional field for request, only present if the PFC_OBJECT_UUID
@@ -465,7 +465,7 @@ typedef struct {
                           .
                           .
                           .                 */
-       uint8* stub_data;
+       BYTE* stub_data;
 
        /* optional authentication verifier */
        /* following fields present iff auth_length != 0 */
@@ -477,13 +477,13 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;        /* 00:01 RPC version */
-       uint8  rpc_vers_minor;      /* 01:01 minor version */
-       uint8  PTYPE;    /* 02:01 response PDU */
-       uint8  pfc_flags;           /* 03:01 flags */
-       uint8  packed_drep[4];      /* 04:04 NDR data rep format label*/
-       uint16 frag_length;         /* 08:02 total length of fragment */
-       uint16 auth_length;         /* 10:02 length of auth_value */
+       BYTE  rpc_vers;        /* 00:01 RPC version */
+       BYTE  rpc_vers_minor;      /* 01:01 minor version */
+       BYTE  PTYPE;    /* 02:01 response PDU */
+       BYTE  pfc_flags;           /* 03:01 flags */
+       BYTE  packed_drep[4];      /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;         /* 08:02 total length of fragment */
+       UINT16 auth_length;         /* 10:02 length of auth_value */
        uint32 call_id;             /* 12:04 call identifier */
 
        /* end common fields */
@@ -496,14 +496,14 @@ typedef struct {
 
        /* needed for response or fault */
 
-       uint8  cancel_count;        /* 22:01 cancel count */
-       uint8  reserved;            /* 23:01 reserved, m.b.z. */
+       BYTE  cancel_count;        /* 22:01 cancel count */
+       BYTE  reserved;            /* 23:01 reserved, m.b.z. */
 
        /* stub data here, 8-octet aligned
           .
           .
           .                          */
-       uint8* stub_data;
+       BYTE* stub_data;
 
        /* optional authentication verifier */
        /* following fields present iff auth_length != 0 */
@@ -516,13 +516,13 @@ typedef struct {
        /* start 8-octet aligned */
 
        /* common fields */
-       uint8  rpc_vers;        /* 00:01 RPC version */
-       uint8  rpc_vers_minor;      /* 01:01 minor version */
-       uint8  PTYPE;   /* 02:01 shutdown PDU */
-       uint8  pfc_flags;           /* 03:01 flags */
-       uint8  packed_drep[4];      /* 04:04 NDR data rep format label*/
-       uint16 frag_length;         /* 08:02 total length of fragment */
-       uint16 auth_length;         /* 10:02 */
+       BYTE  rpc_vers;        /* 00:01 RPC version */
+       BYTE  rpc_vers_minor;      /* 01:01 minor version */
+       BYTE  PTYPE;   /* 02:01 shutdown PDU */
+       BYTE  pfc_flags;           /* 03:01 flags */
+       BYTE  packed_drep[4];      /* 04:04 NDR data rep format label*/
+       UINT16 frag_length;         /* 08:02 total length of fragment */
+       UINT16 auth_length;         /* 10:02 */
        uint32  call_id;            /* 12:04 call identifier */
 
        /* end common fields */
@@ -621,17 +621,17 @@ typedef enum _VIRTUAL_CONNECTION_STATE VIRTUAL_CONNECTION_STATE;
 
 struct rpc_virtual_connection
 {
-       uint8 Cookie[16]; /* Virtual Connection Cookie */
+       BYTE Cookie[16]; /* Virtual Connection Cookie */
        VIRTUAL_CONNECTION_STATE State; /* Virtual Connection State */
        RpcInChannel* DefaultInChannel; /* Default IN Channel */
        RpcInChannel* NonDefaultInChannel; /* Non-Default IN Channel */
-       uint8 DefaultInChannelCookie[16]; /* Default IN Channel Cookie */
-       uint8 NonDefaultInChannelCookie[16]; /* Non-Default Default IN Channel Cookie */
+       BYTE DefaultInChannelCookie[16]; /* Default IN Channel Cookie */
+       BYTE NonDefaultInChannelCookie[16]; /* Non-Default Default IN Channel Cookie */
        RpcOutChannel* DefaultOutChannel; /* Default OUT Channel */
        RpcOutChannel* NonDefaultOutChannel; /* Non-Default OUT Channel */
-       uint8 DefaultOutChannelCookie[16]; /* Default OUT Channel Cookie */
-       uint8 NonDefaultOutChannelCookie[16]; /* Non-Default Default OUT Channel Cookie */
-       uint8 AssociationGroupId[16]; /* AssociationGroupId */
+       BYTE DefaultOutChannelCookie[16]; /* Default OUT Channel Cookie */
+       BYTE NonDefaultOutChannelCookie[16]; /* Non-Default Default OUT Channel Cookie */
+       BYTE AssociationGroupId[16]; /* AssociationGroupId */
 };
 typedef struct rpc_virtual_connection RpcVirtualConnection;
 
@@ -649,9 +649,9 @@ struct rdp_rpc
        rdpSettings* settings;
        rdpTransport* transport;
 
-       uint8* write_buffer;
+       BYTE* write_buffer;
        uint32 write_buffer_len;
-       uint8* read_buffer;
+       BYTE* read_buffer;
        uint32 read_buffer_len;
 
        uint32 call_id;
@@ -677,13 +677,13 @@ BOOL rpc_ntlm_http_in_connect(rdpRpc* rpc);
 
 void rpc_pdu_header_read(STREAM* s, RPC_PDU_HEADER* header);
 
-int rpc_out_write(rdpRpc* rpc, uint8* data, int length);
-int rpc_in_write(rdpRpc* rpc, uint8* data, int length);
+int rpc_out_write(rdpRpc* rpc, BYTE* data, int length);
+int rpc_in_write(rdpRpc* rpc, BYTE* data, int length);
 
-int rpc_out_read(rdpRpc* rpc, uint8* data, int length);
+int rpc_out_read(rdpRpc* rpc, BYTE* data, int length);
 
-int rpc_tsg_write(rdpRpc* rpc, uint8* data, int length, uint16 opnum);
-int rpc_read(rdpRpc* rpc, uint8* data, int length);
+int rpc_tsg_write(rdpRpc* rpc, BYTE* data, int length, UINT16 opnum);
+int rpc_read(rdpRpc* rpc, BYTE* data, int length);
 
 rdpRpc* rpc_new(rdpTransport* transport);
 void rpc_free(rdpRpc* rpc);
index edb3aa6..d3e2af3 100644 (file)
@@ -124,36 +124,36 @@ static const char* const RTS_CMD_STRINGS[] =
 
 void rts_pdu_header_read(STREAM* s, RTS_PDU_HEADER* header)
 {
-       stream_read_uint8(s, header->rpc_vers); /* rpc_vers (1 byte) */
-       stream_read_uint8(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */
-       stream_read_uint8(s, header->ptype); /* PTYPE (1 byte) */
-       stream_read_uint8(s, header->pfc_flags); /* pfc_flags (1 byte) */
-       stream_read_uint8(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */
-       stream_read_uint8(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */
-       stream_read_uint8(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */
-       stream_read_uint8(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */
-       stream_read_uint16(s, header->frag_length); /* frag_length (2 bytes) */
-       stream_read_uint16(s, header->auth_length); /* auth_length (2 bytes) */
+       stream_read_BYTE(s, header->rpc_vers); /* rpc_vers (1 byte) */
+       stream_read_BYTE(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */
+       stream_read_BYTE(s, header->ptype); /* PTYPE (1 byte) */
+       stream_read_BYTE(s, header->pfc_flags); /* pfc_flags (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */
+       stream_read_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */
+       stream_read_UINT16(s, header->frag_length); /* frag_length (2 bytes) */
+       stream_read_UINT16(s, header->auth_length); /* auth_length (2 bytes) */
        stream_read_uint32(s, header->call_id); /* call_id (4 bytes) */
-       stream_read_uint16(s, header->flags); /* flags (2 bytes) */
-       stream_read_uint16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */
+       stream_read_UINT16(s, header->flags); /* flags (2 bytes) */
+       stream_read_UINT16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */
 }
 
 void rts_pdu_header_write(STREAM* s, RTS_PDU_HEADER* header)
 {
-       stream_write_uint8(s, header->rpc_vers); /* rpc_vers (1 byte) */
-       stream_write_uint8(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */
-       stream_write_uint8(s, header->ptype); /* PTYPE (1 byte) */
-       stream_write_uint8(s, header->pfc_flags); /* pfc_flags (1 byte) */
-       stream_write_uint8(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */
-       stream_write_uint8(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */
-       stream_write_uint8(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */
-       stream_write_uint8(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */
-       stream_write_uint16(s, header->frag_length); /* frag_length (2 bytes) */
-       stream_write_uint16(s, header->auth_length); /* auth_length (2 bytes) */
+       stream_write_BYTE(s, header->rpc_vers); /* rpc_vers (1 byte) */
+       stream_write_BYTE(s, header->rpc_vers_minor); /* rpc_vers_minor (1 byte) */
+       stream_write_BYTE(s, header->ptype); /* PTYPE (1 byte) */
+       stream_write_BYTE(s, header->pfc_flags); /* pfc_flags (1 byte) */
+       stream_write_BYTE(s, header->packed_drep[0]); /* packet_drep[0] (1 byte) */
+       stream_write_BYTE(s, header->packed_drep[1]); /* packet_drep[1] (1 byte) */
+       stream_write_BYTE(s, header->packed_drep[2]); /* packet_drep[2] (1 byte) */
+       stream_write_BYTE(s, header->packed_drep[3]); /* packet_drep[3] (1 byte) */
+       stream_write_UINT16(s, header->frag_length); /* frag_length (2 bytes) */
+       stream_write_UINT16(s, header->auth_length); /* auth_length (2 bytes) */
        stream_write_uint32(s, header->call_id); /* call_id (4 bytes) */
-       stream_write_uint16(s, header->flags); /* flags (2 bytes) */
-       stream_write_uint16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */
+       stream_write_UINT16(s, header->flags); /* flags (2 bytes) */
+       stream_write_UINT16(s, header->numberOfCommands); /* numberOfCommands (2 bytes) */
 }
 
 void rts_receive_window_size_command_read(rdpRpc* rpc, STREAM* s)
@@ -175,7 +175,7 @@ void rts_flow_control_ack_command_read(rdpRpc* rpc, STREAM* s)
        stream_seek(s, 16); /* ChannelCookie (16 bytes) */
 }
 
-void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, uint8* ChannelCookie)
+void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, BYTE* ChannelCookie)
 {
        stream_write_uint32(s, RTS_CMD_FLOW_CONTROL_ACK); /* CommandType (4 bytes) */
 
@@ -201,7 +201,7 @@ void rts_cookie_command_read(rdpRpc* rpc, STREAM* s)
        stream_seek(s, 16); /* Cookie (16 bytes) */
 }
 
-void rts_cookie_command_write(STREAM* s, uint8* Cookie)
+void rts_cookie_command_write(STREAM* s, BYTE* Cookie)
 {
        stream_write_uint32(s, RTS_CMD_COOKIE); /* CommandType (4 bytes) */
        stream_write(s, Cookie, 16); /* Cookie (16 bytes) */
@@ -302,7 +302,7 @@ void rts_client_address_command_read(rdpRpc* rpc, STREAM* s)
        stream_seek(s, 12); /* padding (12 bytes) */
 }
 
-void rts_client_address_command_write(STREAM* s, uint32 AddressType, uint8* ClientAddress)
+void rts_client_address_command_write(STREAM* s, uint32 AddressType, BYTE* ClientAddress)
 {
        stream_write_uint32(s, RTS_CMD_CLIENT_ADDRESS); /* CommandType (4 bytes) */
        stream_write_uint32(s, AddressType); /* AddressType (4 bytes) */
@@ -324,7 +324,7 @@ void rts_association_group_id_command_read(rdpRpc* rpc, STREAM* s)
        stream_seek(s, 16); /* AssociationGroupId (16 bytes) */
 }
 
-void rts_association_group_id_command_write(STREAM* s, uint8* associationGroupId)
+void rts_association_group_id_command_write(STREAM* s, BYTE* associationGroupId)
 {
        stream_write_uint32(s, RTS_CMD_ASSOCIATION_GROUP_ID); /* CommandType (4 bytes) */
        stream_write(s, associationGroupId, 16); /* AssociationGroupId (16 bytes) */
@@ -352,7 +352,7 @@ void rts_ping_traffic_sent_notify_command_write(STREAM* s, uint32 PingTrafficSen
        stream_write_uint32(s, PingTrafficSent); /* PingTrafficSent (4 bytes) */
 }
 
-void rpc_generate_cookie(uint8* cookie)
+void rpc_generate_cookie(BYTE* cookie)
 {
        RAND_pseudo_bytes(cookie, 16);
 }
@@ -362,8 +362,8 @@ BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc)
        STREAM* s;
        RTS_PDU_HEADER header;
        uint32 ReceiveWindowSize;
-       uint8* OUTChannelCookie;
-       uint8* VirtualConnectionCookie;
+       BYTE* OUTChannelCookie;
+       BYTE* VirtualConnectionCookie;
 
        header.rpc_vers = 5;
        header.rpc_vers_minor = 0;
@@ -383,11 +383,11 @@ BOOL rts_send_CONN_A1_pdu(rdpRpc* rpc)
 
        s = stream_new(header.frag_length);
 
-       rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->Cookie));
-       rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->DefaultOutChannelCookie));
+       rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->Cookie));
+       rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->DefaultOutChannelCookie));
 
-       VirtualConnectionCookie = (uint8*) &(rpc->VirtualConnection->Cookie);
-       OUTChannelCookie = (uint8*) &(rpc->VirtualConnection->DefaultOutChannelCookie);
+       VirtualConnectionCookie = (BYTE*) &(rpc->VirtualConnection->Cookie);
+       OUTChannelCookie = (BYTE*) &(rpc->VirtualConnection->DefaultOutChannelCookie);
        ReceiveWindowSize = rpc->VirtualConnection->DefaultOutChannel->ReceiveWindow;
 
        rts_pdu_header_write(s, &header); /* RTS Header (20 bytes) */
@@ -408,9 +408,9 @@ BOOL rts_send_CONN_B1_pdu(rdpRpc* rpc)
 {
        STREAM* s;
        RTS_PDU_HEADER header;
-       uint8* INChannelCookie;
-       uint8* AssociationGroupId;
-       uint8* VirtualConnectionCookie;
+       BYTE* INChannelCookie;
+       BYTE* AssociationGroupId;
+       BYTE* VirtualConnectionCookie;
 
        header.rpc_vers = 5;
        header.rpc_vers_minor = 0;
@@ -430,12 +430,12 @@ BOOL rts_send_CONN_B1_pdu(rdpRpc* rpc)
 
        s = stream_new(header.frag_length);
 
-       rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->DefaultInChannelCookie));
-       rpc_generate_cookie((uint8*) &(rpc->VirtualConnection->AssociationGroupId));
+       rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->DefaultInChannelCookie));
+       rpc_generate_cookie((BYTE*) &(rpc->VirtualConnection->AssociationGroupId));
 
-       VirtualConnectionCookie = (uint8*) &(rpc->VirtualConnection->Cookie);
-       INChannelCookie = (uint8*) &(rpc->VirtualConnection->DefaultInChannelCookie);
-       AssociationGroupId = (uint8*) &(rpc->VirtualConnection->AssociationGroupId);
+       VirtualConnectionCookie = (BYTE*) &(rpc->VirtualConnection->Cookie);
+       INChannelCookie = (BYTE*) &(rpc->VirtualConnection->DefaultInChannelCookie);
+       AssociationGroupId = (BYTE*) &(rpc->VirtualConnection->AssociationGroupId);
 
        rts_pdu_header_write(s, &header); /* RTS Header (20 bytes) */
        rts_version_command_write(s); /* Version (8 bytes) */
@@ -492,7 +492,7 @@ BOOL rts_send_flow_control_ack_pdu(rdpRpc* rpc)
        RTS_PDU_HEADER header;
        uint32 BytesReceived;
        uint32 AvailableWindow;
-       uint8* ChannelCookie;
+       BYTE* ChannelCookie;
 
        header.rpc_vers = 5;
        header.rpc_vers_minor = 0;
@@ -512,7 +512,7 @@ BOOL rts_send_flow_control_ack_pdu(rdpRpc* rpc)
 
        BytesReceived = rpc->VirtualConnection->DefaultOutChannel->BytesReceived;
        AvailableWindow = rpc->VirtualConnection->DefaultOutChannel->ReceiverAvailableWindow;
-       ChannelCookie = (uint8*) &(rpc->VirtualConnection->DefaultOutChannelCookie);
+       ChannelCookie = (BYTE*) &(rpc->VirtualConnection->DefaultOutChannelCookie);
 
        s = stream_new(header.frag_length);
        rts_pdu_header_write(s, &header); /* RTS Header (20 bytes) */
@@ -667,11 +667,11 @@ int rts_recv_pdu(rdpRpc* rpc, RTS_PDU* rts_pdu)
        STREAM* s;
        int status;
        int length;
-       uint8 header_buffer[20];
+       BYTE header_buffer[20];
        rdpTls* tls_out = rpc->tls_out;
 
        /* read first 20 bytes to get RTS PDU Header */
-       status = tls_read(tls_out, (uint8*) &header_buffer, 20);
+       status = tls_read(tls_out, (BYTE*) &header_buffer, 20);
 
        if (status <= 0)
        {
@@ -688,7 +688,7 @@ int rts_recv_pdu(rdpRpc* rpc, RTS_PDU* rts_pdu)
        stream_free(s);
 
        length = rts_pdu->header.frag_length - 20;
-       rts_pdu->content = (uint8*) malloc(length);
+       rts_pdu->content = (BYTE*) malloc(length);
 
        status = tls_read(tls_out, rts_pdu->content, length);
 
index b162dbe..8b2df48 100644 (file)
 
 struct _rts_pdu_header
 {
-       uint8 rpc_vers;
-       uint8 rpc_vers_minor;
-       uint8 ptype;
-       uint8 pfc_flags;
-       uint8 packed_drep[4];
-       uint16 frag_length;
-       uint16 auth_length;
+       BYTE rpc_vers;
+       BYTE rpc_vers_minor;
+       BYTE ptype;
+       BYTE pfc_flags;
+       BYTE packed_drep[4];
+       UINT16 frag_length;
+       UINT16 auth_length;
        uint32 call_id;
-       uint16 flags;
-       uint16 numberOfCommands;
+       UINT16 flags;
+       UINT16 numberOfCommands;
 };
 typedef struct _rts_pdu_header RTS_PDU_HEADER;
 
 struct _rts_pdu
 {
        RTS_PDU_HEADER header;
-       uint8* content;
+       BYTE* content;
 };
 typedef struct _rts_pdu RTS_PDU;
 
@@ -121,11 +121,11 @@ void rts_pdu_header_write(STREAM* s, RTS_PDU_HEADER* header);
 void rts_receive_window_size_command_read(rdpRpc* rpc, STREAM* s);
 void rts_receive_window_size_command_write(STREAM* s, uint32 ReceiveWindowSize);
 void rts_flow_control_ack_command_read(rdpRpc* rpc, STREAM* s);
-void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, uint8* ChannelCookie);
+void rts_flow_control_ack_command_write(STREAM* s, uint32 BytesReceived, uint32 AvailableWindow, BYTE* ChannelCookie);
 void rts_connection_timeout_command_read(rdpRpc* rpc, STREAM* s);
 void rts_connection_timeout_command_write(STREAM* s, uint32 ConnectionTimeout);
 void rts_cookie_command_read(rdpRpc* rpc, STREAM* s);
-void rts_cookie_command_write(STREAM* s, uint8* Cookie);
+void rts_cookie_command_write(STREAM* s, BYTE* Cookie);
 void rts_channel_lifetime_command_read(rdpRpc* rpc, STREAM* s);
 void rts_channel_lifetime_command_write(STREAM* s, uint32 ChannelLifetime);
 void rts_client_keepalive_command_read(rdpRpc* rpc, STREAM* s);
@@ -141,9 +141,9 @@ void rts_negative_ance_command_write(STREAM* s);
 void rts_ance_command_read(rdpRpc* rpc, STREAM* s);
 void rts_ance_command_write(STREAM* s);
 void rts_client_address_command_read(rdpRpc* rpc, STREAM* s);
-void rts_client_address_command_write(STREAM* s, uint32 AddressType, uint8* ClientAddress);
+void rts_client_address_command_write(STREAM* s, uint32 AddressType, BYTE* ClientAddress);
 void rts_association_group_id_command_read(rdpRpc* rpc, STREAM* s);
-void rts_association_group_id_command_write(STREAM* s, uint8* AssociationGroupId);
+void rts_association_group_id_command_write(STREAM* s, BYTE* AssociationGroupId);
 void rts_destination_command_read(rdpRpc* rpc, STREAM* s);
 void rts_destination_command_write(STREAM* s, uint32 Destination);
 void rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc, STREAM* s);
index 8c7bf4c..7e810aa 100644 (file)
@@ -24,7 +24,7 @@
 #include "security.h"
 
 /* 0x36 repeated 40 times */
-static const uint8 pad1[40] =
+static const BYTE pad1[40] =
 {
        "\x36\x36\x36\x36\x36\x36\x36\x36"
        "\x36\x36\x36\x36\x36\x36\x36\x36"
@@ -34,7 +34,7 @@ static const uint8 pad1[40] =
 };
 
 /* 0x5C repeated 48 times */
-static const uint8 pad2[48] =
+static const BYTE pad2[48] =
 {
        "\x5C\x5C\x5C\x5C\x5C\x5C\x5C\x5C"
        "\x5C\x5C\x5C\x5C\x5C\x5C\x5C\x5C"
@@ -44,7 +44,7 @@ static const uint8 pad2[48] =
        "\x5C\x5C\x5C\x5C\x5C\x5C\x5C\x5C"
 };
 
-static const uint8
+static const BYTE
 fips_reverse_table[256] =
 {
        0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
@@ -81,7 +81,7 @@ fips_reverse_table[256] =
        0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
 };
 
-static const uint8
+static const BYTE
 fips_oddparity_table[256] =
 {
        0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x07, 0x07,
@@ -118,11 +118,11 @@ fips_oddparity_table[256] =
        0xf8, 0xf8, 0xfb, 0xfb, 0xfd, 0xfd, 0xfe, 0xfe
 };
 
-static void security_salted_hash(uint8* salt, uint8* input, int length, uint8* salt1, uint8* salt2, uint8* output)
+static void security_salted_hash(BYTE* salt, BYTE* input, int length, BYTE* salt1, BYTE* salt2, BYTE* output)
 {
        CryptoMd5 md5;
        CryptoSha1 sha1;
-       uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
+       BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
 
        /* SaltedHash(Salt, Input, Salt1, Salt2) = MD5(S + SHA1(Input + Salt + Salt1 + Salt2)) */
 
@@ -141,13 +141,13 @@ static void security_salted_hash(uint8* salt, uint8* input, int length, uint8* s
        crypto_md5_final(md5, output);
 }
 
-static void security_premaster_hash(char* input, int length, uint8* premaster_secret, uint8* client_random, uint8* server_random, uint8* output)
+static void security_premaster_hash(char* input, int length, BYTE* premaster_secret, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        /* PremasterHash(Input) = SaltedHash(PremasterSecret, Input, ClientRandom, ServerRandom) */
-       security_salted_hash(premaster_secret, (uint8*)input, length, client_random, server_random, output);
+       security_salted_hash(premaster_secret, (BYTE*)input, length, client_random, server_random, output);
 }
 
-void security_master_secret(uint8* premaster_secret, uint8* client_random, uint8* server_random, uint8* output)
+void security_master_secret(BYTE* premaster_secret, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        /* MasterSecret = PremasterHash('A') + PremasterHash('BB') + PremasterHash('CCC') */
        security_premaster_hash("A", 1, premaster_secret, client_random, server_random, &output[0]);
@@ -155,13 +155,13 @@ void security_master_secret(uint8* premaster_secret, uint8* client_random, uint8
        security_premaster_hash("CCC", 3, premaster_secret, client_random, server_random, &output[32]);
 }
 
-static void security_master_hash(char* input, int length, uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output)
+static void security_master_hash(char* input, int length, BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        /* MasterHash(Input) = SaltedHash(MasterSecret, Input, ServerRandom, ClientRandom) */
-       security_salted_hash(master_secret, (uint8*)input, length, server_random, client_random, output);
+       security_salted_hash(master_secret, (BYTE*)input, length, server_random, client_random, output);
 }
 
-void security_session_key_blob(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output)
+void security_session_key_blob(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        /* MasterHash = MasterHash('A') + MasterHash('BB') + MasterHash('CCC') */
        security_master_hash("A", 1, master_secret, client_random, server_random, &output[0]);
@@ -169,13 +169,13 @@ void security_session_key_blob(uint8* master_secret, uint8* client_random, uint8
        security_master_hash("CCC", 3, master_secret, client_random, server_random, &output[32]);
 }
 
-void security_mac_salt_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output)
+void security_mac_salt_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        /* MacSaltKey = First128Bits(SessionKeyBlob) */
        memcpy(output, session_key_blob, 16);
 }
 
-void security_md5_16_32_32(uint8* in0, uint8* in1, uint8* in2, uint8* output)
+void security_md5_16_32_32(BYTE* in0, BYTE* in1, BYTE* in2, BYTE* output)
 {
        CryptoMd5 md5;
 
@@ -186,13 +186,13 @@ void security_md5_16_32_32(uint8* in0, uint8* in1, uint8* in2, uint8* output)
        crypto_md5_final(md5, output);
 }
 
-void security_licensing_encryption_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output)
+void security_licensing_encryption_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        /* LicensingEncryptionKey = MD5(Second128Bits(SessionKeyBlob) + ClientRandom + ServerRandom)) */
        security_md5_16_32_32(&session_key_blob[16], client_random, server_random, output);
 }
 
-void security_uint32_le(uint8* output, uint32 value)
+void security_uint32_le(BYTE* output, uint32 value)
 {
        output[0] = (value) & 0xFF;
        output[1] = (value >> 8) & 0xFF;
@@ -200,12 +200,12 @@ void security_uint32_le(uint8* output, uint32 value)
        output[3] = (value >> 24) & 0xFF;
 }
 
-void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* output)
+void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* output)
 {
        CryptoMd5 md5;
        CryptoSha1 sha1;
-       uint8 length_le[4];
-       uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
+       BYTE length_le[4];
+       BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
 
        /* MacData = MD5(MacSaltKey + pad2 + SHA1(MacSaltKey + pad1 + length + data)) */
 
@@ -227,13 +227,13 @@ void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* o
        crypto_md5_final(md5, output);
 }
 
-void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* output)
+void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output)
 {
        CryptoMd5 md5;
        CryptoSha1 sha1;
-       uint8 length_le[4];
-       uint8 md5_digest[CRYPTO_MD5_DIGEST_LENGTH];
-       uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
+       BYTE length_le[4];
+       BYTE md5_digest[CRYPTO_MD5_DIGEST_LENGTH];
+       BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
 
        security_uint32_le(length_le, length); /* length must be little-endian */
 
@@ -255,14 +255,14 @@ void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* outp
        memcpy(output, md5_digest, 8);
 }
 
-void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL encryption, uint8* output)
+void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL encryption, BYTE* output)
 {
        CryptoMd5 md5;
        CryptoSha1 sha1;
-       uint8 length_le[4];
-       uint8 use_count_le[4];
-       uint8 md5_digest[CRYPTO_MD5_DIGEST_LENGTH];
-       uint8 sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
+       BYTE length_le[4];
+       BYTE use_count_le[4];
+       BYTE md5_digest[CRYPTO_MD5_DIGEST_LENGTH];
+       BYTE sha1_digest[CRYPTO_SHA1_DIGEST_LENGTH];
 
        security_uint32_le(length_le, length); /* length must be little-endian */
        if (encryption)
@@ -298,23 +298,23 @@ void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL
        memcpy(output, md5_digest, 8);
 }
 
-static void security_A(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output)
+static void security_A(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        security_premaster_hash("A", 1, master_secret, client_random, server_random, &output[0]);
        security_premaster_hash("BB", 2, master_secret, client_random, server_random, &output[16]);
        security_premaster_hash("CCC", 3, master_secret, client_random, server_random, &output[32]);
 }
 
-static void security_X(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output)
+static void security_X(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output)
 {
        security_premaster_hash("X", 1, master_secret, client_random, server_random, &output[0]);
        security_premaster_hash("YY", 2, master_secret, client_random, server_random, &output[16]);
        security_premaster_hash("ZZZ", 3, master_secret, client_random, server_random, &output[32]);
 }
 
-static void fips_expand_key_bits(uint8* in, uint8* out)
+static void fips_expand_key_bits(BYTE* in, BYTE* out)
 {
-       uint8 buf[21], c;
+       BYTE buf[21], c;
        int i, b, p, r;
 
        /* reverse every byte in the key */
@@ -345,13 +345,13 @@ static void fips_expand_key_bits(uint8* in, uint8* out)
                out[i] = fips_oddparity_table[fips_reverse_table[out[i]]];
 }
 
-BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp)
+BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp)
 {
-       uint8 pre_master_secret[48];
-       uint8 master_secret[48];
-       uint8 session_key_blob[48];
-       uint8* server_random;
-       uint8 salt40[] = { 0xD1, 0x26, 0x9E };
+       BYTE pre_master_secret[48];
+       BYTE master_secret[48];
+       BYTE session_key_blob[48];
+       BYTE* server_random;
+       BYTE salt40[] = { 0xD1, 0x26, 0x9E };
        rdpSettings* settings;
 
        settings = rdp->settings;
@@ -360,8 +360,8 @@ BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp)
        if (settings->encryption_method == ENCRYPTION_METHOD_FIPS)
        {
                CryptoSha1 sha1;
-               uint8 client_encrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1];
-               uint8 client_decrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1];
+               BYTE client_encrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1];
+               BYTE client_decrypt_key_t[CRYPTO_SHA1_DIGEST_LENGTH + 1];
 
                printf("FIPS Compliant encryption level.\n");
 
@@ -435,13 +435,13 @@ BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp)
        return TRUE;
 }
 
-BOOL security_key_update(uint8* key, uint8* update_key, int key_len)
+BOOL security_key_update(BYTE* key, BYTE* update_key, int key_len)
 {
-       uint8 sha1h[CRYPTO_SHA1_DIGEST_LENGTH];
+       BYTE sha1h[CRYPTO_SHA1_DIGEST_LENGTH];
        CryptoMd5 md5;
        CryptoSha1 sha1;
        CryptoRc4 rc4;
-       uint8 salt40[] = { 0xD1, 0x26, 0x9E };
+       BYTE salt40[] = { 0xD1, 0x26, 0x9E };
 
        sha1 = crypto_sha1_init();
        crypto_sha1_update(sha1, update_key, key_len);
@@ -465,7 +465,7 @@ BOOL security_key_update(uint8* key, uint8* update_key, int key_len)
        return TRUE;
 }
 
-BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp)
+BOOL security_encrypt(BYTE* data, int length, rdpRdp* rdp)
 {
        if (rdp->encrypt_use_count >= 4096)
        {
@@ -480,7 +480,7 @@ BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp)
        return TRUE;
 }
 
-BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp)
+BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp)
 {
        if (rdp->decrypt_use_count >= 4096)
        {
@@ -495,10 +495,10 @@ BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp)
        return TRUE;
 }
 
-void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp)
+void security_hmac_signature(BYTE* data, int length, BYTE* output, rdpRdp* rdp)
 {
-       uint8 buf[20];
-       uint8 use_count_le[4];
+       BYTE buf[20];
+       BYTE use_count_le[4];
 
        security_uint32_le(use_count_le, rdp->encrypt_use_count);
 
@@ -510,23 +510,23 @@ void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp
        memmove(output, buf, 8);
 }
 
-BOOL security_fips_encrypt(uint8* data, int length, rdpRdp* rdp)
+BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp)
 {
        crypto_des3_encrypt(rdp->fips_encrypt, length, data, data);
        rdp->encrypt_use_count++;
        return TRUE;
 }
 
-BOOL security_fips_decrypt(uint8* data, int length, rdpRdp* rdp)
+BOOL security_fips_decrypt(BYTE* data, int length, rdpRdp* rdp)
 {
        crypto_des3_decrypt(rdp->fips_decrypt, length, data, data);
        return TRUE;
 }
 
-BOOL security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp)
+BOOL security_fips_check_signature(BYTE* data, int length, BYTE* sig, rdpRdp* rdp)
 {
-       uint8 buf[20];
-       uint8 use_count_le[4];
+       BYTE buf[20];
+       BYTE use_count_le[4];
 
        security_uint32_le(use_count_le, rdp->decrypt_use_count);
 
index 8747d56..cca4fa7 100644 (file)
 #include <freerdp/freerdp.h>
 #include <freerdp/utils/stream.h>
 
-void security_master_secret(uint8* premaster_secret, uint8* client_random, uint8* server_random, uint8* output);
-void security_session_key_blob(uint8* master_secret, uint8* client_random, uint8* server_random, uint8* output);
-void security_mac_salt_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output);
-void security_licensing_encryption_key(uint8* session_key_blob, uint8* client_random, uint8* server_random, uint8* output);
-void security_mac_data(uint8* mac_salt_key, uint8* data, uint32 length, uint8* output);
-
-void security_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, uint8* output);
-void security_salted_mac_signature(rdpRdp *rdp, uint8* data, uint32 length, BOOL encryption, uint8* output);
-BOOL security_establish_keys(uint8* client_random, rdpRdp* rdp);
-
-BOOL security_encrypt(uint8* data, int length, rdpRdp* rdp);
-BOOL security_decrypt(uint8* data, int length, rdpRdp* rdp);
-
-void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp);
-BOOL security_fips_encrypt(uint8* data, int length, rdpRdp* rdp);
-BOOL security_fips_decrypt(uint8* data, int length, rdpRdp* rdp);
-BOOL security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp);
+void security_master_secret(BYTE* premaster_secret, BYTE* client_random, BYTE* server_random, BYTE* output);
+void security_session_key_blob(BYTE* master_secret, BYTE* client_random, BYTE* server_random, BYTE* output);
+void security_mac_salt_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output);
+void security_licensing_encryption_key(BYTE* session_key_blob, BYTE* client_random, BYTE* server_random, BYTE* output);
+void security_mac_data(BYTE* mac_salt_key, BYTE* data, uint32 length, BYTE* output);
+
+void security_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BYTE* output);
+void security_salted_mac_signature(rdpRdp *rdp, BYTE* data, uint32 length, BOOL encryption, BYTE* output);
+BOOL security_establish_keys(BYTE* client_random, rdpRdp* rdp);
+
+BOOL security_encrypt(BYTE* data, int length, rdpRdp* rdp);
+BOOL security_decrypt(BYTE* data, int length, rdpRdp* rdp);
+
+void security_hmac_signature(BYTE* data, int length, BYTE* output, rdpRdp* rdp);
+BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp);
+BOOL security_fips_decrypt(BYTE* data, int length, rdpRdp* rdp);
+BOOL security_fips_check_signature(BYTE* data, int length, BYTE* sig, rdpRdp* rdp);
 
 #endif /* __SECURITY_H */
index 8738fea..fe81d87 100644 (file)
@@ -30,15 +30,15 @@ static int update_recv_surfcmd_surface_bits(rdpUpdate* update, STREAM* s)
        int pos;
        SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command;
 
-       stream_read_uint16(s, cmd->destLeft);
-       stream_read_uint16(s, cmd->destTop);
-       stream_read_uint16(s, cmd->destRight);
-       stream_read_uint16(s, cmd->destBottom);
-       stream_read_uint8(s, cmd->bpp);
+       stream_read_UINT16(s, cmd->destLeft);
+       stream_read_UINT16(s, cmd->destTop);
+       stream_read_UINT16(s, cmd->destRight);
+       stream_read_UINT16(s, cmd->destBottom);
+       stream_read_BYTE(s, cmd->bpp);
        stream_seek(s, 2); /* reserved1, reserved2 */
-       stream_read_uint8(s, cmd->codecID);
-       stream_read_uint16(s, cmd->width);
-       stream_read_uint16(s, cmd->height);
+       stream_read_BYTE(s, cmd->codecID);
+       stream_read_UINT16(s, cmd->width);
+       stream_read_UINT16(s, cmd->height);
        stream_read_uint32(s, cmd->bitmapDataLength);
        pos = stream_get_pos(s) + cmd->bitmapDataLength;
        cmd->bitmapData = stream_get_tail(s);
@@ -63,7 +63,7 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s)
 {
        SURFACE_FRAME_MARKER* marker = &update->surface_frame_marker;
 
-       stream_read_uint16(s, marker->frameAction);
+       stream_read_UINT16(s, marker->frameAction);
        stream_read_uint32(s, marker->frameId);
 
        IFCALL(update->SurfaceFrameMarker, update->context, marker);
@@ -78,15 +78,15 @@ static int update_recv_surfcmd_frame_marker(rdpUpdate* update, STREAM* s)
 
 BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s)
 {
-       uint8* mark;
-       uint16 cmdType;
+       BYTE* mark;
+       UINT16 cmdType;
        uint32 cmdLength;
 
        while (size > 2)
        {
                stream_get_mark(s, mark);
 
-               stream_read_uint16(s, cmdType);
+               stream_read_UINT16(s, cmdType);
                size -= 2;
 
                switch (cmdType)
@@ -120,27 +120,27 @@ void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* c
 {
        stream_check_size(s, SURFCMD_SURFACE_BITS_HEADER_LENGTH);
 
-       stream_write_uint16(s, CMDTYPE_STREAM_SURFACE_BITS);
-
-       stream_write_uint16(s, cmd->destLeft);
-       stream_write_uint16(s, cmd->destTop);
-       stream_write_uint16(s, cmd->destRight);
-       stream_write_uint16(s, cmd->destBottom);
-       stream_write_uint8(s, cmd->bpp);
-       stream_write_uint16(s, 0); /* reserved1, reserved2 */
-       stream_write_uint8(s, cmd->codecID);
-       stream_write_uint16(s, cmd->width);
-       stream_write_uint16(s, cmd->height);
+       stream_write_UINT16(s, CMDTYPE_STREAM_SURFACE_BITS);
+
+       stream_write_UINT16(s, cmd->destLeft);
+       stream_write_UINT16(s, cmd->destTop);
+       stream_write_UINT16(s, cmd->destRight);
+       stream_write_UINT16(s, cmd->destBottom);
+       stream_write_BYTE(s, cmd->bpp);
+       stream_write_UINT16(s, 0); /* reserved1, reserved2 */
+       stream_write_BYTE(s, cmd->codecID);
+       stream_write_UINT16(s, cmd->width);
+       stream_write_UINT16(s, cmd->height);
        stream_write_uint32(s, cmd->bitmapDataLength);
 }
 
-void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId)
+void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, uint32 frameId)
 {
        stream_check_size(s, SURFCMD_FRAME_MARKER_LENGTH);
 
-       stream_write_uint16(s, CMDTYPE_FRAME_MARKER);
+       stream_write_UINT16(s, CMDTYPE_FRAME_MARKER);
 
-       stream_write_uint16(s, frameAction);
+       stream_write_UINT16(s, frameAction);
        stream_write_uint32(s, frameId);
 }
 
index 00c3433..3890e0f 100644 (file)
@@ -36,7 +36,7 @@ enum SURFCMD_CMDTYPE
 BOOL update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s);
 
 void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd);
-void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId);
+void update_write_surfcmd_frame_marker(STREAM* s, UINT16 frameAction, uint32 frameId);
 
 #endif /* __SURFACE */
 
index fe0a6e0..9be5cde 100644 (file)
@@ -61,7 +61,7 @@
 
 void tcp_get_ip_address(rdpTcp * tcp)
 {
-       uint8* ip;
+       BYTE* ip;
        socklen_t length;
        struct sockaddr_in sockaddr;
 
@@ -69,7 +69,7 @@ void tcp_get_ip_address(rdpTcp * tcp)
 
        if (getsockname(tcp->sockfd, (struct sockaddr*) &sockaddr, &length) == 0)
        {
-               ip = (uint8*) (&sockaddr.sin_addr);
+               ip = (BYTE*) (&sockaddr.sin_addr);
                snprintf(tcp->ip_address, sizeof(tcp->ip_address),
                         "%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);
        }
@@ -87,7 +87,7 @@ void tcp_get_ip_address(rdpTcp * tcp)
 void tcp_get_mac_address(rdpTcp * tcp)
 {
 #ifdef LINUX
-       uint8* mac;
+       BYTE* mac;
        struct ifreq if_req;
        struct if_nameindex* ni;
 
@@ -117,7 +117,7 @@ void tcp_get_mac_address(rdpTcp * tcp)
                mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); */
 }
 
-BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port)
+BOOL tcp_connect(rdpTcp* tcp, const char* hostname, UINT16 port)
 {
        uint32 option_value;
        socklen_t option_len;
@@ -160,12 +160,12 @@ BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port)
        return TRUE;
 }
 
-int tcp_read(rdpTcp* tcp, uint8* data, int length)
+int tcp_read(rdpTcp* tcp, BYTE* data, int length)
 {
        return freerdp_tcp_read(tcp->sockfd, data, length);
 }
 
-int tcp_write(rdpTcp* tcp, uint8* data, int length)
+int tcp_write(rdpTcp* tcp, BYTE* data, int length)
 {
        return freerdp_tcp_write(tcp->sockfd, data, length);
 }
index fbdb144..fe60278 100644 (file)
@@ -37,17 +37,17 @@ struct rdp_tcp
 {
        int sockfd;
        char ip_address[32];
-       uint8 mac_address[6];
+       BYTE mac_address[6];
        struct rdp_settings* settings;
 #ifdef _WIN32
        WSAEVENT wsa_event;
 #endif
 };
 
-BOOL tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port);
+BOOL tcp_connect(rdpTcp* tcp, const char* hostname, UINT16 port);
 BOOL tcp_disconnect(rdpTcp* tcp);
-int tcp_read(rdpTcp* tcp, uint8* data, int length);
-int tcp_write(rdpTcp* tcp, uint8* data, int length);
+int tcp_read(rdpTcp* tcp, BYTE* data, int length);
+int tcp_write(rdpTcp* tcp, BYTE* data, int length);
 BOOL tcp_set_blocking_mode(rdpTcp* tcp, BOOL blocking);
 BOOL tcp_set_keep_alive_mode(rdpTcp* tcp);
 
index 1844bed..5042ff4 100644 (file)
 
 void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time)
 {
-       stream_read_uint16(s, system_time->wYear); /* wYear, must be set to 0 */
-       stream_read_uint16(s, system_time->wMonth); /* wMonth */
-       stream_read_uint16(s, system_time->wDayOfWeek); /* wDayOfWeek */
-       stream_read_uint16(s, system_time->wDay); /* wDay */
-       stream_read_uint16(s, system_time->wHour); /* wHour */
-       stream_read_uint16(s, system_time->wMinute); /* wMinute */
-       stream_read_uint16(s, system_time->wSecond); /* wSecond */
-       stream_read_uint16(s, system_time->wMilliseconds); /* wMilliseconds */
+       stream_read_UINT16(s, system_time->wYear); /* wYear, must be set to 0 */
+       stream_read_UINT16(s, system_time->wMonth); /* wMonth */
+       stream_read_UINT16(s, system_time->wDayOfWeek); /* wDayOfWeek */
+       stream_read_UINT16(s, system_time->wDay); /* wDay */
+       stream_read_UINT16(s, system_time->wHour); /* wHour */
+       stream_read_UINT16(s, system_time->wMinute); /* wMinute */
+       stream_read_UINT16(s, system_time->wSecond); /* wSecond */
+       stream_read_UINT16(s, system_time->wMilliseconds); /* wMilliseconds */
 }
 
 /**
@@ -53,14 +53,14 @@ void rdp_read_system_time(STREAM* s, SYSTEM_TIME* system_time)
 
 void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time)
 {
-       stream_write_uint16(s, system_time->wYear); /* wYear, must be set to 0 */
-       stream_write_uint16(s, system_time->wMonth); /* wMonth */
-       stream_write_uint16(s, system_time->wDayOfWeek); /* wDayOfWeek */
-       stream_write_uint16(s, system_time->wDay); /* wDay */
-       stream_write_uint16(s, system_time->wHour); /* wHour */
-       stream_write_uint16(s, system_time->wMinute); /* wMinute */
-       stream_write_uint16(s, system_time->wSecond); /* wSecond */
-       stream_write_uint16(s, system_time->wMilliseconds); /* wMilliseconds */
+       stream_write_UINT16(s, system_time->wYear); /* wYear, must be set to 0 */
+       stream_write_UINT16(s, system_time->wMonth); /* wMonth */
+       stream_write_UINT16(s, system_time->wDayOfWeek); /* wDayOfWeek */
+       stream_write_UINT16(s, system_time->wDay); /* wDay */
+       stream_write_UINT16(s, system_time->wHour); /* wHour */
+       stream_write_UINT16(s, system_time->wMinute); /* wMinute */
+       stream_write_UINT16(s, system_time->wSecond); /* wSecond */
+       stream_write_UINT16(s, system_time->wMilliseconds); /* wMilliseconds */
        DEBUG_TIMEZONE("Time: y=%d,m=%d,dow=%d,d=%d, %02d:%02d:%02d.%03d",
                system_time->wYear, system_time->wMonth, system_time->wDayOfWeek,
                system_time->wDay, system_time->wHour, system_time->wMinute,
index de83375..51cb781 100644 (file)
  * @return TPDU length indicator (LI)
  */
 
-uint8
-tpdu_read_header(STREAM* s, uint8* code)
+BYTE
+tpdu_read_header(STREAM* s, BYTE* code)
 {
-       uint8 li;
+       BYTE li;
 
-       stream_read_uint8(s, li); /* LI */
-       stream_read_uint8(s, *code); /* Code */
+       stream_read_BYTE(s, li); /* LI */
+       stream_read_BYTE(s, *code); /* Code */
 
        if (*code == X224_TPDU_DATA)
        {
@@ -98,20 +98,20 @@ tpdu_read_header(STREAM* s, uint8* code)
  */
 
 void
-tpdu_write_header(STREAM* s, uint16 length, uint8 code)
+tpdu_write_header(STREAM* s, UINT16 length, BYTE code)
 {
-       stream_write_uint8(s, length); /* LI */
-       stream_write_uint8(s, code); /* code */
+       stream_write_BYTE(s, length); /* LI */
+       stream_write_BYTE(s, code); /* code */
 
        if (code == X224_TPDU_DATA)
        {
-               stream_write_uint8(s, 0x80); /* EOT */
+               stream_write_BYTE(s, 0x80); /* EOT */
        }
        else
        {
-               stream_write_uint16(s, 0); /* DST-REF */
-               stream_write_uint16(s, 0); /* SRC-REF */
-               stream_write_uint8(s, 0); /* Class 0 */
+               stream_write_UINT16(s, 0); /* DST-REF */
+               stream_write_UINT16(s, 0); /* SRC-REF */
+               stream_write_BYTE(s, 0); /* Class 0 */
        }
 }
 
@@ -121,10 +121,10 @@ tpdu_write_header(STREAM* s, uint16 length, uint8 code)
  * @return length indicator (LI)
  */
 
-uint8 tpdu_read_connection_request(STREAM* s)
+BYTE tpdu_read_connection_request(STREAM* s)
 {
-       uint8 li;
-       uint8 code;
+       BYTE li;
+       BYTE code;
 
        li = tpdu_read_header(s, &code);
 
@@ -144,7 +144,7 @@ uint8 tpdu_read_connection_request(STREAM* s)
  */
 
 void
-tpdu_write_connection_request(STREAM* s, uint16 length)
+tpdu_write_connection_request(STREAM* s, UINT16 length)
 {
        tpdu_write_header(s, length, X224_TPDU_CONNECTION_REQUEST);
 }
@@ -155,11 +155,11 @@ tpdu_write_connection_request(STREAM* s, uint16 length)
  * @return length indicator (LI)
  */
 
-uint8
+BYTE
 tpdu_read_connection_confirm(STREAM* s)
 {
-       uint8 li;
-       uint8 code;
+       BYTE li;
+       BYTE code;
 
        li = tpdu_read_header(s, &code);
 
@@ -179,7 +179,7 @@ tpdu_read_connection_confirm(STREAM* s)
  */
 
 void
-tpdu_write_connection_confirm(STREAM* s, uint16 length)
+tpdu_write_connection_confirm(STREAM* s, UINT16 length)
 {
        tpdu_write_header(s, length, X224_TPDU_CONNECTION_CONFIRM);
 }
@@ -191,7 +191,7 @@ tpdu_write_connection_confirm(STREAM* s, uint16 length)
  */
 
 void
-tpdu_write_disconnect_request(STREAM* s, uint16 length)
+tpdu_write_disconnect_request(STREAM* s, UINT16 length)
 {
        tpdu_write_header(s, length, X224_TPDU_DISCONNECT_REQUEST);
 }
@@ -212,11 +212,11 @@ tpdu_write_data(STREAM* s)
  * @param s stream
  */
 
-uint16
+UINT16
 tpdu_read_data(STREAM* s)
 {
-       uint8 code;
-       uint16 li;
+       BYTE code;
+       UINT16 li;
 
        li = tpdu_read_header(s, &code);
 
index 193f719..cf92551 100644 (file)
@@ -41,14 +41,14 @@ enum X224_TPDU_TYPE
 #define TPDU_CONNECTION_CONFIRM_LENGTH         (TPKT_HEADER_LENGTH + TPDU_CONNECTION_CONFIRM_HEADER_LENGTH)
 #define TPDU_DISCONNECT_REQUEST_LENGTH         (TPKT_HEADER_LENGTH + TPDU_DISCONNECT_REQUEST_HEADER_LENGTH)
 
-uint8 tpdu_read_header(STREAM* s, uint8* code);
-void tpdu_write_header(STREAM* s, uint16 length, uint8 code);
-uint8 tpdu_read_connection_request(STREAM* s);
-void tpdu_write_connection_request(STREAM* s, uint16 length);
-uint8 tpdu_read_connection_confirm(STREAM* s);
-void tpdu_write_connection_confirm(STREAM* s, uint16 length);
-void tpdu_write_disconnect_request(STREAM* s, uint16 length);
-uint16 tpdu_read_data(STREAM* s);
+BYTE tpdu_read_header(STREAM* s, BYTE* code);
+void tpdu_write_header(STREAM* s, UINT16 length, BYTE code);
+BYTE tpdu_read_connection_request(STREAM* s);
+void tpdu_write_connection_request(STREAM* s, UINT16 length);
+BYTE tpdu_read_connection_confirm(STREAM* s);
+void tpdu_write_connection_confirm(STREAM* s, UINT16 length);
+void tpdu_write_disconnect_request(STREAM* s, UINT16 length);
+UINT16 tpdu_read_data(STREAM* s);
 void tpdu_write_data(STREAM* s);
 
 #endif /* __TPDU_H */
index 5d6e173..8f52285 100644 (file)
@@ -65,9 +65,9 @@
 
 BOOL tpkt_verify_header(STREAM* s)
 {
-       uint8 version;
+       BYTE version;
 
-       stream_peek_uint8(s, version);
+       stream_peek_BYTE(s, version);
        if (version == 3)
                return TRUE;
        else
@@ -80,17 +80,17 @@ BOOL tpkt_verify_header(STREAM* s)
  * @return length
  */
 
-uint16 tpkt_read_header(STREAM* s)
+UINT16 tpkt_read_header(STREAM* s)
 {
-       uint8 version;
-       uint16 length;
+       BYTE version;
+       UINT16 length;
 
-       stream_peek_uint8(s, version);
+       stream_peek_BYTE(s, version);
 
        if (version == 3)
        {
                stream_seek(s, 2);
-               stream_read_uint16_be(s, length);
+               stream_read_UINT16_be(s, length);
        }
        else
        {
@@ -107,9 +107,9 @@ uint16 tpkt_read_header(STREAM* s)
  * @param length
  */
 
-void tpkt_write_header(STREAM* s, uint16 length)
+void tpkt_write_header(STREAM* s, UINT16 length)
 {
-       stream_write_uint8(s, 3); /* version */
-       stream_write_uint8(s, 0); /* reserved */
-       stream_write_uint16_be(s, length); /* length */
+       stream_write_BYTE(s, 3); /* version */
+       stream_write_BYTE(s, 0); /* reserved */
+       stream_write_UINT16_be(s, length); /* length */
 }
index ae0db9f..73579d2 100644 (file)
@@ -28,7 +28,7 @@
 #define TPKT_HEADER_LENGTH     4
 
 BOOL tpkt_verify_header(STREAM* s);
-uint16 tpkt_read_header(STREAM* s);
-void tpkt_write_header(STREAM* s, uint16 length);
+UINT16 tpkt_read_header(STREAM* s);
+void tpkt_write_header(STREAM* s, UINT16 length);
 
 #endif /* __TPKT_H */
index 21bc13f..2e820e8 100644 (file)
@@ -155,7 +155,7 @@ BOOL transport_connect_nla(rdpTransport* transport)
        return TRUE;
 }
 
-BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, uint16 port)
+BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, UINT16 port)
 {
        rdpTsg* tsg = tsg_new(transport);
 
@@ -184,7 +184,7 @@ BOOL transport_tsg_connect(rdpTransport* transport, const char* hostname, uint16
        return TRUE;
 }
 
-BOOL transport_connect(rdpTransport* transport, const char* hostname, uint16 port)
+BOOL transport_connect(rdpTransport* transport, const char* hostname, UINT16 port)
 {
        BOOL status = FALSE;
        rdpSettings* settings = transport->settings;
@@ -386,7 +386,7 @@ int transport_check_fds(rdpTransport** ptransport)
 {
        int pos;
        int status;
-       uint16 length;
+       UINT16 length;
        STREAM* received;
        rdpTransport* transport = *ptransport;
 
index 3c26410..40d8d7b 100644 (file)
@@ -70,7 +70,7 @@ struct rdp_transport
 
 STREAM* transport_recv_stream_init(rdpTransport* transport, int size);
 STREAM* transport_send_stream_init(rdpTransport* transport, int size);
-BOOL transport_connect(rdpTransport* transport, const char* hostname, uint16 port);
+BOOL transport_connect(rdpTransport* transport, const char* hostname, UINT16 port);
 void transport_attach(rdpTransport* transport, int sockfd);
 BOOL transport_disconnect(rdpTransport* transport);
 BOOL transport_connect_rdp(rdpTransport* transport);
index 80c15a7..353689b 100644 (file)
@@ -41,7 +41,7 @@
  * RPC NDR Interface Reference: http://msdn.microsoft.com/en-us/library/windows/desktop/hh802752/
  */
 
-uint8 tsg_packet1[108] =
+BYTE tsg_packet1[108] =
 {
        0x43, 0x56, 0x00, 0x00, 0x43, 0x56, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x52, 0x54, 0x43, 0x56,
        0x04, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -284,7 +284,7 @@ uint8 tsg_packet1[108] =
        HRESULT ReturnValue:    00 00 00 00
  */
 
-uint8 tsg_packet2[112] =
+BYTE tsg_packet2[112] =
 {
        0x00, 0x00, 0x00, 0x00, 0x6A, 0x78, 0xE9, 0xAB, 0x02, 0x90, 0x1C, 0x44, 0x8D, 0x99, 0x29, 0x30,
        0x53, 0x6C, 0x04, 0x33, 0x52, 0x51, 0x00, 0x00, 0x52, 0x51, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
@@ -330,7 +330,7 @@ uint8 tsg_packet2[112] =
                                                0x00, 0x00
  */
 
-uint8 tsg_packet3[40] =
+BYTE tsg_packet3[40] =
 {
        0x00, 0x00, 0x00, 0x00, 0x6A, 0x78, 0xE9, 0xAB, 0x02, 0x90, 0x1C, 0x44, 0x8D, 0x99, 0x29, 0x30,
        0x53, 0x6C, 0x04, 0x33, 0x01, 0x00, 0x00, 0x00, 0x52, 0x47, 0x00, 0x00, 0x52, 0x47, 0x00, 0x00,
@@ -349,7 +349,7 @@ uint8 tsg_packet3[40] =
        0x01, 0x00, 0x00, 0x00
  */
 
-uint8 tsg_packet4[48] =
+BYTE tsg_packet4[48] =
 {
        0x00, 0x00, 0x00, 0x00, 0x6A, 0x78, 0xE9, 0xAB, 0x02, 0x90, 0x1C, 0x44, 0x8D, 0x99, 0x29, 0x30,
        0x53, 0x6C, 0x04, 0x33, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -366,7 +366,7 @@ uint8 tsg_packet4[48] =
        0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00
  */
 
-uint8 tsg_packet5[20] =
+BYTE tsg_packet5[20] =
 {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00
@@ -453,9 +453,9 @@ DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count,
        return length;
 }
 
-BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port)
+BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port)
 {
-       uint8* data;
+       BYTE* data;
        uint32 length;
        STREAM* s_p4;
        int status = -1;
@@ -582,7 +582,7 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port)
        stream_write_uint32(s_p4, 0x00000000); /* Offset */
        stream_write_uint32(s_p4, (dest_addr_unic_len / 2) + 1); /* ActualCount */
        stream_write(s_p4, dest_addr_unic, dest_addr_unic_len);
-       stream_write_uint16(s_p4, 0x0000); /* unicode zero to terminate hostname string */
+       stream_write_UINT16(s_p4, 0x0000); /* unicode zero to terminate hostname string */
 
        free(dest_addr_unic);
 
@@ -653,7 +653,7 @@ BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port)
        return TRUE;
 }
 
-int tsg_read(rdpTsg* tsg, uint8* data, uint32 length)
+int tsg_read(rdpTsg* tsg, BYTE* data, uint32 length)
 {
        int status;
 
@@ -662,7 +662,7 @@ int tsg_read(rdpTsg* tsg, uint8* data, uint32 length)
        return status;
 }
 
-int tsg_write(rdpTsg* tsg, uint8* data, uint32 length)
+int tsg_write(rdpTsg* tsg, BYTE* data, uint32 length)
 {
        return TsProxySendToServer((handle_t) tsg, data, 1, &length);
 }
index 4fcbb12..03d0c31 100644 (file)
@@ -42,8 +42,8 @@ struct rdp_tsg
        rdpRpc* rpc;
        rdpSettings* settings;
        rdpTransport* transport;
-       uint8 TunnelContext[16];
-       uint8 ChannelContext[16];
+       BYTE TunnelContext[16];
+       BYTE ChannelContext[16];
 };
 
 typedef wchar_t* RESOURCENAME;
@@ -241,10 +241,10 @@ typedef struct _TSG_PACKET
 
 DWORD TsProxySendToServer(handle_t IDL_handle, byte pRpcMessage[], uint32 count, uint32* lengths);
 
-BOOL tsg_connect(rdpTsg* tsg, const char* hostname, uint16 port);
+BOOL tsg_connect(rdpTsg* tsg, const char* hostname, UINT16 port);
 
-int tsg_write(rdpTsg* tsg, uint8* data, uint32 length);
-int tsg_read(rdpTsg* tsg, uint8* data, uint32 length);
+int tsg_write(rdpTsg* tsg, BYTE* data, uint32 length);
+int tsg_read(rdpTsg* tsg, BYTE* data, uint32 length);
 
 rdpTsg* tsg_new(rdpTransport* transport);
 void tsg_free(rdpTsg* tsg);
index 9825fb9..1490c44 100644 (file)
@@ -38,11 +38,11 @@ static const char* const UPDATE_TYPE_STRINGS[] =
 
 BOOL update_recv_orders(rdpUpdate* update, STREAM* s)
 {
-       uint16 numberOrders;
+       UINT16 numberOrders;
 
-       stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */
-       stream_read_uint16(s, numberOrders); /* numberOrders (2 bytes) */
-       stream_seek_uint16(s); /* pad2OctetsB (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsA (2 bytes) */
+       stream_read_UINT16(s, numberOrders); /* numberOrders (2 bytes) */
+       stream_seek_UINT16(s); /* pad2OctetsB (2 bytes) */
 
        while (numberOrders > 0)
        {
@@ -56,24 +56,24 @@ BOOL update_recv_orders(rdpUpdate* update, STREAM* s)
 
 void update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data)
 {
-       stream_read_uint16(s, bitmap_data->destLeft);
-       stream_read_uint16(s, bitmap_data->destTop);
-       stream_read_uint16(s, bitmap_data->destRight);
-       stream_read_uint16(s, bitmap_data->destBottom);
-       stream_read_uint16(s, bitmap_data->width);
-       stream_read_uint16(s, bitmap_data->height);
-       stream_read_uint16(s, bitmap_data->bitsPerPixel);
-       stream_read_uint16(s, bitmap_data->flags);
-       stream_read_uint16(s, bitmap_data->bitmapLength);
+       stream_read_UINT16(s, bitmap_data->destLeft);
+       stream_read_UINT16(s, bitmap_data->destTop);
+       stream_read_UINT16(s, bitmap_data->destRight);
+       stream_read_UINT16(s, bitmap_data->destBottom);
+       stream_read_UINT16(s, bitmap_data->width);
+       stream_read_UINT16(s, bitmap_data->height);
+       stream_read_UINT16(s, bitmap_data->bitsPerPixel);
+       stream_read_UINT16(s, bitmap_data->flags);
+       stream_read_UINT16(s, bitmap_data->bitmapLength);
 
        if (bitmap_data->flags & BITMAP_COMPRESSION)
        {
                if (!(bitmap_data->flags & NO_BITMAP_COMPRESSION_HDR))
                {
-                       stream_read_uint16(s, bitmap_data->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */
-                       stream_read_uint16(s, bitmap_data->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */
-                       stream_read_uint16(s, bitmap_data->cbScanWidth); /* cbScanWidth (2 bytes) */
-                       stream_read_uint16(s, bitmap_data->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */
+                       stream_read_UINT16(s, bitmap_data->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */
+                       stream_read_UINT16(s, bitmap_data->cbCompMainBodySize); /* cbCompMainBodySize (2 bytes) */
+                       stream_read_UINT16(s, bitmap_data->cbScanWidth); /* cbScanWidth (2 bytes) */
+                       stream_read_UINT16(s, bitmap_data->cbUncompressedSize); /* cbUncompressedSize (2 bytes) */
                        bitmap_data->bitmapLength = bitmap_data->cbCompMainBodySize;
                }
 
@@ -93,11 +93,11 @@ void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_upda
 {
        int i;
 
-       stream_read_uint16(s, bitmap_update->number); /* numberRectangles (2 bytes) */
+       stream_read_UINT16(s, bitmap_update->number); /* numberRectangles (2 bytes) */
 
        if (bitmap_update->number > bitmap_update->count)
        {
-               uint16 count;
+               UINT16 count;
 
                count = bitmap_update->number * 2;
 
@@ -122,7 +122,7 @@ void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_u
        int i;
        PALETTE_ENTRY* entry;
 
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
        stream_read_uint32(s, palette_update->number); /* numberColors (4 bytes), must be set to 256 */
 
        if (palette_update->number > 256)
@@ -133,15 +133,15 @@ void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_u
        {
                entry = &palette_update->entries[i];
 
-               stream_read_uint8(s, entry->blue);
-               stream_read_uint8(s, entry->green);
-               stream_read_uint8(s, entry->red);
+               stream_read_BYTE(s, entry->blue);
+               stream_read_BYTE(s, entry->green);
+               stream_read_BYTE(s, entry->red);
        }
 }
 
 void update_read_synchronize(rdpUpdate* update, STREAM* s)
 {
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
 
        /**
         * The Synchronize Update is an artifact from the
@@ -163,8 +163,8 @@ void update_recv_play_sound(rdpUpdate* update, STREAM* s)
 
 void update_read_pointer_position(STREAM* s, POINTER_POSITION_UPDATE* pointer_position)
 {
-       stream_read_uint16(s, pointer_position->xPos); /* xPos (2 bytes) */
-       stream_read_uint16(s, pointer_position->yPos); /* yPos (2 bytes) */
+       stream_read_UINT16(s, pointer_position->xPos); /* xPos (2 bytes) */
+       stream_read_UINT16(s, pointer_position->yPos); /* yPos (2 bytes) */
 }
 
 void update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system)
@@ -174,13 +174,13 @@ void update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system
 
 void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color)
 {
-       stream_read_uint16(s, pointer_color->cacheIndex); /* cacheIndex (2 bytes) */
-       stream_read_uint16(s, pointer_color->xPos); /* xPos (2 bytes) */
-       stream_read_uint16(s, pointer_color->yPos); /* yPos (2 bytes) */
-       stream_read_uint16(s, pointer_color->width); /* width (2 bytes) */
-       stream_read_uint16(s, pointer_color->height); /* height (2 bytes) */
-       stream_read_uint16(s, pointer_color->lengthAndMask); /* lengthAndMask (2 bytes) */
-       stream_read_uint16(s, pointer_color->lengthXorMask); /* lengthXorMask (2 bytes) */
+       stream_read_UINT16(s, pointer_color->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_read_UINT16(s, pointer_color->xPos); /* xPos (2 bytes) */
+       stream_read_UINT16(s, pointer_color->yPos); /* yPos (2 bytes) */
+       stream_read_UINT16(s, pointer_color->width); /* width (2 bytes) */
+       stream_read_UINT16(s, pointer_color->height); /* height (2 bytes) */
+       stream_read_UINT16(s, pointer_color->lengthAndMask); /* lengthAndMask (2 bytes) */
+       stream_read_UINT16(s, pointer_color->lengthXorMask); /* lengthXorMask (2 bytes) */
 
        /**
         * There does not seem to be any documentation on why
@@ -195,39 +195,39 @@ void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color)
 
        if (pointer_color->lengthXorMask > 0)
        {
-               pointer_color->xorMaskData = (uint8*) malloc(pointer_color->lengthXorMask);
+               pointer_color->xorMaskData = (BYTE*) malloc(pointer_color->lengthXorMask);
                stream_read(s, pointer_color->xorMaskData, pointer_color->lengthXorMask);
        }
 
        if (pointer_color->lengthAndMask > 0)
        {
-               pointer_color->andMaskData = (uint8*) malloc(pointer_color->lengthAndMask);
+               pointer_color->andMaskData = (BYTE*) malloc(pointer_color->lengthAndMask);
                stream_read(s, pointer_color->andMaskData, pointer_color->lengthAndMask);
        }
 
        if (stream_get_left(s) > 0)
-               stream_seek_uint8(s); /* pad (1 byte) */
+               stream_seek_BYTE(s); /* pad (1 byte) */
 }
 
 void update_read_pointer_new(STREAM* s, POINTER_NEW_UPDATE* pointer_new)
 {
-       stream_read_uint16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */
+       stream_read_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */
        update_read_pointer_color(s, &pointer_new->colorPtrAttr); /* colorPtrAttr */
 }
 
 void update_read_pointer_cached(STREAM* s, POINTER_CACHED_UPDATE* pointer_cached)
 {
-       stream_read_uint16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_read_UINT16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */
 }
 
 void update_recv_pointer(rdpUpdate* update, STREAM* s)
 {
-       uint16 messageType;
+       UINT16 messageType;
        rdpContext* context = update->context;
        rdpPointerUpdate* pointer = update->pointer;
 
-       stream_read_uint16(s, messageType); /* messageType (2 bytes) */
-       stream_seek_uint16(s); /* pad2Octets (2 bytes) */
+       stream_read_UINT16(s, messageType); /* messageType (2 bytes) */
+       stream_seek_UINT16(s); /* pad2Octets (2 bytes) */
 
        switch (messageType)
        {
@@ -263,10 +263,10 @@ void update_recv_pointer(rdpUpdate* update, STREAM* s)
 
 BOOL update_recv(rdpUpdate* update, STREAM* s)
 {
-       uint16 updateType;
+       UINT16 updateType;
        rdpContext* context = update->context;
 
-       stream_read_uint16(s, updateType); /* updateType (2 bytes) */
+       stream_read_UINT16(s, updateType); /* updateType (2 bytes) */
 
        //printf("%s Update Data PDU\n", UPDATE_TYPE_STRINGS[updateType]);
 
@@ -347,23 +347,23 @@ static void update_end_paint(rdpContext* context)
 
 }
 
-static void update_write_refresh_rect(STREAM* s, uint8 count, RECTANGLE_16* areas)
+static void update_write_refresh_rect(STREAM* s, BYTE count, RECTANGLE_16* areas)
 {
        int i;
 
-       stream_write_uint8(s, count); /* numberOfAreas (1 byte) */
+       stream_write_BYTE(s, count); /* numberOfAreas (1 byte) */
        stream_seek(s, 3); /* pad3Octets (3 bytes) */
 
        for (i = 0; i < count; i++)
        {
-               stream_write_uint16(s, areas[i].left); /* left (2 bytes) */
-               stream_write_uint16(s, areas[i].top); /* top (2 bytes) */
-               stream_write_uint16(s, areas[i].right); /* right (2 bytes) */
-               stream_write_uint16(s, areas[i].bottom); /* bottom (2 bytes) */
+               stream_write_UINT16(s, areas[i].left); /* left (2 bytes) */
+               stream_write_UINT16(s, areas[i].top); /* top (2 bytes) */
+               stream_write_UINT16(s, areas[i].right); /* right (2 bytes) */
+               stream_write_UINT16(s, areas[i].bottom); /* bottom (2 bytes) */
        }
 }
 
-static void update_send_refresh_rect(rdpContext* context, uint8 count, RECTANGLE_16* areas)
+static void update_send_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_16* areas)
 {
        STREAM* s;
        rdpRdp* rdp = context->rdp;
@@ -377,21 +377,21 @@ static void update_send_refresh_rect(rdpContext* context, uint8 count, RECTANGLE
        }
 }
 
-static void update_write_suppress_output(STREAM* s, uint8 allow, RECTANGLE_16* area)
+static void update_write_suppress_output(STREAM* s, BYTE allow, RECTANGLE_16* area)
 {
-       stream_write_uint8(s, allow); /* allowDisplayUpdates (1 byte) */
+       stream_write_BYTE(s, allow); /* allowDisplayUpdates (1 byte) */
        stream_seek(s, 3); /* pad3Octets (3 bytes) */
 
        if (allow > 0)
        {
-               stream_write_uint16(s, area->left); /* left (2 bytes) */
-               stream_write_uint16(s, area->top); /* top (2 bytes) */
-               stream_write_uint16(s, area->right); /* right (2 bytes) */
-               stream_write_uint16(s, area->bottom); /* bottom (2 bytes) */
+               stream_write_UINT16(s, area->left); /* left (2 bytes) */
+               stream_write_UINT16(s, area->top); /* top (2 bytes) */
+               stream_write_UINT16(s, area->right); /* right (2 bytes) */
+               stream_write_UINT16(s, area->bottom); /* bottom (2 bytes) */
        }
 }
 
-static void update_send_suppress_output(rdpContext* context, uint8 allow, RECTANGLE_16* area)
+static void update_send_suppress_output(rdpContext* context, BYTE allow, RECTANGLE_16* area)
 {
        STREAM* s;
        rdpRdp* rdp = context->rdp;
@@ -460,18 +460,18 @@ static void update_send_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt)
 
        s = fastpath_update_pdu_init(rdp->fastpath);
 
-       stream_write_uint16(s, 1); /* numberOrders (2 bytes) */
-       stream_write_uint8(s, ORDER_STANDARD | ORDER_TYPE_CHANGE); /* controlFlags (1 byte) */
-       stream_write_uint8(s, ORDER_TYPE_SCRBLT); /* orderType (1 byte) */
-       stream_write_uint8(s, 0x7F); /* fieldFlags (variable) */
+       stream_write_UINT16(s, 1); /* numberOrders (2 bytes) */
+       stream_write_BYTE(s, ORDER_STANDARD | ORDER_TYPE_CHANGE); /* controlFlags (1 byte) */
+       stream_write_BYTE(s, ORDER_TYPE_SCRBLT); /* orderType (1 byte) */
+       stream_write_BYTE(s, 0x7F); /* fieldFlags (variable) */
 
-       stream_write_uint16(s, scrblt->nLeftRect);
-       stream_write_uint16(s, scrblt->nTopRect);
-       stream_write_uint16(s, scrblt->nWidth);
-       stream_write_uint16(s, scrblt->nHeight);
-       stream_write_uint8(s, scrblt->bRop);
-       stream_write_uint16(s, scrblt->nXSrc);
-       stream_write_uint16(s, scrblt->nYSrc);
+       stream_write_UINT16(s, scrblt->nLeftRect);
+       stream_write_UINT16(s, scrblt->nTopRect);
+       stream_write_UINT16(s, scrblt->nWidth);
+       stream_write_UINT16(s, scrblt->nHeight);
+       stream_write_BYTE(s, scrblt->bRop);
+       stream_write_UINT16(s, scrblt->nXSrc);
+       stream_write_UINT16(s, scrblt->nYSrc);
 
        fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_ORDERS, s);
 }
@@ -479,7 +479,7 @@ static void update_send_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt)
 static void update_send_pointer_system(rdpContext* context, POINTER_SYSTEM_UPDATE* pointer_system)
 {
        STREAM* s;
-       uint8 updateCode;
+       BYTE updateCode;
        rdpRdp* rdp = context->rdp;
 
        s = fastpath_update_pdu_init(rdp->fastpath);
@@ -496,13 +496,13 @@ static void update_write_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_
 {
        stream_check_size(s, 15 + (int) pointer_color->lengthAndMask + (int) pointer_color->lengthXorMask);
 
-       stream_write_uint16(s, pointer_color->cacheIndex);
-       stream_write_uint16(s, pointer_color->xPos);
-       stream_write_uint16(s, pointer_color->yPos);
-       stream_write_uint16(s, pointer_color->width);
-       stream_write_uint16(s, pointer_color->height);
-       stream_write_uint16(s, pointer_color->lengthAndMask);
-       stream_write_uint16(s, pointer_color->lengthXorMask);
+       stream_write_UINT16(s, pointer_color->cacheIndex);
+       stream_write_UINT16(s, pointer_color->xPos);
+       stream_write_UINT16(s, pointer_color->yPos);
+       stream_write_UINT16(s, pointer_color->width);
+       stream_write_UINT16(s, pointer_color->height);
+       stream_write_UINT16(s, pointer_color->lengthAndMask);
+       stream_write_UINT16(s, pointer_color->lengthXorMask);
 
        if (pointer_color->lengthXorMask > 0)
                stream_write(s, pointer_color->xorMaskData, pointer_color->lengthXorMask);
@@ -510,7 +510,7 @@ static void update_write_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_
        if (pointer_color->lengthAndMask > 0)
                stream_write(s, pointer_color->andMaskData, pointer_color->lengthAndMask);
        
-       stream_write_uint8(s, 0); /* pad (1 byte) */
+       stream_write_BYTE(s, 0); /* pad (1 byte) */
 }
 
 static void update_send_pointer_color(rdpContext* context, POINTER_COLOR_UPDATE* pointer_color)
@@ -529,7 +529,7 @@ static void update_send_pointer_new(rdpContext* context, POINTER_NEW_UPDATE* poi
        rdpRdp* rdp = context->rdp;
 
        s = fastpath_update_pdu_init(rdp->fastpath);
-       stream_write_uint16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */
+       stream_write_UINT16(s, pointer_new->xorBpp); /* xorBpp (2 bytes) */
         update_write_pointer_color(s, &pointer_new->colorPtrAttr);
        fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_POINTER, s);
 }
@@ -540,30 +540,30 @@ static void update_send_pointer_cached(rdpContext* context, POINTER_CACHED_UPDAT
        rdpRdp* rdp = context->rdp;
 
        s = fastpath_update_pdu_init(rdp->fastpath);
-       stream_write_uint16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */
+       stream_write_UINT16(s, pointer_cached->cacheIndex); /* cacheIndex (2 bytes) */
        fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_CACHED, s);
 }
 
 BOOL update_read_refresh_rect(rdpUpdate* update, STREAM* s)
 {
        int index;
-       uint8 numberOfAreas;
+       BYTE numberOfAreas;
        RECTANGLE_16* areas;
 
        if (stream_get_left(s) < 4)
                return FALSE;
 
-       stream_read_uint8(s, numberOfAreas);
+       stream_read_BYTE(s, numberOfAreas);
        stream_seek(s, 3); /* pad3Octects */
 
        areas = (RECTANGLE_16*) malloc(sizeof(RECTANGLE_16) * numberOfAreas);
 
        for (index = 0; index < numberOfAreas; index++)
        {
-               stream_read_uint16(s, areas[index].left);
-               stream_read_uint16(s, areas[index].top);
-               stream_read_uint16(s, areas[index].right);
-               stream_read_uint16(s, areas[index].bottom);
+               stream_read_UINT16(s, areas[index].left);
+               stream_read_UINT16(s, areas[index].top);
+               stream_read_UINT16(s, areas[index].right);
+               stream_read_UINT16(s, areas[index].bottom);
        }
 
        IFCALL(update->RefreshRect, update->context, numberOfAreas, areas);
@@ -575,12 +575,12 @@ BOOL update_read_refresh_rect(rdpUpdate* update, STREAM* s)
 
 BOOL update_read_suppress_output(rdpUpdate* update, STREAM* s)
 {
-       uint8 allowDisplayUpdates;
+       BYTE allowDisplayUpdates;
 
        if (stream_get_left(s) < 4)
                return FALSE;
 
-       stream_read_uint8(s, allowDisplayUpdates);
+       stream_read_BYTE(s, allowDisplayUpdates);
        stream_seek(s, 3); /* pad3Octects */
 
        if (allowDisplayUpdates > 0 && stream_get_left(s) < 8)
index 20dad39..075f3ba 100644 (file)
 
 void update_read_icon_info(STREAM* s, ICON_INFO* icon_info)
 {
-       stream_read_uint16(s, icon_info->cacheEntry); /* cacheEntry (2 bytes) */
-       stream_read_uint8(s, icon_info->cacheId); /* cacheId (1 byte) */
-       stream_read_uint8(s, icon_info->bpp); /* bpp (1 byte) */
-       stream_read_uint16(s, icon_info->width); /* width (2 bytes) */
-       stream_read_uint16(s, icon_info->height); /* height (2 bytes) */
+       stream_read_UINT16(s, icon_info->cacheEntry); /* cacheEntry (2 bytes) */
+       stream_read_BYTE(s, icon_info->cacheId); /* cacheId (1 byte) */
+       stream_read_BYTE(s, icon_info->bpp); /* bpp (1 byte) */
+       stream_read_UINT16(s, icon_info->width); /* width (2 bytes) */
+       stream_read_UINT16(s, icon_info->height); /* height (2 bytes) */
 
        /* cbColorTable is only present when bpp is 1, 2 or 4 */
        if (icon_info->bpp == 1 || icon_info->bpp == 2 || icon_info->bpp == 4)
-               stream_read_uint16(s, icon_info->cbColorTable); /* cbColorTable (2 bytes) */
+               stream_read_UINT16(s, icon_info->cbColorTable); /* cbColorTable (2 bytes) */
        else
                icon_info->cbColorTable = 0;
 
-       stream_read_uint16(s, icon_info->cbBitsMask); /* cbBitsMask (2 bytes) */
-       stream_read_uint16(s, icon_info->cbBitsColor); /* cbBitsColor (2 bytes) */
+       stream_read_UINT16(s, icon_info->cbBitsMask); /* cbBitsMask (2 bytes) */
+       stream_read_UINT16(s, icon_info->cbBitsColor); /* cbBitsColor (2 bytes) */
 
        /* bitsMask */
        if (icon_info->bitsMask == NULL)
-               icon_info->bitsMask = (uint8*) malloc(icon_info->cbBitsMask);
+               icon_info->bitsMask = (BYTE*) malloc(icon_info->cbBitsMask);
        else
-               icon_info->bitsMask = (uint8*) realloc(icon_info->bitsMask, icon_info->cbBitsMask);
+               icon_info->bitsMask = (BYTE*) realloc(icon_info->bitsMask, icon_info->cbBitsMask);
        stream_read(s, icon_info->bitsMask, icon_info->cbBitsMask);
 
        /* colorTable */
        if (icon_info->colorTable == NULL)
-               icon_info->colorTable = (uint8*) malloc(icon_info->cbColorTable);
+               icon_info->colorTable = (BYTE*) malloc(icon_info->cbColorTable);
        else
-               icon_info->colorTable = (uint8*) realloc(icon_info->colorTable, icon_info->cbColorTable);
+               icon_info->colorTable = (BYTE*) realloc(icon_info->colorTable, icon_info->cbColorTable);
        stream_read(s, icon_info->colorTable, icon_info->cbColorTable);
 
        /* bitsColor */
        if (icon_info->bitsColor == NULL)
-               icon_info->bitsColor = (uint8*) malloc(icon_info->cbBitsColor);
+               icon_info->bitsColor = (BYTE*) malloc(icon_info->cbBitsColor);
        else
-               icon_info->bitsColor = (uint8*) realloc(icon_info->bitsColor, icon_info->cbBitsColor);
+               icon_info->bitsColor = (BYTE*) realloc(icon_info->bitsColor, icon_info->cbBitsColor);
        stream_read(s, icon_info->bitsColor, icon_info->cbBitsColor);
 }
 
 void update_read_cached_icon_info(STREAM* s, CACHED_ICON_INFO* cached_icon_info)
 {
-       stream_read_uint16(s, cached_icon_info->cacheEntry); /* cacheEntry (2 bytes) */
-       stream_read_uint8(s, cached_icon_info->cacheId); /* cacheId (1 byte) */
+       stream_read_UINT16(s, cached_icon_info->cacheEntry); /* cacheEntry (2 bytes) */
+       stream_read_BYTE(s, cached_icon_info->cacheId); /* cacheId (1 byte) */
 }
 
 void update_read_notify_icon_infotip(STREAM* s, NOTIFY_ICON_INFOTIP* notify_icon_infotip)
@@ -95,7 +95,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
        }
 
        if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_SHOW)
-               stream_read_uint8(s, window_state->showState); /* showState (1 byte) */
+               stream_read_BYTE(s, window_state->showState); /* showState (1 byte) */
 
        if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
                rail_read_unicode_string(s, &window_state->titleInfo); /* titleInfo */
@@ -113,7 +113,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
        }
 
        if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_RP_CONTENT)
-               stream_read_uint8(s, window_state->RPContent); /* RPContent (1 byte) */
+               stream_read_BYTE(s, window_state->RPContent); /* RPContent (1 byte) */
 
        if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ROOT_PARENT)
                stream_read_uint32(s, window_state->rootParentHandle);/* rootParentHandle (4 bytes) */
@@ -138,7 +138,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
 
        if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_WND_RECTS)
        {
-               stream_read_uint16(s, window_state->numWindowRects); /* numWindowRects (2 bytes) */
+               stream_read_UINT16(s, window_state->numWindowRects); /* numWindowRects (2 bytes) */
 
                size = sizeof(RECTANGLE_16) * window_state->numWindowRects;
                window_state->windowRects = (RECTANGLE_16*) malloc(size);
@@ -146,10 +146,10 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
                /* windowRects */
                for (i = 0; i < (int) window_state->numWindowRects; i++)
                {
-                       stream_read_uint16(s, window_state->windowRects[i].left); /* left (2 bytes) */
-                       stream_read_uint16(s, window_state->windowRects[i].top); /* top (2 bytes) */
-                       stream_read_uint16(s, window_state->windowRects[i].right); /* right (2 bytes) */
-                       stream_read_uint16(s, window_state->windowRects[i].bottom); /* bottom (2 bytes) */
+                       stream_read_UINT16(s, window_state->windowRects[i].left); /* left (2 bytes) */
+                       stream_read_UINT16(s, window_state->windowRects[i].top); /* top (2 bytes) */
+                       stream_read_UINT16(s, window_state->windowRects[i].right); /* right (2 bytes) */
+                       stream_read_UINT16(s, window_state->windowRects[i].bottom); /* bottom (2 bytes) */
                }
        }
 
@@ -161,7 +161,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
 
        if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_VISIBILITY)
        {
-               stream_read_uint16(s, window_state->numVisibilityRects); /* numVisibilityRects (2 bytes) */
+               stream_read_UINT16(s, window_state->numVisibilityRects); /* numVisibilityRects (2 bytes) */
 
                size = sizeof(RECTANGLE_16) * window_state->numVisibilityRects;
                window_state->visibilityRects = (RECTANGLE_16*) malloc(size);
@@ -169,10 +169,10 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
                /* visibilityRects */
                for (i = 0; i < (int) window_state->numVisibilityRects; i++)
                {
-                       stream_read_uint16(s, window_state->visibilityRects[i].left); /* left (2 bytes) */
-                       stream_read_uint16(s, window_state->visibilityRects[i].top); /* top (2 bytes) */
-                       stream_read_uint16(s, window_state->visibilityRects[i].right); /* right (2 bytes) */
-                       stream_read_uint16(s, window_state->visibilityRects[i].bottom); /* bottom (2 bytes) */
+                       stream_read_UINT16(s, window_state->visibilityRects[i].left); /* left (2 bytes) */
+                       stream_read_UINT16(s, window_state->visibilityRects[i].top); /* top (2 bytes) */
+                       stream_read_UINT16(s, window_state->visibilityRects[i].right); /* right (2 bytes) */
+                       stream_read_UINT16(s, window_state->visibilityRects[i].bottom); /* bottom (2 bytes) */
                }
        }
 }
@@ -292,7 +292,7 @@ void update_read_desktop_actively_monitored_order(STREAM* s, WINDOW_ORDER_INFO*
 
        if (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_DESKTOP_ZORDER)
        {
-               stream_read_uint8(s, monitored_desktop->numWindowIds); /* numWindowIds (1 byte) */
+               stream_read_BYTE(s, monitored_desktop->numWindowIds); /* numWindowIds (1 byte) */
 
                size = sizeof(uint32) * monitored_desktop->numWindowIds;
 
@@ -335,10 +335,10 @@ void update_recv_desktop_info_order(rdpUpdate* update, STREAM* s, WINDOW_ORDER_I
 
 void update_recv_altsec_window_order(rdpUpdate* update, STREAM* s)
 {
-       uint16 orderSize;
+       UINT16 orderSize;
        rdpWindowUpdate* window = update->window;
 
-       stream_read_uint16(s, orderSize); /* orderSize (2 bytes) */
+       stream_read_UINT16(s, orderSize); /* orderSize (2 bytes) */
        stream_read_uint32(s, window->orderInfo.fieldFlags); /* FieldsPresentFlags (4 bytes) */
 
        if (window->orderInfo.fieldFlags & WINDOW_ORDER_TYPE_WINDOW)
index b45b6f4..bab56f8 100644 (file)
 
 void ber_read_length(STREAM* s, int* length)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte & 0x80)
        {
                byte &= ~(0x80);
 
                if (byte == 1)
-                       stream_read_uint8(s, *length);
+                       stream_read_BYTE(s, *length);
                if (byte == 2)
-                       stream_read_uint16_be(s, *length);
+                       stream_read_UINT16_be(s, *length);
        }
        else
        {
@@ -54,13 +54,13 @@ int ber_write_length(STREAM* s, int length)
 {
        if (length > 0x7F)
        {
-               stream_write_uint8(s, 0x82);
-               stream_write_uint16_be(s, length);
+               stream_write_BYTE(s, 0x82);
+               stream_write_UINT16_be(s, length);
                return 3;
        }
        else
        {
-               stream_write_uint8(s, length);
+               stream_write_BYTE(s, length);
                return 1;
        }
 }
@@ -88,11 +88,11 @@ int ber_get_content_length(int length)
  * @return
  */
 
-BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc)
+BOOL ber_read_universal_tag(STREAM* s, BYTE tag, BOOL pc)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte != (BER_CLASS_UNIV | BER_PC(pc) | (BER_TAG_MASK & tag)))
                return FALSE;
@@ -107,9 +107,9 @@ BOOL ber_read_universal_tag(STREAM* s, uint8 tag, BOOL pc)
  * @param pc primitive (FALSE) or constructed (TRUE)
  */
 
-void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc)
+void ber_write_universal_tag(STREAM* s, BYTE tag, BOOL pc)
 {
-       stream_write_uint8(s, (BER_CLASS_UNIV | BER_PC(pc)) | (BER_TAG_MASK & tag));
+       stream_write_BYTE(s, (BER_CLASS_UNIV | BER_PC(pc)) | (BER_TAG_MASK & tag));
 }
 
 /**
@@ -119,18 +119,18 @@ void ber_write_universal_tag(STREAM* s, uint8 tag, BOOL pc)
  * @param length length
  */
 
-BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length)
+BOOL ber_read_application_tag(STREAM* s, BYTE tag, int* length)
 {
-       uint8 byte;
+       BYTE byte;
 
        if (tag > 30)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
 
                if (byte != ((BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK))
                        return FALSE;
 
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
 
                if (byte != tag)
                        return FALSE;
@@ -139,7 +139,7 @@ BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length)
        }
        else
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
 
                if (byte != ((BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag)))
                        return FALSE;
@@ -157,26 +157,26 @@ BOOL ber_read_application_tag(STREAM* s, uint8 tag, int* length)
  * @param length length
  */
 
-void ber_write_application_tag(STREAM* s, uint8 tag, int length)
+void ber_write_application_tag(STREAM* s, BYTE tag, int length)
 {
        if (tag > 30)
        {
-               stream_write_uint8(s, (BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK);
-               stream_write_uint8(s, tag);
+               stream_write_BYTE(s, (BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK);
+               stream_write_BYTE(s, tag);
                ber_write_length(s, length);
        }
        else
        {
-               stream_write_uint8(s, (BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag));
+               stream_write_BYTE(s, (BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag));
                ber_write_length(s, length);
        }
 }
 
-BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc)
+BOOL ber_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte != ((BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag)))
        {
@@ -189,9 +189,9 @@ BOOL ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc)
        return TRUE;
 }
 
-int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc)
+int ber_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc)
 {
-       stream_write_uint8(s, (BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag));
+       stream_write_BYTE(s, (BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag));
        return ber_write_length(s, length) + 1;
 }
 
@@ -202,9 +202,9 @@ int ber_skip_contextual_tag(int length)
 
 BOOL ber_read_sequence_tag(STREAM* s, int* length)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte != ((BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_SEQUENCE_OF)))
                return FALSE;
@@ -222,7 +222,7 @@ BOOL ber_read_sequence_tag(STREAM* s, int* length)
 
 int ber_write_sequence_tag(STREAM* s, int length)
 {
-       stream_write_uint8(s, (BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_MASK & BER_TAG_SEQUENCE));
+       stream_write_BYTE(s, (BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_MASK & BER_TAG_SEQUENCE));
        return ber_write_length(s, length) + 1;
 }
 
@@ -236,7 +236,7 @@ int ber_skip_sequence_tag(int length)
        return 1 + _ber_skip_length(length);
 }
 
-BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
+BOOL ber_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count)
 {
        int length;
 
@@ -244,7 +244,7 @@ BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
        ber_read_length(s, &length);
 
        if (length == 1)
-               stream_read_uint8(s, *enumerated);
+               stream_read_BYTE(s, *enumerated);
        else
                return FALSE;
 
@@ -255,18 +255,18 @@ BOOL ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
        return TRUE;
 }
 
-void ber_write_enumerated(STREAM* s, uint8 enumerated, uint8 count)
+void ber_write_enumerated(STREAM* s, BYTE enumerated, BYTE count)
 {
        ber_write_universal_tag(s, BER_TAG_ENUMERATED, FALSE);
        ber_write_length(s, 1);
-       stream_write_uint8(s, enumerated);
+       stream_write_BYTE(s, enumerated);
 }
 
-BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding)
+BOOL ber_read_bit_string(STREAM* s, int* length, BYTE* padding)
 {
        ber_read_universal_tag(s, BER_TAG_BIT_STRING, FALSE);
        ber_read_length(s, length);
-       stream_read_uint8(s, *padding);
+       stream_read_BYTE(s, *padding);
 
        return TRUE;
 }
@@ -278,7 +278,7 @@ BOOL ber_read_bit_string(STREAM* s, int* length, uint8* padding)
  * @param length string length
  */
 
-void ber_write_octet_string(STREAM* s, const uint8* oct_str, int length)
+void ber_write_octet_string(STREAM* s, const BYTE* oct_str, int length)
 {
        ber_write_universal_tag(s, BER_TAG_OCTET_STRING, FALSE);
        ber_write_length(s, length);
@@ -313,14 +313,14 @@ int ber_skip_octet_string(int length)
 BOOL ber_read_BOOL(STREAM* s, BOOL* value)
 {
        int length;
-       uint8 v;
+       BYTE v;
 
        if (!ber_read_universal_tag(s, BER_TAG_BOOLEAN, FALSE))
                return FALSE;
        ber_read_length(s, &length);
        if (length != 1)
                return FALSE;
-       stream_read_uint8(s, v);
+       stream_read_BYTE(s, v);
        *value = (v ? TRUE : FALSE);
        return TRUE;
 }
@@ -335,7 +335,7 @@ void ber_write_BOOL(STREAM* s, BOOL value)
 {
        ber_write_universal_tag(s, BER_TAG_BOOLEAN, FALSE);
        ber_write_length(s, 1);
-       stream_write_uint8(s, (value == TRUE) ? 0xFF : 0);
+       stream_write_BYTE(s, (value == TRUE) ? 0xFF : 0);
 }
 
 BOOL ber_read_integer(STREAM* s, uint32* value)
@@ -352,14 +352,14 @@ BOOL ber_read_integer(STREAM* s, uint32* value)
        }
 
        if (length == 1)
-               stream_read_uint8(s, *value);
+               stream_read_BYTE(s, *value);
        else if (length == 2)
-               stream_read_uint16_be(s, *value);
+               stream_read_UINT16_be(s, *value);
        else if (length == 3)
        {
-               uint8 byte;
-               stream_read_uint8(s, byte);
-               stream_read_uint16_be(s, *value);
+               BYTE byte;
+               stream_read_BYTE(s, byte);
+               stream_read_UINT16_be(s, *value);
                *value += (byte << 16);
        }
        else if (length == 4)
@@ -383,20 +383,20 @@ int ber_write_integer(STREAM* s, uint32 value)
        if (value <= 0xFF)
        {
                ber_write_length(s, 1);
-               stream_write_uint8(s, value);
+               stream_write_BYTE(s, value);
                return 2;
        }
        else if (value < 0xFF80)
        {
                ber_write_length(s, 2);
-               stream_write_uint16_be(s, value);
+               stream_write_UINT16_be(s, value);
                return 3;
        }
        else if (value < 0xFF8000)
        {
                ber_write_length(s, 3);
-               stream_write_uint8(s, (value >> 16));
-               stream_write_uint16_be(s, (value & 0xFFFF));
+               stream_write_BYTE(s, (value >> 16));
+               stream_write_UINT16_be(s, (value & 0xFFFF));
                return 4;
        }
        else if (value <= 0xFFFFFFFF)
index bb6fb8f..f0bd6ae 100644 (file)
@@ -30,12 +30,12 @@ CryptoSha1 crypto_sha1_init(void)
        return sha1;
 }
 
-void crypto_sha1_update(CryptoSha1 sha1, const uint8* data, uint32 length)
+void crypto_sha1_update(CryptoSha1 sha1, const BYTE* data, uint32 length)
 {
        SHA1_Update(&sha1->sha_ctx, data, length);
 }
 
-void crypto_sha1_final(CryptoSha1 sha1, uint8* out_data)
+void crypto_sha1_final(CryptoSha1 sha1, BYTE* out_data)
 {
        SHA1_Final(out_data, &sha1->sha_ctx);
        free(sha1);
@@ -48,25 +48,25 @@ CryptoMd5 crypto_md5_init(void)
        return md5;
 }
 
-void crypto_md5_update(CryptoMd5 md5, const uint8* data, uint32 length)
+void crypto_md5_update(CryptoMd5 md5, const BYTE* data, uint32 length)
 {
        MD5_Update(&md5->md5_ctx, data, length);
 }
 
-void crypto_md5_final(CryptoMd5 md5, uint8* out_data)
+void crypto_md5_final(CryptoMd5 md5, BYTE* out_data)
 {
        MD5_Final(out_data, &md5->md5_ctx);
        free(md5);
 }
 
-CryptoRc4 crypto_rc4_init(const uint8* key, uint32 length)
+CryptoRc4 crypto_rc4_init(const BYTE* key, uint32 length)
 {
        CryptoRc4 rc4 = malloc(sizeof(*rc4));
        RC4_set_key(&rc4->rc4_key, length, key);
        return rc4;
 }
 
-void crypto_rc4(CryptoRc4 rc4, uint32 length, const uint8* in_data, uint8* out_data)
+void crypto_rc4(CryptoRc4 rc4, uint32 length, const BYTE* in_data, BYTE* out_data)
 {
        RC4(&rc4->rc4_key, length, in_data, out_data);
 }
@@ -77,7 +77,7 @@ void crypto_rc4_free(CryptoRc4 rc4)
                free(rc4);
 }
 
-CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec)
+CryptoDes3 crypto_des3_encrypt_init(const BYTE* key, const BYTE* ivec)
 {
        CryptoDes3 des3 = malloc(sizeof(*des3));
        EVP_CIPHER_CTX_init(&des3->des3_ctx);
@@ -86,7 +86,7 @@ CryptoDes3 crypto_des3_encrypt_init(const uint8* key, const uint8* ivec)
        return des3;
 }
 
-CryptoDes3 crypto_des3_decrypt_init(const uint8* key, const uint8* ivec)
+CryptoDes3 crypto_des3_decrypt_init(const BYTE* key, const BYTE* ivec)
 {
        CryptoDes3 des3 = malloc(sizeof(*des3));
        EVP_CIPHER_CTX_init(&des3->des3_ctx);
@@ -95,13 +95,13 @@ CryptoDes3 crypto_des3_decrypt_init(const uint8* key, const uint8* ivec)
        return des3;
 }
 
-void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const uint8* in_data, uint8* out_data)
+void crypto_des3_encrypt(CryptoDes3 des3, uint32 length, const BYTE* in_data, BYTE* out_data)
 {
        int len;
        EVP_EncryptUpdate(&des3->des3_ctx, out_data, &len, in_data, length);
 }
 
-void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const uint8* in_data, uint8* out_data)
+void crypto_des3_decrypt(CryptoDes3 des3, uint32 length, const BYTE* in_data, BYTE* out_data)
 {
        int len;
        EVP_DecryptUpdate(&des3->des3_ctx, out_data, &len, in_data, length);
@@ -125,17 +125,17 @@ CryptoHmac crypto_hmac_new(void)
        return hmac;
 }
 
-void crypto_hmac_sha1_init(CryptoHmac hmac, const uint8* data, uint32 length)
+void crypto_hmac_sha1_init(CryptoHmac hmac, const BYTE* data, uint32 length)
 {
        HMAC_Init_ex(&hmac->hmac_ctx, data, length, EVP_sha1(), NULL);
 }
 
-void crypto_hmac_update(CryptoHmac hmac, const uint8* data, uint32 length)
+void crypto_hmac_update(CryptoHmac hmac, const BYTE* data, uint32 length)
 {
        HMAC_Update(&hmac->hmac_ctx, data, length);
 }
 
-void crypto_hmac_final(CryptoHmac hmac, uint8* out_data, uint32 length)
+void crypto_hmac_final(CryptoHmac hmac, BYTE* out_data, uint32 length)
 {
        HMAC_Final(&hmac->hmac_ctx, out_data, &length);
 }
@@ -148,11 +148,11 @@ void crypto_hmac_free(CryptoHmac hmac)
        free(hmac);
 }
 
-CryptoCert crypto_cert_read(uint8* data, uint32 length)
+CryptoCert crypto_cert_read(BYTE* data, uint32 length)
 {
        CryptoCert cert = malloc(sizeof(*cert));
        /* this will move the data pointer but we don't care, we don't use it again */
-       cert->px509 = d2i_X509(NULL, (D2I_X509_CONST uint8 **) &data, length);
+       cert->px509 = d2i_X509(NULL, (D2I_X509_CONST BYTE **) &data, length);
        return cert;
 }
 
@@ -204,16 +204,16 @@ exit:
        return status;
 }
 
-static void crypto_rsa_common(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, int exponent_size, uint8* output)
+static void crypto_rsa_common(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, int exponent_size, BYTE* output)
 {
        BN_CTX* ctx;
        int output_length;
-       uint8* input_reverse;
-       uint8* modulus_reverse;
-       uint8* exponent_reverse;
+       BYTE* input_reverse;
+       BYTE* modulus_reverse;
+       BYTE* exponent_reverse;
        BIGNUM mod, exp, x, y;
 
-       input_reverse = (uint8*) malloc(2 * key_length + exponent_size);
+       input_reverse = (BYTE*) malloc(2 * key_length + exponent_size);
        modulus_reverse = input_reverse + key_length;
        exponent_reverse = modulus_reverse + key_length;
 
@@ -249,51 +249,51 @@ static void crypto_rsa_common(const uint8* input, int length, uint32 key_length,
        free(input_reverse);
 }
 
-static void crypto_rsa_public(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output)
+static void crypto_rsa_public(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output)
 {
        crypto_rsa_common(input, length, key_length, modulus, exponent, EXPONENT_MAX_SIZE, output);
 }
 
-static void crypto_rsa_private(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output)
+static void crypto_rsa_private(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output)
 {
 
        crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length, output);
 }
 
-void crypto_rsa_public_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output)
+void crypto_rsa_public_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output)
 {
 
        crypto_rsa_public(input, length, key_length, modulus, exponent, output);
 }
 
-void crypto_rsa_public_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* exponent, uint8* output)
+void crypto_rsa_public_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* exponent, BYTE* output)
 {
 
        crypto_rsa_public(input, length, key_length, modulus, exponent, output);
 }
 
-void crypto_rsa_private_encrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output)
+void crypto_rsa_private_encrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output)
 {
 
        crypto_rsa_private(input, length, key_length, modulus, private_exponent, output);
 }
 
-void crypto_rsa_private_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output)
+void crypto_rsa_private_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output)
 {
 
        crypto_rsa_private(input, length, key_length, modulus, private_exponent, output);
 }
 
-void crypto_rsa_decrypt(const uint8* input, int length, uint32 key_length, const uint8* modulus, const uint8* private_exponent, uint8* output)
+void crypto_rsa_decrypt(const BYTE* input, int length, uint32 key_length, const BYTE* modulus, const BYTE* private_exponent, BYTE* output)
 {
 
        crypto_rsa_common(input, length, key_length, modulus, private_exponent, key_length, output);
 }
 
-void crypto_reverse(uint8* data, int length)
+void crypto_reverse(BYTE* data, int length)
 {
        int i, j;
-       uint8 temp;
+       BYTE temp;
 
        for (i = 0, j = length - 1; i < j; i++, j--)
        {
@@ -303,7 +303,7 @@ void crypto_reverse(uint8* data, int length)
        }
 }
 
-void crypto_nonce(uint8* nonce, int size)
+void crypto_nonce(BYTE* nonce, int size)
 {
        RAND_bytes((void*) nonce, size);
 }
@@ -314,7 +314,7 @@ char* crypto_cert_fingerprint(X509* xcert)
        char* p;
        char* fp_buffer;
        uint32 fp_len;
-       uint8 fp[EVP_MAX_MD_SIZE];
+       BYTE fp[EVP_MAX_MD_SIZE];
 
        X509_digest(xcert, EVP_sha1(), fp, &fp_len);
 
@@ -357,7 +357,7 @@ char* crypto_cert_subject(X509* xcert)
 char* crypto_cert_subject_common_name(X509* xcert, int* length)
 {
        int index;
-       uint8* common_name;
+       BYTE* common_name;
        X509_NAME* subject_name;
        X509_NAME_ENTRY* entry;
        ASN1_STRING* entry_data;
@@ -395,7 +395,7 @@ char** crypto_cert_subject_alt_name(X509* xcert, int* count, int** lengths)
        int index;
        int length;
        char** strings;
-       uint8* string;
+       BYTE* string;
        int num_subject_alt_names;
        GENERAL_NAMES* subject_alt_names;
        GENERAL_NAME* subject_alt_name;
@@ -525,7 +525,7 @@ void crypto_cert_print_info(X509* xcert)
        free(fp);
 }
 
-char* crypto_base64_encode(uint8* data, int length)
+char* crypto_base64_encode(BYTE* data, int length)
 {
        BIO* bmem;
        BIO* b64;
@@ -552,7 +552,7 @@ char* crypto_base64_encode(uint8* data, int length)
        return base64_string;
 }
 
-void crypto_base64_decode(uint8* enc_data, int length, uint8** dec_data, int* res_length)
+void crypto_base64_decode(BYTE* enc_data, int length, BYTE** dec_data, int* res_length)
 {
       BIO *b64, *bmem;
 
index feb9156..ef77b2a 100644 (file)
@@ -37,19 +37,19 @@ int der_write_length(STREAM* s, int length)
 {
        if (length > 0x7F && length <= 0xFF)
        {
-               stream_write_uint8(s, 0x81);
-               stream_write_uint8(s, length);
+               stream_write_BYTE(s, 0x81);
+               stream_write_BYTE(s, length);
                return 2;
        }
        else if (length > 0xFF)
        {
-               stream_write_uint8(s, 0x82);
-               stream_write_uint16_be(s, length);
+               stream_write_BYTE(s, 0x82);
+               stream_write_UINT16_be(s, length);
                return 3;
        }
        else
        {
-               stream_write_uint8(s, length);
+               stream_write_BYTE(s, length);
                return 1;
        }
 }
@@ -69,15 +69,15 @@ int der_skip_contextual_tag(int length)
        return _der_skip_length(length) + 1;
 }
 
-int der_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc)
+int der_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc)
 {
-       stream_write_uint8(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag));
+       stream_write_BYTE(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag));
        return der_write_length(s, length) + 1;
 }
 
-void der_write_universal_tag(STREAM* s, uint8 tag, BOOL pc)
+void der_write_universal_tag(STREAM* s, BYTE tag, BOOL pc)
 {
-       stream_write_uint8(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag));
+       stream_write_BYTE(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag));
 }
 
 int der_skip_octet_string(int length)
@@ -85,7 +85,7 @@ int der_skip_octet_string(int length)
        return 1 + _der_skip_length(length) + length;
 }
 
-void der_write_octet_string(STREAM* s, uint8* oct_str, int length)
+void der_write_octet_string(STREAM* s, BYTE* oct_str, int length)
 {
        der_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE);
        der_write_length(s, length);
@@ -99,7 +99,7 @@ int der_skip_sequence_tag(int length)
 
 int der_write_sequence_tag(STREAM* s, int length)
 {
-       stream_write_uint8(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE));
+       stream_write_BYTE(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE));
        return der_write_length(s, length) + 1;
 }
 
index ec540a2..c2415f7 100644 (file)
 
 void er_read_length(STREAM* s, int* length)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte & 0x80)
        {
                byte &= ~(0x80);
 
                if (byte == 1)
-                       stream_read_uint8(s, *length);
+                       stream_read_BYTE(s, *length);
                if (byte == 2)
-                       stream_read_uint16_be(s, *length);
+                       stream_read_UINT16_be(s, *length);
        }
        else
        {
@@ -84,11 +84,11 @@ int er_get_content_length(int length)
  * @return
  */
 
-BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc)
+BOOL er_read_universal_tag(STREAM* s, BYTE tag, BOOL pc)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte != (ER_CLASS_UNIV | ER_PC(pc) | (ER_TAG_MASK & tag)))
                return FALSE;
@@ -103,9 +103,9 @@ BOOL er_read_universal_tag(STREAM* s, uint8 tag, BOOL pc)
  * @param pc primitive (FALSE) or constructed (TRUE)
  */
 
-void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc)
+void er_write_universal_tag(STREAM* s, BYTE tag, BOOL pc)
 {
-       stream_write_uint8(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag));
+       stream_write_BYTE(s, (ER_CLASS_UNIV | ER_PC(pc)) | (ER_TAG_MASK & tag));
 }
 
 /**
@@ -115,18 +115,18 @@ void er_write_universal_tag(STREAM* s, uint8 tag, BOOL pc)
  * @param length length
  */
 
-BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length)
+BOOL er_read_application_tag(STREAM* s, BYTE tag, int* length)
 {
-       uint8 byte;
+       BYTE byte;
 
        if (tag > 30)
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
 
                if (byte != ((ER_CLASS_APPL | ER_CONSTRUCT) | ER_TAG_MASK))
                        return FALSE;
 
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
 
                if (byte != tag)
                        return FALSE;
@@ -135,7 +135,7 @@ BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length)
        }
        else
        {
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
 
                if (byte != ((ER_CLASS_APPL | ER_CONSTRUCT) | (ER_TAG_MASK & tag)))
                        return FALSE;
@@ -153,26 +153,26 @@ BOOL er_read_application_tag(STREAM* s, uint8 tag, int* length)
  * @param length length
  */
 
-void er_write_application_tag(STREAM* s, uint8 tag, int length, BOOL flag)
+void er_write_application_tag(STREAM* s, BYTE tag, int length, BOOL flag)
 {
        if (tag > 30)
        {
-               stream_write_uint8(s, (ER_CLASS_APPL | ER_CONSTRUCT) | ER_TAG_MASK);
-               stream_write_uint8(s, tag);
+               stream_write_BYTE(s, (ER_CLASS_APPL | ER_CONSTRUCT) | ER_TAG_MASK);
+               stream_write_BYTE(s, tag);
                er_write_length(s, length, flag);
        }
        else
        {
-               stream_write_uint8(s, (ER_CLASS_APPL | ER_CONSTRUCT) | (ER_TAG_MASK & tag));
+               stream_write_BYTE(s, (ER_CLASS_APPL | ER_CONSTRUCT) | (ER_TAG_MASK & tag));
                er_write_length(s, length, flag);
        }
 }
 
-BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc)
+BOOL er_read_contextual_tag(STREAM* s, BYTE tag, int* length, BOOL pc)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte != ((ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag)))
        {
@@ -185,9 +185,9 @@ BOOL er_read_contextual_tag(STREAM* s, uint8 tag, int* length, BOOL pc)
        return TRUE;
 }
 
-int er_write_contextual_tag(STREAM* s, uint8 tag, int length, BOOL pc, BOOL flag)
+int er_write_contextual_tag(STREAM* s, BYTE tag, int length, BOOL pc, BOOL flag)
 {
-       stream_write_uint8(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag));
+       stream_write_BYTE(s, (ER_CLASS_CTXT | ER_PC(pc)) | (ER_TAG_MASK & tag));
        return er_write_length(s, length, flag) + 1;
 }
 
@@ -198,9 +198,9 @@ int er_skip_contextual_tag(int length)
 
 BOOL er_read_sequence_tag(STREAM* s, int* length)
 {
-       uint8 byte;
+       BYTE byte;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte != ((ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_SEQUENCE_OF)))
                return FALSE;
@@ -218,7 +218,7 @@ BOOL er_read_sequence_tag(STREAM* s, int* length)
 
 int er_write_sequence_tag(STREAM* s, int length, BOOL flag)
 {
-       stream_write_uint8(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE));
+       stream_write_BYTE(s, (ER_CLASS_UNIV | ER_CONSTRUCT) | (ER_TAG_MASK & ER_TAG_SEQUENCE));
        return er_write_length(s, length, flag) + 1;
 }
 
@@ -232,7 +232,7 @@ int er_skip_sequence_tag(int length)
        return 1 + _er_skip_length(length);
 }
 
-BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
+BOOL er_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count)
 {
        int length;
 
@@ -240,7 +240,7 @@ BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
        er_read_length(s, &length);
 
        if (length == 1)
-               stream_read_uint8(s, *enumerated);
+               stream_read_BYTE(s, *enumerated);
        else
                return FALSE;
 
@@ -251,27 +251,27 @@ BOOL er_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
        return TRUE;
 }
 
-void er_write_enumerated(STREAM* s, uint8 enumerated, uint8 count, BOOL flag)
+void er_write_enumerated(STREAM* s, BYTE enumerated, BYTE count, BOOL flag)
 {
        er_write_universal_tag(s, ER_TAG_ENUMERATED, FALSE);
        er_write_length(s, 1, flag);
-       stream_write_uint8(s, enumerated);
+       stream_write_BYTE(s, enumerated);
 }
 
-BOOL er_read_bit_string(STREAM* s, int* length, uint8* padding)
+BOOL er_read_bit_string(STREAM* s, int* length, BYTE* padding)
 {
        er_read_universal_tag(s, ER_TAG_BIT_STRING, FALSE);
        er_read_length(s, length);
-       stream_read_uint8(s, *padding);
+       stream_read_BYTE(s, *padding);
 
        return TRUE;
 }
 
-BOOL er_write_bit_string_tag(STREAM* s, uint32 length, uint8 padding, BOOL flag)
+BOOL er_write_bit_string_tag(STREAM* s, uint32 length, BYTE padding, BOOL flag)
 {
        er_write_universal_tag(s, ER_TAG_BIT_STRING, FALSE);
        er_write_length(s, length, flag);
-       stream_write_uint8(s, padding);
+       stream_write_BYTE(s, padding);
        return TRUE;
 }
 
@@ -291,7 +291,7 @@ BOOL er_read_octet_string(STREAM* s, int* length)
  * @param length string length
  */
 
-void er_write_octet_string(STREAM* s, uint8* oct_str, int length, BOOL flag)
+void er_write_octet_string(STREAM* s, BYTE* oct_str, int length, BOOL flag)
 {
        er_write_universal_tag(s, ER_TAG_OCTET_STRING, FALSE);
        er_write_length(s, length, flag);
@@ -319,14 +319,14 @@ int er_skip_octet_string(int length)
 BOOL er_read_BOOL(STREAM* s, BOOL* value)
 {
        int length;
-       uint8 v;
+       BYTE v;
 
        if (!er_read_universal_tag(s, ER_TAG_BOOLEAN, FALSE))
                return FALSE;
        er_read_length(s, &length);
        if (length != 1)
                return FALSE;
-       stream_read_uint8(s, v);
+       stream_read_BYTE(s, v);
        *value = (v ? TRUE : FALSE);
        return TRUE;
 }
@@ -341,7 +341,7 @@ void er_write_BOOL(STREAM* s, BOOL value)
 {
        er_write_universal_tag(s, ER_TAG_BOOLEAN, FALSE);
        er_write_length(s, 1, FALSE);
-       stream_write_uint8(s, (value == TRUE) ? 0xFF : 0);
+       stream_write_BYTE(s, (value == TRUE) ? 0xFF : 0);
 }
 
 BOOL er_read_integer(STREAM* s, uint32* value)
@@ -358,14 +358,14 @@ BOOL er_read_integer(STREAM* s, uint32* value)
        }
 
        if (length == 1)
-               stream_read_uint8(s, *value);
+               stream_read_BYTE(s, *value);
        else if (length == 2)
-               stream_read_uint16_be(s, *value);
+               stream_read_UINT16_be(s, *value);
        else if (length == 3)
        {
-               uint8 byte;
-               stream_read_uint8(s, byte);
-               stream_read_uint16_be(s, *value);
+               BYTE byte;
+               stream_read_BYTE(s, byte);
+               stream_read_UINT16_be(s, *value);
                *value += (byte << 16);
        }
        else if (length == 4)
@@ -389,13 +389,13 @@ int er_write_integer(STREAM* s, sint32 value)
        if (value <= 127 && value >= -128)
        {
                er_write_length(s, 1, FALSE);
-               stream_write_uint8(s, value);
+               stream_write_BYTE(s, value);
                return 2;
        }
        else if (value <= 32767 && value >= -32768)
        {
                er_write_length(s, 2, FALSE);
-               stream_write_uint16_be(s, value);
+               stream_write_UINT16_be(s, value);
                return 3;
        }
        else
index fb3e155..19ee586 100644 (file)
@@ -1108,7 +1108,7 @@ void credssp_send(rdpCredssp* credssp)
                length -= der_write_sequence_tag(s, length); /* SEQUENCE OF NegoDataItem */
                length -= der_write_sequence_tag(s, length); /* NegoDataItem */
                length -= der_write_contextual_tag(s, 0, length, TRUE); /* [0] negoToken */
-               der_write_octet_string(s, (uint8*) credssp->negoToken.pvBuffer, length); /* OCTET STRING */
+               der_write_octet_string(s, (BYTE*) credssp->negoToken.pvBuffer, length); /* OCTET STRING */
        }
 
        /* [2] authInfo (OCTET STRING) */
index 3d858f4..741451e 100644 (file)
  * @return
  */
 
-BOOL per_read_length(STREAM* s, uint16* length)
+BOOL per_read_length(STREAM* s, UINT16* length)
 {
-       uint8 byte;
+       BYTE byte;
 
        if (stream_get_left(s) < 1)
                return FALSE;
 
-       stream_read_uint8(s, byte);
+       stream_read_BYTE(s, byte);
 
        if (byte & 0x80)
        {
@@ -46,7 +46,7 @@ BOOL per_read_length(STREAM* s, uint16* length)
 
                byte &= ~(0x80);
                *length = (byte << 8);
-               stream_read_uint8(s, byte);
+               stream_read_BYTE(s, byte);
                *length += byte;
        }
        else
@@ -66,9 +66,9 @@ BOOL per_read_length(STREAM* s, uint16* length)
 void per_write_length(STREAM* s, int length)
 {
        if (length > 0x7F)
-               stream_write_uint16_be(s, (length | 0x8000));
+               stream_write_UINT16_be(s, (length | 0x8000));
        else
-               stream_write_uint8(s, length);
+               stream_write_BYTE(s, length);
 }
 
 /**
@@ -78,12 +78,12 @@ void per_write_length(STREAM* s, int length)
  * @return
  */
 
-BOOL per_read_choice(STREAM* s, uint8* choice)
+BOOL per_read_choice(STREAM* s, BYTE* choice)
 {
        if (stream_get_left(s) < 1)
                return FALSE;
 
-       stream_read_uint8(s, *choice);
+       stream_read_BYTE(s, *choice);
        return TRUE;
 }
 
@@ -93,9 +93,9 @@ BOOL per_read_choice(STREAM* s, uint8* choice)
  * @param choice index of chosen field
  */
 
-void per_write_choice(STREAM* s, uint8 choice)
+void per_write_choice(STREAM* s, BYTE choice)
 {
-       stream_write_uint8(s, choice);
+       stream_write_BYTE(s, choice);
 }
 
 /**
@@ -105,12 +105,12 @@ void per_write_choice(STREAM* s, uint8 choice)
  * @return
  */
 
-BOOL per_read_selection(STREAM* s, uint8* selection)
+BOOL per_read_selection(STREAM* s, BYTE* selection)
 {
        if (stream_get_left(s) < 1)
                return FALSE;
 
-       stream_read_uint8(s, *selection);
+       stream_read_BYTE(s, *selection);
        return TRUE;
 }
 
@@ -120,9 +120,9 @@ BOOL per_read_selection(STREAM* s, uint8* selection)
  * @param selection bit map of selected fields
  */
 
-void per_write_selection(STREAM* s, uint8 selection)
+void per_write_selection(STREAM* s, BYTE selection)
 {
-       stream_write_uint8(s, selection);
+       stream_write_BYTE(s, selection);
 }
 
 /**
@@ -132,12 +132,12 @@ void per_write_selection(STREAM* s, uint8 selection)
  * @return
  */
 
-BOOL per_read_number_of_sets(STREAM* s, uint8* number)
+BOOL per_read_number_of_sets(STREAM* s, BYTE* number)
 {
        if (stream_get_left(s) < 1)
                return FALSE;
 
-       stream_read_uint8(s, *number);
+       stream_read_BYTE(s, *number);
        return TRUE;
 }
 
@@ -147,9 +147,9 @@ BOOL per_read_number_of_sets(STREAM* s, uint8* number)
  * @param number number of sets
  */
 
-void per_write_number_of_sets(STREAM* s, uint8 number)
+void per_write_number_of_sets(STREAM* s, BYTE number)
 {
-       stream_write_uint8(s, number);
+       stream_write_BYTE(s, number);
 }
 
 /**
@@ -178,7 +178,7 @@ void per_write_padding(STREAM* s, int length)
        int i;
 
        for (i = 0; i < length; i++)
-               stream_write_uint8(s, 0);
+               stream_write_BYTE(s, 0);
 }
 
 /**
@@ -190,7 +190,7 @@ void per_write_padding(STREAM* s, int length)
 
 BOOL per_read_integer(STREAM* s, uint32* integer)
 {
-       uint16 length;
+       UINT16 length;
 
        if (!per_read_length(s, &length))
                return FALSE;
@@ -199,9 +199,9 @@ BOOL per_read_integer(STREAM* s, uint32* integer)
                return FALSE;
 
        if (length == 1)
-               stream_read_uint8(s, *integer);
+               stream_read_BYTE(s, *integer);
        else if (length == 2)
-               stream_read_uint16_be(s, *integer);
+               stream_read_UINT16_be(s, *integer);
        else
                return FALSE;
 
@@ -219,12 +219,12 @@ void per_write_integer(STREAM* s, uint32 integer)
        if (integer <= 0xFF)
        {
                per_write_length(s, 1);
-               stream_write_uint8(s, integer);
+               stream_write_BYTE(s, integer);
        }
        else if (integer <= 0xFFFF)
        {
                per_write_length(s, 2);
-               stream_write_uint16_be(s, integer);
+               stream_write_UINT16_be(s, integer);
        }
        else if (integer <= 0xFFFFFFFF)
        {
@@ -234,19 +234,19 @@ void per_write_integer(STREAM* s, uint32 integer)
 }
 
 /**
- * Read PER INTEGER (uint16).
+ * Read PER INTEGER (UINT16).
  * @param s stream
  * @param integer integer
  * @param min minimum value
  * @return
  */
 
-BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min)
+BOOL per_read_integer16(STREAM* s, UINT16* integer, UINT16 min)
 {
        if (stream_get_left(s) < 2)
                return FALSE;
 
-       stream_read_uint16_be(s, *integer);
+       stream_read_UINT16_be(s, *integer);
 
        if (*integer + min > 0xFFFF)
                return FALSE;
@@ -257,15 +257,15 @@ BOOL per_read_integer16(STREAM* s, uint16* integer, uint16 min)
 }
 
 /**
- * Write PER INTEGER (uint16).
+ * Write PER INTEGER (UINT16).
  * @param s stream
  * @param integer integer
  * @param min minimum value
  */
 
-void per_write_integer16(STREAM* s, uint16 integer, uint16 min)
+void per_write_integer16(STREAM* s, UINT16 integer, UINT16 min)
 {
-       stream_write_uint16_be(s, integer - min);
+       stream_write_UINT16_be(s, integer - min);
 }
 
 /**
@@ -276,12 +276,12 @@ void per_write_integer16(STREAM* s, uint16 integer, uint16 min)
  * @return
  */
 
-BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
+BOOL per_read_enumerated(STREAM* s, BYTE* enumerated, BYTE count)
 {
        if (stream_get_left(s) < 1)
                return FALSE;
 
-       stream_read_uint8(s, *enumerated);
+       stream_read_BYTE(s, *enumerated);
 
        /* check that enumerated value falls within expected range */
        if (*enumerated + 1 > count)
@@ -298,9 +298,9 @@ BOOL per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
  * @return
  */
 
-void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count)
+void per_write_enumerated(STREAM* s, BYTE enumerated, BYTE count)
 {
-       stream_write_uint8(s, enumerated);
+       stream_write_BYTE(s, enumerated);
 }
 
 /**
@@ -310,11 +310,11 @@ void per_write_enumerated(STREAM* s, uint8 enumerated, uint8 count)
  * @return
  */
 
-BOOL per_read_object_identifier(STREAM* s, uint8 oid[6])
+BOOL per_read_object_identifier(STREAM* s, BYTE oid[6])
 {
-       uint8 t12;
-       uint16 length;
-       uint8 a_oid[6];
+       BYTE t12;
+       UINT16 length;
+       BYTE a_oid[6];
 
        if (!per_read_length(s, &length))
                return FALSE;
@@ -325,14 +325,14 @@ BOOL per_read_object_identifier(STREAM* s, uint8 oid[6])
        if (stream_get_left(s) < length)
                return FALSE;
 
-       stream_read_uint8(s, t12); /* first two tuples */
+       stream_read_BYTE(s, t12); /* first two tuples */
        a_oid[0] = (t12 >> 4);
        a_oid[1] = (t12 & 0x0F);
 
-       stream_read_uint8(s, a_oid[2]); /* tuple 3 */
-       stream_read_uint8(s, a_oid[3]); /* tuple 4 */
-       stream_read_uint8(s, a_oid[4]); /* tuple 5 */
-       stream_read_uint8(s, a_oid[5]); /* tuple 6 */
+       stream_read_BYTE(s, a_oid[2]); /* tuple 3 */
+       stream_read_BYTE(s, a_oid[3]); /* tuple 4 */
+       stream_read_BYTE(s, a_oid[4]); /* tuple 5 */
+       stream_read_BYTE(s, a_oid[5]); /* tuple 6 */
 
        if ((a_oid[0] == oid[0]) && (a_oid[1] == oid[1]) &&
                (a_oid[2] == oid[2]) && (a_oid[3] == oid[3]) &&
@@ -352,15 +352,15 @@ BOOL per_read_object_identifier(STREAM* s, uint8 oid[6])
  * @param oid object identifier (oid)
  */
 
-void per_write_object_identifier(STREAM* s, uint8 oid[6])
+void per_write_object_identifier(STREAM* s, BYTE oid[6])
 {
-       uint8 t12 = (oid[0] << 4) & (oid[1] & 0x0F);
-       stream_write_uint8(s, 5); /* length */
-       stream_write_uint8(s, t12); /* first two tuples */
-       stream_write_uint8(s, oid[2]); /* tuple 3 */
-       stream_write_uint8(s, oid[3]); /* tuple 4 */
-       stream_write_uint8(s, oid[4]); /* tuple 5 */
-       stream_write_uint8(s, oid[5]); /* tuple 6 */
+       BYTE t12 = (oid[0] << 4) & (oid[1] & 0x0F);
+       stream_write_BYTE(s, 5); /* length */
+       stream_write_BYTE(s, t12); /* first two tuples */
+       stream_write_BYTE(s, oid[2]); /* tuple 3 */
+       stream_write_BYTE(s, oid[3]); /* tuple 4 */
+       stream_write_BYTE(s, oid[4]); /* tuple 5 */
+       stream_write_BYTE(s, oid[5]); /* tuple 6 */
 }
 
 /**
@@ -370,12 +370,12 @@ void per_write_object_identifier(STREAM* s, uint8 oid[6])
  * @param length string length
  */
 
-void per_write_string(STREAM* s, uint8* str, int length)
+void per_write_string(STREAM* s, BYTE* str, int length)
 {
        int i;
 
        for (i = 0; i < length; i++)
-               stream_write_uint8(s, str[i]);
+               stream_write_BYTE(s, str[i]);
 }
 
 /**
@@ -387,11 +387,11 @@ void per_write_string(STREAM* s, uint8* str, int length)
  * @return
  */
 
-BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min)
+BOOL per_read_octet_string(STREAM* s, BYTE* oct_str, int length, int min)
 {
        int i;
-       uint16 mlength;
-       uint8* a_oct_str;
+       UINT16 mlength;
+       BYTE* a_oct_str;
 
        if (!per_read_length(s, &mlength))
                return FALSE;
@@ -422,7 +422,7 @@ BOOL per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min)
  * @param min minimum string length
  */
 
-void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min)
+void per_write_octet_string(STREAM* s, BYTE* oct_str, int length, int min)
 {
        int i;
        int mlength;
@@ -432,7 +432,7 @@ void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min)
        per_write_length(s, mlength);
 
        for (i = 0; i < length; i++)
-               stream_write_uint8(s, oct_str[i]);
+               stream_write_BYTE(s, oct_str[i]);
 }
 
 /**
@@ -446,7 +446,7 @@ void per_write_octet_string(STREAM* s, uint8* oct_str, int length, int min)
 BOOL per_read_numeric_string(STREAM* s, int min)
 {
        int length;
-       uint16 mlength;
+       UINT16 mlength;
 
        if (!per_read_length(s, &mlength))
                return FALSE;
@@ -468,11 +468,11 @@ BOOL per_read_numeric_string(STREAM* s, int min)
  * @param min minimum string length
  */
 
-void per_write_numeric_string(STREAM* s, uint8* num_str, int length, int min)
+void per_write_numeric_string(STREAM* s, BYTE* num_str, int length, int min)
 {
        int i;
        int mlength;
-       uint8 num, c1, c2;
+       BYTE num, c1, c2;
 
        mlength = (length - min >= 0) ? length - min : min;
 
@@ -487,6 +487,6 @@ void per_write_numeric_string(STREAM* s, uint8* num_str, int length, int min)
                c2 = (c2 - 0x30) % 10;
                num = (c1 << 4) | c2;
 
-               stream_write_uint8(s, num); /* string */
+               stream_write_BYTE(s, num); /* string */
        }
 }
index f050679..acaf424 100644 (file)
@@ -286,7 +286,7 @@ BOOL tls_disconnect(rdpTls* tls)
        return TRUE;
 }
 
-int tls_read(rdpTls* tls, uint8* data, int length)
+int tls_read(rdpTls* tls, BYTE* data, int length)
 {
        int status;
 
@@ -311,7 +311,7 @@ int tls_read(rdpTls* tls, uint8* data, int length)
        return status;
 }
 
-int tls_read_all(rdpTls* tls, uint8* data, int length)
+int tls_read_all(rdpTls* tls, BYTE* data, int length)
 {
        int status;
 
@@ -324,7 +324,7 @@ int tls_read_all(rdpTls* tls, uint8* data, int length)
        return status;
 }
 
-int tls_write(rdpTls* tls, uint8* data, int length)
+int tls_write(rdpTls* tls, BYTE* data, int length)
 {
        int status;
 
@@ -350,7 +350,7 @@ int tls_write(rdpTls* tls, uint8* data, int length)
 }
 
 
-int tls_write_all(rdpTls* tls, uint8* data, int length)
+int tls_write_all(rdpTls* tls, BYTE* data, int length)
 {
        int status;
        int sent = 0;
index fd4b590..77eb60f 100644 (file)
 
 #include <freerdp/gdi/16bpp.h>
 
-uint16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color)
+UINT16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color)
 {
-       uint8 r, g, b;
-       uint16 color16;
+       BYTE r, g, b;
+       UINT16 color16;
 
        GetBGR32(r, g, b, color);
 
@@ -74,11 +74,11 @@ uint16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color)
 int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr)
 {
        int x, y;
-       uint16 *dstp;
+       UINT16 *dstp;
        int nXDest, nYDest;
        int nWidth, nHeight;
 
-       uint16 color16;
+       UINT16 color16;
        
        gdi_RectToCRgn(rect, &nXDest, &nYDest, &nWidth, &nHeight);
        
@@ -89,7 +89,7 @@ int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr)
 
        for (y = 0; y < nHeight; y++)
        {
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdc, nXDest, nYDest + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdc, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -108,7 +108,7 @@ int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr)
 static int BitBlt_BLACKNESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int y;
-       uint8* dstp;
+       BYTE* dstp;
 
        for (y = 0; y < nHeight; y++)
        {
@@ -124,7 +124,7 @@ static int BitBlt_BLACKNESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_WHITENESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int y;
-       uint8* dstp;
+       BYTE* dstp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -140,8 +140,8 @@ static int BitBlt_WHITENESS_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_SRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
 
        if ((hdcDest->selectedObject != hdcSrc->selectedObject) ||
            gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0)
@@ -201,13 +201,13 @@ static int BitBlt_SRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
 static int BitBlt_NOTSRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
        
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -226,11 +226,11 @@ static int BitBlt_NOTSRCCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
 static int BitBlt_DSTINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint16* dstp;
+       UINT16* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -248,13 +248,13 @@ static int BitBlt_DSTINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -273,13 +273,13 @@ static int BitBlt_SRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_NOTSRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -298,13 +298,13 @@ static int BitBlt_NOTSRCERASE_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
 static int BitBlt_SRCINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -323,13 +323,13 @@ static int BitBlt_SRCINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_SRCAND_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -348,13 +348,13 @@ static int BitBlt_SRCAND_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
 static int BitBlt_SRCPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -373,10 +373,10 @@ static int BitBlt_SRCPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {      
        int x, y;
-       uint8* srcp;
-       uint16* dstp;
-       uint16 src16;
-       uint16 color16;
+       BYTE* srcp;
+       UINT16* dstp;
+       UINT16 src16;
+       UINT16 color16;
        HGDI_BITMAP hSrcBmp;
 
        /* D = (S & P) | (~S & D) */
@@ -394,8 +394,8 @@ static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
        
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -415,22 +415,22 @@ static int BitBlt_DSPDxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
 static int BitBlt_PSDPxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
-       uint16* patp;
-       uint16 color16;
+       UINT16* srcp;
+       UINT16* dstp;
+       UINT16* patp;
+       UINT16 color16;
 
        /* D = (S & D) | (~S & P) */
 
        if (hdcDest->brush->style == GDI_BS_SOLID)
        {
                color16 = gdi_get_color_16bpp(hdcDest, hdcDest->brush->color);
-               patp = (uint16*) &color16;
+               patp = (UINT16*) &color16;
 
                for (y = 0; y < nHeight; y++)
                {
-                       srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-                       dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+                       dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
@@ -447,14 +447,14 @@ static int BitBlt_PSDPxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
        {
                for (y = 0; y < nHeight; y++)
                {
-                       srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-                       dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+                       dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
                                for (x = 0; x < nWidth; x++)
                                {
-                                       patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                                       patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
                                        *dstp = (*srcp & *dstp) | (~(*srcp) & *patp);
                                        srcp++;
                                        dstp++;
@@ -469,20 +469,20 @@ static int BitBlt_PSDPxax_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
 static int BitBlt_SPna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
-       uint16* patp;
+       UINT16* srcp;
+       UINT16* dstp;
+       UINT16* patp;
        
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
                        for (x = 0; x < nWidth; x++)
                        {
-                               patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                               patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
                                *dstp = *srcp & ~(*patp);
                                srcp++;
                                dstp++;
@@ -496,18 +496,18 @@ static int BitBlt_SPna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
 static int BitBlt_DPa_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint16* dstp;
-       uint16* patp;
+       UINT16* dstp;
+       UINT16* patp;
 
        for (y = 0; y < nHeight; y++)
        {
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
                        for (x = 0; x < nWidth; x++)
                        {
-                               patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                               patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
 
                                *dstp = *dstp & *patp;
                                dstp++;
@@ -521,18 +521,18 @@ static int BitBlt_DPa_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
 static int BitBlt_PDxn_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint16* dstp;
-       uint16* patp;
+       UINT16* dstp;
+       UINT16* patp;
 
        for (y = 0; y < nHeight; y++)
        {
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
                        for (x = 0; x < nWidth; x++)
                        {
-                               patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                               patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
                                *dstp = *dstp ^ ~(*patp);
                                dstp++;
                        }
@@ -545,13 +545,13 @@ static int BitBlt_PDxn_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
 static int BitBlt_DSna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
 
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -571,20 +571,20 @@ static int BitBlt_DSna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
 static int BitBlt_MERGECOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
-       uint16* patp;
+       UINT16* srcp;
+       UINT16* dstp;
+       UINT16* patp;
        
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
                        for (x = 0; x < nWidth; x++)
                        {
-                               patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                               patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
                                *dstp = *srcp & *patp;
                                srcp++;
                                dstp++;
@@ -598,13 +598,13 @@ static int BitBlt_MERGECOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_MERGEPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
+       UINT16* srcp;
+       UINT16* dstp;
        
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
@@ -623,9 +623,9 @@ static int BitBlt_MERGEPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
 static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint16* dstp;
-       uint16* patp;
-       uint16 color16;
+       UINT16* dstp;
+       UINT16* patp;
+       UINT16 color16;
 
        if (hdcDest->brush->style == GDI_BS_SOLID)
        {
@@ -633,7 +633,7 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
 
                for (y = 0; y < nHeight; y++)
                {
-                       dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
@@ -649,13 +649,13 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
        {
                for (y = 0; y < nHeight; y++)
                {
-                       dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
                                for (x = 0; x < nWidth; x++)
                                {
-                                       patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                                       patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
                                        *dstp = *patp;
                                        dstp++;
                                }
@@ -669,9 +669,9 @@ static int BitBlt_PATCOPY_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
 static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint16* dstp;
-       uint16* patp;
-       uint16 color16;
+       UINT16* dstp;
+       UINT16* patp;
+       UINT16 color16;
 
        if (hdcDest->brush->style == GDI_BS_SOLID)
        {
@@ -679,7 +679,7 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 
                for (y = 0; y < nHeight; y++)
                {
-                       dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
@@ -695,13 +695,13 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
        {
                for (y = 0; y < nHeight; y++)
                {
-                       dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
                                for (x = 0; x < nWidth; x++)
                                {
-                                       patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                                       patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
                                        *dstp = *patp ^ *dstp;
                                        dstp++;
                                }
@@ -715,20 +715,20 @@ static int BitBlt_PATINVERT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_PATPAINT_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint16* srcp;
-       uint16* dstp;
-       uint16* patp;
+       UINT16* srcp;
+       UINT16* dstp;
+       UINT16* patp;
        
        for (y = 0; y < nHeight; y++)
        {
-               srcp = (uint16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-               dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+               srcp = (UINT16*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+               dstp = (UINT16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                if (dstp != 0)
                {
                        for (x = 0; x < nWidth; x++)
                        {
-                               patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
+                               patp = (UINT16*) gdi_get_brush_pointer(hdcDest, x, y);
                                *dstp = *dstp | (*patp | ~(*srcp));
                                srcp++;
                                dstp++;
@@ -883,102 +883,102 @@ int PatBlt_16bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i
        return 1;
 }
 
-static INLINE void SetPixel_BLACK_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_BLACK_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = 0 */
        *pixel = 0;
 }
 
-static INLINE void SetPixel_NOTMERGEPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_NOTMERGEPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = ~(D | P) */
        *pixel = ~(*pixel | *pen);
 }
 
-static INLINE void SetPixel_MASKNOTPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_MASKNOTPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = D & ~P */
        *pixel &= ~(*pen);
 }
 
-static INLINE void SetPixel_NOTCOPYPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_NOTCOPYPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = ~P */
        *pixel = ~(*pen);
 }
 
-static INLINE void SetPixel_MASKPENNOT_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_MASKPENNOT_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = P & ~D */
        *pixel = *pen & ~*pixel;
 }
 
-static INLINE void SetPixel_NOT_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_NOT_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = ~D */
        *pixel = ~(*pixel);
 }
 
-static INLINE void SetPixel_XORPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_XORPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = D ^ P */
        *pixel = *pixel ^ *pen;
 }
 
-static INLINE void SetPixel_NOTMASKPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_NOTMASKPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = ~(D & P) */
        *pixel = ~(*pixel & *pen);
 }
 
-static INLINE void SetPixel_MASKPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_MASKPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = D & P */
        *pixel &= *pen;
 }
 
-static INLINE void SetPixel_NOTXORPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_NOTXORPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = ~(D ^ P) */
        *pixel = ~(*pixel ^ *pen);
 }
 
-static INLINE void SetPixel_NOP_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_NOP_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = D */
 }
 
-static INLINE void SetPixel_MERGENOTPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_MERGENOTPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = D | ~P */
        *pixel |= ~(*pen);
 }
 
-static INLINE void SetPixel_COPYPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_COPYPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = P */
        *pixel = *pen;
 }
 
-static INLINE void SetPixel_MERGEPENNOT_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_MERGEPENNOT_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = P | ~D */
        *pixel = *pen | ~(*pixel);
 }
 
-static INLINE void SetPixel_MERGEPEN_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_MERGEPEN_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = P | D */
        *pixel |= *pen;
 }
 
-static INLINE void SetPixel_WHITE_16bpp(uint16 *pixel, uint16 *pen)
+static INLINE void SetPixel_WHITE_16bpp(UINT16 *pixel, UINT16 *pen)
 {
        /* D = 1 */
        *pixel = 0xFFFF;
 }
 
-#define PIXEL_TYPE             uint16
+#define PIXEL_TYPE             UINT16
 #define GDI_GET_POINTER                gdi_GetPointer_16bpp
 #define GDI_GET_PEN_COLOR      gdi_GetPenColor_16bpp
 
index 9ed9e43..a3e4b17 100644 (file)
@@ -41,7 +41,7 @@
 uint32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color)
 {
        uint32 color32;
-       uint8 a, r, g, b;
+       BYTE a, r, g, b;
 
        a = 0xFF;
        GetBGR32(r, g, b, color);
@@ -96,7 +96,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
        if (hdcDest->alpha)
        {
                int x, y;
-               uint8* dstp;
+               BYTE* dstp;
 
                for (y = 0; y < nHeight; y++)
                {
@@ -124,7 +124,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
        else
        {
                int y;
-               uint8* dstp;
+               BYTE* dstp;
 
                for (y = 0; y < nHeight; y++)
                {
@@ -141,7 +141,7 @@ static int BitBlt_BLACKNESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_WHITENESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int y;
-       uint8* dstp;
+       BYTE* dstp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -157,8 +157,8 @@ static int BitBlt_WHITENESS_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_SRCCOPY_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
 
        if ((hdcDest->selectedObject != hdcSrc->selectedObject) ||
            gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0)
@@ -393,7 +393,7 @@ static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
        uint32* srcp;
        uint32* dstp;
        uint32* patp;
-       uint8* srcp8;
+       BYTE* srcp8;
        uint32 src32;
        uint32 color32;
        HGDI_BITMAP hSrcBmp;
@@ -413,7 +413,7 @@ static int BitBlt_DSPDxax_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
 
                for (y = 0; y < nHeight; y++)
                {
-                       srcp8 = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+                       srcp8 = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
                        dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
index 5c1dd54..c604a94 100644 (file)
@@ -38,7 +38,7 @@
 
 #include <freerdp/gdi/8bpp.h>
 
-uint8 gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color)
+BYTE gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color)
 {
        /* TODO: Implement 8bpp gdi_get_color_8bpp() */
        return 0;
@@ -53,7 +53,7 @@ int FillRect_8bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr)
 static int BitBlt_BLACKNESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int y;
-       uint8* dstp;
+       BYTE* dstp;
 
        for (y = 0; y < nHeight; y++)
        {
@@ -69,7 +69,7 @@ static int BitBlt_BLACKNESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_WHITENESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int y;
-       uint8* dstp;
+       BYTE* dstp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -85,8 +85,8 @@ static int BitBlt_WHITENESS_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_SRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
 
        if ((hdcDest->selectedObject != hdcSrc->selectedObject) ||
            gdi_CopyOverlap(nXDest, nYDest, nWidth, nHeight, nXSrc, nYSrc) == 0)
@@ -146,8 +146,8 @@ static int BitBlt_SRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
 static int BitBlt_NOTSRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -171,7 +171,7 @@ static int BitBlt_NOTSRCCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_DSTINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint8* dstp;
+       BYTE* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
@@ -193,8 +193,8 @@ static int BitBlt_DSTINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_SRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
@@ -218,8 +218,8 @@ static int BitBlt_SRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWi
 static int BitBlt_NOTSRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
@@ -243,8 +243,8 @@ static int BitBlt_NOTSRCERASE_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int
 static int BitBlt_SRCINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
@@ -268,8 +268,8 @@ static int BitBlt_SRCINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_SRCAND_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
@@ -293,8 +293,8 @@ static int BitBlt_SRCAND_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidt
 static int BitBlt_SRCPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
                
        for (y = 0; y < nHeight; y++)
        {
@@ -324,22 +324,22 @@ static int BitBlt_DSPDxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
 static int BitBlt_PSDPxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
-       uint8* patp;
-       uint8 color8;
+       BYTE* srcp;
+       BYTE* dstp;
+       BYTE* patp;
+       BYTE color8;
 
        /* D = (S & D) | (~S & P) */
 
        if (hdcDest->brush->style == GDI_BS_SOLID)
        {
                color8 = gdi_get_color_8bpp(hdcDest, hdcDest->brush->color);
-               patp = (uint8*) &color8;
+               patp = (BYTE*) &color8;
 
                for (y = 0; y < nHeight; y++)
                {
-                       srcp = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-                       dstp = (uint8*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       srcp = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+                       dstp = (BYTE*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
@@ -356,14 +356,14 @@ static int BitBlt_PSDPxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
        {
                for (y = 0; y < nHeight; y++)
                {
-                       srcp = (uint8*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
-                       dstp = (uint8*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
+                       srcp = (BYTE*) gdi_get_bitmap_pointer(hdcSrc, nXSrc, nYSrc + y);
+                       dstp = (BYTE*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
 
                        if (dstp != 0)
                        {
                                for (x = 0; x < nWidth; x++)
                                {
-                                       patp = (uint8*) gdi_get_brush_pointer(hdcDest, x, y);
+                                       patp = (BYTE*) gdi_get_brush_pointer(hdcDest, x, y);
                                        *dstp = (*srcp & *dstp) | (~(*srcp) & *patp);
                                        srcp++;
                                        dstp++;
@@ -378,9 +378,9 @@ static int BitBlt_PSDPxax_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
 static int BitBlt_SPna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
-       uint8* patp;
+       BYTE* srcp;
+       BYTE* dstp;
+       BYTE* patp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -407,8 +407,8 @@ static int BitBlt_SPna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
 static int BitBlt_DPa_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint8* dstp;
-       uint8* patp;
+       BYTE* dstp;
+       BYTE* patp;
 
        for (y = 0; y < nHeight; y++)
        {
@@ -432,8 +432,8 @@ static int BitBlt_DPa_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
 static int BitBlt_PDxn_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint8* dstp;
-       uint8* patp;
+       BYTE* dstp;
+       BYTE* patp;
 
        for (y = 0; y < nHeight; y++)
        {
@@ -458,8 +458,8 @@ static int BitBlt_PDxn_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
 static int BitBlt_DSna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
 
        for (y = 0; y < nHeight; y++)
        {
@@ -483,9 +483,9 @@ static int BitBlt_DSna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
 static int BitBlt_MERGECOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
-       uint8* patp;
+       BYTE* srcp;
+       BYTE* dstp;
+       BYTE* patp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -512,8 +512,8 @@ static int BitBlt_MERGECOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_MERGEPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
+       BYTE* srcp;
+       BYTE* dstp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -537,9 +537,9 @@ static int BitBlt_MERGEPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int n
 static int BitBlt_PATCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint8* dstp;
-       uint8* patp;
-       uint8 palIndex;
+       BYTE* dstp;
+       BYTE* patp;
+       BYTE palIndex;
 
        if(hdcDest->brush->style == GDI_BS_SOLID)
        {
@@ -583,9 +583,9 @@ static int BitBlt_PATCOPY_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWid
 static int BitBlt_PATINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
 {
        int x, y;
-       uint8* dstp;
-       uint8* patp;
-       uint8 palIndex;
+       BYTE* dstp;
+       BYTE* patp;
+       BYTE palIndex;
 
        if(hdcDest->brush->style == GDI_BS_SOLID)
        {
@@ -629,9 +629,9 @@ static int BitBlt_PATINVERT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nW
 static int BitBlt_PATPAINT_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc)
 {
        int x, y;
-       uint8* srcp;
-       uint8* dstp;
-       uint8* patp;
+       BYTE* srcp;
+       BYTE* dstp;
+       BYTE* patp;
        
        for (y = 0; y < nHeight; y++)
        {
@@ -798,102 +798,102 @@ int PatBlt_8bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, in
        return 1;
 }
 
-static INLINE void SetPixel_BLACK_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_BLACK_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = 0 */
        *pixel = 0;
 }
 
-static INLINE void SetPixel_NOTMERGEPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_NOTMERGEPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = ~(D | P) */
        *pixel = ~(*pixel | *pen);
 }
 
-static INLINE void SetPixel_MASKNOTPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_MASKNOTPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = D & ~P */
        *pixel &= ~(*pen);
 }
 
-static INLINE void SetPixel_NOTCOPYPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_NOTCOPYPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = ~P */
        *pixel = ~(*pen);
 }
 
-static INLINE void SetPixel_MASKPENNOT_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_MASKPENNOT_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = P & ~D */
        *pixel = *pen & ~*pixel;
 }
 
-static INLINE void SetPixel_NOT_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_NOT_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = ~D */
        *pixel = ~(*pixel);
 }
 
-static INLINE void SetPixel_XORPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_XORPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = D ^ P */
        *pixel = *pixel ^ *pen;
 }
 
-static INLINE void SetPixel_NOTMASKPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_NOTMASKPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = ~(D & P) */
        *pixel = ~(*pixel & *pen);
 }
 
-static INLINE void SetPixel_MASKPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_MASKPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = D & P */
        *pixel &= *pen;
 }
 
-static INLINE void SetPixel_NOTXORPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_NOTXORPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = ~(D ^ P) */
        *pixel = ~(*pixel ^ *pen);
 }
 
-static INLINE void SetPixel_NOP_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_NOP_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = D */
 }
 
-static INLINE void SetPixel_MERGENOTPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_MERGENOTPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = D | ~P */
        *pixel |= ~(*pen);
 }
 
-static INLINE void SetPixel_COPYPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_COPYPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = P */
        *pixel = *pen;
 }
 
-static INLINE void SetPixel_MERGEPENNOT_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_MERGEPENNOT_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = P | ~D */
        *pixel = *pen | ~(*pixel);
 }
 
-static INLINE void SetPixel_MERGEPEN_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_MERGEPEN_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = P | D */
        *pixel |= *pen;
 }
 
-static INLINE void SetPixel_WHITE_8bpp(uint8* pixel, uint8* pen)
+static INLINE void SetPixel_WHITE_8bpp(BYTE* pixel, BYTE* pen)
 {
        /* D = 1 */
        *pixel = 0xFF;
 }
 
-#define PIXEL_TYPE             uint8
+#define PIXEL_TYPE             BYTE
 #define GDI_GET_POINTER                gdi_GetPointer_8bpp
 #define GDI_GET_PEN_COLOR      gdi_GetPenColor_8bpp
 
index 4ca68ed..cd0ee68 100644 (file)
@@ -62,14 +62,14 @@ INLINE GDI_COLOR gdi_GetPixel(HGDI_DC hdc, int nXPos, int nYPos)
        return (GDI_COLOR) *colorp;
 }
 
-INLINE uint8 gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y)
+INLINE BYTE gdi_GetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y)
 {
-       return *((uint8*)&(hBmp->data[(Y * hBmp->width) + X]));
+       return *((BYTE*)&(hBmp->data[(Y * hBmp->width) + X]));
 }
 
-INLINE uint16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y)
+INLINE UINT16 gdi_GetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y)
 {
-       return *((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2]));
+       return *((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2]));
 }
 
 INLINE uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y)
@@ -77,14 +77,14 @@ INLINE uint32 gdi_GetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y)
        return *((uint32*)&(hBmp->data[(Y * hBmp->width * 4) + X * 4]));
 }
 
-INLINE uint8* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y)
+INLINE BYTE* gdi_GetPointer_8bpp(HGDI_BITMAP hBmp, int X, int Y)
 {
-       return ((uint8*)&(hBmp->data[(Y * hBmp->width) + X]));
+       return ((BYTE*)&(hBmp->data[(Y * hBmp->width) + X]));
 }
 
-INLINE uint16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y)
+INLINE UINT16* gdi_GetPointer_16bpp(HGDI_BITMAP hBmp, int X, int Y)
 {
-       return ((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2]));
+       return ((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2]));
 }
 
 INLINE uint32* gdi_GetPointer_32bpp(HGDI_BITMAP hBmp, int X, int Y)
@@ -109,14 +109,14 @@ INLINE GDI_COLOR gdi_SetPixel(HGDI_DC hdc, int X, int Y, GDI_COLOR crColor)
        return 0;
 }
 
-INLINE void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, uint8 pixel)
+INLINE void gdi_SetPixel_8bpp(HGDI_BITMAP hBmp, int X, int Y, BYTE pixel)
 {
-       *((uint8*)&(hBmp->data[(Y * hBmp->width) + X])) = pixel;
+       *((BYTE*)&(hBmp->data[(Y * hBmp->width) + X])) = pixel;
 }
 
-INLINE void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, uint16 pixel)
+INLINE void gdi_SetPixel_16bpp(HGDI_BITMAP hBmp, int X, int Y, UINT16 pixel)
 {
-       *((uint16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])) = pixel;
+       *((UINT16*)&(hBmp->data[(Y * hBmp->width * 2) + X * 2])) = pixel;
 }
 
 INLINE void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel)
@@ -134,7 +134,7 @@ INLINE void gdi_SetPixel_32bpp(HGDI_BITMAP hBmp, int X, int Y, uint32 pixel)
  * @return new bitmap
  */
 
-HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, uint8* data)
+HGDI_BITMAP gdi_CreateBitmap(int nWidth, int nHeight, int cBitsPerPixel, BYTE* data)
 {
        HGDI_BITMAP hBitmap = (HGDI_BITMAP) malloc(sizeof(GDI_BITMAP));
        hBitmap->objectType = GDIOBJECT_BITMAP;
index 540d2bf..c5d85ed 100644 (file)
@@ -313,14 +313,14 @@ static const uint32 rop3_code_table[] =
 
 /* GDI Helper Functions */
 
-INLINE uint32 gdi_rop3_code(uint8 code)
+INLINE uint32 gdi_rop3_code(BYTE code)
 {
        return rop3_code_table[code];
 }
 
-INLINE uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y)
+INLINE BYTE* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y)
 {
-       uint8* p;
+       BYTE* p;
        HGDI_BITMAP hBmp = (HGDI_BITMAP) hdcBmp->selectedObject;
        
        if (x >= 0 && x < hBmp->width && y >= 0 && y < hBmp->height)
@@ -335,9 +335,9 @@ INLINE uint8* gdi_get_bitmap_pointer(HGDI_DC hdcBmp, int x, int y)
        }
 }
 
-INLINE uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y)
+INLINE BYTE* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y)
 {
-       uint8 * p;
+       BYTE * p;
 
        if (hdcBrush->brush != NULL)
        {
@@ -355,11 +355,11 @@ INLINE uint8* gdi_get_brush_pointer(HGDI_DC hdcBrush, int x, int y)
                }
        }
 
-       p = (uint8*) &(hdcBrush->textColor);
+       p = (BYTE*) &(hdcBrush->textColor);
        return p;
 }
 
-INLINE int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width)
+INLINE int gdi_is_mono_pixel_set(BYTE* data, int x, int y, int width)
 {
        int byte;
        int shift;
@@ -373,7 +373,7 @@ INLINE int gdi_is_mono_pixel_set(uint8* data, int x, int y, int width)
 
 gdiBitmap* gdi_glyph_new(rdpGdi* gdi, GLYPH_DATA* glyph)
 {
-       uint8* extra;
+       BYTE* extra;
        gdiBitmap* gdi_bmp;
 
        gdi_bmp = (gdiBitmap*) malloc(sizeof(gdiBitmap));
@@ -404,7 +404,7 @@ void gdi_glyph_free(gdiBitmap *gdi_bmp)
        }
 }
 
-gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, uint8* data)
+gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, BYTE* data)
 {
        gdiBitmap* bitmap;
 
@@ -467,7 +467,7 @@ void gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt)
 
 void gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt)
 {
-       uint8* data;
+       BYTE* data;
        rdpBrush* brush;
        HGDI_BRUSH originalBrush;
        rdpGdi* gdi = context->gdi;
@@ -748,7 +748,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co
                gdi->image->bitmap->height = surface_bits_command->height;
                gdi->image->bitmap->bitsPerPixel = surface_bits_command->bpp;
                gdi->image->bitmap->bytesPerPixel = gdi->image->bitmap->bitsPerPixel / 8;
-               gdi->image->bitmap->data = (uint8*) realloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4);
+               gdi->image->bitmap->data = (BYTE*) realloc(gdi->image->bitmap->data, gdi->image->bitmap->width * gdi->image->bitmap->height * 4);
                freerdp_image_flip(nsc_context->bmpdata, gdi->image->bitmap->data, gdi->image->bitmap->width, gdi->image->bitmap->height, 32);
                gdi_BitBlt(gdi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, gdi->image->hdc, 0, 0, GDI_SRCCOPY);
        } 
@@ -759,12 +759,12 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co
                gdi->image->bitmap->bitsPerPixel = surface_bits_command->bpp;
                gdi->image->bitmap->bytesPerPixel = gdi->image->bitmap->bitsPerPixel / 8;
 
-               gdi->image->bitmap->data = (uint8*) realloc(gdi->image->bitmap->data,
+               gdi->image->bitmap->data = (BYTE*) realloc(gdi->image->bitmap->data,
                                gdi->image->bitmap->width * gdi->image->bitmap->height * 4);
 
                if ((surface_bits_command->bpp != 32) || (gdi->clrconv->alpha == TRUE))
                {
-                       uint8* temp_image;
+                       BYTE* temp_image;
 
                        freerdp_image_convert(surface_bits_command->bitmapData, gdi->image->bitmap->data,
                                gdi->image->bitmap->width, gdi->image->bitmap->height,
@@ -773,7 +773,7 @@ void gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_co
                        surface_bits_command->bpp = 32;
                        surface_bits_command->bitmapData = gdi->image->bitmap->data;
 
-                       temp_image = (uint8*) malloc(gdi->image->bitmap->width * gdi->image->bitmap->height * 4);
+                       temp_image = (BYTE*) malloc(gdi->image->bitmap->width * gdi->image->bitmap->height * 4);
                        freerdp_image_flip(gdi->image->bitmap->data, temp_image, gdi->image->bitmap->width, gdi->image->bitmap->height, 32);
                        free(gdi->image->bitmap->data);
                        gdi->image->bitmap->data = temp_image;
@@ -875,7 +875,7 @@ void gdi_resize(rdpGdi* gdi, int width, int height)
  * @return
  */
 
-int gdi_init(freerdp* instance, uint32 flags, uint8* buffer)
+int gdi_init(freerdp* instance, uint32 flags, BYTE* buffer)
 {
        rdpGdi* gdi;
        rdpCache* cache;
index 90d2f90..6176c8b 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "graphics.h"
 
-gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, uint8* data);
+gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, BYTE* data);
 void gdi_bitmap_free_ex(gdiBitmap* gdi_bmp);
 
 #endif /* __GDI_CORE_H */
index 6886f74..f214e22 100644 (file)
@@ -40,9 +40,9 @@
 
 /* Bitmap Class */
 
-HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, uint8* data)
+HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, BYTE* data)
 {
-       uint8* bmpData;
+       BYTE* bmpData;
        HGDI_BITMAP bitmap;
 
        bmpData = freerdp_image_convert(data, NULL, width, height, gdi->srcBpp, bpp, gdi->clrconv);
@@ -93,13 +93,13 @@ void gdi_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
 }
 
 void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
-               uint8* data, int width, int height, int bpp, int length,
+               BYTE* data, int width, int height, int bpp, int length,
                BOOL compressed, int codec_id)
 {
-       uint16 size;
+       UINT16 size;
        RFX_MESSAGE* msg;
-       uint8* src;
-       uint8* dst;
+       BYTE* src;
+       BYTE* dst;
        int yindex;
        int xindex;
        rdpGdi* gdi;
@@ -108,9 +108,9 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
        size = width * height * (bpp + 7) / 8;
 
        if (bitmap->data == NULL)
-               bitmap->data = (uint8*) malloc(size);
+               bitmap->data = (BYTE*) malloc(size);
        else
-               bitmap->data = (uint8*) realloc(bitmap->data, size);
+               bitmap->data = (BYTE*) realloc(bitmap->data, size);
 
        switch (codec_id)
        {
@@ -188,7 +188,7 @@ void gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary)
 
 void gdi_Glyph_New(rdpContext* context, rdpGlyph* glyph)
 {
-       uint8* data;
+       BYTE* data;
        gdiGlyph* gdi_glyph;
 
        gdi_glyph = (gdiGlyph*) glyph;
index 796d97d..eaa79ac 100644 (file)
 #include <freerdp/gdi/gdi.h>
 #include <freerdp/graphics.h>
 
-HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, uint8* data);
+HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, BYTE* data);
 
 void gdi_Bitmap_New(rdpContext* context, rdpBitmap* bitmap);
 void gdi_Bitmap_Free(rdpContext* context, rdpBitmap* bitmap);
 void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
-               uint8* data, int width, int height, int bpp, int length,
+               BYTE* data, int width, int height, int bpp, int length,
                 BOOL compressed, int codec_id);
 void gdi_register_graphics(rdpGraphics* graphics);
 
index c727d42..b65c535 100644 (file)
@@ -53,15 +53,15 @@ HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor)
        return hPen;
 }
 
-INLINE uint8 gdi_GetPenColor_8bpp(HGDI_PEN pen)
+INLINE BYTE gdi_GetPenColor_8bpp(HGDI_PEN pen)
 {
        /* TODO: implement conversion using palette */
        return 0xFF;
 }
 
-INLINE uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen)
+INLINE UINT16 gdi_GetPenColor_16bpp(HGDI_PEN pen)
 {
-       uint16 p;
+       UINT16 p;
        int r, g, b;
        GetRGB32(r, g, b, pen->color);
        RGB_888_565(r, g, b);
index 08197fe..6e86c30 100644 (file)
@@ -52,8 +52,8 @@ static void Ellipse_Bresenham(HGDI_DC hdc, int x1, int y1, int x2, int y2)
        int a, b, c;
 
        HGDI_BITMAP bmp;
-       uint8 pixel8;
-       uint16 pixel16;
+       BYTE pixel8;
+       UINT16 pixel16;
        uint32 pixel32;
        int bpp = hdc->bitsPerPixel;
 
index 757ca25..665e31c 100644 (file)
 
 struct _SYSTEM_TIME_ENTRY
 {
-       uint16 wYear;
-       uint16 wMonth;
-       uint16 wDayOfWeek;
-       uint16 wDay;
-       uint16 wHour;
-       uint16 wMinute;
-       uint16 wSecond;
-       uint16 wMilliseconds;
+       UINT16 wYear;
+       UINT16 wMonth;
+       UINT16 wDayOfWeek;
+       UINT16 wDay;
+       UINT16 wHour;
+       UINT16 wMinute;
+       UINT16 wSecond;
+       UINT16 wMilliseconds;
 };
 typedef struct _SYSTEM_TIME_ENTRY SYSTEM_TIME_ENTRY;
 
index 5ab656c..3b26b15 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <freerdp/rail/icon.h>
 
-ICON_INFO* icon_cache_get(rdpIconCache* cache, uint8 id, uint16 index, void** extra)
+ICON_INFO* icon_cache_get(rdpIconCache* cache, BYTE id, UINT16 index, void** extra)
 {
        ICON_INFO* entry;
 
@@ -52,7 +52,7 @@ ICON_INFO* icon_cache_get(rdpIconCache* cache, uint8 id, uint16 index, void** ex
        return entry;
 }
 
-void icon_cache_put(rdpIconCache* cache, uint8 id, uint16 index, ICON_INFO* entry, void* extra)
+void icon_cache_put(rdpIconCache* cache, BYTE id, UINT16 index, ICON_INFO* entry, void* extra)
 {
        if (id >= cache->numCaches)
        {
@@ -83,7 +83,7 @@ rdpIconCache* icon_cache_new(rdpRail* rail)
                int i;
 
                cache->rail = rail;
-               cache->numCaches = (uint8) rail->settings->num_icon_cache_entries;
+               cache->numCaches = (BYTE) rail->settings->num_icon_cache_entries;
                cache->numCacheEntries = rail->settings->num_icon_cache_entries;
 
                cache->caches = xzalloc(cache->numCaches * sizeof(WINDOW_ICON_CACHE));
index c114128..9d90df9 100644 (file)
@@ -252,11 +252,11 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
                        }
                        else
                        {
-                               settings->width = (uint16) strtol(argv[index], &p, 10);
+                               settings->width = (UINT16) strtol(argv[index], &p, 10);
 
                                if (*p == 'x')
                                {
-                                       settings->height = (uint16) strtol(p + 1, &p, 10);
+                                       settings->height = (UINT16) strtol(p + 1, &p, 10);
                                }
                                if (*p == '%')
                                {
index 8fa5ebc..9fb07a5 100644 (file)
 
 typedef struct
 {
-       uint8 magic[2];
+       BYTE magic[2];
 } BITMAP_MAGIC;
 
 typedef struct
 {
        uint32 filesz;
-       uint16 creator1;
-       uint16 creator2;
+       UINT16 creator1;
+       UINT16 creator2;
        uint32 bmp_offset;
 } BITMAP_CORE_HEADER;
 
@@ -46,8 +46,8 @@ typedef struct
        uint32 header_sz;
        sint32 width;
        sint32 height;
-       uint16 nplanes;
-       uint16 bitspp;
+       UINT16 nplanes;
+       UINT16 bitspp;
        uint32 compress_type;
        uint32 bmp_bytesz;
        sint32 hres;
index 673dc59..503901f 100644 (file)
 #include <freerdp/utils/dsp.h>
 
 static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context,
-       const uint8* src, int bytes_per_sample,
+       const BYTE* src, int bytes_per_sample,
        uint32 schan, uint32 srate, int sframes,
        uint32 rchan, uint32 rrate)
 {
-       uint8* dst;
-       uint8* p;
+       BYTE* dst;
+       BYTE* p;
        int rframes;
        int rsize;
        int i, j;
@@ -50,7 +50,7 @@ static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context,
        if (rsize > (int) context->resampled_maxlength)
        {
                context->resampled_maxlength = rsize + 1024;
-               context->resampled_buffer = (uint8*) realloc(context->resampled_buffer, context->resampled_maxlength);
+               context->resampled_buffer = (BYTE*) realloc(context->resampled_buffer, context->resampled_maxlength);
        }
        dst = context->resampled_buffer;
 
@@ -81,13 +81,13 @@ static void freerdp_dsp_resample(FREERDP_DSP_CONTEXT* context,
  * http://wiki.multimedia.cx/index.php?title=IMA_ADPCM
  */
 
-static const sint16 ima_step_index_table[] =
+static const INT16 ima_step_index_table[] =
 {
        -1, -1, -1, -1, 2, 4, 6, 8,
        -1, -1, -1, -1, 2, 4, 6, 8
 };
 
-static const sint16 ima_step_size_table[] =
+static const INT16 ima_step_size_table[] =
 {
        7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 
        19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 
@@ -100,8 +100,8 @@ static const sint16 ima_step_size_table[] =
        15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 
 };
 
-static uint16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm,
-       int channel, uint8 sample)
+static UINT16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm,
+       int channel, BYTE sample)
 {
        sint32 ss;
        sint32 d;
@@ -123,7 +123,7 @@ static uint16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm,
        else if (d > 32767)
                d = 32767;
 
-       adpcm->ima.last_sample[channel] = (sint16) d;
+       adpcm->ima.last_sample[channel] = (INT16) d;
 
        adpcm->ima.last_step[channel] += ima_step_index_table[sample];
        if (adpcm->ima.last_step[channel] < 0)
@@ -131,15 +131,15 @@ static uint16 dsp_decode_ima_adpcm_sample(ADPCM* adpcm,
        else if (adpcm->ima.last_step[channel] > 88)
                adpcm->ima.last_step[channel] = 88;
 
-       return (uint16) d;
+       return (UINT16) d;
 }
 
 static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
-       const uint8* src, int size, int channels, int block_size)
+       const BYTE* src, int size, int channels, int block_size)
 {
-       uint8* dst;
-       uint8 sample;
-       uint16 decoded;
+       BYTE* dst;
+       BYTE sample;
+       UINT16 decoded;
        uint32 out_size;
        int channel;
        int i;
@@ -155,15 +155,15 @@ static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
        {
                if (size % block_size == 0)
                {
-                       context->adpcm.ima.last_sample[0] = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8));
-                       context->adpcm.ima.last_step[0] = (sint16) (*(src + 2));
+                       context->adpcm.ima.last_sample[0] = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8));
+                       context->adpcm.ima.last_step[0] = (INT16) (*(src + 2));
                        src += 4;
                        size -= 4;
                        out_size -= 16;
                        if (channels > 1)
                        {
-                               context->adpcm.ima.last_sample[1] = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8));
-                               context->adpcm.ima.last_step[1] = (sint16) (*(src + 2));
+                               context->adpcm.ima.last_sample[1] = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8));
+                               context->adpcm.ima.last_step[1] = (INT16) (*(src + 2));
                                src += 4;
                                size -= 4;
                                out_size -= 16;
@@ -215,8 +215,8 @@ static void freerdp_dsp_decode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
  */
 static const struct
 {
-       uint8 byte_num;
-       uint8 byte_shift;
+       BYTE byte_num;
+       BYTE byte_shift;
 } ima_stereo_encode_map[] =
 {
        { 0, 0 },
@@ -237,13 +237,13 @@ static const struct
        { 7, 4 }
 };
 
-static uint8 dsp_encode_ima_adpcm_sample(ADPCM* adpcm,
-       int channel, sint16 sample)
+static BYTE dsp_encode_ima_adpcm_sample(ADPCM* adpcm,
+       int channel, INT16 sample)
 {
        sint32 e;
        sint32 d;
        sint32 ss;
-       uint8 enc;
+       BYTE enc;
        sint32 diff;
 
        ss = ima_step_size_table[adpcm->ima.last_step[channel]];
@@ -283,7 +283,7 @@ static uint8 dsp_encode_ima_adpcm_sample(ADPCM* adpcm,
                diff = -32768;
        else if (diff > 32767)
                diff = 32767;
-       adpcm->ima.last_sample[channel] = (sint16) diff;
+       adpcm->ima.last_sample[channel] = (INT16) diff;
 
        adpcm->ima.last_step[channel] += ima_step_index_table[enc];
        if (adpcm->ima.last_step[channel] < 0)
@@ -295,11 +295,11 @@ static uint8 dsp_encode_ima_adpcm_sample(ADPCM* adpcm,
 }
 
 static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
-       const uint8* src, int size, int channels, int block_size)
+       const BYTE* src, int size, int channels, int block_size)
 {
-       uint8* dst;
-       sint16 sample;
-       uint8 encoded;
+       BYTE* dst;
+       INT16 sample;
+       BYTE encoded;
        uint32 out_size;
        int i;
 
@@ -316,13 +316,13 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
                {
                        *dst++ = context->adpcm.ima.last_sample[0] & 0xff;
                        *dst++ = (context->adpcm.ima.last_sample[0] >> 8) & 0xff;
-                       *dst++ = (uint8) context->adpcm.ima.last_step[0];
+                       *dst++ = (BYTE) context->adpcm.ima.last_step[0];
                        *dst++ = 0;
                        if (channels > 1)
                        {
                                *dst++ = context->adpcm.ima.last_sample[1] & 0xff;
                                *dst++ = (context->adpcm.ima.last_sample[1] >> 8) & 0xff;
-                               *dst++ = (uint8) context->adpcm.ima.last_step[1];
+                               *dst++ = (BYTE) context->adpcm.ima.last_step[1];
                                *dst++ = 0;
                        }
                }
@@ -332,7 +332,7 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
                        memset(dst, 0, 8);
                        for (i = 0; i < 16; i++)
                        {
-                               sample = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8));
+                               sample = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8));
                                src += 2;
                                encoded = dsp_encode_ima_adpcm_sample(&context->adpcm, i % 2, sample);
                                dst[ima_stereo_encode_map[i].byte_num] |= encoded << ima_stereo_encode_map[i].byte_shift;
@@ -342,10 +342,10 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
                }
                else
                {
-                       sample = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8));
+                       sample = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8));
                        src += 2;
                        encoded = dsp_encode_ima_adpcm_sample(&context->adpcm, 0, sample);
-                       sample = (sint16) (((uint16)(*src)) | (((uint16)(*(src + 1))) << 8));
+                       sample = (INT16) (((UINT16)(*src)) | (((UINT16)(*(src + 1))) << 8));
                        src += 2;
                        encoded |= dsp_encode_ima_adpcm_sample(&context->adpcm, 0, sample) << 4;
                        *dst++ = encoded;
@@ -362,28 +362,28 @@ static void freerdp_dsp_encode_ima_adpcm(FREERDP_DSP_CONTEXT* context,
  * http://wiki.multimedia.cx/index.php?title=Microsoft_ADPCM
  */
 
-static const sint16 ms_adpcm_adaptation_table[] =
+static const INT16 ms_adpcm_adaptation_table[] =
 {
        230, 230, 230, 230, 307, 409, 512, 614,
        768, 614, 512, 409, 307, 230, 230, 230
 };
 
-static const sint16 ms_adpcm_coeff1_table[] =
+static const INT16 ms_adpcm_coeff1_table[] =
 {
        256, 512, 0, 192, 240, 460, 392
 };
 
-static const sint16 ms_adpcm_coeff2_table[] =
+static const INT16 ms_adpcm_coeff2_table[] =
 {
        0, -256, 0, 64, 0, -208, -232
 };
 
-static sint16 freerdp_dsp_decode_ms_adpcm_sample(ADPCM* adpcm, uint8 sample, int channel)
+static INT16 freerdp_dsp_decode_ms_adpcm_sample(ADPCM* adpcm, BYTE sample, int channel)
 {
-       sint8 nibble;
+       INT8 nibble;
        sint32 presample;
 
-       nibble = (sample & 0x08 ? (sint8)sample - 16 : sample);
+       nibble = (sample & 0x08 ? (INT8)sample - 16 : sample);
        presample = ((adpcm->ms.sample1[channel] * ms_adpcm_coeff1_table[adpcm->ms.predictor[channel]]) +
                (adpcm->ms.sample2[channel] * ms_adpcm_coeff2_table[adpcm->ms.predictor[channel]])) / 256;
        presample += nibble * adpcm->ms.delta[channel];
@@ -396,14 +396,14 @@ static sint16 freerdp_dsp_decode_ms_adpcm_sample(ADPCM* adpcm, uint8 sample, int
        adpcm->ms.delta[channel] = adpcm->ms.delta[channel] * ms_adpcm_adaptation_table[sample] / 256;
        if (adpcm->ms.delta[channel] < 16)
                adpcm->ms.delta[channel] = 16;
-       return (sint16) presample;
+       return (INT16) presample;
 }
 
 static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context,
-       const uint8* src, int size, int channels, int block_size)
+       const BYTE* src, int size, int channels, int block_size)
 {
-       uint8* dst;
-       uint8 sample;
+       BYTE* dst;
+       BYTE sample;
        uint32 out_size;
 
        out_size = size * 4;
@@ -421,43 +421,43 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context,
                        {
                                context->adpcm.ms.predictor[0] = *src++;
                                context->adpcm.ms.predictor[1] = *src++;
-                               context->adpcm.ms.delta[0] = *((sint16*)src);
+                               context->adpcm.ms.delta[0] = *((INT16*)src);
                                src += 2;
-                               context->adpcm.ms.delta[1] = *((sint16*)src);
+                               context->adpcm.ms.delta[1] = *((INT16*)src);
                                src += 2;
-                               context->adpcm.ms.sample1[0] = *((sint16*)src);
+                               context->adpcm.ms.sample1[0] = *((INT16*)src);
                                src += 2;
-                               context->adpcm.ms.sample1[1] = *((sint16*)src);
+                               context->adpcm.ms.sample1[1] = *((INT16*)src);
                                src += 2;
-                               context->adpcm.ms.sample2[0] = *((sint16*)src);
+                               context->adpcm.ms.sample2[0] = *((INT16*)src);
                                src += 2;
-                               context->adpcm.ms.sample2[1] = *((sint16*)src);
+                               context->adpcm.ms.sample2[1] = *((INT16*)src);
                                src += 2;
                                size -= 14;
 
-                               *((sint16*)dst) = context->adpcm.ms.sample2[0];
+                               *((INT16*)dst) = context->adpcm.ms.sample2[0];
                                dst += 2;
-                               *((sint16*)dst) = context->adpcm.ms.sample2[1];
+                               *((INT16*)dst) = context->adpcm.ms.sample2[1];
                                dst += 2;
-                               *((sint16*)dst) = context->adpcm.ms.sample1[0];
+                               *((INT16*)dst) = context->adpcm.ms.sample1[0];
                                dst += 2;
-                               *((sint16*)dst) = context->adpcm.ms.sample1[1];
+                               *((INT16*)dst) = context->adpcm.ms.sample1[1];
                                dst += 2;
                        }
                        else
                        {
                                context->adpcm.ms.predictor[0] = *src++;
-                               context->adpcm.ms.delta[0] = *((sint16*)src);
+                               context->adpcm.ms.delta[0] = *((INT16*)src);
                                src += 2;
-                               context->adpcm.ms.sample1[0] = *((sint16*)src);
+                               context->adpcm.ms.sample1[0] = *((INT16*)src);
                                src += 2;
-                               context->adpcm.ms.sample2[0] = *((sint16*)src);
+                               context->adpcm.ms.sample2[0] = *((INT16*)src);
                                src += 2;
                                size -= 7;
 
-                               *((sint16*)dst) = context->adpcm.ms.sample2[0];
+                               *((INT16*)dst) = context->adpcm.ms.sample2[0];
                                dst += 2;
-                               *((sint16*)dst) = context->adpcm.ms.sample1[0];
+                               *((INT16*)dst) = context->adpcm.ms.sample1[0];
                                dst += 2;
                        }
                }
@@ -466,25 +466,25 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context,
                {
                        sample = *src++;
                        size--;
-                       *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0);
+                       *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0);
                        dst += 2;
-                       *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1);
+                       *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1);
                        dst += 2;
 
                        sample = *src++;
                        size--;
-                       *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0);
+                       *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0);
                        dst += 2;
-                       *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1);
+                       *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 1);
                        dst += 2;
                }
                else
                {
                        sample = *src++;
                        size--;
-                       *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0);
+                       *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample >> 4, 0);
                        dst += 2;
-                       *((sint16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 0);
+                       *((INT16*)dst) = freerdp_dsp_decode_ms_adpcm_sample(&context->adpcm, sample & 0x0F, 0);
                        dst += 2;
                }
        }
@@ -492,7 +492,7 @@ static void freerdp_dsp_decode_ms_adpcm(FREERDP_DSP_CONTEXT* context,
        context->adpcm_size = dst - context->adpcm_buffer;
 }
 
-static uint8 freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, sint32 sample, int channel)
+static BYTE freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, sint32 sample, int channel)
 {
        sint32 presample;
        sint32 errordelta;
@@ -513,16 +513,16 @@ static uint8 freerdp_dsp_encode_ms_adpcm_sample(ADPCM* adpcm, sint32 sample, int
                presample = -32768;
        adpcm->ms.sample2[channel] = adpcm->ms.sample1[channel];
        adpcm->ms.sample1[channel] = presample;
-       adpcm->ms.delta[channel] = adpcm->ms.delta[channel] * ms_adpcm_adaptation_table[(((uint8)errordelta) & 0x0F)] / 256;
+       adpcm->ms.delta[channel] = adpcm->ms.delta[channel] * ms_adpcm_adaptation_table[(((BYTE)errordelta) & 0x0F)] / 256;
        if (adpcm->ms.delta[channel] < 16)
                adpcm->ms.delta[channel] = 16;
-       return ((uint8)errordelta) & 0x0F;
+       return ((BYTE)errordelta) & 0x0F;
 }
 
 static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context,
-       const uint8* src, int size, int channels, int block_size)
+       const BYTE* src, int size, int channels, int block_size)
 {
-       uint8* dst;
+       BYTE* dst;
        sint32 sample;
        uint32 out_size;
 
@@ -547,18 +547,18 @@ static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context,
                        {
                                *dst++ = context->adpcm.ms.predictor[0];
                                *dst++ = context->adpcm.ms.predictor[1];
-                               *dst++ = (uint8) (context->adpcm.ms.delta[0] & 0xff);
-                               *dst++ = (uint8) ((context->adpcm.ms.delta[0] >> 8) & 0xff);
-                               *dst++ = (uint8) (context->adpcm.ms.delta[1] & 0xff);
-                               *dst++ = (uint8) ((context->adpcm.ms.delta[1] >> 8) & 0xff);
-                               context->adpcm.ms.sample1[0] = *((sint16*) (src + 4));
-                               context->adpcm.ms.sample1[1] = *((sint16*) (src + 6));
-                               context->adpcm.ms.sample2[0] = *((sint16*) (src + 0));
-                               context->adpcm.ms.sample2[1] = *((sint16*) (src + 2));
-                               *((sint16*) (dst + 0)) = (sint16) context->adpcm.ms.sample1[0];
-                               *((sint16*) (dst + 2)) = (sint16) context->adpcm.ms.sample1[1];
-                               *((sint16*) (dst + 4)) = (sint16) context->adpcm.ms.sample2[0];
-                               *((sint16*) (dst + 6)) = (sint16) context->adpcm.ms.sample2[1];
+                               *dst++ = (BYTE) (context->adpcm.ms.delta[0] & 0xff);
+                               *dst++ = (BYTE) ((context->adpcm.ms.delta[0] >> 8) & 0xff);
+                               *dst++ = (BYTE) (context->adpcm.ms.delta[1] & 0xff);
+                               *dst++ = (BYTE) ((context->adpcm.ms.delta[1] >> 8) & 0xff);
+                               context->adpcm.ms.sample1[0] = *((INT16*) (src + 4));
+                               context->adpcm.ms.sample1[1] = *((INT16*) (src + 6));
+                               context->adpcm.ms.sample2[0] = *((INT16*) (src + 0));
+                               context->adpcm.ms.sample2[1] = *((INT16*) (src + 2));
+                               *((INT16*) (dst + 0)) = (INT16) context->adpcm.ms.sample1[0];
+                               *((INT16*) (dst + 2)) = (INT16) context->adpcm.ms.sample1[1];
+                               *((INT16*) (dst + 4)) = (INT16) context->adpcm.ms.sample2[0];
+                               *((INT16*) (dst + 6)) = (INT16) context->adpcm.ms.sample2[1];
                                dst += 8;
                                src += 8;
                                size -= 8;
@@ -566,22 +566,22 @@ static void freerdp_dsp_encode_ms_adpcm(FREERDP_DSP_CONTEXT* context,
                        else
                        {
                                *dst++ = context->adpcm.ms.predictor[0];
-                               *dst++ = (uint8) (context->adpcm.ms.delta[0] & 0xff);
-                               *dst++ = (uint8) ((context->adpcm.ms.delta[0] >> 8) & 0xff);
-                               context->adpcm.ms.sample1[0] = *((sint16*) (src + 2));
-                               context->adpcm.ms.sample2[0] = *((sint16*) (src + 0));
-                               *((sint16*) (dst + 0)) = (sint16) context->adpcm.ms.sample1[0];
-                               *((sint16*) (dst + 2)) = (sint16) context->adpcm.ms.sample2[0];
+                               *dst++ = (BYTE) (context->adpcm.ms.delta[0] & 0xff);
+                               *dst++ = (BYTE) ((context->adpcm.ms.delta[0] >> 8) & 0xff);
+                               context->adpcm.ms.sample1[0] = *((INT16*) (src + 2));
+                               context->adpcm.ms.sample2[0] = *((INT16*) (src + 0));
+                               *((INT16*) (dst + 0)) = (INT16) context->adpcm.ms.sample1[0];
+                               *((INT16*) (dst + 2)) = (INT16) context->adpcm.ms.sample2[0];
                                dst += 4;
                                src += 4;
                                size -= 4;
                        }
                }
 
-               sample = *((sint16*) src);
+               sample = *((INT16*) src);
                src += 2;
                *dst = freerdp_dsp_encode_ms_adpcm_sample(&context->adpcm, sample, 0) << 4;
-               sample = *((sint16*) src);
+               sample = *((INT16*) src);
                src += 2;
                *dst += freerdp_dsp_encode_ms_adpcm_sample(&context->adpcm, sample, channels > 1 ? 1 : 0);
                dst++;
index 91608da..48ee710 100644 (file)
@@ -31,7 +31,7 @@
 #include <freerdp/client/tsmf.h>
 #include <freerdp/rail.h>
 
-static RDP_EVENT* freerdp_cliprdr_event_new(uint16 event_type)
+static RDP_EVENT* freerdp_cliprdr_event_new(UINT16 event_type)
 {
        RDP_EVENT* event = NULL;
 
@@ -54,7 +54,7 @@ static RDP_EVENT* freerdp_cliprdr_event_new(uint16 event_type)
        return event;
 }
 
-static RDP_EVENT* freerdp_tsmf_event_new(uint16 event_type)
+static RDP_EVENT* freerdp_tsmf_event_new(UINT16 event_type)
 {
        RDP_EVENT* event = NULL;
 
@@ -71,14 +71,14 @@ static RDP_EVENT* freerdp_tsmf_event_new(uint16 event_type)
        return event;
 }
 
-static RDP_EVENT* freerdp_rail_event_new(uint16 event_type)
+static RDP_EVENT* freerdp_rail_event_new(UINT16 event_type)
 {
        RDP_EVENT* event = NULL;
        event = xnew(RDP_EVENT);
        return event;
 }
 
-RDP_EVENT* freerdp_event_new(uint16 event_class, uint16 event_type,
+RDP_EVENT* freerdp_event_new(UINT16 event_class, UINT16 event_type,
        RDP_EVENT_CALLBACK on_event_free_callback, void* user_data)
 {
        RDP_EVENT* event = NULL;
index 8e80f26..0f20709 100644 (file)
@@ -28,9 +28,9 @@
 
 #include <freerdp/utils/hexdump.h>
 
-void freerdp_hexdump(uint8* data, int length)
+void freerdp_hexdump(BYTE* data, int length)
 {
-       uint8* p = data;
+       BYTE* p = data;
        int i, line, offset = 0;
 
        while (offset < length)
index b1378df..3ec293b 100644 (file)
@@ -60,7 +60,7 @@ msusb_mspipes_replace(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, MSUSB_PIPE_DESCR
 }
 
 static MSUSB_PIPE_DESCRIPTOR **
-msusb_mspipes_read(uint8 * data, uint32 data_size, uint32 NumberOfPipes, int * offset)
+msusb_mspipes_read(BYTE * data, uint32 data_size, uint32 NumberOfPipes, int * offset)
 {
        MSUSB_PIPE_DESCRIPTOR ** MsPipes;
        int pnum, move = 0;
@@ -72,7 +72,7 @@ msusb_mspipes_read(uint8 * data, uint32 data_size, uint32 NumberOfPipes, int * o
        {
                MSUSB_PIPE_DESCRIPTOR * MsPipe = msusb_mspipe_new();
                
-               data_read_uint16(data + move, MsPipe->MaximumPacketSize);
+               data_read_UINT16(data + move, MsPipe->MaximumPacketSize);
                data_read_uint32(data + move + 4, MsPipe->MaximumTransferSize);
                data_read_uint32(data + move + 8, MsPipe->PipeFlags);
                move += 12;
@@ -126,23 +126,23 @@ msusb_msinterface_free_list(MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces, uint32 N
 }
 
 void
-msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR * MsConfig, uint8 InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR * NewMsInterface)
+msusb_msinterface_replace(MSUSB_CONFIG_DESCRIPTOR * MsConfig, BYTE InterfaceNumber, MSUSB_INTERFACE_DESCRIPTOR * NewMsInterface)
 {
        msusb_msinterface_free(MsConfig->MsInterfaces[InterfaceNumber]);
        MsConfig->MsInterfaces[InterfaceNumber] = NewMsInterface;       
 }
 
 MSUSB_INTERFACE_DESCRIPTOR *
-msusb_msinterface_read(uint8 * data, uint32 data_size, int * offset)
+msusb_msinterface_read(BYTE * data, uint32 data_size, int * offset)
 {
        MSUSB_INTERFACE_DESCRIPTOR * MsInterface;
        
        MsInterface = msusb_msinterface_new();
        
-       data_read_uint16(data, MsInterface->Length);
-       data_read_uint16(data + 2, MsInterface->NumberOfPipesExpected);
-       data_read_uint8(data + 4, MsInterface->InterfaceNumber);
-       data_read_uint8(data + 5, MsInterface->AlternateSetting);
+       data_read_UINT16(data, MsInterface->Length);
+       data_read_UINT16(data + 2, MsInterface->NumberOfPipesExpected);
+       data_read_BYTE(data + 4, MsInterface->InterfaceNumber);
+       data_read_BYTE(data + 5, MsInterface->AlternateSetting);
        data_read_uint32(data + 8, MsInterface->NumberOfPipes);
        *offset += 12;
 
@@ -163,26 +163,26 @@ msusb_msinterface_read(uint8 * data, uint32 data_size, int * offset)
 }
 
 int 
-msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, uint8 * data, int * offset)
+msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, BYTE * data, int * offset)
 {
        MSUSB_PIPE_DESCRIPTOR ** MsPipes;
        MSUSB_PIPE_DESCRIPTOR * MsPipe;
        int pnum = 0, move = 0;
        
        /* Length */
-       data_write_uint16(data, MsInterface->Length); 
+       data_write_UINT16(data, MsInterface->Length); 
        /* InterfaceNumber */
-       data_write_uint8(data + 2, MsInterface->InterfaceNumber); 
+       data_write_BYTE(data + 2, MsInterface->InterfaceNumber); 
        /* AlternateSetting */
-       data_write_uint8(data + 3, MsInterface->AlternateSetting); 
+       data_write_BYTE(data + 3, MsInterface->AlternateSetting); 
        /* bInterfaceClass */
-       data_write_uint8(data + 4, MsInterface->bInterfaceClass); 
+       data_write_BYTE(data + 4, MsInterface->bInterfaceClass); 
        /* bInterfaceSubClass */
-       data_write_uint8(data + 5, MsInterface->bInterfaceSubClass); 
+       data_write_BYTE(data + 5, MsInterface->bInterfaceSubClass); 
        /* bInterfaceProtocol */
-       data_write_uint8(data + 6, MsInterface->bInterfaceProtocol);
+       data_write_BYTE(data + 6, MsInterface->bInterfaceProtocol);
        /* Padding */ 
-       data_write_uint8(data + 7, 0);
+       data_write_BYTE(data + 7, 0);
        /* InterfaceHandle */
        data_write_uint32(data + 8, MsInterface->InterfaceHandle);
        /* NumberOfPipes */
@@ -194,11 +194,11 @@ msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, uint8 * data,
        {
                MsPipe = MsPipes[pnum];
                /* MaximumPacketSize */
-               data_write_uint16(data + move, MsPipe->MaximumPacketSize);
+               data_write_UINT16(data + move, MsPipe->MaximumPacketSize);
                /* EndpointAddress */
-               data_write_uint8(data + move + 2, MsPipe->bEndpointAddress);
+               data_write_BYTE(data + move + 2, MsPipe->bEndpointAddress);
                /* Interval */
-               data_write_uint8(data + move + 3, MsPipe->bInterval);
+               data_write_BYTE(data + move + 3, MsPipe->bInterval);
                /* PipeType */
                data_write_uint32(data + move + 4, MsPipe->PipeType);
                /* PipeHandle */
@@ -217,7 +217,7 @@ msusb_msinterface_write(MSUSB_INTERFACE_DESCRIPTOR * MsInterface, uint8 * data,
 }
 
 static MSUSB_INTERFACE_DESCRIPTOR **
-msusb_msinterface_read_list(uint8 * data, uint32 data_size, uint32 NumInterfaces)
+msusb_msinterface_read_list(BYTE * data, uint32 data_size, uint32 NumInterfaces)
 {
        MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces;
        int inum, offset = 0;
@@ -235,7 +235,7 @@ msusb_msinterface_read_list(uint8 * data, uint32 data_size, uint32 NumInterfaces
 }
 
 int
-msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR * MsConfg, uint8 * data, int * offset)
+msusb_msconfig_write(MSUSB_CONFIG_DESCRIPTOR * MsConfg, BYTE * data, int * offset)
 {
        MSUSB_INTERFACE_DESCRIPTOR ** MsInterfaces;
        MSUSB_INTERFACE_DESCRIPTOR * MsInterface;
@@ -279,29 +279,29 @@ msusb_msconfig_free(MSUSB_CONFIG_DESCRIPTOR * MsConfig)
 }
 
 MSUSB_CONFIG_DESCRIPTOR *
-msusb_msconfig_read(uint8 * data, uint32 data_size, uint32 NumInterfaces)
+msusb_msconfig_read(BYTE * data, uint32 data_size, uint32 NumInterfaces)
 {
        MSUSB_CONFIG_DESCRIPTOR * MsConfig;
-       uint8 lenConfiguration, typeConfiguration;
-       uint16 lenInterface;
+       BYTE lenConfiguration, typeConfiguration;
+       UINT16 lenInterface;
        int i, offset = 0;
        
        MsConfig = msusb_msconfig_new();
        
        for(i = 0; i < NumInterfaces; i++)
        {
-               data_read_uint16(data + offset, lenInterface);
+               data_read_UINT16(data + offset, lenInterface);
                offset += lenInterface;
        }
-       data_read_uint8(data + offset, lenConfiguration);
-       data_read_uint8(data + offset + 1, typeConfiguration);
+       data_read_BYTE(data + offset, lenConfiguration);
+       data_read_BYTE(data + offset + 1, typeConfiguration);
        if (lenConfiguration != 0x9 || typeConfiguration != 0x2)
        {
                DEBUG("%s: len and type must be 0x9 and 0x2 , but it is 0x%x and 0x%x", 
                        lenConfiguration, typeConfiguration);
        }
-       data_read_uint16(data + offset + 2, MsConfig->wTotalLength);
-       data_read_uint8(data + offset + 5, MsConfig->bConfigurationValue);
+       data_read_UINT16(data + offset + 2, MsConfig->wTotalLength);
+       data_read_BYTE(data + offset + 5, MsConfig->bConfigurationValue);
        MsConfig->NumInterfaces    = NumInterfaces;
        MsConfig->ConfigurationHandle = 0;
        MsConfig->InitCompleted    = 0;
index fa9b535..90b6548 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <freerdp/rail.h>
 
-void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, uint16 cbString)
+void rail_unicode_string_alloc(RAIL_UNICODE_STRING* unicode_string, UINT16 cbString)
 {
        unicode_string->length = cbString;
        unicode_string->string = malloc(cbString);
@@ -48,12 +48,12 @@ void rail_unicode_string_free(RAIL_UNICODE_STRING* unicode_string)
 
 void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string)
 {
-       stream_read_uint16(s, unicode_string->length); /* cbString (2 bytes) */
+       stream_read_UINT16(s, unicode_string->length); /* cbString (2 bytes) */
 
        if (unicode_string->string == NULL)
-               unicode_string->string = (uint8*) malloc(unicode_string->length);
+               unicode_string->string = (BYTE*) malloc(unicode_string->length);
        else
-               unicode_string->string = (uint8*) realloc(unicode_string->string, unicode_string->length);
+               unicode_string->string = (BYTE*) realloc(unicode_string->string, unicode_string->length);
 
        stream_read(s, unicode_string->string, unicode_string->length);
 }
@@ -61,7 +61,7 @@ void rail_read_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string)
 void rail_write_unicode_string(STREAM* s, RAIL_UNICODE_STRING* unicode_string)
 {
        stream_check_size(s, 2 + unicode_string->length);
-       stream_write_uint16(s, unicode_string->length); /* cbString (2 bytes) */
+       stream_write_UINT16(s, unicode_string->length); /* cbString (2 bytes) */
        stream_write(s, unicode_string->string, unicode_string->length); /* string */
 }
 
@@ -76,18 +76,18 @@ void rail_write_unicode_string_value(STREAM* s, RAIL_UNICODE_STRING* unicode_str
 
 void rail_read_rectangle_16(STREAM* s, RECTANGLE_16* rectangle_16)
 {
-       stream_read_uint16(s, rectangle_16->left); /* left (2 bytes) */
-       stream_read_uint16(s, rectangle_16->top); /* top (2 bytes) */
-       stream_read_uint16(s, rectangle_16->right); /* right (2 bytes) */
-       stream_read_uint16(s, rectangle_16->bottom); /* bottom (2 bytes) */
+       stream_read_UINT16(s, rectangle_16->left); /* left (2 bytes) */
+       stream_read_UINT16(s, rectangle_16->top); /* top (2 bytes) */
+       stream_read_UINT16(s, rectangle_16->right); /* right (2 bytes) */
+       stream_read_UINT16(s, rectangle_16->bottom); /* bottom (2 bytes) */
 }
 
 void rail_write_rectangle_16(STREAM* s, RECTANGLE_16* rectangle_16)
 {
-       stream_write_uint16(s, rectangle_16->left); /* left (2 bytes) */
-       stream_write_uint16(s, rectangle_16->top); /* top (2 bytes) */
-       stream_write_uint16(s, rectangle_16->right); /* right (2 bytes) */
-       stream_write_uint16(s, rectangle_16->bottom); /* bottom (2 bytes) */
+       stream_write_UINT16(s, rectangle_16->left); /* left (2 bytes) */
+       stream_write_UINT16(s, rectangle_16->top); /* top (2 bytes) */
+       stream_write_UINT16(s, rectangle_16->right); /* right (2 bytes) */
+       stream_write_UINT16(s, rectangle_16->bottom); /* bottom (2 bytes) */
 }
 
 void* rail_clone_order(uint32 event_type, void* order)
index 13e0504..599c5e7 100644 (file)
@@ -56,7 +56,7 @@ STREAM* stream_new(int size)
                if (size != 0)
                {
                        size = size > 0 ? size : 0x400;
-                       stream->data = (uint8*) xzalloc(size);
+                       stream->data = (BYTE*) xzalloc(size);
                        stream->p = stream->data;
                        stream->size = size;
                }
@@ -107,9 +107,9 @@ void stream_extend(STREAM* stream, int request_size)
        stream->size += increased_size;
 
        if (original_size == 0)
-               stream->data = (uint8*) malloc(stream->size);
+               stream->data = (BYTE*) malloc(stream->size);
        else
-               stream->data = (uint8*) realloc(stream->data, stream->size);
+               stream->data = (BYTE*) realloc(stream->data, stream->size);
 
        memset(stream->data + original_size, 0, increased_size);
        stream_set_pos(stream, pos);
index 99b287e..44f862b 100644 (file)
@@ -112,7 +112,7 @@ int freerdp_tcp_connect(const char* hostname, int port)
        return sockfd;
 }
 
-int freerdp_tcp_read(int sockfd, uint8* data, int length)
+int freerdp_tcp_read(int sockfd, BYTE* data, int length)
 {
        int status;
 
@@ -145,7 +145,7 @@ int freerdp_tcp_read(int sockfd, uint8* data, int length)
        return status;
 }
 
-int freerdp_tcp_write(int sockfd, uint8* data, int length)
+int freerdp_tcp_write(int sockfd, BYTE* data, int length)
 {
        int status;
 
index 7c73438..285205f 100644 (file)
@@ -1,7 +1,7 @@
 #include<stdio.h>
-typedef unsigned short uint16;
+typedef unsigned short UINT16;
 
-static uint16 HuffCodeLEC[] = {
+static UINT16 HuffCodeLEC[] = {
         0x0004, 0x0024, 0x0014, 0x0011, 0x0051, 0x0031, 0x0071, 0x0009, 0x0049, 0x0029, 0x0069, 0x0015, 0x0095, 
 0x0055, 0x00d5, 0x0035, 0x00b5, 0x0075, 0x001d, 0x00f5, 0x011d, 0x009d, 0x019d, 0x005d, 0x000d, 0x008d, 0x015d, 
 0x00dd, 0x01dd, 0x003d, 0x013d, 0x00bd, 0x004d, 0x01bd, 0x007d, 0x006b, 0x017d, 0x00fd, 0x01fd, 0x0003, 0x0103, 
@@ -24,20 +24,20 @@ static uint16 HuffCodeLEC[] = {
 0x002c, 0x001c, 0x0000, 0x003c, 0x0002, 0x0022, 0x0010, 0x0012, 0x0008, 0x0032, 0x000a, 0x002a, 0x001a, 0x003a, 
 0x0006, 0x0026, 0x0016, 0x0036, 0x000e, 0x002e, 0x001e, 0x003e, 0x0001, 0x00ed, 0x0018, 0x0021, 0x0025, 0x0065 };
 
-uint16 HashTable[512] = { [0 ... 511] = 0xffff };
+UINT16 HashTable[512] = { [0 ... 511] = 0xffff };
 
-static uint16 tab[8] = {511, 0, 508, 448, 494, 347, 486, 482};
+static UINT16 tab[8] = {511, 0, 508, 448, 494, 347, 486, 482};
 
-uint16 hash(uint16 key)
+UINT16 hash(UINT16 key)
 {
-        uint16 h;
+        UINT16 h;
         h = (key & 0x1ff) ^ (key  >> 9) ^ (key >> 4) ^ (key >> 7);
         return h;
 }
 
-uint16 minihash(uint16 key)
+UINT16 minihash(UINT16 key)
 {
-        uint16 h;
+        UINT16 h;
         h = ((((key >> 8) ^ (key & 0xff)) >> 2) & 0xf);
         if(key >> 9)
                 h = ~h;
@@ -47,7 +47,7 @@ uint16 minihash(uint16 key)
 void buildhashtable(void)
 {
         int i,j;
-        uint16 h;
+        UINT16 h;
         for(i=0;i<293;i++)
         {
                 h=hash(HuffCodeLEC[i]);
@@ -64,9 +64,9 @@ void buildhashtable(void)
         }
 }
 
-uint16 getvalue(uint16 huff)
+UINT16 getvalue(UINT16 huff)
 {
-        uint16 h = HashTable[hash(huff)];
+        UINT16 h = HashTable[hash(huff)];
         if((h ^ huff) >> 9)
                 return h & 0x1ff;
         else
@@ -77,7 +77,7 @@ main()
 {
         int i;
         buildhashtable();
-        printf("static uint16 HuffIndexLEC[512] = {\n");
+        printf("static UINT16 HuffIndexLEC[512] = {\n");
         for(i=0;i<512;i++)
         {
                 if(i == 511)
index 0644fb1..c1d4e36 100644 (file)
@@ -1,23 +1,23 @@
 #include<stdio.h>
-typedef unsigned short uint16;
-typedef unsigned char uint8;
-static uint16 HuffCodeLOM[] = {
+typedef unsigned short UINT16;
+typedef unsigned char BYTE;
+static UINT16 HuffCodeLOM[] = {
         0x0001, 0x0000, 0x0002, 0x0009, 0x0006, 0x0005, 0x000d, 0x000b, 0x0003, 0x001b, 0x0007, 0x0017, 0x0037, 
 0x000f, 0x004f, 0x006f, 0x002f, 0x00ef, 0x001f, 0x005f, 0x015f, 0x009f, 0x00df, 0x01df, 0x003f, 0x013f, 0x00bf, 
 0x01bf, 0x007f, 0x017f, 0x00ff, 0x01ff };
 
-uint16 HashTable[32] = { [0 ... 31] = 0xffff };
+UINT16 HashTable[32] = { [0 ... 31] = 0xffff };
 
-uint8 tab[4] = { 0, 4, 10, 19 };
+BYTE tab[4] = { 0, 4, 10, 19 };
 
-uint16 hash(uint16 key)
+UINT16 hash(UINT16 key)
 {
         return ((key & 0x1f) ^ (key  >> 5) ^ (key >> 9));
 }
 
-uint8 minihash(uint16 key)
+BYTE minihash(UINT16 key)
 {
-        uint8 h;
+        BYTE h;
         h = (key >> 4) & 0xf;
         return ((h ^ (h >> 2) ^ (h >> 3)) & 0x3);
 }
@@ -25,7 +25,7 @@ uint8 minihash(uint16 key)
 void buildhashtable(void)
 {
         int i,j;
-        uint16 h;
+        UINT16 h;
         for(i=0;i<32;i++)
         {
                 h=hash(HuffCodeLOM[i]);
@@ -43,9 +43,9 @@ void buildhashtable(void)
         }
 }
 
-uint8 getvalue(uint16 huff)
+BYTE getvalue(UINT16 huff)
 {
-        uint16 h = HashTable[hash(huff)];
+        UINT16 h = HashTable[hash(huff)];
         if((h ^ huff) >> 5)
         {
                 return h & 0x1f;
@@ -58,7 +58,7 @@ main()
 {
         int i;
         buildhashtable();
-        printf("static uint16 HuffIndexLOM[32] = {\n");
+        printf("static UINT16 HuffIndexLOM[32] = {\n");
         for(i=0;i<32;i++)
         {
                 if(i == 31)
index 82479b9..08941af 100644 (file)
@@ -144,7 +144,7 @@ static void test_peer_draw_background(freerdp_peer* client)
        int size;
        STREAM* s;
        RFX_RECT rect;
-       uint8* rgb_data;
+       BYTE* rgb_data;
        rdpUpdate* update = client->update;
        SURFACE_BITS_COMMAND* cmd = &update->surface_bits_command;
        testPeerContext* context = (testPeerContext*) client->context;
@@ -200,7 +200,7 @@ static void test_peer_load_icon(freerdp_peer* client)
        FILE* fp;
        int i;
        char line[50];
-       uint8* rgb_data;
+       BYTE* rgb_data;
        int c;
 
        if (!client->settings->rfx_codec && !client->settings->ns_codec)
@@ -226,7 +226,7 @@ static void test_peer_load_icon(freerdp_peer* client)
                if (fgets(line, sizeof(line), fp))
                {
                        sscanf(line, "%d", &c);
-                       rgb_data[i] = (uint8)c;
+                       rgb_data[i] = (BYTE)c;
                }
        }
 
@@ -414,7 +414,7 @@ static void* tf_debug_channel_thread_func(void* arg)
 
        s = stream_new(4096);
 
-       WTSVirtualChannelWrite(context->debug_channel, (uint8*) "test1", 5, NULL);
+       WTSVirtualChannelWrite(context->debug_channel, (BYTE*) "test1", 5, NULL);
 
        while (1)
        {
@@ -542,7 +542,7 @@ void tf_peer_synchronize_event(rdpInput* input, uint32 flags)
        printf("Client sent a synchronize event (flags:0x%X)\n", flags);
 }
 
-void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void tf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        freerdp_peer* client = input->context->peer;
        rdpUpdate* update = client->update;
@@ -569,7 +569,7 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
        {
                if (context->debug_channel)
                {
-                       WTSVirtualChannelWrite(context->debug_channel, (uint8*) "test2", 5, NULL);
+                       WTSVirtualChannelWrite(context->debug_channel, (BYTE*) "test2", 5, NULL);
                }
        }
        else if ((flags & 0x4000) && code == 0x2D) /* 'x' key */
@@ -595,26 +595,26 @@ void tf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
        }
 }
 
-void tf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void tf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        printf("Client sent a unicode keyboard event (flags:0x%X code:0x%X)\n", flags, code);
 }
 
-void tf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void tf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        //printf("Client sent a mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y);
 
        test_peer_draw_icon(input->context->peer, x + 10, y);
 }
 
-void tf_peer_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void tf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        //printf("Client sent an extended mouse event (flags:0x%X pos:%d,%d)\n", flags, x, y);
 }
 
-static void tf_peer_refresh_rect(rdpContext* context, uint8 count, RECTANGLE_16* areas)
+static void tf_peer_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_16* areas)
 {
-       uint8 i;
+       BYTE i;
 
        printf("Client requested to refresh:\n");
 
@@ -624,7 +624,7 @@ static void tf_peer_refresh_rect(rdpContext* context, uint8 count, RECTANGLE_16*
        }
 }
 
-static void tf_peer_suppress_output(rdpContext* context, uint8 allow, RECTANGLE_16* area)
+static void tf_peer_suppress_output(rdpContext* context, BYTE allow, RECTANGLE_16* area)
 {
        if (allow > 0)
        {
index 2ef6c1f..616899c 100644 (file)
@@ -36,8 +36,8 @@ struct test_peer_context
        RFX_CONTEXT* rfx_context;\r
        NSC_CONTEXT* nsc_context;\r
        STREAM* s;\r
-       uint8* icon_data;\r
-       uint8* bg_data;\r
+       BYTE* icon_data;\r
+       BYTE* bg_data;\r
        int icon_width;\r
        int icon_height;\r
        int icon_x;\r
index ba6cac3..15fa7ed 100644 (file)
@@ -295,7 +295,7 @@ BOOL wf_info_have_invalid_region(wfInfo* wfi)
        return IsRectEmpty(&wfi->invalid);\r
 }\r
 \r
-void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, uint8** pBits, int* pitch)\r
+void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, BYTE** pBits, int* pitch)\r
 {\r
        *width = (wfi->invalid.right - wfi->invalid.left);\r
        *height = (wfi->invalid.bottom - wfi->invalid.top);\r
@@ -312,7 +312,7 @@ void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, uint8** pBits
                *height += 1;\r
 \r
                offset = (4 * wfi->invalid.left) + (wfi->invalid.top * wfi->width * 4);\r
-               *pBits = ((uint8*) (changes->Userbuffer)) + offset;\r
+               *pBits = ((BYTE*) (changes->Userbuffer)) + offset;\r
                *pitch = wfi->width * 4;\r
        }\r
 #endif\r
index e207a37..bad196d 100644 (file)
@@ -36,6 +36,6 @@ void wf_info_find_invalid_region(wfInfo* wfi);
 void wf_info_clear_invalid_region(wfInfo* wfi);\r
 void wf_info_invalidate_full_screen(wfInfo* wfi);\r
 BOOL wf_info_have_invalid_region(wfInfo* wfi);\r
-void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, uint8** pBits, int* pitch);\r
+void wf_info_getScreenData(wfInfo* wfi, long* width, long* height, BYTE** pBits, int* pitch);\r
 \r
 #endif /* WF_INFO_H */
\ No newline at end of file
index ecb0c2d..09fd9b0 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "wf_input.h"
 
-void wf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        INPUT keyboard_event;
 
@@ -45,7 +45,7 @@ void wf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
        SendInput(1, &keyboard_event, sizeof(INPUT));
 }
 
-void wf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        INPUT keyboard_event;
 
@@ -62,7 +62,7 @@ void wf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
        SendInput(1, &keyboard_event, sizeof(INPUT));
 }
 
-void wf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        INPUT mouse_event;
        float width, height;
@@ -127,7 +127,7 @@ void wf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
        }
 }
 
-void wf_peer_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
        if ((flags & PTR_XFLAGS_BUTTON1) || (flags & PTR_XFLAGS_BUTTON2))
        {
index 861bc8d..8409cfd 100644 (file)
@@ -22,9 +22,9 @@
 
 #include "wf_interface.h"
 
-void wf_peer_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void wf_peer_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void wf_peer_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
-void wf_peer_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
+void wf_peer_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void wf_peer_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void wf_peer_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
+void wf_peer_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
 
 #endif /* WF_INPUT_H */
index 3c225a6..3a50a9d 100644 (file)
@@ -92,7 +92,7 @@ BOOL wfreerdp_server_start(wfServer* server)
 
        wf_settings_read_dword(HKEY_LOCAL_MACHINE, _T("Software\\FreeRDP\\Server"), _T("DefaultPort"), &server->port);
 
-       if (instance->Open(instance, NULL, (uint16) server->port))
+       if (instance->Open(instance, NULL, (UINT16) server->port))
        {
                server->thread = CreateThread(NULL, 0, wf_server_main_loop, (void*) instance, 0, NULL);
                return TRUE;
index 9045075..cb9e29f 100644 (file)
@@ -107,7 +107,7 @@ void wf_update_encode(wfInfo* wfi)
        
        RFX_RECT rect;
        long height, width;
-       uint8* pDataBits = NULL;
+       BYTE* pDataBits = NULL;
        int stride;
        
        SURFACE_BITS_COMMAND* cmd;
@@ -122,8 +122,8 @@ void wf_update_encode(wfInfo* wfi)
 
        rect.x = 0;
        rect.y = 0;
-       rect.width = (uint16) width;
-       rect.height = (uint16) height;
+       rect.width = (UINT16) width;
+       rect.height = (UINT16) height;
 
        //printf("x:%d y:%d w:%d h:%d\n", wfi->invalid.left, wfi->invalid.top, width, height);
 
index c1afbca..a646b58 100644 (file)
@@ -32,7 +32,7 @@ void xf_input_synchronize_event(rdpInput* input, uint32 flags)
        printf("Client sent a synchronize event (flags:0x%X)\n", flags);
 }
 
-void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void xf_input_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
 #ifdef WITH_XTEST
        unsigned int keycode;
@@ -63,12 +63,12 @@ void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
 #endif
 }
 
-void xf_input_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
+void xf_input_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code)
 {
        printf("Client sent a unicode keyboard event (flags:0x%X code:0x%X)\n", flags, code);
 }
 
-void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void xf_input_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
 #ifdef WITH_XTEST
        xfPeerContext* xfp = (xfPeerContext*) input->context;
@@ -115,7 +115,7 @@ void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
 #endif
 }
 
-void xf_input_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
+void xf_input_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y)
 {
 #ifdef WITH_XTEST
        xfPeerContext* xfp = (xfPeerContext*) input->context;
index 465a024..b53b27d 100644 (file)
 #include "xfreerdp.h"
 
 void xf_input_synchronize_event(rdpInput* input, uint32 flags);
-void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void xf_input_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
-void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
-void xf_input_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
+void xf_input_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void xf_input_unicode_keyboard_event(rdpInput* input, UINT16 flags, UINT16 code);
+void xf_input_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
+void xf_input_extended_mouse_event(rdpInput* input, UINT16 flags, UINT16 x, UINT16 y);
 void xf_input_register_callbacks(rdpInput* input);
 
 #endif /* __XF_INPUT_H */
index 36d062e..2fcb19b 100644 (file)
@@ -398,7 +398,7 @@ void xf_peer_dump_rfx(freerdp_peer* client)
 void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int height)
 {
        STREAM* s;
-       uint8* data;
+       BYTE* data;
        xfInfo* xfi;
        RFX_RECT rect;
        XImage* image;
@@ -429,7 +429,7 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh
 
                image = xf_snapshot(xfp, x, y, width, height);
 
-               data = (uint8*) image->data;
+               data = (BYTE*) image->data;
                data = &data[(y * image->bytes_per_line) + (x * image->bits_per_pixel / 8)];
 
                rfx_compose_message(xfp->rfx_context, s, &rect, 1, data,
@@ -450,7 +450,7 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh
                image = xf_snapshot(xfp, x, y, width, height);
 
                rfx_compose_message(xfp->rfx_context, s, &rect, 1,
-                               (uint8*) image->data, width, height, width * xfi->bytesPerPixel);
+                               (BYTE*) image->data, width, height, width * xfi->bytesPerPixel);
 
                cmd->destLeft = x;
                cmd->destTop = y;