types: refactoring to make use of standard data types when available

This commit is contained in:
Marc-André Moreau 2011-11-19 12:19:16 -05:00
parent 300fe32eba
commit a63a196f53
106 changed files with 1456 additions and 1413 deletions

View File

@ -99,6 +99,10 @@ check_include_files(sys/socket.h HAVE_SYS_SOCKET_H)
check_include_files(netdb.h HAVE_NETDB_H)
check_include_files(fcntl.h HAVE_FCNTL_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(limits.h HAVE_LIMITS_H)
check_include_files(stdint.h HAVE_STDINT_H)
check_include_files(stdbool.h HAVE_STDBOOL_H)
check_include_files(inttypes.h HAVE_INTTYPES_H)
# Libraries that we have a hard dependency on
find_required_package(OpenSSL)

View File

@ -106,7 +106,7 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, uint3
if (num_formats * 36 != length)
DEBUG_WARN("dataLen %d not divided by 36!", length);
ascii = (flags & CB_ASCII_NAMES) ? True : False;
ascii = (flags & CB_ASCII_NAMES) ? true : false;
cliprdr->format_names = (CLIPRDR_FORMAT_NAME*) xmalloc(sizeof(CLIPRDR_FORMAT_NAME) * num_formats);
cliprdr->num_format_names = num_formats;
@ -198,7 +198,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL
for (i = 0; i < cliprdr->num_format_names; i++)
{
supported = True;
supported = true;
format_name = &cliprdr->format_names[i];
format = format_name->id;
@ -237,7 +237,7 @@ void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataL
}
}
supported = False;
supported = false;
break;
}

View File

@ -113,18 +113,18 @@ static void cliprdr_process_general_capability(cliprdrPlugin* cliprdr, STREAM* s
#endif
if (generalFlags & CB_USE_LONG_FORMAT_NAMES)
cliprdr->use_long_format_names = True;
cliprdr->use_long_format_names = true;
if (generalFlags & CB_STREAM_FILECLIP_ENABLED)
cliprdr->stream_fileclip_enabled = True;
cliprdr->stream_fileclip_enabled = true;
if (generalFlags & CB_FILECLIP_NO_FILE_PATHS)
cliprdr->fileclip_no_file_paths = True;
cliprdr->fileclip_no_file_paths = true;
if (generalFlags & CB_CAN_LOCK_CLIPDATA)
cliprdr->can_lock_clipdata = True;
cliprdr->can_lock_clipdata = true;
cliprdr->received_caps = True;
cliprdr->received_caps = true;
}
static void cliprdr_process_clip_caps(cliprdrPlugin* cliprdr, STREAM* s)

View File

@ -61,7 +61,7 @@ static boolean audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_h
{
DEBUG_WARN("snd_pcm_hw_params_malloc (%s)",
snd_strerror(error));
return False;
return false;
}
snd_pcm_hw_params_any(capture_handle, hw_params);
snd_pcm_hw_params_set_access(capture_handle, hw_params,
@ -84,7 +84,7 @@ static boolean audin_alsa_set_params(AudinALSADevice* alsa, snd_pcm_t* capture_h
alsa->actual_rate, alsa->actual_channels,
alsa->target_rate, alsa->target_channels);
}
return True;
return true;
}
static boolean audin_alsa_thread_receive(AudinALSADevice* alsa, uint8* src, int size)
@ -246,7 +246,7 @@ static boolean audin_alsa_format_supported(IAudinDevice* device, audinFormat* fo
(format->wBitsPerSample == 8 || format->wBitsPerSample == 16) &&
(format->nChannels == 1 || format->nChannels == 2))
{
return True;
return true;
}
break;
@ -255,11 +255,11 @@ static boolean audin_alsa_format_supported(IAudinDevice* device, audinFormat* fo
(format->wBitsPerSample == 4) &&
(format->nChannels == 1 || format->nChannels == 2))
{
return True;
return true;
}
break;
}
return False;
return false;
}
static void audin_alsa_set_format(IAudinDevice* device, audinFormat* format, uint32 FramesPerPacket)

View File

@ -222,7 +222,7 @@ static boolean audin_receive_wave_data(uint8* data, int size, void* user_data)
error = audin_send_incoming_data_pdu((IWTSVirtualChannelCallback*) callback);
if (error != 0)
return False;
return false;
out = stream_new(size + 1);
stream_write_uint8(out, MSG_SNDIN_DATA);
@ -230,7 +230,7 @@ static boolean audin_receive_wave_data(uint8* data, int size, void* user_data)
error = callback->channel->Write(callback->channel, stream_get_length(out), stream_get_head(out), NULL);
stream_free(out);
return (error == 0 ? True : False);
return (error == 0 ? true : false);
}
static int audin_process_open(IWTSVirtualChannelCallback* pChannelCallback, STREAM* s)
@ -450,7 +450,7 @@ static boolean audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, R
}
if (entry == NULL)
{
return False;
return false;
}
entryPoints.plugin = pPlugin;
@ -459,10 +459,10 @@ static boolean audin_load_device_plugin(IWTSPlugin* pPlugin, const char* name, R
if (entry(&entryPoints) != 0)
{
DEBUG_WARN("%s entry returns error.", name);
return False;
return false;
}
return True;
return true;
}
static boolean audin_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* data)
@ -476,17 +476,17 @@ static boolean audin_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* d
if (data->data[1] && strcmp((char*)data->data[1], "format") == 0)
{
audin->fixed_format = atoi(data->data[2]);
return True;
return true;
}
else if (data->data[1] && strcmp((char*)data->data[1], "rate") == 0)
{
audin->fixed_rate = atoi(data->data[2]);
return True;
return true;
}
else if (data->data[1] && strcmp((char*)data->data[1], "channel") == 0)
{
audin->fixed_channel = atoi(data->data[2]);
return True;
return true;
}
else if (data->data[1] && ((char*)data->data[1])[0])
{
@ -511,7 +511,7 @@ static boolean audin_process_plugin_data(IWTSPlugin* pPlugin, RDP_PLUGIN_DATA* d
}
}
return True;
return true;
}
int DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)

View File

@ -80,13 +80,13 @@ static boolean audin_pulse_connect(IAudinDevice* device)
AudinPulseDevice* pulse = (AudinPulseDevice*) device;
if (!pulse->context)
return False;
return false;
if (pa_context_connect(pulse->context, NULL, 0, NULL))
{
DEBUG_WARN("pa_context_connect failed (%d)",
pa_context_errno(pulse->context));
return False;
return false;
}
pa_threaded_mainloop_lock(pulse->mainloop);
if (pa_threaded_mainloop_start(pulse->mainloop) < 0)
@ -94,7 +94,7 @@ static boolean audin_pulse_connect(IAudinDevice* device)
pa_threaded_mainloop_unlock(pulse->mainloop);
DEBUG_WARN("pa_threaded_mainloop_start failed (%d)",
pa_context_errno(pulse->context));
return False;
return false;
}
for (;;)
{
@ -113,12 +113,12 @@ static boolean audin_pulse_connect(IAudinDevice* device)
if (state == PA_CONTEXT_READY)
{
DEBUG_DVC("connected");
return True;
return true;
}
else
{
pa_context_disconnect(pulse->context);
return False;
return false;
}
}
@ -163,7 +163,7 @@ static boolean audin_pulse_format_supported(IAudinDevice* device, audinFormat* f
(format->wBitsPerSample == 8 || format->wBitsPerSample == 16) &&
(format->nChannels >= 1 && format->nChannels <= PA_CHANNELS_MAX))
{
return True;
return true;
}
break;
@ -174,7 +174,7 @@ static boolean audin_pulse_format_supported(IAudinDevice* device, audinFormat* f
(format->wBitsPerSample == 8) &&
(format->nChannels >= 1 && format->nChannels <= PA_CHANNELS_MAX))
{
return True;
return true;
}
break;
@ -183,11 +183,11 @@ static boolean audin_pulse_format_supported(IAudinDevice* device, audinFormat* f
(format->wBitsPerSample == 4) &&
(format->nChannels == 1 || format->nChannels == 2))
{
return True;
return true;
}
break;
}
return False;
return false;
}
static void audin_pulse_set_format(IAudinDevice* device, audinFormat* format, uint32 FramesPerPacket)

View File

@ -50,11 +50,11 @@ static boolean tsmf_alsa_open_device(TSMFALSAAudioDevice* alsa)
if (error < 0)
{
DEBUG_WARN("failed to open device %s", alsa->device);
return False;
return false;
}
DEBUG_DVC("open device %s", alsa->device);
return True;
return true;
}
static boolean tsmf_alsa_open(ITSMFAudioDevice* audio, const char* device)
@ -84,7 +84,7 @@ static boolean tsmf_alsa_set_format(ITSMFAudioDevice* audio,
TSMFALSAAudioDevice* alsa = (TSMFALSAAudioDevice*) audio;
if (!alsa->out_handle)
return False;
return false;
snd_pcm_drop(alsa->out_handle);
@ -96,7 +96,7 @@ static boolean tsmf_alsa_set_format(ITSMFAudioDevice* audio,
if (error < 0)
{
DEBUG_WARN("snd_pcm_hw_params_malloc failed");
return False;
return false;
}
snd_pcm_hw_params_any(alsa->out_handle, hw_params);
snd_pcm_hw_params_set_access(alsa->out_handle, hw_params,
@ -117,7 +117,7 @@ static boolean tsmf_alsa_set_format(ITSMFAudioDevice* audio,
if (error < 0)
{
DEBUG_WARN("snd_pcm_sw_params_malloc");
return False;
return false;
}
snd_pcm_sw_params_current(alsa->out_handle, sw_params);
snd_pcm_sw_params_set_start_threshold(alsa->out_handle, sw_params,
@ -138,7 +138,7 @@ static boolean tsmf_alsa_set_format(ITSMFAudioDevice* audio,
alsa->actual_rate, alsa->actual_channels,
alsa->source_rate, alsa->source_channels);
}
return True;
return true;
}
static boolean tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_size)
@ -166,7 +166,6 @@ static boolean tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_
{
resampled_data = NULL;
src = data;
data_size = data_size;
}
else
{
@ -210,7 +209,7 @@ static boolean tsmf_alsa_play(ITSMFAudioDevice* audio, uint8* data, uint32 data_
}
xfree(data);
return True;
return true;
}
static uint64 tsmf_alsa_get_latency(ITSMFAudioDevice* audio)

View File

@ -58,10 +58,10 @@ static boolean tsmf_ffmpeg_init_context(ITSMFDecoder* decoder)
if (!mdecoder->codec_context)
{
DEBUG_WARN("avcodec_alloc_context failed.");
return False;
return false;
}
return True;
return true;
}
static boolean tsmf_ffmpeg_init_video_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type)
@ -76,7 +76,7 @@ static boolean tsmf_ffmpeg_init_video_stream(ITSMFDecoder* decoder, const TS_AM_
mdecoder->frame = avcodec_alloc_frame();
return True;
return true;
}
static boolean tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type)
@ -98,7 +98,7 @@ static boolean tsmf_ffmpeg_init_audio_stream(ITSMFDecoder* decoder, const TS_AM_
#endif
#endif
return True;
return true;
}
static boolean tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYPE* media_type)
@ -112,7 +112,7 @@ static boolean tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_
if (!mdecoder->codec)
{
DEBUG_WARN("avcodec_find_decoder failed.");
return False;
return false;
}
mdecoder->codec_context->codec_id = mdecoder->codec_id;
@ -121,12 +121,12 @@ static boolean tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_
if (mdecoder->media_type == AVMEDIA_TYPE_VIDEO)
{
if (!tsmf_ffmpeg_init_video_stream(decoder, media_type))
return False;
return false;
}
else if (mdecoder->media_type == AVMEDIA_TYPE_AUDIO)
{
if (!tsmf_ffmpeg_init_audio_stream(decoder, media_type))
return False;
return false;
}
if (media_type->ExtraData)
@ -167,7 +167,7 @@ static boolean tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_
if (mdecoder->codec->capabilities & CODEC_CAP_TRUNCATED)
mdecoder->codec_context->flags |= CODEC_FLAG_TRUNCATED;
return True;
return true;
}
static boolean tsmf_ffmpeg_prepare(ITSMFDecoder* decoder)
@ -177,12 +177,12 @@ static boolean tsmf_ffmpeg_prepare(ITSMFDecoder* decoder)
if (avcodec_open(mdecoder->codec_context, mdecoder->codec) < 0)
{
DEBUG_WARN("avcodec_open failed.");
return False;
return false;
}
mdecoder->prepared = 1;
return True;
return true;
}
static boolean tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type)
@ -198,7 +198,7 @@ static boolean tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* m
mdecoder->media_type = AVMEDIA_TYPE_AUDIO;
break;
default:
return False;
return false;
}
switch (media_type->SubType)
{
@ -242,17 +242,17 @@ static boolean tsmf_ffmpeg_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* m
mdecoder->codec_id = CODEC_ID_AC3;
break;
default:
return False;
return false;
}
if (!tsmf_ffmpeg_init_context(decoder))
return False;
return false;
if (!tsmf_ffmpeg_init_stream(decoder, media_type))
return False;
return false;
if (!tsmf_ffmpeg_prepare(decoder))
return False;
return false;
return True;
return true;
}
static boolean tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
@ -261,7 +261,7 @@ static boolean tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data
int decoded;
int len;
AVFrame* frame;
boolean ret = True;
boolean ret = true;
#if LIBAVCODEC_VERSION_MAJOR < 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR <= 20)
len = avcodec_decode_video(mdecoder->codec_context, mdecoder->frame, &decoded, data, data_size);
@ -280,12 +280,12 @@ static boolean tsmf_ffmpeg_decode_video(ITSMFDecoder* decoder, const uint8* data
if (len < 0)
{
DEBUG_WARN("data_size %d, avcodec_decode_video failed (%d)", data_size, len);
ret = False;
ret = false;
}
else if (!decoded)
{
DEBUG_WARN("data_size %d, no frame is decoded.", data_size);
ret = False;
ret = false;
}
else
{
@ -401,7 +401,7 @@ static boolean tsmf_ffmpeg_decode_audio(ITSMFDecoder* decoder, const uint8* data
DEBUG_DVC("data_size %d decoded_size %d",
data_size, mdecoder->decoded_size);
return True;
return true;
}
static boolean tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions)
@ -423,7 +423,7 @@ static boolean tsmf_ffmpeg_decode(ITSMFDecoder* decoder, const uint8* data, uint
return tsmf_ffmpeg_decode_audio(decoder, data, data_size, extensions);
default:
DEBUG_WARN("unknown media type.");
return False;
return false;
}
}
@ -463,11 +463,11 @@ static boolean tsmf_ffmpeg_get_decoded_dimension(ITSMFDecoder* decoder, uint32*
{
*width = mdecoder->codec_context->width;
*height = mdecoder->codec_context->height;
return True;
return true;
}
else
{
return False;
return false;
}
}
@ -490,7 +490,7 @@ static void tsmf_ffmpeg_free(ITSMFDecoder* decoder)
xfree(decoder);
}
static boolean initialized = False;
static boolean initialized = false;
ITSMFDecoder*
TSMFDecoderEntry(void)
@ -501,7 +501,7 @@ TSMFDecoderEntry(void)
{
avcodec_init();
avcodec_register_all();
initialized = True;
initialized = true;
}
decoder = xnew(TSMFFFmpegDecoder);

View File

@ -67,13 +67,13 @@ static boolean tsmf_pulse_connect(TSMFPulseAudioDevice* pulse)
pa_context_state_t state;
if (!pulse->context)
return False;
return false;
if (pa_context_connect(pulse->context, NULL, 0, NULL))
{
DEBUG_WARN("pa_context_connect failed (%d)",
pa_context_errno(pulse->context));
return False;
return false;
}
pa_threaded_mainloop_lock(pulse->mainloop);
if (pa_threaded_mainloop_start(pulse->mainloop) < 0)
@ -81,7 +81,7 @@ static boolean tsmf_pulse_connect(TSMFPulseAudioDevice* pulse)
pa_threaded_mainloop_unlock(pulse->mainloop);
DEBUG_WARN("pa_threaded_mainloop_start failed (%d)",
pa_context_errno(pulse->context));
return False;
return false;
}
for (;;)
{
@ -100,12 +100,12 @@ static boolean tsmf_pulse_connect(TSMFPulseAudioDevice* pulse)
if (state == PA_CONTEXT_READY)
{
DEBUG_DVC("connected");
return True;
return true;
}
else
{
pa_context_disconnect(pulse->context);
return False;
return false;
}
}
@ -122,23 +122,23 @@ static boolean tsmf_pulse_open(ITSMFAudioDevice* audio, const char* device)
if (!pulse->mainloop)
{
DEBUG_WARN("pa_threaded_mainloop_new failed");
return False;
return false;
}
pulse->context = pa_context_new(pa_threaded_mainloop_get_api(pulse->mainloop), "freerdp");
if (!pulse->context)
{
DEBUG_WARN("pa_context_new failed");
return False;
return false;
}
pa_context_set_state_callback(pulse->context, tsmf_pulse_context_state_callback, pulse);
if (tsmf_pulse_connect(pulse))
{
DEBUG_WARN("tsmf_pulse_connect failed");
return False;
return false;
}
DEBUG_DVC("open device %s", pulse->device);
return True;
return true;
}
static void tsmf_pulse_stream_success_callback(pa_stream* stream, int success, void* userdata)
@ -196,7 +196,7 @@ static void tsmf_pulse_stream_request_callback(pa_stream* stream, size_t length,
static boolean tsmf_pulse_close_stream(TSMFPulseAudioDevice* pulse)
{
if (!pulse->context || !pulse->stream)
return False;
return false;
DEBUG_DVC("");
@ -209,7 +209,7 @@ static boolean tsmf_pulse_close_stream(TSMFPulseAudioDevice* pulse)
pulse->stream = NULL;
pa_threaded_mainloop_unlock(pulse->mainloop);
return True;
return true;
}
static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse)
@ -218,7 +218,7 @@ static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse)
pa_buffer_attr buffer_attr = { 0 };
if (!pulse->context)
return False;
return false;
DEBUG_DVC("");
@ -230,7 +230,7 @@ static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse)
pa_threaded_mainloop_unlock(pulse->mainloop);
DEBUG_WARN("pa_stream_new failed (%d)",
pa_context_errno(pulse->context));
return False;
return false;
}
pa_stream_set_state_callback(pulse->stream,
tsmf_pulse_stream_state_callback, pulse);
@ -249,7 +249,7 @@ static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse)
pa_threaded_mainloop_unlock(pulse->mainloop);
DEBUG_WARN("pa_stream_connect_playback failed (%d)",
pa_context_errno(pulse->context));
return False;
return false;
}
for (;;)
@ -269,12 +269,12 @@ static boolean tsmf_pulse_open_stream(TSMFPulseAudioDevice* pulse)
if (state == PA_STREAM_READY)
{
DEBUG_DVC("connected");
return True;
return true;
}
else
{
tsmf_pulse_close_stream(pulse);
return False;
return false;
}
}
@ -333,7 +333,7 @@ static boolean tsmf_pulse_play(ITSMFAudioDevice* audio, uint8* data, uint32 data
}
xfree(data);
return True;
return true;
}
static uint64 tsmf_pulse_get_latency(ITSMFAudioDevice* audio)

View File

@ -261,7 +261,7 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
{
int i;
uint32 cbFormat;
boolean ret = True;
boolean ret = true;
memset(mediatype, 0, sizeof(TS_AM_MEDIA_TYPE));
@ -275,7 +275,7 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
}
mediatype->MajorType = tsmf_major_type_map[i].type;
if (mediatype->MajorType == TSMF_MAJOR_TYPE_UNKNOWN)
ret = False;
ret = false;
DEBUG_DVC("MajorType %s", tsmf_major_type_map[i].name);
stream_seek(s, 16);
@ -289,7 +289,7 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
}
mediatype->SubType = tsmf_sub_type_map[i].type;
if (mediatype->SubType == TSMF_SUB_TYPE_UNKNOWN)
ret = False;
ret = false;
DEBUG_DVC("SubType %s", tsmf_sub_type_map[i].name);
stream_seek(s, 16);
@ -306,7 +306,7 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
}
mediatype->FormatType = tsmf_format_type_map[i].type;
if (mediatype->FormatType == TSMF_FORMAT_TYPE_UNKNOWN)
ret = False;
ret = false;
DEBUG_DVC("FormatType %s", tsmf_format_type_map[i].name);
stream_seek(s, 16);
@ -362,7 +362,7 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
/* http://msdn.microsoft.com/en-us/library/dd390707.aspx */
i = tsmf_codec_parse_VIDEOINFOHEADER2(mediatype, s);
i += tsmf_codec_parse_BITMAPINFOHEADER(mediatype, s, True);
i += tsmf_codec_parse_BITMAPINFOHEADER(mediatype, s, true);
if (cbFormat > i)
{
mediatype->ExtraDataSize = cbFormat - i;
@ -372,7 +372,7 @@ boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s)
case TSMF_FORMAT_TYPE_VIDEOINFO2:
i = tsmf_codec_parse_VIDEOINFOHEADER2(mediatype, s);
i += tsmf_codec_parse_BITMAPINFOHEADER(mediatype, s, False);
i += tsmf_codec_parse_BITMAPINFOHEADER(mediatype, s, false);
if (cbFormat > i)
{
mediatype->ExtraDataSize = cbFormat - i;

View File

@ -27,7 +27,7 @@ typedef struct _ITSMFDecoder ITSMFDecoder;
struct _ITSMFDecoder
{
/* Set the decoder format. Return True if supported. */
/* Set the decoder format. Return true if supported. */
boolean (*SetFormat) (ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* media_type);
/* Decode a sample. */
boolean (*Decode) (ITSMFDecoder* decoder, const uint8* data, uint32 data_size, uint32 extensions);

View File

@ -129,7 +129,7 @@ int tsmf_ifman_on_new_presentation(TSMF_IFMAN* ifman)
if (presentation == NULL)
error = 1;
tsmf_presentation_set_audio_device(presentation, ifman->audio_name, ifman->audio_device);
ifman->output_pending = True;
ifman->output_pending = true;
return error;
}
@ -155,7 +155,7 @@ int tsmf_ifman_add_stream(TSMF_IFMAN* ifman)
if (stream)
tsmf_stream_set_format(stream, ifman->decoder_name, ifman->input);
}
ifman->output_pending = True;
ifman->output_pending = true;
return error;
}
@ -193,7 +193,7 @@ int tsmf_ifman_remove_stream(TSMF_IFMAN* ifman)
else
error = 1;
}
ifman->output_pending = True;
ifman->output_pending = true;
return error;
}
@ -216,21 +216,21 @@ int tsmf_ifman_shutdown_presentation(TSMF_IFMAN* ifman)
int tsmf_ifman_on_stream_volume(TSMF_IFMAN* ifman)
{
DEBUG_DVC("");
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
int tsmf_ifman_on_channel_volume(TSMF_IFMAN* ifman)
{
DEBUG_DVC("");
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
int tsmf_ifman_set_video_window(TSMF_IFMAN* ifman)
{
DEBUG_DVC("");
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
@ -294,21 +294,21 @@ int tsmf_ifman_update_geometry_info(TSMF_IFMAN* ifman)
}
tsmf_presentation_set_geometry_info(presentation, Left, Top, Width, Height, num_rects, rects);
}
ifman->output_pending = True;
ifman->output_pending = true;
return error;
}
int tsmf_ifman_set_allocator(TSMF_IFMAN* ifman)
{
DEBUG_DVC("");
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
int tsmf_ifman_notify_preroll(TSMF_IFMAN* ifman)
{
DEBUG_DVC("");
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
@ -354,7 +354,7 @@ int tsmf_ifman_on_sample(TSMF_IFMAN* ifman)
ifman->message_id, SampleStartTime, SampleEndTime, ThrottleDuration, SampleExtensions,
cbData, stream_get_tail(ifman->input));
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
@ -376,7 +376,7 @@ int tsmf_ifman_on_flush(TSMF_IFMAN* ifman)
tsmf_presentation_flush(presentation);
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
@ -429,14 +429,14 @@ int tsmf_ifman_on_playback_started(TSMF_IFMAN* ifman)
int tsmf_ifman_on_playback_paused(TSMF_IFMAN* ifman)
{
DEBUG_DVC("");
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}
int tsmf_ifman_on_playback_restarted(TSMF_IFMAN* ifman)
{
DEBUG_DVC("");
ifman->output_pending = True;
ifman->output_pending = true;
return 0;
}

View File

@ -101,9 +101,9 @@ boolean tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback,
if (error)
{
DEBUG_WARN("response error %d", error);
return False;
return false;
}
return True;
return true;
}
static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
@ -148,7 +148,7 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
ifman.input = input;
ifman.input_size = cbSize - 12;
ifman.output = output;
ifman.output_pending = False;
ifman.output_pending = false;
ifman.output_interface_id = InterfaceId;
switch (InterfaceId)
@ -175,7 +175,7 @@ static int tsmf_on_data_received(IWTSVirtualChannelCallback* pChannelCallback,
stream_seek(input, 16);
stream_read_uint32(input, callback->stream_id);
DEBUG_DVC("SET_CHANNEL_PARAMS StreamId=%d", callback->stream_id);
ifman.output_pending = True;
ifman.output_pending = true;
error = 0;
break;

View File

@ -137,7 +137,7 @@ static TSMF_SAMPLE* tsmf_stream_pop_sample(TSMF_STREAM* stream, int sync)
TSMF_STREAM* s;
LIST_ITEM* item;
TSMF_SAMPLE* sample;
boolean pending = False;
boolean pending = false;
TSMF_PRESENTATION* presentation = stream->presentation;
if (!stream->sample_list->head)
@ -157,7 +157,7 @@ static TSMF_SAMPLE* tsmf_stream_pop_sample(TSMF_STREAM* stream, int sync)
if (s != stream && !s->eos && s->last_end_time &&
s->last_end_time < stream->last_end_time - AUDIO_TOLERANCE)
{
pending = True;
pending = true;
break;
}
}
@ -168,7 +168,7 @@ static TSMF_SAMPLE* tsmf_stream_pop_sample(TSMF_STREAM* stream, int sync)
{
if (stream->last_end_time > presentation->audio_end_time)
{
pending = True;
pending = true;
}
}
}
@ -416,7 +416,7 @@ static void tsmf_sample_playback_audio(TSMF_SAMPLE* sample)
static void tsmf_sample_playback(TSMF_SAMPLE* sample)
{
boolean ret = False;
boolean ret = false;
uint32 width;
uint32 height;
uint32 pixfmt = 0;

View File

@ -148,11 +148,11 @@ void rail_read_server_sysparam_order(STREAM* s, RAIL_SYSPARAM_ORDER* sysparam)
switch (sysparam->param)
{
case SPI_SET_SCREEN_SAVE_ACTIVE:
sysparam->setScreenSaveActive = (body != 0) ? True : False;
sysparam->setScreenSaveActive = (body != 0) ? true : false;
break;
case SPI_SET_SCREEN_SAVE_SECURE:
sysparam->setScreenSaveSecure = (body != 0) ? True : False;
sysparam->setScreenSaveSecure = (body != 0) ? true : false;
break;
default:
@ -179,7 +179,7 @@ void rail_read_server_localmovesize_order(STREAM* s, RAIL_LOCALMOVESIZE_ORDER* l
stream_read_uint32(s, localmovesize->windowId); /* windowId (4 bytes) */
stream_read_uint16(s, isMoveSizeStart); /* isMoveSizeStart (2 bytes) */
localmovesize->isMoveSizeStart = (isMoveSizeStart != 0) ? True : False;
localmovesize->isMoveSizeStart = (isMoveSizeStart != 0) ? true : false;
stream_read_uint16(s, localmovesize->moveSizeType); /* moveSizeType (2 bytes) */
stream_read_uint16(s, localmovesize->posX); /* posX (2 bytes) */
@ -335,16 +335,16 @@ void rail_recv_handshake_order(rdpRailOrder* rail_order, STREAM* s)
rail_order->sysparam.highContrast.flags = 0x7E;
rail_order->sysparam.params |= SPI_MASK_SET_MOUSE_BUTTON_SWAP;
rail_order->sysparam.mouseButtonSwap = False;
rail_order->sysparam.mouseButtonSwap = false;
rail_order->sysparam.params |= SPI_MASK_SET_KEYBOARD_PREF;
rail_order->sysparam.keyboardPref = False;
rail_order->sysparam.keyboardPref = false;
rail_order->sysparam.params |= SPI_MASK_SET_DRAG_FULL_WINDOWS;
rail_order->sysparam.dragFullWindows = False;
rail_order->sysparam.dragFullWindows = false;
rail_order->sysparam.params |= SPI_MASK_SET_KEYBOARD_CUES;
rail_order->sysparam.keyboardCues = False;
rail_order->sysparam.keyboardCues = false;
rail_order->sysparam.params |= SPI_MASK_SET_WORK_AREA;
rail_order->sysparam.workArea.left = 0;

View File

@ -76,7 +76,7 @@ boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data)
entry = freerdp_load_plugin((char*)plugin_data->data[0], "DeviceServiceEntry");
if (entry == NULL)
return False;
return false;
ep.devman = devman;
ep.RegisterDevice = devman_register_device;
@ -85,7 +85,7 @@ boolean devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data)
entry(&ep);
return True;
return true;
}
DEVICE* devman_get_device_by_id(DEVMAN* devman, uint32 id)

View File

@ -88,11 +88,11 @@ static boolean disk_file_remove_dir(const char* path)
struct dirent* pdirent;
struct stat st;
char* p;
boolean ret = True;
boolean ret = true;
dir = opendir(path);
if (dir == NULL)
return False;
return false;
pdirent = readdir(dir);
while (pdirent)
@ -108,7 +108,7 @@ static boolean disk_file_remove_dir(const char* path)
if (stat(p, &st) != 0)
{
DEBUG_WARN("stat %s failed.", p);
ret = False;
ret = false;
}
else if (S_ISDIR(st.st_mode))
{
@ -117,10 +117,10 @@ static boolean disk_file_remove_dir(const char* path)
else if (unlink(p) < 0)
{
DEBUG_WARN("unlink %s failed.", p);
ret = False;
ret = false;
}
else
ret = True;
ret = true;
xfree(p);
if (!ret)
@ -135,7 +135,7 @@ static boolean disk_file_remove_dir(const char* path)
if (rmdir(path) < 0)
{
DEBUG_WARN("rmdir %s failed.", path);
ret = False;
ret = false;
}
}
@ -162,21 +162,21 @@ static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 Crea
if (stat(file->fullpath, &st) == 0)
{
file->is_dir = (S_ISDIR(st.st_mode) ? True : False);
exists = True;
file->is_dir = (S_ISDIR(st.st_mode) ? true : false);
exists = true;
}
else
{
file->is_dir = ((CreateOptions & FILE_DIRECTORY_FILE) ? True : False);
file->is_dir = ((CreateOptions & FILE_DIRECTORY_FILE) ? true : false);
if (file->is_dir)
{
if (mkdir(file->fullpath, mode) != 0)
{
file->err = errno;
return True;
return true;
}
}
exists = False;
exists = false;
}
if (file->is_dir)
{
@ -184,7 +184,7 @@ static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 Crea
if (file->dir == NULL)
{
file->err = errno;
return True;
return true;
}
}
else
@ -212,7 +212,7 @@ static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 Crea
break;
}
if (!exists && (CreateOptions & FILE_DELETE_ON_CLOSE))
file->delete_pending = True;
file->delete_pending = true;
if ((DesiredAccess & GENERIC_ALL)
|| (DesiredAccess & GENERIC_WRITE)
@ -230,11 +230,11 @@ static boolean disk_file_init(DISK_FILE* file, uint32 DesiredAccess, uint32 Crea
if (file->fd == -1)
{
file->err = errno;
return True;
return true;
}
}
return True;
return true;
}
DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id,
@ -278,12 +278,12 @@ void disk_file_free(DISK_FILE* file)
boolean disk_file_seek(DISK_FILE* file, uint64 Offset)
{
if (file->is_dir || file->fd == -1)
return False;
return false;
if (lseek(file->fd, Offset, SEEK_SET) == (off_t)-1)
return False;
return false;
return True;
return true;
}
boolean disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length)
@ -291,14 +291,14 @@ boolean disk_file_read(DISK_FILE* file, uint8* buffer, uint32* Length)
ssize_t r;
if (file->is_dir || file->fd == -1)
return False;
return false;
r = read(file->fd, buffer, *Length);
if (r < 0)
return False;
return false;
*Length = (uint32)r;
return True;
return true;
}
boolean disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length)
@ -306,18 +306,18 @@ boolean disk_file_write(DISK_FILE* file, uint8* buffer, uint32 Length)
ssize_t r;
if (file->is_dir || file->fd == -1)
return False;
return false;
while (Length > 0)
{
r = write(file->fd, buffer, Length);
if (r == -1)
return False;
return false;
Length -= r;
buffer += r;
}
return True;
return true;
}
boolean disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass, STREAM* output)
@ -327,7 +327,7 @@ boolean disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass,
if (stat(file->fullpath, &st) != 0)
{
stream_write_uint32(output, 0); /* Length */
return False;
return false;
}
switch (FsInformationClass)
{
@ -366,9 +366,9 @@ boolean disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass,
default:
stream_write_uint32(output, 0); /* Length */
DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass);
return False;
return false;
}
return True;
return true;
}
boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input)
@ -396,7 +396,7 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui
stream_read_uint32(input, FileAttributes);
if (fstat(file->fd, &st) != 0)
return False;
return false;
tv[0].tv_sec = st.st_atime;
tv[0].tv_usec = 0;
tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime);
@ -421,7 +421,7 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui
/* http://msdn.microsoft.com/en-us/library/cc232076.aspx */
stream_read_uint64(input, size);
if (ftruncate(file->fd, size) != 0)
return False;
return false;
break;
case FileDispositionInformation:
@ -457,16 +457,16 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui
{
DEBUG_WARN("rename %s to %s failed", file->fullpath, fullpath);
free(fullpath);
return False;
return false;
}
break;
default:
DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass);
return False;
return false;
}
return True;
return true;
}
boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, uint8 InitialQuery,
@ -491,7 +491,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui
{
stream_write_uint32(output, 0); /* Length */
stream_write_uint8(output, 0); /* Padding */
return False;
return false;
}
memset(&st, 0, sizeof(struct stat));
@ -507,7 +507,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui
ent_path = freerdp_uniconv_out(uniconv, ent->d_name, &len);
freerdp_uniconv_free(uniconv);
ret = True;
ret = true;
switch (FsInformationClass)
{
case FileDirectoryInformation:
@ -580,7 +580,7 @@ boolean disk_file_query_directory(DISK_FILE* file, uint32 FsInformationClass, ui
stream_write_uint32(output, 0); /* Length */
stream_write_uint8(output, 0); /* Padding */
DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass);
ret = False;
ret = false;
break;
}

View File

@ -255,7 +255,7 @@ static rdpPrinter* printer_cups_get_printer(rdpPrinterDriver* driver, const char
{
rdpCupsPrinterDriver* cups_driver = (rdpCupsPrinterDriver*)driver;
return printer_cups_new_printer(cups_driver, name, cups_driver->id_sequence == 1 ? True : False);
return printer_cups_new_printer(cups_driver, name, cups_driver->id_sequence == 1 ? true : false);
}
static rdpCupsPrinterDriver* cups_driver = NULL;

View File

@ -214,11 +214,11 @@ static boolean rdpdr_process_irp(rdpdrPlugin* rdpdr, STREAM* data_in)
irp = irp_new(rdpdr->devman, data_in);
if (irp == NULL)
return False;
return false;
IFCALL(irp->device->IRPRequest, irp->device, irp);
return True;
return true;
}
static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
@ -252,12 +252,12 @@ static void rdpdr_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
case PAKID_CORE_CLIENTID_CONFIRM:
DEBUG_SVC("RDPDR_CTYP_CORE / PAKID_CORE_CLIENTID_CONFIRM");
rdpdr_process_server_clientid_confirm(rdpdr, data_in);
rdpdr_send_device_list_announce_request(rdpdr, False);
rdpdr_send_device_list_announce_request(rdpdr, false);
break;
case PAKID_CORE_USER_LOGGEDON:
DEBUG_SVC("RDPDR_CTYP_CORE / PAKID_CORE_USER_LOGGEDON");
rdpdr_send_device_list_announce_request(rdpdr, True);
rdpdr_send_device_list_announce_request(rdpdr, true);
break;
case PAKID_CORE_DEVICE_REPLY:

View File

@ -405,12 +405,12 @@ boolean serial_tty_read(SERIAL_TTY* tty, uint8* buffer, uint32* Length)
memset(buffer, 0, *Length);
r = read(tty->fd, buffer, *Length);
if (r < 0)
return False;
return false;
tty->event_txempty = r;
*Length = r;
return True;
return true;
}
boolean serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length)
@ -424,14 +424,14 @@ boolean serial_tty_write(SERIAL_TTY* tty, uint8* buffer, uint32 Length)
{
r = write(tty->fd, buffer, Length);
if (r < 0)
return False;
return false;
Length -= r;
buffer += r;
}
tty->event_txempty = event_txempty;
return True;
return true;
}
void serial_tty_free(SERIAL_TTY* tty)
@ -508,7 +508,7 @@ SERIAL_TTY* serial_tty_new(const char* path, uint32 id)
boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result)
{
int bytes;
boolean ret = False;
boolean ret = false;
DEBUG_SVC("in");
@ -520,7 +520,7 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result)
if (tty->wait_mask == 0)
{
tty->event_pending = 0;
return True;
return true;
}
ioctl(tty->fd, TIOCINQ, &bytes);
@ -536,7 +536,7 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result)
{
DEBUG_SVC("SERIAL_EV_RLSD");
*result |= SERIAL_EV_RLSD;
ret = True;
ret = true;
}
}
@ -545,13 +545,13 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result)
{
DEBUG_SVC("SERIAL_EV_RXFLAG bytes %d", bytes);
*result |= SERIAL_EV_RXFLAG;
ret = True;
ret = true;
}
if ((tty->wait_mask & SERIAL_EV_RXCHAR))
{
DEBUG_SVC("SERIAL_EV_RXCHAR bytes %d", bytes);
*result |= SERIAL_EV_RXCHAR;
ret = True;
ret = true;
}
}
@ -568,7 +568,7 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result)
{
DEBUG_SVC("SERIAL_EV_TXEMPTY");
*result |= SERIAL_EV_TXEMPTY;
ret = True;
ret = true;
}
tty->event_txempty = bytes;
#endif
@ -581,7 +581,7 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result)
{
DEBUG_SVC("SERIAL_EV_DSR %s", (bytes & TIOCM_DSR) ? "ON" : "OFF");
*result |= SERIAL_EV_DSR;
ret = True;
ret = true;
}
}
@ -592,7 +592,7 @@ boolean serial_tty_get_event(SERIAL_TTY* tty, uint32* result)
{
DEBUG_SVC("SERIAL_EV_CTS %s", (bytes & TIOCM_CTS) ? "ON" : "OFF");
*result |= SERIAL_EV_CTS;
ret = True;
ret = true;
}
}
@ -610,7 +610,7 @@ static boolean tty_get_termios(SERIAL_TTY* tty)
DEBUG_SVC("tcgetattr? %d", tcgetattr(tty->fd, ptermios) >= 0);
if (tcgetattr(tty->fd, ptermios) < 0)
return False;
return false;
speed = cfgetispeed(ptermios);
switch (speed)
@ -750,7 +750,7 @@ static boolean tty_get_termios(SERIAL_TTY* tty)
tty->chars[SERIAL_CHAR_BREAK] = ptermios->c_cc[VINTR];
tty->chars[SERIAL_CHAR_ERROR] = ptermios->c_cc[VKILL];
return True;
return true;
}
static void tty_set_termios(SERIAL_TTY* tty)

View File

@ -1342,7 +1342,7 @@ scard_async_op(IRP* irp)
case SCARD_IOCTL_RELEASE_CONTEXT:
case SCARD_IOCTL_IS_VALID_CONTEXT:
return False;
return false;
break;
/* async events */
@ -1353,7 +1353,7 @@ scard_async_op(IRP* irp)
case SCARD_IOCTL_STATUS:
case SCARD_IOCTL_STATUS + 4:
return True;
return true;
break;
default:
@ -1361,7 +1361,7 @@ scard_async_op(IRP* irp)
}
/* default to async */
return True;
return true;
}

View File

@ -206,7 +206,7 @@ static boolean rdpsnd_alsa_format_supported(rdpsndDevicePlugin* device, rdpsndFo
(format->wBitsPerSample == 8 || format->wBitsPerSample == 16) &&
(format->nChannels == 1 || format->nChannels == 2))
{
return True;
return true;
}
break;
@ -215,11 +215,11 @@ static boolean rdpsnd_alsa_format_supported(rdpsndDevicePlugin* device, rdpsndFo
format->wBitsPerSample == 4 &&
(format->nChannels == 1 || format->nChannels == 2))
{
return True;
return true;
}
break;
}
return False;
return false;
}
static void rdpsnd_alsa_set_volume(rdpsndDevicePlugin* device, uint32 value)

View File

@ -75,19 +75,19 @@ static boolean rdpsnd_pulse_connect(rdpsndDevicePlugin* device)
pa_context_state_t state;
if (!pulse->context)
return False;
return false;
if (pa_context_connect(pulse->context, NULL, 0, NULL))
{
DEBUG_WARN("pa_context_connect failed (%d)", pa_context_errno(pulse->context));
return False;
return false;
}
pa_threaded_mainloop_lock(pulse->mainloop);
if (pa_threaded_mainloop_start(pulse->mainloop) < 0)
{
pa_threaded_mainloop_unlock(pulse->mainloop);
DEBUG_WARN("pa_threaded_mainloop_start failed (%d)", pa_context_errno(pulse->context));
return False;
return false;
}
for (;;)
{
@ -105,12 +105,12 @@ static boolean rdpsnd_pulse_connect(rdpsndDevicePlugin* device)
if (state == PA_CONTEXT_READY)
{
DEBUG_SVC("connected");
return True;
return true;
}
else
{
pa_context_disconnect(pulse->context);
return False;
return false;
}
}
@ -337,7 +337,7 @@ static boolean rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndF
rdpsndPulsePlugin* pulse = (rdpsndPulsePlugin*)device;
if (!pulse->context)
return False;
return false;
switch (format->wFormatTag)
{
@ -347,7 +347,7 @@ static boolean rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndF
(format->wBitsPerSample == 8 || format->wBitsPerSample == 16) &&
(format->nChannels >= 1 && format->nChannels <= PA_CHANNELS_MAX))
{
return True;
return true;
}
break;
@ -358,7 +358,7 @@ static boolean rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndF
(format->wBitsPerSample == 8) &&
(format->nChannels >= 1 && format->nChannels <= PA_CHANNELS_MAX))
{
return True;
return true;
}
break;
@ -367,11 +367,11 @@ static boolean rdpsnd_pulse_format_supported(rdpsndDevicePlugin* device, rdpsndF
(format->wBitsPerSample == 4) &&
(format->nChannels == 1 || format->nChannels == 2))
{
return True;
return true;
}
break;
}
return False;
return false;
}
static void rdpsnd_pulse_set_format(rdpsndDevicePlugin* device, rdpsndFormat* format, int latency)

View File

@ -128,7 +128,7 @@ static void rdpsnd_process_interval(rdpSvcPlugin* plugin)
{
if (rdpsnd->device)
IFCALL(rdpsnd->device->Close, rdpsnd->device);
rdpsnd->is_open = False;
rdpsnd->is_open = false;
rdpsnd->close_timestamp = 0;
DEBUG_SVC("processed close");
@ -306,7 +306,7 @@ static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_
stream_read(data_in, rdpsnd->waveData, 4);
rdpsnd->waveDataSize = BodySize - 8;
rdpsnd->wave_timestamp = get_mstime();
rdpsnd->expectingWave = True;
rdpsnd->expectingWave = true;
DEBUG_SVC("waveDataSize %d wFormatNo %d", rdpsnd->waveDataSize, wFormatNo);
@ -314,7 +314,7 @@ static void rdpsnd_process_message_wave_info(rdpsndPlugin* rdpsnd, STREAM* data_
if (!rdpsnd->is_open)
{
rdpsnd->current_format = wFormatNo;
rdpsnd->is_open = True;
rdpsnd->is_open = true;
if (rdpsnd->device)
IFCALL(rdpsnd->device->Open, rdpsnd->device, &rdpsnd->supported_formats[wFormatNo],
rdpsnd->latency);
@ -455,7 +455,7 @@ static boolean rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name,
}
if (entry == NULL)
{
return False;
return false;
}
entryPoints.rdpsnd = rdpsnd;
@ -464,9 +464,9 @@ static boolean rdpsnd_load_device_plugin(rdpsndPlugin* rdpsnd, const char* name,
if (entry(&entryPoints) != 0)
{
DEBUG_WARN("%s entry returns error.", name);
return False;
return false;
}
return True;
return true;
}
static void rdpsnd_process_plugin_data(rdpsndPlugin* rdpsnd, RDP_PLUGIN_DATA* data)

View File

@ -215,19 +215,19 @@ boolean df_event_process(freerdp* instance, DFBEvent* event)
break;
case DIET_BUTTONPRESS:
df_send_mouse_button_event(instance->input, True, input_event->button, pointer_x, pointer_y);
df_send_mouse_button_event(instance->input, true, input_event->button, pointer_x, pointer_y);
break;
case DIET_BUTTONRELEASE:
df_send_mouse_button_event(instance->input, False, input_event->button, pointer_x, pointer_y);
df_send_mouse_button_event(instance->input, false, input_event->button, pointer_x, pointer_y);
break;
case DIET_KEYPRESS:
df_send_keyboard_event(instance->input, True, input_event->key_id - DIKI_UNKNOWN);
df_send_keyboard_event(instance->input, true, input_event->key_id - DIKI_UNKNOWN);
break;
case DIET_KEYRELEASE:
df_send_keyboard_event(instance->input, False, input_event->key_id - DIKI_UNKNOWN);
df_send_keyboard_event(instance->input, false, input_event->key_id - DIKI_UNKNOWN);
break;
case DIET_UNKNOWN:
@ -235,5 +235,5 @@ boolean df_event_process(freerdp* instance, DFBEvent* event)
}
}
return True;
return true;
}

View File

@ -91,7 +91,7 @@ boolean df_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int
rfds[*rcount] = (void*)(long)(dfi->read_fds);
(*rcount)++;
return True;
return true;
}
boolean df_check_fds(freerdp* instance, fd_set* set)
@ -101,12 +101,12 @@ boolean df_check_fds(freerdp* instance, fd_set* set)
dfi = ((dfContext*) instance->context)->dfi;
if (!FD_ISSET(dfi->read_fds, set))
return True;
return true;
if (read(dfi->read_fds, &(dfi->event), sizeof(dfi->event)) > 0)
df_event_process(instance, &(dfi->event));
return True;
return true;
}
boolean df_pre_connect(freerdp* instance)
@ -121,28 +121,28 @@ boolean df_pre_connect(freerdp* instance)
settings = instance->settings;
settings->order_support[NEG_DSTBLT_INDEX] = True;
settings->order_support[NEG_PATBLT_INDEX] = True;
settings->order_support[NEG_SCRBLT_INDEX] = True;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = True;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = False;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = False;
settings->order_support[NEG_MULTIPATBLT_INDEX] = False;
settings->order_support[NEG_MULTISCRBLT_INDEX] = False;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = True;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = False;
settings->order_support[NEG_LINETO_INDEX] = True;
settings->order_support[NEG_POLYLINE_INDEX] = True;
settings->order_support[NEG_MEMBLT_INDEX] = True;
settings->order_support[NEG_MEM3BLT_INDEX] = False;
settings->order_support[NEG_SAVEBITMAP_INDEX] = True;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_GLYPH_INDEX] = True;
settings->order_support[NEG_POLYGON_SC_INDEX] = False;
settings->order_support[NEG_POLYGON_CB_INDEX] = False;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = False;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = False;
settings->order_support[NEG_DSTBLT_INDEX] = true;
settings->order_support[NEG_PATBLT_INDEX] = true;
settings->order_support[NEG_SCRBLT_INDEX] = true;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = true;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = false;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = false;
settings->order_support[NEG_MULTIPATBLT_INDEX] = false;
settings->order_support[NEG_MULTISCRBLT_INDEX] = false;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = true;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = false;
settings->order_support[NEG_LINETO_INDEX] = true;
settings->order_support[NEG_POLYLINE_INDEX] = true;
settings->order_support[NEG_MEMBLT_INDEX] = true;
settings->order_support[NEG_MEM3BLT_INDEX] = false;
settings->order_support[NEG_SAVEBITMAP_INDEX] = true;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_GLYPH_INDEX] = true;
settings->order_support[NEG_POLYGON_SC_INDEX] = false;
settings->order_support[NEG_POLYGON_CB_INDEX] = false;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = false;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = false;
dfi->clrconv = xnew(CLRCONV);
dfi->clrconv->alpha = 1;
@ -152,7 +152,7 @@ boolean df_pre_connect(freerdp* instance)
freerdp_channels_pre_connect(instance->context->channels, instance);
return True;
return true;
}
boolean df_post_connect(freerdp* instance)
@ -208,7 +208,7 @@ boolean df_post_connect(freerdp* instance)
freerdp_channels_post_connect(instance->context->channels, instance);
return True;
return true;
}
static int df_process_plugin_args(rdpSettings* settings, const char* name,
@ -240,7 +240,7 @@ boolean df_verify_certificate(freerdp* instance, char* subject, char* issuer, ch
if (answer == 'y' || answer == 'Y')
{
return True;
return true;
}
else if (answer == 'n' || answer == 'N')
{
@ -248,7 +248,7 @@ boolean df_verify_certificate(freerdp* instance, char* subject, char* issuer, ch
}
}
return False;
return false;
}
static int
@ -331,17 +331,17 @@ int dfreerdp_run(freerdp* instance)
rcount = 0;
wcount = 0;
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get FreeRDP file descriptor\n");
break;
}
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get channel manager file descriptor\n");
break;
}
if (df_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
if (df_get_fds(instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get dfreerdp file descriptor\n");
break;
@ -377,17 +377,17 @@ int dfreerdp_run(freerdp* instance)
}
}
if (freerdp_check_fds(instance) != True)
if (freerdp_check_fds(instance) != true)
{
printf("Failed to check FreeRDP file descriptor\n");
break;
}
if (df_check_fds(instance, &rfds_set) != True)
if (df_check_fds(instance, &rfds_set) != true)
{
printf("Failed to check dfreerdp file descriptor\n");
break;
}
if (freerdp_channels_check_fds(channels, instance) != True)
if (freerdp_channels_check_fds(channels, instance) != true)
{
printf("Failed to check channel manager file descriptor\n");
break;

View File

@ -131,7 +131,7 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
rdpInput* input;
boolean processed;
processed = True;
processed = true;
ptr = GetWindowLongPtr(hWnd, GWLP_USERDATA);
wfi = (wfInfo*) ptr;
@ -181,13 +181,13 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
break;
default:
processed = False;
processed = false;
break;
}
}
else
{
processed = False;
processed = false;
}
if (processed)

View File

@ -60,12 +60,12 @@ boolean wf_set_rop2(HDC hdc, int rop2)
if ((rop2 < 0x01) || (rop2 > 0x10))
{
printf("Unsupported ROP2: %d\n", rop2);
return False;
return false;
}
SetROP2(hdc, wf_rop2_table[rop2 - 1]);
return True;
return true;
}
wfBitmap* wf_glyph_new(wfInfo* wfi, GLYPH_DATA* glyph)
@ -470,7 +470,7 @@ void wf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_c
wfi->image->_bitmap.data = (uint8*) xrealloc(wfi->image->_bitmap.data,
wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
if ((surface_bits_command->bpp != 32) || (wfi->clrconv->alpha == True))
if ((surface_bits_command->bpp != 32) || (wfi->clrconv->alpha == true))
{
uint8* temp_image;

View File

@ -156,7 +156,7 @@ void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
status = bitmap_decompress(data, bitmap->data, width, height, length, bpp, bpp);
if (status != True)
if (status != true)
{
printf("Bitmap Decompression Failed\n");
}
@ -166,7 +166,7 @@ void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
freerdp_image_flip(data, bitmap->data, width, height, bpp);
}
bitmap->compressed = False;
bitmap->compressed = false;
bitmap->length = size;
bitmap->bpp = bpp;
}

View File

@ -138,28 +138,28 @@ boolean wf_pre_connect(freerdp* instance)
settings = instance->settings;
settings->order_support[NEG_DSTBLT_INDEX] = True;
settings->order_support[NEG_PATBLT_INDEX] = True;
settings->order_support[NEG_SCRBLT_INDEX] = True;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = True;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = False;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = False;
settings->order_support[NEG_MULTIPATBLT_INDEX] = False;
settings->order_support[NEG_MULTISCRBLT_INDEX] = False;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = True;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = False;
settings->order_support[NEG_LINETO_INDEX] = True;
settings->order_support[NEG_POLYLINE_INDEX] = True;
settings->order_support[NEG_MEMBLT_INDEX] = True;
settings->order_support[NEG_MEM3BLT_INDEX] = False;
settings->order_support[NEG_SAVEBITMAP_INDEX] = False;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = False;
settings->order_support[NEG_FAST_INDEX_INDEX] = False;
settings->order_support[NEG_FAST_GLYPH_INDEX] = False;
settings->order_support[NEG_POLYGON_SC_INDEX] = False;
settings->order_support[NEG_POLYGON_CB_INDEX] = False;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = False;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = False;
settings->order_support[NEG_DSTBLT_INDEX] = true;
settings->order_support[NEG_PATBLT_INDEX] = true;
settings->order_support[NEG_SCRBLT_INDEX] = true;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = true;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = false;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = false;
settings->order_support[NEG_MULTIPATBLT_INDEX] = false;
settings->order_support[NEG_MULTISCRBLT_INDEX] = false;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = true;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = false;
settings->order_support[NEG_LINETO_INDEX] = true;
settings->order_support[NEG_POLYLINE_INDEX] = true;
settings->order_support[NEG_MEMBLT_INDEX] = true;
settings->order_support[NEG_MEM3BLT_INDEX] = false;
settings->order_support[NEG_SAVEBITMAP_INDEX] = false;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = false;
settings->order_support[NEG_FAST_INDEX_INDEX] = false;
settings->order_support[NEG_FAST_GLYPH_INDEX] = false;
settings->order_support[NEG_POLYGON_SC_INDEX] = false;
settings->order_support[NEG_POLYGON_CB_INDEX] = false;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = false;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = false;
wfi->cursor = g_default_cursor;
@ -202,7 +202,7 @@ boolean wf_pre_connect(freerdp* instance)
settings->kbd_layout = (int) GetKeyboardLayout(0) & 0x0000FFFF;
freerdp_channels_pre_connect(instance->context->channels, instance);
return True;
return true;
}
boolean wf_post_connect(freerdp* instance)
@ -307,7 +307,7 @@ boolean wf_post_connect(freerdp* instance)
pointer_cache_register_callbacks(instance->update);
if (wfi->sw_gdi != True)
if (wfi->sw_gdi != true)
{
brush_cache_register_callbacks(instance->update);
bitmap_cache_register_callbacks(instance->update);
@ -318,12 +318,12 @@ boolean wf_post_connect(freerdp* instance)
freerdp_channels_post_connect(instance->context->channels, instance);
return True;
return true;
}
boolean wf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint)
{
return True;
return true;
}
@ -344,12 +344,12 @@ void wf_process_channel_event(rdpChannels* channels, freerdp* instance)
boolean wf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount)
{
return True;
return true;
}
boolean wf_check_fds(freerdp* instance)
{
return True;
return true;
}
int wf_process_plugin_args(rdpSettings* settings, const char* name, RDP_PLUGIN_DATA* plugin_data, void* user_data)
@ -384,7 +384,7 @@ int wfreerdp_run(freerdp* instance)
memset(rfds, 0, sizeof(rfds));
memset(wfds, 0, sizeof(wfds));
if (freerdp_connect(instance) != True)
if (freerdp_connect(instance) != true)
return 0;
channels = instance->context->channels;
@ -394,17 +394,17 @@ int wfreerdp_run(freerdp* instance)
rcount = 0;
wcount = 0;
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get FreeRDP file descriptor\n");
break;
}
if (wf_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
if (wf_get_fds(instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get wfreerdp file descriptor\n");
break;
}
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get channel manager file descriptor\n");
break;
@ -435,17 +435,17 @@ int wfreerdp_run(freerdp* instance)
break;
}
if (freerdp_check_fds(instance) != True)
if (freerdp_check_fds(instance) != true)
{
printf("Failed to check FreeRDP file descriptor\n");
break;
}
if (wf_check_fds(instance) != True)
if (wf_check_fds(instance) != true)
{
printf("Failed to check wfreerdp file descriptor\n");
break;
}
if (freerdp_channels_check_fds(channels, instance) != True)
if (freerdp_channels_check_fds(channels, instance) != true)
{
printf("Failed to check channel manager file descriptor\n");
break;

View File

@ -82,7 +82,7 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman)
cb->request_index = -1;
cb->root_window = DefaultRootWindow(xfi->display);
cb->clipboard_atom = XInternAtom(xfi->display, "CLIPBOARD", False);
cb->clipboard_atom = XInternAtom(xfi->display, "CLIPBOARD", false);
if (cb->clipboard_atom == None)
{
@ -90,8 +90,8 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman)
}
id = 1;
cb->property_atom = XInternAtom(xfi->display, "_FREERDP_CLIPRDR", False);
cb->identity_atom = XInternAtom(xfi->display, "_FREERDP_CLIPRDR_ID", False);
cb->property_atom = XInternAtom(xfi->display, "_FREERDP_CLIPRDR", false);
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);
@ -99,11 +99,11 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman)
XSelectInput(xfi->display, cb->root_window, PropertyChangeMask);
n = 0;
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "_FREERDP_RAW", False);
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "_FREERDP_RAW", false);
cb->format_mappings[n].format_id = CB_FORMAT_RAW;
n++;
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "UTF8_STRING", False);
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "UTF8_STRING", false);
cb->format_mappings[n].format_id = CB_FORMAT_UNICODETEXT;
n++;
@ -111,31 +111,31 @@ void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman)
cb->format_mappings[n].format_id = CB_FORMAT_TEXT;
n++;
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/png", False);
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/png", false);
cb->format_mappings[n].format_id = CB_FORMAT_PNG;
n++;
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/jpeg", False);
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/jpeg", false);
cb->format_mappings[n].format_id = CB_FORMAT_JPEG;
n++;
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/gif", False);
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/gif", false);
cb->format_mappings[n].format_id = CB_FORMAT_GIF;
n++;
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/bmp", False);
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "image/bmp", false);
cb->format_mappings[n].format_id = CB_FORMAT_DIB;
n++;
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "text/html", False);
cb->format_mappings[n].target_format = XInternAtom(xfi->display, "text/html", false);
cb->format_mappings[n].format_id = CB_FORMAT_HTML;
cb->num_format_mappings = n + 1;
cb->targets[0] = XInternAtom(xfi->display, "TIMESTAMP", False);
cb->targets[1] = XInternAtom(xfi->display, "TARGETS", False);
cb->targets[0] = XInternAtom(xfi->display, "TIMESTAMP", false);
cb->targets[1] = XInternAtom(xfi->display, "TARGETS", false);
cb->num_targets = 2;
cb->incr_atom = XInternAtom(xfi->display, "INCR", False);
cb->incr_atom = XInternAtom(xfi->display, "INCR", false);
}
void xf_cliprdr_uninit(xfInfo* xfi)
@ -250,12 +250,12 @@ static boolean xf_cliprdr_is_self_owned(xfInfo* xfi)
}
if ((cb->owner == None) || (cb->owner == xfi->drawable))
return False;
return false;
if (result != Success)
return False;
return false;
return (id ? True : False);
return (id ? true : false);
}
static int xf_cliprdr_select_format_by_id(clipboardContext* cb, uint32 format_id)
@ -416,7 +416,7 @@ static void xf_cliprdr_process_cb_monitor_ready_event(xfInfo* xfi)
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
xf_cliprdr_send_format_list(xfi);
cb->sync = True;
cb->sync = true;
}
static void xf_cliprdr_process_cb_data_request_event(xfInfo* xfi, RDP_CB_DATA_REQUEST_EVENT* event)
@ -697,7 +697,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
Atom type;
int format;
uint8* data = NULL;
boolean has_data = False;
boolean has_data = false;
unsigned long length, bytes_left, dummy;
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
@ -706,7 +706,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
{
DEBUG_X11("invalid target");
xf_cliprdr_send_null_data_response(xfi);
return False;
return false;
}
XGetWindowProperty(xfi->display, xfi->drawable,
@ -728,7 +728,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
else if (type == cb->incr_atom)
{
DEBUG_X11("INCR started");
cb->incr_starts = True;
cb->incr_starts = true;
if (cb->incr_data)
{
xfree(cb->incr_data);
@ -736,7 +736,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
}
cb->incr_data_length = 0;
/* Data will be followed in PropertyNotify event */
has_data = True;
has_data = true;
}
else
{
@ -749,7 +749,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
cb->incr_data_length = 0;
cb->incr_starts = 0;
DEBUG_X11("INCR finished");
has_data = True;
has_data = true;
}
else if (XGetWindowProperty(xfi->display, xfi->drawable,
cb->property_atom, 0, bytes_left, 0, target,
@ -765,7 +765,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
XFree(data);
data = NULL;
}
has_data = True;
has_data = true;
}
else
{
@ -779,7 +779,7 @@ static boolean xf_cliprdr_get_requested_data(xfInfo* xfi, Atom target)
if (data)
XFree(data);
return True;
return true;
}
static void xf_cliprdr_append_target(clipboardContext* cb, Atom target)
@ -1062,7 +1062,7 @@ boolean xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent)
xf_cliprdr_get_requested_targets(xfi);
}
return True;
return true;
}
else
{
@ -1088,10 +1088,10 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent)
if (xevent->xselectionrequest.owner != xfi->drawable)
{
DEBUG_X11("not owner");
return False;
return false;
}
delay_respond = False;
delay_respond = false;
respond = xnew(XEvent);
respond->xselection.property = None;
respond->xselection.type = SelectionNotify;
@ -1159,21 +1159,21 @@ boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent)
cb->respond = respond;
cb->data_format = format;
cb->data_alt_format = alt_format;
delay_respond = True;
delay_respond = true;
xf_cliprdr_send_data_request(xfi, alt_format);
}
}
}
if (delay_respond != False)
if (delay_respond != false)
{
XSendEvent(xfi->display, xevent->xselectionrequest.requestor, 0, 0, respond);
XFlush(xfi->display);
xfree(respond);
}
return True;
return true;
}
boolean xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent)
@ -1181,11 +1181,11 @@ boolean xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent)
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
if (xf_cliprdr_is_self_owned(xfi))
return False;
return false;
XDeleteProperty(xfi->display, cb->root_window, cb->property_atom);
return True;
return true;
}
boolean xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent)
@ -1193,7 +1193,7 @@ boolean xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent)
clipboardContext* cb = (clipboardContext*) xfi->clipboard_context;
if (xevent->xproperty.atom != cb->property_atom)
return False; /* Not cliprdr-related */
return false; /* Not cliprdr-related */
if (xevent->xproperty.window == cb->root_window)
{
@ -1209,7 +1209,7 @@ boolean xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent)
cb->format_mappings[cb->request_index].target_format);
}
return True;
return true;
}
void xf_cliprdr_check_owner(xfInfo* xfi)

View File

@ -82,7 +82,7 @@ boolean xf_event_Expose(xfInfo* xfi, XEvent* event, boolean app)
w = event->xexpose.width;
h = event->xexpose.height;
if (app != True)
if (app != true)
{
XCopyArea(xfi->display, xfi->primary, xfi->window->handle, xfi->gc, x, y, w, h, x, y);
}
@ -101,13 +101,13 @@ boolean xf_event_Expose(xfInfo* xfi, XEvent* event, boolean app)
}
}
return True;
return true;
}
boolean xf_event_VisibilityNotify(xfInfo* xfi, XEvent* event, boolean app)
{
xfi->unobscured = event->xvisibility.state == VisibilityUnobscured;
return True;
return true;
}
boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app)
@ -116,12 +116,12 @@ boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app)
input = xfi->instance->input;
if (app != True)
if (app != true)
{
if (xfi->mouse_motion != True)
if (xfi->mouse_motion != true)
{
if ((event->xmotion.state & (Button1Mask | Button2Mask | Button3Mask)) == 0)
return True;
return true;
}
input->MouseEvent(input, PTR_FLAGS_MOVE, event->xmotion.x, event->xmotion.y);
@ -129,7 +129,7 @@ boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app)
if (xfi->fullscreen)
XSetInputFocus(xfi->display, xfi->window->handle, RevertToPointerRoot, CurrentTime);
}
else if (xfi->mouse_motion == True)
else if (xfi->mouse_motion == true)
{
rdpWindow* window;
int x = event->xmotion.x;
@ -146,7 +146,7 @@ boolean xf_event_MotionNotify(xfInfo* xfi, XEvent* event, boolean app)
}
}
return True;
return true;
}
boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app)
@ -161,7 +161,7 @@ boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app)
x = 0;
y = 0;
flags = 0;
wheel = False;
wheel = false;
switch (event->xbutton.button)
{
@ -184,12 +184,12 @@ boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app)
break;
case 4:
wheel = True;
wheel = true;
flags = PTR_FLAGS_WHEEL | 0x0078;
break;
case 5:
wheel = True;
wheel = true;
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
break;
@ -226,7 +226,7 @@ boolean xf_event_ButtonPress(xfInfo* xfi, XEvent* event, boolean app)
}
}
return True;
return true;
}
boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app)
@ -285,7 +285,7 @@ boolean xf_event_ButtonRelease(xfInfo* xfi, XEvent* event, boolean app)
input->MouseEvent(input, flags, x, y);
}
return True;
return true;
}
boolean xf_event_KeyPress(xfInfo* xfi, XEvent* event, boolean app)
@ -298,11 +298,11 @@ boolean xf_event_KeyPress(xfInfo* xfi, XEvent* event, boolean app)
xf_kbd_set_keypress(xfi, event->xkey.keycode, keysym);
if (xfi->fullscreen_toggle && xf_kbd_handle_special_keys(xfi, keysym))
return True;
return true;
xf_kbd_send_key(xfi, True, event->xkey.keycode);
xf_kbd_send_key(xfi, true, event->xkey.keycode);
return True;
return true;
}
boolean xf_event_KeyRelease(xfInfo* xfi, XEvent* event, boolean app)
@ -317,48 +317,48 @@ boolean xf_event_KeyRelease(xfInfo* xfi, XEvent* event, boolean app)
if (next_event.type == KeyPress)
{
if (next_event.xkey.keycode == event->xkey.keycode)
return True;
return true;
}
}
xf_kbd_unset_keypress(xfi, event->xkey.keycode);
xf_kbd_send_key(xfi, False, event->xkey.keycode);
xf_kbd_send_key(xfi, false, event->xkey.keycode);
return True;
return true;
}
boolean xf_event_FocusIn(xfInfo* xfi, XEvent* event, boolean app)
{
if (event->xfocus.mode == NotifyGrab)
return True;
return true;
xfi->focused = True;
xfi->focused = true;
if (xfi->mouse_active && (app != True))
XGrabKeyboard(xfi->display, xfi->window->handle, True, GrabModeAsync, GrabModeAsync, CurrentTime);
if (xfi->mouse_active && (app != true))
XGrabKeyboard(xfi->display, xfi->window->handle, true, GrabModeAsync, GrabModeAsync, CurrentTime);
xf_rail_send_activate(xfi, event->xany.window, True);
xf_rail_send_activate(xfi, event->xany.window, true);
xf_kbd_focus_in(xfi);
if (xfi->remote_app != True)
if (xfi->remote_app != true)
xf_cliprdr_check_owner(xfi);
return True;
return true;
}
boolean xf_event_FocusOut(xfInfo* xfi, XEvent* event, boolean app)
{
if (event->xfocus.mode == NotifyUngrab)
return True;
return true;
xfi->focused = False;
xfi->focused = false;
if (event->xfocus.mode == NotifyWhileGrabbed)
XUngrabKeyboard(xfi->display, CurrentTime);
xf_rail_send_activate(xfi, event->xany.window, False);
xf_rail_send_activate(xfi, event->xany.window, false);
return True;
return true;
}
boolean xf_event_MappingNotify(xfInfo* xfi, XEvent* event, boolean app)
@ -369,7 +369,7 @@ boolean xf_event_MappingNotify(xfInfo* xfi, XEvent* event, boolean app)
xfi->modifier_map = XGetModifierMapping(xfi->display);
}
return True;
return true;
}
boolean xf_event_ClientMessage(xfInfo* xfi, XEvent* event, boolean app)
@ -389,28 +389,28 @@ boolean xf_event_ClientMessage(xfInfo* xfi, XEvent* event, boolean app)
xf_rail_send_client_system_command(xfi, window->windowId, SC_CLOSE);
}
return True;
return true;
}
else
{
return False;
return false;
}
}
return True;
return true;
}
boolean xf_event_EnterNotify(xfInfo* xfi, XEvent* event, boolean app)
{
if (app != True)
if (app != true)
{
xfi->mouse_active = True;
xfi->mouse_active = true;
if (xfi->fullscreen)
XSetInputFocus(xfi->display, xfi->window->handle, RevertToPointerRoot, CurrentTime);
if (xfi->focused)
XGrabKeyboard(xfi->display, xfi->window->handle, True, GrabModeAsync, GrabModeAsync, CurrentTime);
XGrabKeyboard(xfi->display, xfi->window->handle, true, GrabModeAsync, GrabModeAsync, CurrentTime);
} else {
// Keep track of which window has focus so that we can apply pointer updates
xfWindow* xfw;
@ -424,18 +424,18 @@ boolean xf_event_EnterNotify(xfInfo* xfi, XEvent* event, boolean app)
}
}
return True;
return true;
}
boolean xf_event_LeaveNotify(xfInfo* xfi, XEvent* event, boolean app)
{
if (app != True)
if (app != true)
{
xfi->mouse_active = False;
xfi->mouse_active = false;
XUngrabKeyboard(xfi->display, CurrentTime);
}
return True;
return true;
}
boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app)
@ -470,7 +470,7 @@ boolean xf_event_ConfigureNotify(xfInfo* xfi, XEvent* event, boolean app)
event->xconfigure.override_redirect);
}
return True;
return true;
}
boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app)
@ -478,8 +478,8 @@ boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app)
rdpWindow* window;
rdpRail* rail = ((rdpContext*) xfi->context)->rail;
if (app != True)
return True;
if (app != true)
return true;
window = window_list_get_by_extra_id(rail->list, (void*) event->xany.window);
@ -489,67 +489,67 @@ boolean xf_event_MapNotify(xfInfo* xfi, XEvent* event, boolean app)
xf_rail_send_client_system_command(xfi, window->windowId, SC_RESTORE);
}
return True;
return true;
}
boolean xf_event_SelectionNotify(xfInfo* xfi, XEvent* event, boolean app)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
if (xf_cliprdr_process_selection_notify(xfi, event))
return True;
return true;
}
return True;
return true;
}
boolean xf_event_SelectionRequest(xfInfo* xfi, XEvent* event, boolean app)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
if (xf_cliprdr_process_selection_request(xfi, event))
return True;
return true;
}
return True;
return true;
}
boolean xf_event_SelectionClear(xfInfo* xfi, XEvent* event, boolean app)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
if (xf_cliprdr_process_selection_clear(xfi, event))
return True;
return true;
}
return True;
return true;
}
boolean xf_event_PropertyNotify(xfInfo* xfi, XEvent* event, boolean app)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
if (xf_cliprdr_process_property_notify(xfi, event))
return True;
return true;
}
return True;
return true;
}
boolean xf_event_process(freerdp* instance, XEvent* event)
{
boolean app = False;
boolean status = True;
boolean app = false;
boolean status = true;
xfInfo* xfi = ((xfContext*) instance->context)->xfi;
if (xfi->remote_app == True)
if (xfi->remote_app == true)
{
app = True;
app = true;
}
else
{
if (event->xany.window != xfi->window->handle)
app = True;
app = true;
}

View File

@ -56,11 +56,11 @@ boolean xf_set_rop2(xfInfo* xfi, int rop2)
if ((rop2 < 0x01) || (rop2 > 0x10))
{
printf("Unsupported ROP2: %d\n", rop2);
return False;
return false;
}
XSetFunction(xfi->display, xfi->gc, xf_rop2_table[rop2]);
return True;
return true;
}
boolean xf_set_rop3(xfInfo* xfi, int rop3)
@ -189,12 +189,12 @@ boolean xf_set_rop3(xfInfo* xfi, int rop3)
{
printf("Unsupported ROP3: 0x%08X\n", rop3);
XSetFunction(xfi->display, xfi->gc, GXclear);
return False;
return false;
}
XSetFunction(xfi->display, xfi->gc, function);
return True;
return true;
}
Pixmap xf_brush_new(xfInfo* xfi, int width, int height, int bpp, uint8* data)
@ -301,7 +301,7 @@ void xf_gdi_dstblt(rdpUpdate* update, DSTBLT_ORDER* dstblt)
if (xfi->drawing == xfi->primary)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XFillRectangle(xfi->display, xfi->drawable, xfi->gc,
dstblt->nLeftRect, dstblt->nTopRect, dstblt->nWidth, dstblt->nHeight);
@ -373,7 +373,7 @@ void xf_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt)
{
XSetFunction(xfi->display, xfi->gc, GXcopy);
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XCopyArea(xfi->display, xfi->primary, xfi->drawable, xfi->gc, patblt->nLeftRect, patblt->nTopRect,
patblt->nWidth, patblt->nHeight, patblt->nLeftRect, patblt->nTopRect);
@ -396,7 +396,7 @@ void xf_gdi_scrblt(rdpUpdate* update, SCRBLT_ORDER* scrblt)
if (xfi->drawing == xfi->primary)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
if (xfi->unobscured)
{
@ -435,7 +435,7 @@ void xf_gdi_opaque_rect(rdpUpdate* update, OPAQUE_RECT_ORDER* opaque_rect)
if (xfi->drawing == xfi->primary)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XFillRectangle(xfi->display, xfi->drawable, xfi->gc,
opaque_rect->nLeftRect, opaque_rect->nTopRect, opaque_rect->nWidth, opaque_rect->nHeight);
@ -469,7 +469,7 @@ void xf_gdi_multi_opaque_rect(rdpUpdate* update, MULTI_OPAQUE_RECT_ORDER* multi_
if (xfi->drawing == xfi->primary)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XFillRectangle(xfi->display, xfi->drawable, xfi->gc,
rectangle->left, rectangle->top, rectangle->width, rectangle->height);
@ -496,7 +496,7 @@ void xf_gdi_line_to(rdpUpdate* update, LINE_TO_ORDER* line_to)
if (xfi->drawing == xfi->primary)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
int width, height;
@ -553,7 +553,7 @@ void xf_gdi_polyline(rdpUpdate* update, POLYLINE_ORDER* polyline)
if (xfi->drawing == xfi->primary)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
XDrawLines(xfi->display, xfi->drawable, xfi->gc, points, npoints, CoordModePrevious);
x1 = points[0].x;
@ -595,7 +595,7 @@ void xf_gdi_memblt(rdpUpdate* update, MEMBLT_ORDER* memblt)
if (xfi->drawing == xfi->primary)
{
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XCopyArea(xfi->display, bitmap->pixmap, xfi->drawable, xfi->gc,
memblt->nXSrc, memblt->nYSrc, memblt->nWidth, memblt->nHeight,
@ -652,7 +652,7 @@ void xf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_c
tx = message->rects[i].x + surface_bits_command->destLeft;
ty = message->rects[i].y + surface_bits_command->destTop;
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XCopyArea(xfi->display, xfi->primary, xfi->drawable, xfi->gc,
tx, ty, message->rects[i].width, message->rects[i].height, tx, ty);
@ -685,7 +685,7 @@ void xf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_c
surface_bits_command->destLeft, surface_bits_command->destTop,
surface_bits_command->width, surface_bits_command->height);
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XCopyArea(xfi->display, xfi->primary, xfi->window->handle, xfi->gc,
surface_bits_command->destLeft, surface_bits_command->destTop,
@ -717,7 +717,7 @@ void xf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_c
surface_bits_command->destLeft, surface_bits_command->destTop,
surface_bits_command->width, surface_bits_command->height);
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XCopyArea(xfi->display, xfi->primary, xfi->window->handle, xfi->gc,
surface_bits_command->destLeft, surface_bits_command->destTop,

View File

@ -45,7 +45,7 @@ void xf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
data = freerdp_image_convert(bitmap->data, NULL,
bitmap->width, bitmap->height, xfi->srcBpp, xfi->bpp, xfi->clrconv);
if (bitmap->ephemeral != True)
if (bitmap->ephemeral != true)
{
image = XCreateImage(xfi->display, xfi->visual, xfi->depth,
ZPixmap, 0, (char*) data, bitmap->width, bitmap->height, xfi->scanline_pad, 0);
@ -95,7 +95,7 @@ void xf_Bitmap_Paint(rdpContext* context, rdpBitmap* bitmap)
XFree(image);
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XCopyArea(xfi->display, xfi->primary, xfi->drawable, xfi->gc,
bitmap->left, bitmap->top, width, height, bitmap->left, bitmap->top);
@ -122,7 +122,7 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
status = bitmap_decompress(data, bitmap->data, width, height, length, bpp, bpp);
if (status != True)
if (status != true)
{
printf("Bitmap Decompression Failed\n");
}
@ -132,7 +132,7 @@ void xf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
freerdp_image_flip(data, bitmap->data, width, height, bpp);
}
bitmap->compressed = False;
bitmap->compressed = false;
bitmap->length = size;
bitmap->bpp = bpp;
}

View File

@ -89,7 +89,7 @@ void xf_kbd_send_key(xfInfo* xfi, boolean down, uint8 keycode)
input->KeyboardEvent(input, flags, scancode);
if ((scancode == 0x3A) && (down == False)) /* caps lock was released */
if ((scancode == 0x3A) && (down == false)) /* caps lock was released */
{
uint32 syncFlags;
syncFlags = xf_kbd_get_toggle_keys_state(xfi);
@ -104,7 +104,7 @@ int xf_kbd_read_keyboard_state(xfInfo* xfi)
Window wdummy;
uint32 state = 0;
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
XQueryPointer(xfi->display, xfi->window->handle,
&wdummy, &wdummy, &dummy, &dummy, &dummy, &dummy, &state);
@ -120,7 +120,7 @@ boolean xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym)
KeyCode keycode = XKeysymToKeycode(xfi->display, keysym);
if (keycode == NoSymbol)
return False;
return false;
for (modifierpos = 0; modifierpos < 8; modifierpos++)
{
@ -134,7 +134,7 @@ boolean xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym)
}
}
return (state & keysymMask) ? True : False;
return (state & keysymMask) ? true : false;
}
int xf_kbd_get_toggle_keys_state(xfInfo* xfi)
@ -179,10 +179,10 @@ boolean xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym)
{
/* Ctrl-Alt-Enter: toggle full screen */
xf_toggle_fullscreen(xfi);
return True;
return true;
}
}
return False;
return false;
}

View File

@ -43,7 +43,7 @@ boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
vscreen = &xfi->vscreen;
if (xf_GetWorkArea(xfi) != True)
if (xf_GetWorkArea(xfi) != true)
{
xfi->workArea.x = 0;
xfi->workArea.y = 0;
@ -62,8 +62,8 @@ boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
settings->height = (xfi->workArea.height * settings->percent_screen) / 100;
}
if (settings->fullscreen != True && settings->workarea != True)
return True;
if (settings->fullscreen != true && settings->workarea != true)
return true;
#ifdef WITH_XINERAMA
if (XineramaQueryExtension(xfi->display, &ignored, &ignored2))
@ -87,7 +87,7 @@ boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
vscreen->monitors[i].area.bottom = screen_info[i].y_org + screen_info[i].height - 1;
if ((screen_info[i].x_org == 0) && (screen_info[i].y_org == 0))
vscreen->monitors[i].primary = True;
vscreen->monitors[i].primary = true;
}
}
@ -115,5 +115,5 @@ boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings)
settings->width = vscreen->area.right - vscreen->area.left + 1;
settings->height = vscreen->area.bottom - vscreen->area.top + 1;
return True;
return true;
}

View File

@ -57,7 +57,7 @@ void xf_rail_paint(xfInfo* xfi, rdpRail* rail, uint32 uleft, uint32 utop, uint32
iwidth = iright - ileft + 1;
iheight = ibottom - itop + 1;
intersect = ((iright > ileft) && (ibottom > itop)) ? True : False;
intersect = ((iright > ileft) && (ibottom > itop)) ? true : false;
if (intersect)
{
@ -265,7 +265,7 @@ void xf_process_rail_get_sysparams_event(xfInfo* xfi, rdpChannels* channels, RDP
sysparam->taskbarPos.right = 0;
sysparam->taskbarPos.bottom = 0;
sysparam->dragFullWindows = False;
sysparam->dragFullWindows = false;
xf_send_rail_client_event(channels, RDP_EVENT_TYPE_RAIL_CLIENT_SET_SYSPARAMS, sysparam);
}

View File

@ -122,7 +122,7 @@ void xf_tsmf_init(xfInfo* xfi, long xv_port)
{
if (strcmp(attr[i].name, "XV_COLORKEY") == 0)
{
xv->xv_colorkey_atom = XInternAtom(xfi->display, "XV_COLORKEY", False);
xv->xv_colorkey_atom = XInternAtom(xfi->display, "XV_COLORKEY", false);
XvSetPortAttribute(xfi->display, xv->xv_port, xv->xv_colorkey_atom, attr[i].min_value + 1);
break;
}
@ -179,15 +179,15 @@ xf_tsmf_is_format_supported(xfXvContext* xv, uint32 pixfmt)
int i;
if (!xv->xv_pixfmts)
return False;
return false;
for (i = 0; xv->xv_pixfmts[i]; i++)
{
if (xv->xv_pixfmts[i] == pixfmt)
return True;
return true;
}
return False;
return false;
}
static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT* vevent)
@ -240,7 +240,7 @@ static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT
}
shminfo.shmid = xv->xv_shmid;
shminfo.shmaddr = image->data = xv->xv_shmaddr;
shminfo.readOnly = False;
shminfo.readOnly = false;
if (!XShmAttach(xfi->display, &shminfo))
{
@ -323,8 +323,8 @@ static void xf_process_tsmf_video_frame_event(xfInfo* xfi, RDP_VIDEO_FRAME_EVENT
XvShmPutImage(xfi->display, xv->xv_port, xfi->window->handle, xfi->gc, image,
0, 0, image->width, image->height,
vevent->x, vevent->y, vevent->width, vevent->height, False);
XSync(xfi->display, False);
vevent->x, vevent->y, vevent->width, vevent->height, false);
XSync(xfi->display, false);
XShmDetach(xfi->display, &shminfo);
XFree(image);

View File

@ -63,20 +63,20 @@ void xf_SendClientMessage(xfInfo* xfi, xfWindow* window, Atom atom, long msg, lo
xevent.xclient.data.l[3] = d2;
xevent.xclient.data.l[4] = d3;
XSendEvent(xfi->display, window->handle, False, NoEventMask, &xevent);
XSync(xfi->display, False);
XSendEvent(xfi->display, window->handle, false, NoEventMask, &xevent);
XSync(xfi->display, false);
}
void xf_SetWindowFullscreen(xfInfo* xfi, xfWindow* window, boolean fullscreen)
{
if (fullscreen)
{
xf_SetWindowDecorations(xfi, window, False);
xf_SetWindowDecorations(xfi, window, false);
XMoveResizeWindow(xfi->display, window->handle, 0, 0, window->width, window->height);
XMapRaised(xfi->display, window->handle);
window->fullscreen = True;
window->fullscreen = true;
}
}
@ -90,22 +90,22 @@ boolean xf_GetWindowProperty(xfInfo* xfi, Window window, Atom property, int leng
int actual_format;
if (property == None)
return False;
return false;
status = XGetWindowProperty(xfi->display, window,
property, 0, length, False, AnyPropertyType,
property, 0, length, false, AnyPropertyType,
&actual_type, &actual_format, nitems, bytes, prop);
if (status != Success)
return False;
return false;
if (actual_type == None)
{
DEBUG_WARN("Property %lu does not exist", property);
return False;
return false;
}
return True;
return true;
}
boolean xf_GetCurrentDesktop(xfInfo* xfi)
@ -118,14 +118,14 @@ boolean xf_GetCurrentDesktop(xfInfo* xfi)
status = xf_GetWindowProperty(xfi, DefaultRootWindow(xfi->display),
xfi->_NET_CURRENT_DESKTOP, 1, &nitems, &bytes, &prop);
if (status != True) {
return False;
if (status != true) {
return false;
}
xfi->current_desktop = (int) *prop;
xfree(prop);
return True;
return true;
}
boolean xf_GetWorkArea(xfInfo* xfi)
@ -138,18 +138,18 @@ boolean xf_GetWorkArea(xfInfo* xfi)
status = xf_GetCurrentDesktop(xfi);
if (status != True)
return False;
if (status != true)
return false;
status = xf_GetWindowProperty(xfi, DefaultRootWindow(xfi->display),
xfi->_NET_WORKAREA, 32 * 4, &nitems, &bytes, &prop);
if (status != True)
return False;
if (status != true)
return false;
if ((xfi->current_desktop * 4 + 3) >= nitems) {
xfree(prop);
return False;
return false;
}
plong = (long*) prop;
@ -160,7 +160,7 @@ boolean xf_GetWorkArea(xfInfo* xfi)
xfi->workArea.height = plong[xfi->current_desktop * 4 + 3];
xfree(prop);
return True;
return true;
}
void xf_SetWindowDecorations(xfInfo* xfi, xfWindow* window, boolean show)
@ -219,7 +219,7 @@ xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height,
window->width = width;
window->height = height;
window->fullscreen = False;
window->fullscreen = false;
window->decorations = decorations;
window->handle = XCreateWindow(xfi->display, RootWindowOfScreen(xfi->screen),
@ -333,10 +333,10 @@ xfWindow* xf_CreateWindow(xfInfo* xfi, rdpWindow* wnd, int x, int y, int width,
int input_mask;
XClassHint* class_hints;
window->decorations = False;
window->fullscreen = False;
window->decorations = false;
window->fullscreen = false;
window->window = wnd;
window->localMoveSize = False;
window->localMoveSize = false;
window->handle = XCreateWindow(xfi->display, RootWindowOfScreen(xfi->screen),
x, y, window->width, window->height, 0, xfi->depth, InputOutput, xfi->visual,
@ -418,7 +418,7 @@ void xf_SendMoveResizeEvent(xfInfo* xfi, xfWindow* window, int direction, int x_
event.xclient.message_type = xfi->_NET_WM_MOVERESIZE;
event.xclient.serial = 0;
event.xclient.display = xfi->display;
event.xclient.send_event = True;
event.xclient.send_event = true;
event.xclient.format = 32;
event.xclient.data.l[0] = x_root;
event.xclient.data.l[1] = y_root;
@ -427,28 +427,28 @@ void xf_SendMoveResizeEvent(xfInfo* xfi, xfWindow* window, int direction, int x_
event.xclient.data.l[4] = 0;
XUngrabPointer(xfi->display, CurrentTime);
XSendEvent(xfi->display, RootWindowOfScreen(xfi->screen), False, SubstructureNotifyMask, &event);
XSendEvent(xfi->display, RootWindowOfScreen(xfi->screen), false, SubstructureNotifyMask, &event);
}
void xf_StartLocalMoveSize(xfInfo* xfi, xfWindow* window, uint16 moveSizeType, int posX, int posY)
{
window->localMoveSize = True;
window->localMoveSize = true;
}
void xf_StopLocalMoveSize(xfInfo* xfi, xfWindow* window, uint16 moveSizeType, int posX, int posY)
{
window->localMoveSize = False;
window->localMoveSize = false;
}
void xf_MoveWindow(xfInfo* xfi, xfWindow* window, int x, int y, int width, int height)
{
boolean resize = False;
boolean resize = false;
if ((width * height) < 1)
return;
if ((window->width != width) || (window->height != height))
resize = True;
resize = true;
if (resize)
XMoveResizeWindow(xfi->display, window->handle, x, y, width, height);
@ -505,7 +505,7 @@ void xf_SetWindowIcon(xfInfo* xfi, xfWindow* window, rdpIcon* icon)
long* dstp;
uint32* srcp;
if (icon->big != True)
if (icon->big != true)
return;
pixels = icon->entry->width * icon->entry->height;
@ -605,18 +605,18 @@ void xf_UpdateWindowArea(xfInfo* xfi, xfWindow* window, int x, int y, int width,
boolean xf_IsWindowBorder(xfInfo* xfi, xfWindow* xfw, int x, int y)
{
rdpWindow* wnd;
boolean clientArea = False;
boolean windowArea = False;
boolean clientArea = false;
boolean windowArea = false;
wnd = xfw->window;
if (((x > wnd->clientOffsetX) && (x < wnd->clientOffsetX + wnd->clientAreaWidth)) &&
((y > wnd->clientOffsetY) && (y < wnd->clientOffsetY + wnd->clientAreaHeight)))
clientArea = True;
clientArea = true;
if (((x > wnd->windowOffsetX) && (x < wnd->windowOffsetX + wnd->windowWidth)) &&
((y > wnd->windowOffsetY) && (y < wnd->windowOffsetY + wnd->windowHeight)))
windowArea = True;
windowArea = true;
return (windowArea && !(clientArea));
}

View File

@ -109,9 +109,9 @@ void xf_sw_end_paint(rdpUpdate* update)
gdi = update->context->gdi;
xfi = context->xfi;
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
if (xfi->complex_regions != True)
if (xfi->complex_regions != true)
{
if (gdi->primary->hdc->hwnd->invalid->null)
return;
@ -172,7 +172,7 @@ void xf_sw_desktop_resize(rdpUpdate* update)
xfi = ((xfContext*) update->context)->xfi;
settings = xfi->instance->settings;
if (xfi->fullscreen != True)
if (xfi->fullscreen != true)
{
rdpGdi* gdi = update->context->gdi;
gdi_resize(gdi, xfi->width, xfi->height);
@ -226,7 +226,7 @@ void xf_hw_desktop_resize(rdpUpdate* update)
xfi = ((xfContext*) update->context)->xfi;
settings = xfi->instance->settings;
if (xfi->fullscreen != True)
if (xfi->fullscreen != true)
{
xfi->width = settings->width;
xfi->height = settings->height;
@ -236,7 +236,7 @@ void xf_hw_desktop_resize(rdpUpdate* update)
if (xfi->primary)
{
same = (xfi->primary == xfi->drawing) ? True : False;
same = (xfi->primary == xfi->drawing) ? true : false;
XFreePixmap(xfi->display, xfi->primary);
@ -256,7 +256,7 @@ boolean xf_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int
rfds[*rcount] = (void*)(long)(xfi->xfds);
(*rcount)++;
return True;
return true;
}
boolean xf_check_fds(freerdp* instance, fd_set* set)
@ -269,11 +269,11 @@ boolean xf_check_fds(freerdp* instance, fd_set* set)
memset(&xevent, 0, sizeof(xevent));
XNextEvent(xfi->display, &xevent);
if (xf_event_process(instance, &xevent) != True)
return False;
if (xf_event_process(instance, &xevent) != true)
return false;
}
return True;
return true;
}
void xf_create_window(xfInfo* xfi)
@ -292,7 +292,7 @@ void xf_create_window(xfInfo* xfi)
xfi->attribs.override_redirect = xfi->fullscreen;
xfi->attribs.colormap = xfi->colormap;
if (xfi->remote_app != True)
if (xfi->remote_app != true)
{
if (xfi->fullscreen)
{
@ -336,7 +336,7 @@ void xf_toggle_fullscreen(xfInfo* xfi)
XCopyArea(xfi->display, xfi->primary, contents, xfi->gc, 0, 0, xfi->width, xfi->height, 0, 0);
XDestroyWindow(xfi->display, xfi->window->handle);
xfi->fullscreen = (xfi->fullscreen) ? False : True;
xfi->fullscreen = (xfi->fullscreen) ? false : true;
xf_create_window(xfi);
XCopyArea(xfi->display, contents, xfi->primary, xfi->gc, 0, 0, xfi->width, xfi->height, 0, 0);
@ -384,7 +384,7 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
if (vis == NULL)
{
printf("xf_get_pixmap_info: XGetVisualInfo failed\n");
return False;
return false;
}
for (i = 0; i < vi_count; i++)
@ -401,10 +401,10 @@ boolean xf_get_pixmap_info(xfInfo* xfi)
if ((xfi->visual == NULL) || (xfi->scanline_pad == 0))
{
return False;
return false;
}
return True;
return true;
}
boolean xf_pre_connect(freerdp* instance)
@ -431,30 +431,30 @@ boolean xf_pre_connect(freerdp* instance)
settings = instance->settings;
bitmap_cache = settings->bitmap_cache;
settings->order_support[NEG_DSTBLT_INDEX] = True;
settings->order_support[NEG_PATBLT_INDEX] = True;
settings->order_support[NEG_SCRBLT_INDEX] = True;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = True;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = False;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = False;
settings->order_support[NEG_MULTIPATBLT_INDEX] = False;
settings->order_support[NEG_MULTISCRBLT_INDEX] = False;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = True;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = False;
settings->order_support[NEG_LINETO_INDEX] = True;
settings->order_support[NEG_POLYLINE_INDEX] = True;
settings->order_support[NEG_DSTBLT_INDEX] = true;
settings->order_support[NEG_PATBLT_INDEX] = true;
settings->order_support[NEG_SCRBLT_INDEX] = true;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = true;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = false;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = false;
settings->order_support[NEG_MULTIPATBLT_INDEX] = false;
settings->order_support[NEG_MULTISCRBLT_INDEX] = false;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = true;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = false;
settings->order_support[NEG_LINETO_INDEX] = true;
settings->order_support[NEG_POLYLINE_INDEX] = true;
settings->order_support[NEG_MEMBLT_INDEX] = bitmap_cache;
settings->order_support[NEG_MEM3BLT_INDEX] = False;
settings->order_support[NEG_MEM3BLT_INDEX] = false;
settings->order_support[NEG_MEMBLT_V2_INDEX] = bitmap_cache;
settings->order_support[NEG_MEM3BLT_V2_INDEX] = False;
settings->order_support[NEG_SAVEBITMAP_INDEX] = False;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_GLYPH_INDEX] = True;
settings->order_support[NEG_POLYGON_SC_INDEX] = False;
settings->order_support[NEG_POLYGON_CB_INDEX] = False;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = False;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = False;
settings->order_support[NEG_MEM3BLT_V2_INDEX] = false;
settings->order_support[NEG_SAVEBITMAP_INDEX] = false;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_GLYPH_INDEX] = true;
settings->order_support[NEG_POLYGON_SC_INDEX] = false;
settings->order_support[NEG_POLYGON_CB_INDEX] = false;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = false;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = false;
freerdp_channels_pre_connect(xfi->_context->channels, instance);
@ -463,27 +463,27 @@ boolean xf_pre_connect(freerdp* instance)
if (xfi->display == NULL)
{
printf("xf_pre_connect: failed to open display: %s\n", XDisplayName(NULL));
return False;
return false;
}
xfi->_NET_WM_ICON = XInternAtom(xfi->display, "_NET_WM_ICON", False);
xfi->_MOTIF_WM_HINTS = XInternAtom(xfi->display, "_MOTIF_WM_HINTS", False);
xfi->_NET_CURRENT_DESKTOP = XInternAtom(xfi->display, "_NET_CURRENT_DESKTOP", False);
xfi->_NET_WORKAREA = XInternAtom(xfi->display, "_NET_WORKAREA", False);
xfi->_NET_WM_STATE = XInternAtom(xfi->display, "_NET_WM_STATE", False);
xfi->_NET_WM_STATE_FULLSCREEN = XInternAtom(xfi->display, "_NET_WM_STATE_FULLSCREEN", False);
xfi->_NET_WM_WINDOW_TYPE = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE", False);
xfi->_NET_WM_ICON = XInternAtom(xfi->display, "_NET_WM_ICON", false);
xfi->_MOTIF_WM_HINTS = XInternAtom(xfi->display, "_MOTIF_WM_HINTS", false);
xfi->_NET_CURRENT_DESKTOP = XInternAtom(xfi->display, "_NET_CURRENT_DESKTOP", false);
xfi->_NET_WORKAREA = XInternAtom(xfi->display, "_NET_WORKAREA", false);
xfi->_NET_WM_STATE = XInternAtom(xfi->display, "_NET_WM_STATE", false);
xfi->_NET_WM_STATE_FULLSCREEN = XInternAtom(xfi->display, "_NET_WM_STATE_FULLSCREEN", false);
xfi->_NET_WM_WINDOW_TYPE = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE", false);
xfi->_NET_WM_WINDOW_TYPE_NORMAL = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE_NORMAL", False);
xfi->_NET_WM_WINDOW_TYPE_DIALOG = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE_DIALOG", False);
xfi->_NET_WM_WINDOW_TYPE_UTILITY = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE_UTILITY", False);
xfi->_NET_WM_STATE_SKIP_TASKBAR = XInternAtom(xfi->display, "_NET_WM_STATE_SKIP_TASKBAR", False);
xfi->_NET_WM_STATE_SKIP_PAGER = XInternAtom(xfi->display, "_NET_WM_STATE_SKIP_PAGER", False);
xfi->_NET_WM_WINDOW_TYPE_NORMAL = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE_NORMAL", false);
xfi->_NET_WM_WINDOW_TYPE_DIALOG = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE_DIALOG", false);
xfi->_NET_WM_WINDOW_TYPE_UTILITY = XInternAtom(xfi->display, "_NET_WM_WINDOW_TYPE_UTILITY", false);
xfi->_NET_WM_STATE_SKIP_TASKBAR = XInternAtom(xfi->display, "_NET_WM_STATE_SKIP_TASKBAR", false);
xfi->_NET_WM_STATE_SKIP_PAGER = XInternAtom(xfi->display, "_NET_WM_STATE_SKIP_PAGER", false);
xfi->_NET_WM_MOVERESIZE = XInternAtom(xfi->display, "_NET_WM_MOVERESIZE", False);
xfi->_NET_WM_MOVERESIZE = XInternAtom(xfi->display, "_NET_WM_MOVERESIZE", false);
xfi->WM_PROTOCOLS = XInternAtom(xfi->display, "WM_PROTOCOLS", False);
xfi->WM_DELETE_WINDOW = XInternAtom(xfi->display, "WM_DELETE_WINDOW", False);
xfi->WM_PROTOCOLS = XInternAtom(xfi->display, "WM_PROTOCOLS", false);
xfi->WM_DELETE_WINDOW = XInternAtom(xfi->display, "WM_DELETE_WINDOW", false);
xf_kbd_init(xfi);
@ -502,17 +502,17 @@ boolean xf_pre_connect(freerdp* instance)
xfi->big_endian = (ImageByteOrder(xfi->display) == MSBFirst);
xfi->mouse_motion = settings->mouse_motion;
xfi->complex_regions = True;
xfi->complex_regions = true;
xfi->decorations = settings->decorations;
xfi->remote_app = settings->remote_app;
xfi->fullscreen = settings->fullscreen;
xfi->grab_keyboard = settings->grab_keyboard;
xfi->fullscreen_toggle = True;
xfi->fullscreen_toggle = true;
xfi->sw_gdi = settings->sw_gdi;
xf_detect_monitors(xfi, settings);
return True;
return true;
}
void cpuid(unsigned info, unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx)
@ -559,8 +559,8 @@ boolean xf_post_connect(freerdp* instance)
cache = instance->context->cache;
channels = xfi->_context->channels;
if (xf_get_pixmap_info(xfi) != True)
return False;
if (xf_get_pixmap_info(xfi) != true)
return false;
xf_register_graphics(instance->context->graphics);
@ -661,7 +661,7 @@ boolean xf_post_connect(freerdp* instance)
pointer_cache_register_callbacks(instance->update);
if (xfi->sw_gdi != True)
if (xfi->sw_gdi != true)
{
brush_cache_register_callbacks(instance->update);
bitmap_cache_register_callbacks(instance->update);
@ -677,10 +677,10 @@ boolean xf_post_connect(freerdp* instance)
xf_tsmf_init(xfi, xv_port);
if (xfi->remote_app != True)
if (xfi->remote_app != true)
xf_cliprdr_init(xfi, channels);
return True;
return true;
}
boolean xf_authenticate(freerdp* instance, char** username, char** password, char** domain)
@ -688,9 +688,9 @@ boolean xf_authenticate(freerdp* instance, char** username, char** password, cha
*password = xmalloc(password_size * sizeof(char));
if (freerdp_passphrase_read("Password: ", *password, password_size) == NULL)
return False;
return false;
return True;
return true;
}
boolean xf_verify_certificate(freerdp* instance, char* subject, char* issuer, char* fingerprint)
@ -711,7 +711,7 @@ boolean xf_verify_certificate(freerdp* instance, char* subject, char* issuer, ch
if (answer == 'y' || answer == 'Y')
{
return True;
return true;
}
else if (answer == 'n' || answer == 'N')
{
@ -719,7 +719,7 @@ boolean xf_verify_certificate(freerdp* instance, char* subject, char* issuer, ch
}
}
return False;
return false;
}
int xf_process_client_args(rdpSettings* settings, const char* opt, const char* val, void* user_data)
@ -896,19 +896,19 @@ int xfreerdp_run(freerdp* instance)
rcount = 0;
wcount = 0;
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get FreeRDP file descriptor\n");
ret = XF_EXIT_CONN_FAILED;
break;
}
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get channel manager file descriptor\n");
ret = XF_EXIT_CONN_FAILED;
break;
}
if (xf_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
if (xf_get_fds(instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get xfreerdp file descriptor\n");
ret = XF_EXIT_CONN_FAILED;
@ -945,17 +945,17 @@ int xfreerdp_run(freerdp* instance)
}
}
if (freerdp_check_fds(instance) != True)
if (freerdp_check_fds(instance) != true)
{
printf("Failed to check FreeRDP file descriptor\n");
break;
}
if (xf_check_fds(instance, &rfds_set) != True)
if (xf_check_fds(instance, &rfds_set) != true)
{
printf("Failed to check xfreerdp file descriptor\n");
break;
}
if (freerdp_channels_check_fds(channels, instance) != True)
if (freerdp_channels_check_fds(channels, instance) != true)
{
printf("Failed to check channel manager file descriptor\n");
break;
@ -1045,7 +1045,7 @@ int main(int argc, char* argv[])
instance->context->argc = argc;
instance->context->argv = argv;
instance->settings->sw_gdi = False;
instance->settings->sw_gdi = false;
data = (struct thread_data*) xzalloc(sizeof(struct thread_data));
data->instance = instance;

View File

@ -150,32 +150,32 @@ boolean tf_pre_connect(freerdp* instance)
settings = instance->settings;
settings->order_support[NEG_DSTBLT_INDEX] = True;
settings->order_support[NEG_PATBLT_INDEX] = True;
settings->order_support[NEG_SCRBLT_INDEX] = True;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = True;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = True;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = True;
settings->order_support[NEG_MULTIPATBLT_INDEX] = True;
settings->order_support[NEG_MULTISCRBLT_INDEX] = True;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = True;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = True;
settings->order_support[NEG_LINETO_INDEX] = True;
settings->order_support[NEG_POLYLINE_INDEX] = True;
settings->order_support[NEG_MEMBLT_INDEX] = True;
settings->order_support[NEG_MEM3BLT_INDEX] = True;
settings->order_support[NEG_SAVEBITMAP_INDEX] = True;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_GLYPH_INDEX] = True;
settings->order_support[NEG_POLYGON_SC_INDEX] = True;
settings->order_support[NEG_POLYGON_CB_INDEX] = True;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = True;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = True;
settings->order_support[NEG_DSTBLT_INDEX] = true;
settings->order_support[NEG_PATBLT_INDEX] = true;
settings->order_support[NEG_SCRBLT_INDEX] = true;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = true;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = true;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = true;
settings->order_support[NEG_MULTIPATBLT_INDEX] = true;
settings->order_support[NEG_MULTISCRBLT_INDEX] = true;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = true;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = true;
settings->order_support[NEG_LINETO_INDEX] = true;
settings->order_support[NEG_POLYLINE_INDEX] = true;
settings->order_support[NEG_MEMBLT_INDEX] = true;
settings->order_support[NEG_MEM3BLT_INDEX] = true;
settings->order_support[NEG_SAVEBITMAP_INDEX] = true;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_GLYPH_INDEX] = true;
settings->order_support[NEG_POLYGON_SC_INDEX] = true;
settings->order_support[NEG_POLYGON_CB_INDEX] = true;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = true;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = true;
freerdp_channels_pre_connect(instance->context->channels, instance);
return True;
return true;
}
boolean tf_post_connect(freerdp* instance)
@ -190,7 +190,7 @@ boolean tf_post_connect(freerdp* instance)
freerdp_channels_post_connect(instance->context->channels, instance);
return True;
return true;
}
int tfreerdp_run(freerdp* instance)
@ -218,12 +218,12 @@ int tfreerdp_run(freerdp* instance)
rcount = 0;
wcount = 0;
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_get_fds(instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get FreeRDP file descriptor\n");
break;
}
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != True)
if (freerdp_channels_get_fds(channels, instance, rfds, &rcount, wfds, &wcount) != true)
{
printf("Failed to get channel manager file descriptor\n");
break;
@ -258,12 +258,12 @@ int tfreerdp_run(freerdp* instance)
}
}
if (freerdp_check_fds(instance) != True)
if (freerdp_check_fds(instance) != true)
{
printf("Failed to check FreeRDP file descriptor\n");
break;
}
if (freerdp_channels_check_fds(channels, instance) != True)
if (freerdp_channels_check_fds(channels, instance) != true)
{
printf("Failed to check channel manager file descriptor\n");
break;

View File

@ -2,7 +2,7 @@
# Find the CUnit libraries
#
# This module defines the following variables:
# CUNIT_FOUND - True if CUNIT_INCLUDE_DIR & CUNIT_LIBRARY are found
# CUNIT_FOUND - true if CUNIT_INCLUDE_DIR & CUNIT_LIBRARY are found
# CUNIT_LIBRARIES - Set when CUNIT_LIBRARY is found
# CUNIT_INCLUDE_DIRS - Set when CUNIT_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the DirectFB libraries
#
# This module defines the following variables:
# DIRECTFB_FOUND - True if DIRECTFB_INCLUDE_DIR & DIRECTFB_LIBRARY are found
# DIRECTFB_FOUND - true if DIRECTFB_INCLUDE_DIR & DIRECTFB_LIBRARY are found
# DIRECTFB_LIBRARIES - Set when DIRECTFB_LIBRARY is found
# DIRECTFB_INCLUDE_DIRS - Set when DIRECTFB_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the X11 libraries
#
# This module defines the following variables:
# X11_FOUND - True if X11_INCLUDE_DIR & X11_LIBRARY are found
# X11_FOUND - true if X11_INCLUDE_DIR & X11_LIBRARY are found
# X11_LIBRARIES - Set when X11_LIBRARY is found
# X11_INCLUDE_DIRS - Set when X11_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the XKBFILE libraries
#
# This module defines the following variables:
# XKBFILE_FOUND - True if XKBFILE_INCLUDE_DIR & XKBFILE_LIBRARY are found
# XKBFILE_FOUND - true if XKBFILE_INCLUDE_DIR & XKBFILE_LIBRARY are found
# XKBFILE_LIBRARIES - Set when XKBFILE_LIBRARY is found
# XKBFILE_INCLUDE_DIRS - Set when XKBFILE_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the Xcursor libraries
#
# This module defines the following variables:
# XCURSOR_FOUND - True if XCURSOR_INCLUDE_DIR & XCURSOR_LIBRARY are found
# XCURSOR_FOUND - true if XCURSOR_INCLUDE_DIR & XCURSOR_LIBRARY are found
# XCURSOR_LIBRARIES - Set when XCURSOR_LIBRARY is found
# XCURSOR_INCLUDE_DIRS - Set when XCURSOR_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the XDAMAGE libraries
#
# This module defines the following variables:
# XDAMAGE_FOUND - True if XDAMAGE_INCLUDE_DIR & XDAMAGE_LIBRARY are found
# XDAMAGE_FOUND - true if XDAMAGE_INCLUDE_DIR & XDAMAGE_LIBRARY are found
# XDAMAGE_LIBRARIES - Set when XDAMAGE_LIBRARY is found
# XDAMAGE_INCLUDE_DIRS - Set when XDAMAGE_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the Xext libraries
#
# This module defines the following variables:
# Xext_FOUND - True if Xext_INCLUDE_DIR & Xext_LIBRARY are found
# Xext_FOUND - true if Xext_INCLUDE_DIR & Xext_LIBRARY are found
# Xext_LIBRARIES - Set when Xext_LIBRARY is found
# Xext_INCLUDE_DIRS - Set when Xext_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the XINERAMA libraries
#
# This module defines the following variables:
# XINERAMA_FOUND - True if XINERAMA_INCLUDE_DIR & XINERAMA_LIBRARY are found
# XINERAMA_FOUND - true if XINERAMA_INCLUDE_DIR & XINERAMA_LIBRARY are found
# XINERAMA_LIBRARIES - Set when XINERAMA_LIBRARY is found
# XINERAMA_INCLUDE_DIRS - Set when XINERAMA_INCLUDE_DIR is found
#

View File

@ -2,7 +2,7 @@
# Find the xmlto docbook xslt frontend
#
# This module defines the following variables:
# XMLTO_FOUND - True if xmlto was found
# XMLTO_FOUND - true if xmlto was found
# XMLTO_EXECUTABLE - Path to xmlto, if xmlto was found
#

View File

@ -2,7 +2,7 @@
# Find the Xv libraries
#
# This module defines the following variables:
# XV_FOUND - True if XV_INCLUDE_DIR & XV_LIBRARY are found
# XV_FOUND - true if XV_INCLUDE_DIR & XV_LIBRARY are found
# XV_LIBRARIES - Set when XV_LIBRARY is found
# XV_INCLUDE_DIRS - Set when XV_INCLUDE_DIR is found
#

View File

@ -9,6 +9,10 @@
#cmakedefine HAVE_NETDB_H
#cmakedefine HAVE_FCNTL_H
#cmakedefine HAVE_UNISTD_H
#cmakedefine HAVE_LIMITS_H
#cmakedefine HAVE_STDINT_H
#cmakedefine HAVE_STDBOOL_H
#cmakedefine HAVE_INTTYPES_H
/* Found packages */
#cmakedefine CUPS_FOUND

View File

@ -73,7 +73,7 @@ void test_ber_write_universal_tag(void)
STREAM* s;
s = stream_new(sizeof(ber_universal_tag_expected));
ber_write_universal_tag(s, 1, False);
ber_write_universal_tag(s, 1, false);
ASSERT_STREAM(s, (uint8*) ber_universal_tag_expected, sizeof(ber_universal_tag_expected));

View File

@ -1172,7 +1172,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_16x1x8);
decomp_size = sizeof(decompressed_16x1x8);
CU_ASSERT(bitmap_decompress(compressed_16x1x8, t->decompressed_16x1x8,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_16x1x8, decompressed_16x1x8,
decomp_size) == 0);
@ -1182,7 +1182,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_32x32x8);
decomp_size = sizeof(decompressed_32x32x8);
CU_ASSERT(bitmap_decompress(compressed_32x32x8, t->decompressed_32x32x8,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_32x32x8, decompressed_32x32x8,
decomp_size) == 0);
@ -1192,7 +1192,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_16x1x16);
decomp_size = sizeof(decompressed_16x1x16);
CU_ASSERT(bitmap_decompress(compressed_16x1x16, t->decompressed_16x1x16,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_16x1x16, decompressed_16x1x16,
decomp_size) == 0);
@ -1202,7 +1202,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_32x32x16);
decomp_size = sizeof(decompressed_32x32x16);
CU_ASSERT(bitmap_decompress(compressed_32x32x16, t->decompressed_32x32x16,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_32x32x16, decompressed_32x32x16,
decomp_size) == 0);
@ -1212,7 +1212,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_16x1x24);
decomp_size = sizeof(decompressed_16x1x24);
CU_ASSERT(bitmap_decompress(compressed_16x1x24, t->decompressed_16x1x24,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_16x1x24, decompressed_16x1x24,
decomp_size) == 0);
@ -1222,7 +1222,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_32x32x24);
decomp_size = sizeof(decompressed_32x32x24);
CU_ASSERT(bitmap_decompress(compressed_32x32x24, t->decompressed_32x32x24,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_32x32x24, decompressed_32x32x24,
decomp_size) == 0);
@ -1232,7 +1232,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_16x1x32);
decomp_size = sizeof(decompressed_16x1x32);
CU_ASSERT(bitmap_decompress(compressed_16x1x32, t->decompressed_16x1x32,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_16x1x32, decompressed_16x1x32,
decomp_size) == 0);
@ -1242,7 +1242,7 @@ void test_bitmap(void)
comp_size = sizeof(compressed_32x32x32);
decomp_size = sizeof(decompressed_32x32x32);
CU_ASSERT(bitmap_decompress(compressed_32x32x32, t->decompressed_32x32x32,
width, height, comp_size, bpp, bpp) == True);
width, height, comp_size, bpp, bpp) == true);
CU_ASSERT(memcmp(t->decompressed_32x32x32, decompressed_32x32x32,
decomp_size) == 0);

View File

@ -655,7 +655,7 @@ void test_mppc(void)
/* uncompress data */
CU_ASSERT(decompress_rdp_5(&rdp, compressed_rd5, sizeof(compressed_rd5),
PACKET_COMPRESSED, &roff, &rlen) == True);
PACKET_COMPRESSED, &roff, &rlen) == true);
/* get end time */
gettimeofday(&end_time, NULL);

View File

@ -188,7 +188,7 @@ void test_read_draw_nine_grid_order(void)
memset(orderInfo, 0, sizeof(ORDER_INFO));
orderInfo->fieldFlags = 0x1C;
orderInfo->deltaCoordinates = True;
orderInfo->deltaCoordinates = true;
memset(&draw_nine_grid, 0, sizeof(DRAW_NINE_GRID_ORDER));
draw_nine_grid.srcRight = 38;
@ -268,7 +268,7 @@ void test_read_line_to_order(void)
memset(orderInfo, 0, sizeof(ORDER_INFO));
orderInfo->fieldFlags = 0x021E;
orderInfo->deltaCoordinates = True;
orderInfo->deltaCoordinates = true;
memset(&line_to, 0, sizeof(LINE_TO_ORDER));
line_to.nXStart = 826;
@ -410,7 +410,7 @@ void test_read_glyph_index_order(void)
memset(orderInfo, 0, sizeof(ORDER_INFO));
orderInfo->fieldFlags = 0x200100;
orderInfo->deltaCoordinates = True;
orderInfo->deltaCoordinates = true;
memset(&glyph_index, 0, sizeof(GLYPH_INDEX_ORDER));
@ -424,7 +424,7 @@ void test_read_glyph_index_order(void)
memset(orderInfo, 0, sizeof(ORDER_INFO));
orderInfo->fieldFlags = 0x383FE8;
orderInfo->deltaCoordinates = True;
orderInfo->deltaCoordinates = true;
memset(&glyph_index, 0, sizeof(GLYPH_INDEX_ORDER));
@ -567,7 +567,7 @@ void test_read_cache_bitmap_order(void)
memset(&cache_bitmap, 0, sizeof(CACHE_BITMAP_ORDER));
update_read_cache_bitmap_order(s, &cache_bitmap, True, extraFlags);
update_read_cache_bitmap_order(s, &cache_bitmap, true, extraFlags);
CU_ASSERT(cache_bitmap.cacheId == 0);
CU_ASSERT(cache_bitmap.bitmapWidth == 16);
@ -608,7 +608,7 @@ void test_read_cache_bitmap_v2_order(void)
memset(&cache_bitmap_v2, 0, sizeof(CACHE_BITMAP_V2_ORDER));
update_read_cache_bitmap_v2_order(s, &cache_bitmap_v2, True, extraFlags);
update_read_cache_bitmap_v2_order(s, &cache_bitmap_v2, true, extraFlags);
CU_ASSERT(cache_bitmap_v2.cacheId == 1);
CU_ASSERT(cache_bitmap_v2.bitmapBpp == 16);
@ -639,7 +639,7 @@ void test_read_cache_bitmap_v3_order(void)
memset(&cache_bitmap_v3, 0, sizeof(CACHE_BITMAP_V3_ORDER));
update_read_cache_bitmap_v3_order(s, &cache_bitmap_v3, True, extraFlags);
update_read_cache_bitmap_v3_order(s, &cache_bitmap_v3, true, extraFlags);
CU_ASSERT(cache_bitmap_v3.cacheIndex == 32767);
CU_ASSERT(cache_bitmap_v3.key1 == 0xBCEC5035);

View File

@ -74,7 +74,7 @@ void test_pcap(void)
packets[2].data = test_packet_3;
packets[2].length = sizeof(test_packet_3);
pcap = pcap_open("/tmp/test.pcap", True);
pcap = pcap_open("/tmp/test.pcap", true);
pcap_add_record(pcap, test_packet_1, sizeof(test_packet_1));
pcap_flush(pcap);
pcap_add_record(pcap, test_packet_2, sizeof(test_packet_2));
@ -82,7 +82,7 @@ void test_pcap(void)
pcap_add_record(pcap, test_packet_3, sizeof(test_packet_3));
pcap_close(pcap);
pcap = pcap_open("/tmp/test.pcap", False);
pcap = pcap_open("/tmp/test.pcap", false);
int i = 0;
while (pcap_has_next_record(pcap))

View File

@ -717,16 +717,16 @@ void test_rail_plugin(void)
param.out_rail_orders.sysparam.taskbarPos.bottom = 0x03c2;
param.out_rail_orders.sysparam.params |= SPI_MASK_SET_MOUSE_BUTTON_SWAP;
param.out_rail_orders.sysparam.mouseButtonSwap = False;
param.out_rail_orders.sysparam.mouseButtonSwap = false;
param.out_rail_orders.sysparam.params |= SPI_MASK_SET_KEYBOARD_PREF;
param.out_rail_orders.sysparam.keyboardPref = False;
param.out_rail_orders.sysparam.keyboardPref = false;
param.out_rail_orders.sysparam.params |= SPI_MASK_SET_DRAG_FULL_WINDOWS;
param.out_rail_orders.sysparam.dragFullWindows = True;
param.out_rail_orders.sysparam.dragFullWindows = true;
param.out_rail_orders.sysparam.params |= SPI_MASK_SET_KEYBOARD_CUES;
param.out_rail_orders.sysparam.keyboardCues = False;
param.out_rail_orders.sysparam.keyboardCues = false;
param.out_rail_orders.sysparam.params |= SPI_MASK_SET_WORK_AREA;
param.out_rail_orders.sysparam.workArea.left = 0;
@ -744,7 +744,7 @@ void test_rail_plugin(void)
send_ui_event2plugin(chan_man, RDP_EVENT_TYPE_RAIL_CLIENT_EXEC_REMOTE_APP,
&param.plugin_data);
param.out_rail_orders.activate.enabled = True;
param.out_rail_orders.activate.enabled = true;
param.out_rail_orders.activate.windowId = 0x0007008e;
send_ui_event2plugin(chan_man, RDP_EVENT_TYPE_RAIL_CLIENT_ACTIVATE,
&param.out_rail_orders.activate);
@ -829,18 +829,18 @@ void test_rail_plugin(void)
);
CU_ASSERT(en > 2 &&
ee[ 2].event_type == RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_SYSPARAM &&
ee[ 2].order_info.sysparam.setScreenSaveSecure == False
ee[ 2].order_info.sysparam.setScreenSaveSecure == false
);
CU_ASSERT(en > 3 &&
ee[ 3].event_type == RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_SYSPARAM &&
ee[ 3].order_info.sysparam.setScreenSaveActive == False
ee[ 3].order_info.sysparam.setScreenSaveActive == false
);
CU_ASSERT(en > 4 &&
ee[ 4].event_type == RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_LOCALMOVESIZE &&
ee[ 4].order_info.localmovesize.windowId == 0x0007008e &&
ee[ 4].order_info.localmovesize.isMoveSizeStart == True &&
ee[ 4].order_info.localmovesize.isMoveSizeStart == true &&
ee[ 4].order_info.localmovesize.moveSizeType == RAIL_WMSZ_MOVE &&
ee[ 4].order_info.localmovesize.posX == 0x017e &&
ee[ 4].order_info.localmovesize.posY == 0x000a
@ -849,7 +849,7 @@ void test_rail_plugin(void)
CU_ASSERT(en > 5 &&
ee[ 5].event_type == RDP_EVENT_TYPE_RAIL_CHANNEL_SERVER_LOCALMOVESIZE &&
ee[ 5].order_info.localmovesize.windowId == 0x0007008e &&
ee[ 5].order_info.localmovesize.isMoveSizeStart == False &&
ee[ 5].order_info.localmovesize.isMoveSizeStart == false &&
ee[ 5].order_info.localmovesize.moveSizeType == RAIL_WMSZ_MOVE &&
ee[ 5].order_info.localmovesize.posX == 0x00a6 &&
ee[ 5].order_info.localmovesize.posY == 0x0044

View File

@ -27,6 +27,28 @@
/* Base Types */
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef 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;
typedef int64_t sint64;
#else
typedef unsigned char uint8;
typedef signed char sint8;
typedef unsigned short uint16;
@ -41,20 +63,34 @@ typedef unsigned long long uint64;
typedef signed long long sint64;
#endif
#ifndef True
#define True (1)
#endif
#endif /* HAVE_INTTYPES_H */
#ifndef False
#define False (0)
#endif
#ifdef HAVE_STDBOOL_H
#ifndef _WIN32
#include <stdbool.h>
typedef int boolean;
#else
#ifndef __cplusplus
#ifndef __bool_true_false_are_defined
#define __bool_true_false_are_defined 1
#define true 1
#define false 0
#ifdef _WIN32
#define boolean BOOLEAN
#else
typedef int boolean;
#endif
#endif
#endif /* __cplusplus */
#endif /* HAVE_STDBOOL_H */
#ifndef MIN
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
#endif

View File

@ -91,7 +91,7 @@ void update_gdi_bitmap_update(rdpUpdate* update, BITMAP_UPDATE* bitmap_update)
if (cache->bitmap->bitmap == NULL)
{
cache->bitmap->bitmap = Bitmap_Alloc(update->context);
cache->bitmap->bitmap->ephemeral = True;
cache->bitmap->bitmap->ephemeral = true;
reused = 0;
}
@ -199,18 +199,18 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
bitmap_cache->maxCells = 5;
settings->bitmap_cache = False;
settings->bitmap_cache = false;
settings->bitmapCacheV2NumCells = 5;
settings->bitmapCacheV2CellInfo[0].numEntries = 600;
settings->bitmapCacheV2CellInfo[0].persistent = False;
settings->bitmapCacheV2CellInfo[0].persistent = false;
settings->bitmapCacheV2CellInfo[1].numEntries = 600;
settings->bitmapCacheV2CellInfo[1].persistent = False;
settings->bitmapCacheV2CellInfo[1].persistent = false;
settings->bitmapCacheV2CellInfo[2].numEntries = 2048;
settings->bitmapCacheV2CellInfo[2].persistent = False;
settings->bitmapCacheV2CellInfo[2].persistent = false;
settings->bitmapCacheV2CellInfo[3].numEntries = 4096;
settings->bitmapCacheV2CellInfo[3].persistent = False;
settings->bitmapCacheV2CellInfo[3].persistent = false;
settings->bitmapCacheV2CellInfo[4].numEntries = 2048;
settings->bitmapCacheV2CellInfo[4].persistent = False;
settings->bitmapCacheV2CellInfo[4].persistent = false;
bitmap_cache->cells = (BITMAP_V2_CELL*) xzalloc(sizeof(BITMAP_V2_CELL) * bitmap_cache->maxCells);

View File

@ -40,7 +40,7 @@ void update_gdi_create_offscreen_bitmap(rdpUpdate* update, CREATE_OFFSCREEN_BITM
offscreen_cache_put(cache->offscreen, create_offscreen_bitmap->id, bitmap);
if(cache->offscreen->currentSurface == create_offscreen_bitmap->id)
Bitmap_SetSurface(update->context, bitmap, False);
Bitmap_SetSurface(update->context, bitmap, false);
for (i = 0; i < create_offscreen_bitmap->deleteList.cIndices; i++)
{
@ -55,13 +55,13 @@ void update_gdi_switch_surface(rdpUpdate* update, SWITCH_SURFACE_ORDER* switch_s
if (switch_surface->bitmapId == SCREEN_BITMAP_SURFACE)
{
Bitmap_SetSurface(update->context, NULL, True);
Bitmap_SetSurface(update->context, NULL, true);
}
else
{
rdpBitmap* bitmap;
bitmap = offscreen_cache_get(cache->offscreen, switch_surface->bitmapId);
Bitmap_SetSurface(update->context, bitmap, False);
Bitmap_SetSurface(update->context, bitmap, false);
}
cache->offscreen->currentSurface = switch_surface->bitmapId;

View File

@ -859,7 +859,7 @@ boolean freerdp_channels_get_fds(rdpChannels* chan_man, freerdp* instance, void*
int* read_count, void** write_fds, int* write_count)
{
wait_obj_get_fds(chan_man->signal, read_fds, read_count);
return True;
return true;
}
/**
@ -873,7 +873,7 @@ boolean freerdp_channels_check_fds(rdpChannels * chan_man, freerdp* instance)
freerdp_channels_process_sync(chan_man, instance);
}
return True;
return true;
}
RDP_EVENT* freerdp_channels_pop_event(rdpChannels* chan_man)

View File

@ -372,7 +372,7 @@ static boolean bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int
code = IN_UINT8_MV(srcData);
RLE = code & 0x10;
if (RLE == 0)
return False;
return false;
total_pro = 1;
NA = code & 0x20;
if (NA == 0)
@ -389,7 +389,7 @@ static boolean bitmap_decompress4(uint8* srcData, uint8* dstData, int width, int
srcData += bytes_pro;
bytes_pro = process_plane(srcData, width, height, dstData + 0, size - total_pro);
total_pro += bytes_pro;
return (size == total_pro) ? True : False;
return (size == total_pro) ? true : false;
}
/**
@ -426,7 +426,7 @@ boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height,
else if (srcBpp == 32 && dstBpp == 32)
{
if (!bitmap_decompress4(srcData, dstData, width, height, size))
return False;
return false;
}
else if (srcBpp == 15 && dstBpp == 15)
{
@ -451,8 +451,8 @@ boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height,
}
else
{
return False;
return false;
}
return True;
return true;
}

View File

@ -260,8 +260,8 @@ void RLEDECOMPRESS(uint8* pbSrcBuffer, uint32 cbSrcBuffer, uint8* pbDestBuffer,
PIXEL temp;
PIXEL fgPel = WHITE_PIXEL;
boolean fInsertFgPel = False;
boolean fFirstLine = True;
boolean fInsertFgPel = false;
boolean fFirstLine = true;
uint8 bitmask;
PIXEL pixelA, pixelB;
@ -280,8 +280,8 @@ void RLEDECOMPRESS(uint8* pbSrcBuffer, uint32 cbSrcBuffer, uint8* pbDestBuffer,
{
if ((uint32)(pbDest - pbDestBuffer) >= rowDelta)
{
fFirstLine = False;
fInsertFgPel = False;
fFirstLine = false;
fInsertFgPel = false;
}
}
@ -344,13 +344,13 @@ void RLEDECOMPRESS(uint8* pbSrcBuffer, uint32 cbSrcBuffer, uint8* pbDestBuffer,
}
}
/* A follow-on background run order will need a foreground pel inserted. */
fInsertFgPel = True;
fInsertFgPel = true;
continue;
}
/* For any of the other run-types a follow-on background run
order does not need a foreground pel inserted. */
fInsertFgPel = False;
fInsertFgPel = false;
switch (code)
{

View File

@ -212,7 +212,7 @@ void rfx_context_set_pixel_format(RFX_CONTEXT* context, RFX_PIXEL_FORMAT pixel_f
void rfx_context_reset(RFX_CONTEXT* context)
{
context->header_processed = False;
context->header_processed = false;
context->frame_idx = 0;
}
@ -681,7 +681,7 @@ void rfx_compose_message_header(RFX_CONTEXT* context, STREAM* s)
rfx_compose_message_codec_versions(context, s);
rfx_compose_message_channels(context, s);
context->header_processed = True;
context->header_processed = true;
}
static void rfx_compose_message_frame_begin(RFX_CONTEXT* context, STREAM* s)

View File

@ -36,7 +36,7 @@ void rdp_write_synchronize_pdu(STREAM* s, rdpSettings* settings)
boolean rdp_recv_server_synchronize_pdu(rdpRdp* rdp, STREAM* s)
{
return True;
return true;
}
boolean rdp_send_server_synchronize_pdu(rdpRdp* rdp)
@ -49,7 +49,7 @@ boolean rdp_send_server_synchronize_pdu(rdpRdp* rdp)
rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_SYNCHRONIZE, rdp->mcs->user_id);
return True;
return true;
}
boolean rdp_recv_client_synchronize_pdu(STREAM* s)
@ -57,14 +57,14 @@ boolean rdp_recv_client_synchronize_pdu(STREAM* s)
uint16 messageType;
if (stream_get_left(s) < 4)
return False;
return false;
stream_read_uint16(s, messageType); /* messageType (2 bytes) */
if (messageType != SYNCMSGTYPE_SYNC)
return False;
return false;
/* targetUser (2 bytes) */
return True;
return true;
}
boolean rdp_send_client_synchronize_pdu(rdpRdp* rdp)
@ -81,13 +81,13 @@ boolean rdp_send_client_synchronize_pdu(rdpRdp* rdp)
boolean rdp_recv_control_pdu(STREAM* s, uint16* action)
{
if (stream_get_left(s) < 8)
return False;
return false;
stream_read_uint16(s, *action); /* action (2 bytes) */
stream_seek_uint16(s); /* grantId (2 bytes) */
stream_seek_uint32(s); /* controlId (4 bytes) */
return True;
return true;
}
void rdp_write_client_control_pdu(STREAM* s, uint16 action)
@ -103,7 +103,7 @@ boolean rdp_recv_server_control_pdu(rdpRdp* rdp, STREAM* s)
rdp_recv_control_pdu(s, &action);
return True;
return true;
}
boolean rdp_send_server_control_cooperate_pdu(rdpRdp* rdp)
@ -118,7 +118,7 @@ boolean rdp_send_server_control_cooperate_pdu(rdpRdp* rdp)
rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id);
return True;
return true;
}
boolean rdp_send_server_control_granted_pdu(rdpRdp* rdp)
@ -133,7 +133,7 @@ boolean rdp_send_server_control_granted_pdu(rdpRdp* rdp)
rdp_send_data_pdu(rdp, s, DATA_PDU_TYPE_CONTROL, rdp->mcs->user_id);
return True;
return true;
}
boolean rdp_send_client_control_pdu(rdpRdp* rdp, uint16 action)
@ -186,9 +186,9 @@ boolean rdp_send_client_persistent_key_list_pdu(rdpRdp* rdp)
boolean rdp_recv_client_font_list_pdu(STREAM* s)
{
if (stream_get_left(s) < 8)
return False;
return false;
return True;
return true;
}
void rdp_write_client_font_list_pdu(STREAM* s, uint16 flags)
@ -212,7 +212,7 @@ boolean rdp_send_client_font_list_pdu(rdpRdp* rdp, uint16 flags)
boolean rdp_recv_server_font_map_pdu(rdpRdp* rdp, STREAM* s)
{
return True;
return true;
}
boolean rdp_send_server_font_map_pdu(rdpRdp* rdp)
@ -242,10 +242,10 @@ boolean rdp_recv_deactivate_all(rdpRdp* rdp, STREAM* s)
while (rdp->state != CONNECTION_STATE_ACTIVE)
{
if (rdp_check_fds(rdp) < 0)
return False;
return false;
}
return True;
return true;
}
boolean rdp_send_deactivate_all(rdpRdp* rdp)
@ -266,22 +266,22 @@ boolean rdp_server_accept_client_control_pdu(rdpRdp* rdp, STREAM* s)
uint16 action;
if (!rdp_recv_control_pdu(s, &action))
return False;
return false;
if (action == CTRLACTION_REQUEST_CONTROL)
{
if (!rdp_send_server_control_granted_pdu(rdp))
return False;
return false;
}
return True;
return true;
}
boolean rdp_server_accept_client_font_list_pdu(rdpRdp* rdp, STREAM* s)
{
if (!rdp_recv_client_font_list_pdu(s))
return False;
return false;
if (!rdp_send_server_font_map_pdu(rdp))
return False;
return false;
return True;
return true;
}

View File

@ -91,16 +91,16 @@ boolean ber_read_universal_tag(STREAM* s, uint8 tag, boolean pc)
stream_read_uint8(s, byte);
if (byte != (BER_CLASS_UNIV | BER_PC(pc) | (BER_TAG_MASK & tag)))
return False;
return false;
return True;
return true;
}
/**
* Write BER Universal tag.
* @param s stream
* @param tag BER universally-defined tag
* @param pc primitive (False) or constructed (True)
* @param pc primitive (false) or constructed (true)
*/
void ber_write_universal_tag(STREAM* s, uint8 tag, boolean pc)
@ -124,12 +124,12 @@ boolean ber_read_application_tag(STREAM* s, uint8 tag, int* length)
stream_read_uint8(s, byte);
if (byte != ((BER_CLASS_APPL | BER_CONSTRUCT) | BER_TAG_MASK))
return False;
return false;
stream_read_uint8(s, byte);
if (byte != tag)
return False;
return false;
ber_read_length(s, length);
}
@ -138,12 +138,12 @@ boolean ber_read_application_tag(STREAM* s, uint8 tag, int* length)
stream_read_uint8(s, byte);
if (byte != ((BER_CLASS_APPL | BER_CONSTRUCT) | (BER_TAG_MASK & tag)))
return False;
return false;
ber_read_length(s, length);
}
return True;
return true;
}
/**
@ -177,12 +177,12 @@ boolean ber_read_contextual_tag(STREAM* s, uint8 tag, int* length, boolean pc)
if (byte != ((BER_CLASS_CTXT | BER_PC(pc)) | (BER_TAG_MASK & tag)))
{
stream_rewind(s, 1);
return False;
return false;
}
ber_read_length(s, length);
return True;
return true;
}
int ber_write_contextual_tag(STREAM* s, uint8 tag, int length, boolean pc)
@ -203,11 +203,11 @@ boolean ber_read_sequence_tag(STREAM* s, int* length)
stream_read_uint8(s, byte);
if (byte != ((BER_CLASS_UNIV | BER_CONSTRUCT) | (BER_TAG_SEQUENCE_OF)))
return False;
return false;
ber_read_length(s, length);
return True;
return true;
}
/**
@ -236,43 +236,43 @@ boolean ber_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
{
int length;
ber_read_universal_tag(s, BER_TAG_ENUMERATED, False);
ber_read_universal_tag(s, BER_TAG_ENUMERATED, false);
ber_read_length(s, &length);
if (length == 1)
stream_read_uint8(s, *enumerated);
else
return False;
return false;
/* check that enumerated value falls within expected range */
if (*enumerated + 1 > count)
return False;
return false;
return True;
return true;
}
void ber_write_enumerated(STREAM* s, uint8 enumerated, uint8 count)
{
ber_write_universal_tag(s, BER_TAG_ENUMERATED, False);
ber_write_universal_tag(s, BER_TAG_ENUMERATED, false);
ber_write_length(s, 1);
stream_write_uint8(s, enumerated);
}
boolean ber_read_bit_string(STREAM* s, int* length, uint8* padding)
{
ber_read_universal_tag(s, BER_TAG_BIT_STRING, False);
ber_read_universal_tag(s, BER_TAG_BIT_STRING, false);
ber_read_length(s, length);
stream_read_uint8(s, *padding);
return True;
return true;
}
boolean ber_read_octet_string(STREAM* s, int* length)
{
ber_read_universal_tag(s, BER_TAG_OCTET_STRING, False);
ber_read_universal_tag(s, BER_TAG_OCTET_STRING, false);
ber_read_length(s, length);
return True;
return true;
}
/**
@ -284,14 +284,14 @@ boolean ber_read_octet_string(STREAM* s, int* length)
void ber_write_octet_string(STREAM* s, uint8* oct_str, int length)
{
ber_write_universal_tag(s, BER_TAG_OCTET_STRING, False);
ber_write_universal_tag(s, BER_TAG_OCTET_STRING, false);
ber_write_length(s, length);
stream_write(s, oct_str, length);
}
int ber_write_octet_string_tag(STREAM* s, int length)
{
ber_write_universal_tag(s, BER_TAG_OCTET_STRING, False);
ber_write_universal_tag(s, BER_TAG_OCTET_STRING, false);
ber_write_length(s, length);
return 1 + _ber_skip_length(length);
}
@ -312,14 +312,14 @@ boolean ber_read_boolean(STREAM* s, boolean* value)
int length;
uint8 v;
if (!ber_read_universal_tag(s, BER_TAG_BOOLEAN, False))
return False;
if (!ber_read_universal_tag(s, BER_TAG_BOOLEAN, false))
return false;
ber_read_length(s, &length);
if (length != 1)
return False;
return false;
stream_read_uint8(s, v);
*value = (v ? True : False);
return True;
*value = (v ? true : false);
return true;
}
/**
@ -330,22 +330,22 @@ boolean ber_read_boolean(STREAM* s, boolean* value)
void ber_write_boolean(STREAM* s, boolean value)
{
ber_write_universal_tag(s, BER_TAG_BOOLEAN, False);
ber_write_universal_tag(s, BER_TAG_BOOLEAN, false);
ber_write_length(s, 1);
stream_write_uint8(s, (value == True) ? 0xFF : 0);
stream_write_uint8(s, (value == true) ? 0xFF : 0);
}
boolean ber_read_integer(STREAM* s, uint32* value)
{
int length;
ber_read_universal_tag(s, BER_TAG_INTEGER, False);
ber_read_universal_tag(s, BER_TAG_INTEGER, false);
ber_read_length(s, &length);
if (value == NULL)
{
stream_seek(s, length);
return True;
return true;
}
if (length == 1)
@ -362,9 +362,9 @@ boolean ber_read_integer(STREAM* s, uint32* value)
else if (length == 4)
stream_read_uint32_be(s, *value);
else
return False;
return false;
return True;
return true;
}
/**
@ -375,7 +375,7 @@ boolean ber_read_integer(STREAM* s, uint32* value)
int ber_write_integer(STREAM* s, uint32 value)
{
ber_write_universal_tag(s, BER_TAG_INTEGER, False);
ber_write_universal_tag(s, BER_TAG_INTEGER, false);
if (value <= 0xFF)
{
@ -419,7 +419,7 @@ int ber_skip_integer(uint32 value)
boolean ber_read_integer_length(STREAM* s, int* length)
{
ber_read_universal_tag(s, BER_TAG_INTEGER, False);
ber_read_universal_tag(s, BER_TAG_INTEGER, false);
ber_read_length(s, length);
return True;
return true;
}

View File

@ -117,11 +117,11 @@ void rdp_read_general_capability_set(STREAM* s, uint16 length, rdpSettings* sett
stream_read_uint8(s, refreshRectSupport); /* refreshRectSupport (1 byte) */
stream_read_uint8(s, suppressOutputSupport); /* suppressOutputSupport (1 byte) */
if (refreshRectSupport == False)
settings->refresh_rect = False;
if (refreshRectSupport == false)
settings->refresh_rect = false;
if (suppressOutputSupport == False)
settings->suppress_output = False;
if (suppressOutputSupport == false)
settings->suppress_output = false;
}
/**
@ -149,8 +149,8 @@ void rdp_write_general_capability_set(STREAM* s, rdpSettings* settings)
if (settings->server_mode)
{
/* not yet supported server-side */
settings->refresh_rect = False;
settings->suppress_output = False;
settings->refresh_rect = false;
settings->suppress_output = false;
}
stream_write_uint16(s, 0); /* osMajorType (2 bytes) */
@ -203,8 +203,8 @@ void rdp_read_bitmap_capability_set(STREAM* s, uint16 length, rdpSettings* setti
settings->color_depth = preferredBitsPerPixel;
}
if (desktopResizeFlag == False)
settings->desktop_resize = False;
if (desktopResizeFlag == false)
settings->desktop_resize = false;
if (!settings->server_mode && settings->desktop_resize)
{
@ -290,8 +290,8 @@ void rdp_read_order_capability_set(STREAM* s, uint16 length, rdpSettings* settin
for (i = 0; i < 32; i++)
{
if (orderSupport[i] == False)
settings->order_support[i] = False;
if (orderSupport[i] == false)
settings->order_support[i] = false;
}
}
@ -494,8 +494,8 @@ void rdp_read_pointer_capability_set(STREAM* s, uint16 length, rdpSettings* sett
stream_read_uint16(s, colorPointerCacheSize); /* colorPointerCacheSize (2 bytes) */
stream_read_uint16(s, pointerCacheSize); /* pointerCacheSize (2 bytes) */
if (colorPointerFlag == False)
settings->color_pointer = False;
if (colorPointerFlag == false)
settings->color_pointer = false;
}
/**
@ -512,7 +512,7 @@ void rdp_write_pointer_capability_set(STREAM* s, rdpSettings* settings)
header = rdp_capability_set_start(s);
colorPointerFlag = (settings->color_pointer) ? True : False;
colorPointerFlag = (settings->color_pointer) ? true : false;
stream_write_uint16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
stream_write_uint16(s, settings->pointer_cache_size); /* colorPointerCacheSize (2 bytes) */
@ -603,7 +603,7 @@ void rdp_read_sound_capability_set(STREAM* s, uint16 length, rdpSettings* settin
stream_read_uint16(s, soundFlags); /* soundFlags (2 bytes) */
stream_seek_uint16(s); /* pad2OctetsA (2 bytes) */
settings->sound_beeps = (soundFlags & SOUND_BEEPS_FLAG) ? True : False;
settings->sound_beeps = (soundFlags & SOUND_BEEPS_FLAG) ? true : false;
}
/**
@ -662,7 +662,7 @@ void rdp_read_input_capability_set(STREAM* s, uint16 length, rdpSettings* settin
if (!settings->server_mode &&
(inputFlags & INPUT_FLAG_FASTPATH_INPUT) == 0 && (inputFlags & INPUT_FLAG_FASTPATH_INPUT2) == 0)
{
settings->fastpath_input = False;
settings->fastpath_input = false;
}
}
@ -851,8 +851,8 @@ void rdp_read_offscreen_bitmap_cache_capability_set(STREAM* s, uint16 length, rd
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;
if (offscreenSupportLevel & true)
settings->offscreen_bitmap_cache = true;
}
/**
@ -870,7 +870,7 @@ void rdp_write_offscreen_bitmap_cache_capability_set(STREAM* s, rdpSettings* set
header = rdp_capability_set_start(s);
if (settings->offscreen_bitmap_cache)
offscreenSupportLevel = True;
offscreenSupportLevel = true;
stream_read_uint32(s, offscreenSupportLevel); /* offscreenSupportLevel (4 bytes) */
stream_write_uint16(s, settings->offscreen_bitmap_cache_size); /* offscreenCacheSize (2 bytes) */
@ -895,7 +895,7 @@ void rdp_read_bitmap_cache_host_support_capability_set(STREAM* s, uint16 length,
stream_seek_uint16(s); /* pad2 (2 bytes) */
if (cacheVersion & BITMAP_CACHE_V2)
settings->persistent_bitmap_cache = True;
settings->persistent_bitmap_cache = true;
}
/**
@ -1002,7 +1002,7 @@ void rdp_read_virtual_channel_capability_set(STREAM* s, uint16 length, rdpSettin
else
VCChunkSize = 1600;
if (settings->server_mode != True)
if (settings->server_mode != true)
settings->vc_chunk_size = VCChunkSize;
}
@ -1042,7 +1042,7 @@ void rdp_read_draw_nine_grid_cache_capability_set(STREAM* s, uint16 length, rdpS
if ((drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED) ||
(drawNineGridSupportLevel & DRAW_NINEGRID_SUPPORTED_V2))
settings->draw_nine_grid = True;
settings->draw_nine_grid = true;
}
/**
@ -1112,10 +1112,10 @@ void rdp_read_draw_gdiplus_cache_capability_set(STREAM* s, uint16 length, rdpSet
stream_seek(s, 6); /* GdipImageCacheProperties (6 bytes) */
if (drawGDIPlusSupportLevel & DRAW_GDIPLUS_SUPPORTED)
settings->draw_gdi_plus = True;
settings->draw_gdi_plus = true;
if (drawGdiplusCacheLevel & DRAW_GDIPLUS_CACHE_LEVEL_ONE)
settings->draw_gdi_plus_cache = True;
settings->draw_gdi_plus_cache = true;
}
/**
@ -1161,10 +1161,10 @@ void rdp_read_remote_programs_capability_set(STREAM* s, uint16 length, rdpSettin
if ((railSupportLevel & RAIL_LEVEL_SUPPORTED) == 0)
{
if (settings->remote_app == True)
if (settings->remote_app == true)
{
/* RemoteApp Failure! */
settings->remote_app = False;
settings->remote_app = false;
}
}
}
@ -1338,7 +1338,7 @@ void rdp_read_surface_commands_capability_set(STREAM* s, uint16 length, rdpSetti
stream_seek_uint32(s); /* cmdFlags (4 bytes) */
stream_seek_uint32(s); /* reserved (4 bytes) */
settings->surface_commands = True;
settings->surface_commands = true;
}
/**
@ -1381,8 +1381,8 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings
if (settings->server_mode)
{
settings->rfx_codec = False;
settings->ns_codec = False;
settings->rfx_codec = false;
settings->ns_codec = false;
}
while (bitmapCodecCount > 0)
@ -1391,13 +1391,13 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings
{
stream_seek(s, 16); /* codecGUID (16 bytes) */
stream_read_uint8(s, settings->rfx_codec_id);
settings->rfx_codec = True;
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);
settings->ns_codec = True;
settings->ns_codec = true;
}
else
{
@ -1592,13 +1592,13 @@ boolean rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 number
rdp_read_capability_set_header(s, &length, &type);
//printf("%s Capability Set (0x%02X), length:%d\n", CAPSET_TYPE_STRINGS[type], type, length);
settings->received_caps[type] = True;
settings->received_caps[type] = true;
em = bm + length;
if (stream_get_left(s) < length - 4)
{
printf("error processing stream\n");
return False;
return false;
}
switch (type)
@ -1730,7 +1730,7 @@ boolean rdp_read_capability_sets(STREAM* s, rdpSettings* settings, uint16 number
numberCapabilities--;
}
return True;
return true;
}
boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
@ -1746,7 +1746,7 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
uint32 securityHeader;
if (!rdp_read_header(rdp, s, &length, &channelId))
return False;
return false;
if (rdp->settings->encryption)
{
@ -1754,14 +1754,14 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
if (securityHeader & SEC_SECURE_CHECKSUM)
{
printf("Error: TODO\n");
return False;
return false;
}
if (securityHeader & SEC_ENCRYPT)
{
if (!rdp_decrypt(rdp, s, length - 4))
{
printf("rdp_decrypt failed\n");
return False;
return false;
}
}
}
@ -1769,13 +1769,13 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
if (channelId != MCS_GLOBAL_CHANNEL_ID)
{
printf("channelId bad\n");
return False;
return false;
}
if (!rdp_read_share_control_header(s, &pduLength, &pduType, &pduSource))
{
printf("rdp_read_share_control_header failed\n");
return False;
return false;
}
rdp->settings->pdu_source = pduSource;
@ -1783,7 +1783,7 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
if (pduType != PDU_TYPE_DEMAND_ACTIVE)
{
printf("pduType bad\n");
return False;
return false;
}
stream_read_uint32(s, rdp->settings->share_id); /* shareId (4 bytes) */
@ -1797,12 +1797,12 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
if (!rdp_read_capability_sets(s, rdp->settings, numberCapabilities))
{
printf("rdp_read_capability_sets failed\n");
return False;
return false;
}
rdp->update->glyph_v2 = (rdp->settings->glyphSupportLevel > GLYPH_SUPPORT_FULL) ? True : False;
rdp->update->glyph_v2 = (rdp->settings->glyphSupportLevel > GLYPH_SUPPORT_FULL) ? true : false;
return True;
return true;
}
void rdp_write_demand_active(STREAM* s, rdpSettings* settings)
@ -1864,7 +1864,7 @@ boolean rdp_send_demand_active(rdpRdp* rdp)
rdp_send_pdu(rdp, s, PDU_TYPE_DEMAND_ACTIVE, rdp->mcs->user_id);
return True;
return true;
}
boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
@ -1879,17 +1879,17 @@ boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
uint16 numberCapabilities;
if (!rdp_read_header(rdp, s, &length, &channelId))
return False;
return false;
if (channelId != MCS_GLOBAL_CHANNEL_ID)
return False;
return false;
if (!rdp_read_share_control_header(s, &pduLength, &pduType, &pduSource))
return False;
return false;
rdp->settings->pdu_source = pduSource;
if (pduType != PDU_TYPE_CONFIRM_ACTIVE)
return False;
return false;
stream_seek_uint32(s); /* shareId (4 bytes) */
stream_seek_uint16(s); /* originatorId (2 bytes) */
@ -1900,9 +1900,9 @@ boolean rdp_recv_confirm_active(rdpRdp* rdp, STREAM* s)
stream_seek(s, 2); /* pad2Octets (2 bytes) */
if (!rdp_read_capability_sets(s, rdp->settings, numberCapabilities))
return False;
return false;
return True;
return true;
}
void rdp_write_confirm_active(STREAM* s, rdpSettings* settings)

View File

@ -130,7 +130,7 @@ void certificate_read_x509_certificate(rdpCertBlob* cert, rdpCertInfo* info)
ber_read_sequence_tag(s, &length); /* TBSCertificate (SEQUENCE) */
/* Explicit Contextual Tag [0] */
ber_read_contextual_tag(s, 0, &length, True);
ber_read_contextual_tag(s, 0, &length, true);
ber_read_integer(s, &version); /* version (INTEGER) */
version++;
@ -242,7 +242,7 @@ static boolean certificate_process_server_public_key(rdpCertificate* certificate
if (memcmp(magic, "RSA1", 4) != 0)
{
printf("gcc_process_server_public_key: magic error\n");
return False;
return false;
}
stream_seek(s, 4);
@ -256,13 +256,13 @@ static boolean certificate_process_server_public_key(rdpCertificate* certificate
memcpy(certificate->cert_info.modulus.data, s->p, modlen);
stream_seek(s, keylen);
return True;
return true;
}
static boolean certificate_process_server_public_signature(rdpCertificate* certificate, STREAM* s, uint32 length)
{
stream_seek(s, length);
return True;
return true;
}
/**
@ -285,34 +285,34 @@ boolean certificate_read_server_proprietary_certificate(rdpCertificate* certific
if (!(dwSigAlgId == 1 && dwKeyAlgId == 1))
{
printf("certificate_read_server_proprietary_certificate: parse error 1\n");
return False;
return false;
}
stream_read_uint16(s, wPublicKeyBlobType);
if (wPublicKeyBlobType != BB_RSA_KEY_BLOB)
{
printf("certificate_read_server_proprietary_certificate: parse error 2\n");
return False;
return false;
}
stream_read_uint16(s, wPublicKeyBlobLen);
if (!certificate_process_server_public_key(certificate, s, wPublicKeyBlobLen))
{
printf("certificate_read_server_proprietary_certificate: parse error 3\n");
return False;
return false;
}
stream_read_uint16(s, wSignatureBlobType);
if (wSignatureBlobType != BB_RSA_SIGNATURE_BLOB)
{
printf("certificate_read_server_proprietary_certificate: parse error 4\n");
return False;
return false;
}
stream_read_uint16(s, wSignatureBlobLen);
if (!certificate_process_server_public_signature(certificate, s, wSignatureBlobLen))
{
printf("certificate_read_server_proprietary_certificate: parse error 5\n");
return False;
return false;
}
return True;
return true;
}
/**
@ -358,7 +358,7 @@ boolean certificate_read_server_x509_certificate_chain(rdpCertificate* certifica
}
}
return True;
return true;
}
/**
@ -379,7 +379,7 @@ boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8*
if (length < 1)
{
printf("null server certificate\n");
return False;
return false;
}
stream_read_uint32(s, dwVersion); /* dwVersion (4 bytes) */
@ -400,7 +400,7 @@ boolean certificate_read_server_certificate(rdpCertificate* certificate, uint8*
}
xfree(s);
return True;
return true;
}
/**

View File

@ -48,7 +48,7 @@ boolean freerdp_channel_send(freerdp* instance, uint16 channel_id, uint8* data,
if (channel == NULL)
{
printf("freerdp_channel_send: unknown channel_id %d\n", channel_id);
return False;
return false;
}
flags = CHANNEL_FLAG_FIRST;
@ -83,7 +83,7 @@ boolean freerdp_channel_send(freerdp* instance, uint16 channel_id, uint8* data,
flags = 0;
}
return True;
return true;
}
void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id)

View File

@ -70,13 +70,13 @@ boolean rdp_client_connect(rdpRdp* rdp)
nego_enable_nla(rdp->nego, rdp->settings->nla_security);
nego_enable_tls(rdp->nego, rdp->settings->tls_security);
if (nego_connect(rdp->nego) != True)
if (nego_connect(rdp->nego) != true)
{
printf("Error: protocol security negotiation failure\n");
return False;
return false;
}
status = False;
status = false;
if (rdp->nego->selected_protocol & PROTOCOL_NLA)
status = transport_connect_nla(rdp->transport);
else if (rdp->nego->selected_protocol & PROTOCOL_TLS)
@ -84,25 +84,25 @@ boolean rdp_client_connect(rdpRdp* rdp)
else if (rdp->nego->selected_protocol == PROTOCOL_RDP) /* 0 */
status = transport_connect_rdp(rdp->transport);
if (status != True)
return False;
if (status != true)
return false;
rdp_set_blocking_mode(rdp, False);
rdp_set_blocking_mode(rdp, false);
rdp->state = CONNECTION_STATE_NEGO;
if (mcs_send_connect_initial(rdp->mcs) != True)
if (mcs_send_connect_initial(rdp->mcs) != true)
{
printf("Error: unable to send MCS Connect Initial\n");
return False;
return false;
}
while (rdp->state != CONNECTION_STATE_ACTIVE)
{
if (rdp_check_fds(rdp) < 0)
return False;
return false;
}
return True;
return true;
}
boolean rdp_client_disconnect(rdpRdp* rdp)
@ -156,10 +156,10 @@ static boolean rdp_establish_keys(rdpRdp* rdp)
uint32 length;
STREAM* s;
if (rdp->settings->encryption == False)
if (rdp->settings->encryption == false)
{
/* no RDP encryption */
return True;
return true;
}
/* encrypt client random */
@ -189,16 +189,16 @@ static boolean rdp_establish_keys(rdpRdp* rdp)
stream_seek(s, length);
if (transport_write(rdp->mcs->transport, s) < 0)
{
return False;
return false;
}
/* now calculate encrypt / decrypt and update keys */
if (!security_establish_keys(client_random, rdp))
{
return False;
return false;
}
rdp->do_crypt = True;
rdp->do_crypt = true;
if (rdp->settings->encryption_method == ENCRYPTION_METHOD_FIPS)
{
@ -207,13 +207,13 @@ static boolean rdp_establish_keys(rdpRdp* rdp)
rdp->fips_decrypt = crypto_des3_decrypt_init(rdp->fips_decrypt_key, fips_ivec);
rdp->fips_hmac = crypto_hmac_new();
return True;
return true;
}
rdp->rc4_decrypt_key = crypto_rc4_init(rdp->decrypt_key, rdp->rc4_key_len);
rdp->rc4_encrypt_key = crypto_rc4_init(rdp->encrypt_key, rdp->rc4_key_len);
return True;
return true;
}
boolean rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s)
@ -221,61 +221,61 @@ boolean rdp_client_connect_mcs_connect_response(rdpRdp* rdp, STREAM* s)
if (!mcs_recv_connect_response(rdp->mcs, s))
{
printf("rdp_client_connect_mcs_connect_response: mcs_recv_connect_response failed\n");
return False;
return false;
}
if (!mcs_send_erect_domain_request(rdp->mcs))
return False;
return false;
if (!mcs_send_attach_user_request(rdp->mcs))
return False;
return false;
rdp->state = CONNECTION_STATE_MCS_ATTACH_USER;
return True;
return true;
}
boolean rdp_client_connect_mcs_attach_user_confirm(rdpRdp* rdp, STREAM* s)
{
if (!mcs_recv_attach_user_confirm(rdp->mcs, s))
return False;
return false;
if (!mcs_send_channel_join_request(rdp->mcs, rdp->mcs->user_id))
return False;
return false;
rdp->state = CONNECTION_STATE_MCS_CHANNEL_JOIN;
return True;
return true;
}
boolean rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s)
{
int i;
uint16 channel_id;
boolean all_joined = True;
boolean all_joined = true;
if (!mcs_recv_channel_join_confirm(rdp->mcs, s, &channel_id))
return False;
return false;
if (!rdp->mcs->user_channel_joined)
{
if (channel_id != rdp->mcs->user_id)
return False;
rdp->mcs->user_channel_joined = True;
return false;
rdp->mcs->user_channel_joined = true;
if (!mcs_send_channel_join_request(rdp->mcs, MCS_GLOBAL_CHANNEL_ID))
return False;
return false;
}
else if (!rdp->mcs->global_channel_joined)
{
if (channel_id != MCS_GLOBAL_CHANNEL_ID)
return False;
rdp->mcs->global_channel_joined = True;
return false;
rdp->mcs->global_channel_joined = true;
if (rdp->settings->num_channels > 0)
{
if (!mcs_send_channel_join_request(rdp->mcs, rdp->settings->channels[0].channel_id))
return False;
return false;
all_joined = False;
all_joined = false;
}
}
else
@ -286,41 +286,41 @@ boolean rdp_client_connect_mcs_channel_join_confirm(rdpRdp* rdp, STREAM* s)
continue;
if (rdp->settings->channels[i].channel_id != channel_id)
return False;
return false;
rdp->settings->channels[i].joined = True;
rdp->settings->channels[i].joined = true;
break;
}
if (i + 1 < rdp->settings->num_channels)
{
if (!mcs_send_channel_join_request(rdp->mcs, rdp->settings->channels[i + 1].channel_id))
return False;
return false;
all_joined = False;
all_joined = false;
}
}
if (rdp->mcs->user_channel_joined && rdp->mcs->global_channel_joined && all_joined)
{
if (!rdp_establish_keys(rdp))
return False;
return false;
if (!rdp_send_client_info(rdp))
return False;
return false;
rdp->state = CONNECTION_STATE_LICENSE;
}
return True;
return true;
}
boolean rdp_client_connect_license(rdpRdp* rdp, STREAM* s)
{
if (!license_recv(rdp->license, s))
return False;
return false;
if (rdp->license->state == LICENSE_STATE_ABORTED)
{
printf("license connection sequence aborted.\n");
return False;
return false;
}
if (rdp->license->state == LICENSE_STATE_COMPLETED)
@ -328,7 +328,7 @@ boolean rdp_client_connect_license(rdpRdp* rdp, STREAM* s)
rdp->state = CONNECTION_STATE_CAPABILITY;
}
return True;
return true;
}
boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
@ -347,14 +347,14 @@ boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
stream_set_mark(s, mark);
stream_seek(s, RDP_PACKET_HEADER_LENGTH);
if (rdp_recv_out_of_sequence_pdu(rdp, s) != True)
return False;
if (rdp_recv_out_of_sequence_pdu(rdp, s) != true)
return false;
return True;
return true;
}
if (!rdp_send_confirm_active(rdp))
return False;
return false;
/**
* The server may request a different desktop size during Deactivation-Reactivation sequence.
@ -372,34 +372,34 @@ boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s)
*/
if (!rdp_send_client_synchronize_pdu(rdp))
return False;
return false;
if (!rdp_send_client_control_pdu(rdp, CTRLACTION_COOPERATE))
return False;
return false;
if (!rdp_send_client_control_pdu(rdp, CTRLACTION_REQUEST_CONTROL))
return False;
return false;
if (!rdp_send_client_persistent_key_list_pdu(rdp))
return False;
return false;
if (!rdp_send_client_font_list_pdu(rdp, FONTLIST_FIRST | FONTLIST_LAST))
return False;
return false;
rdp->state = CONNECTION_STATE_ACTIVE;
update_reset_state(rdp->update);
return True;
return true;
}
boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s)
{
boolean ret;
transport_set_blocking_mode(rdp->transport, True);
transport_set_blocking_mode(rdp->transport, true);
if (!nego_read_request(rdp->nego, s))
return False;
return false;
if (rdp->nego->requested_protocols == PROTOCOL_RDP)
{
printf("Standard RDP encryption is not supported.\n");
return False;
return false;
}
printf("Requested protocols:");
@ -428,9 +428,9 @@ boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s)
printf("\n");
if (!nego_send_negotiation_response(rdp->nego))
return False;
return false;
ret = False;
ret = false;
if (rdp->nego->selected_protocol & PROTOCOL_NLA)
ret = transport_accept_nla(rdp->transport);
else if (rdp->nego->selected_protocol & PROTOCOL_TLS)
@ -439,13 +439,13 @@ boolean rdp_server_accept_nego(rdpRdp* rdp, STREAM* s)
ret = transport_accept_rdp(rdp->transport);
if (!ret)
return False;
return false;
transport_set_blocking_mode(rdp->transport, False);
transport_set_blocking_mode(rdp->transport, false);
rdp->state = CONNECTION_STATE_NEGO;
return True;
return true;
}
boolean rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s)
@ -453,7 +453,7 @@ boolean rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s)
int i;
if (!mcs_recv_connect_initial(rdp->mcs, s))
return False;
return false;
printf("Accepted client: %s\n", rdp->settings->client_hostname);
printf("Accepted channels:");
@ -464,82 +464,82 @@ boolean rdp_server_accept_mcs_connect_initial(rdpRdp* rdp, STREAM* s)
printf("\n");
if (!mcs_send_connect_response(rdp->mcs))
return False;
return false;
rdp->state = CONNECTION_STATE_MCS_CONNECT;
return True;
return true;
}
boolean rdp_server_accept_mcs_erect_domain_request(rdpRdp* rdp, STREAM* s)
{
if (!mcs_recv_erect_domain_request(rdp->mcs, s))
return False;
return false;
rdp->state = CONNECTION_STATE_MCS_ERECT_DOMAIN;
return True;
return true;
}
boolean rdp_server_accept_mcs_attach_user_request(rdpRdp* rdp, STREAM* s)
{
if (!mcs_recv_attach_user_request(rdp->mcs, s))
return False;
return false;
if (!mcs_send_attach_user_confirm(rdp->mcs))
return False;
return false;
rdp->state = CONNECTION_STATE_MCS_ATTACH_USER;
return True;
return true;
}
boolean rdp_server_accept_mcs_channel_join_request(rdpRdp* rdp, STREAM* s)
{
int i;
uint16 channel_id;
boolean all_joined = True;
boolean all_joined = true;
if (!mcs_recv_channel_join_request(rdp->mcs, s, &channel_id))
return False;
return false;
if (!mcs_send_channel_join_confirm(rdp->mcs, channel_id))
return False;
return false;
if (channel_id == rdp->mcs->user_id)
rdp->mcs->user_channel_joined = True;
rdp->mcs->user_channel_joined = true;
else if (channel_id == MCS_GLOBAL_CHANNEL_ID)
rdp->mcs->global_channel_joined = True;
rdp->mcs->global_channel_joined = true;
for (i = 0; i < rdp->settings->num_channels; i++)
{
if (rdp->settings->channels[i].channel_id == channel_id)
rdp->settings->channels[i].joined = True;
rdp->settings->channels[i].joined = true;
if (!rdp->settings->channels[i].joined)
all_joined = False;
all_joined = false;
}
if (rdp->mcs->user_channel_joined && rdp->mcs->global_channel_joined && all_joined)
rdp->state = CONNECTION_STATE_MCS_CHANNEL_JOIN;
return True;
return true;
}
boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s)
{
if (!rdp_recv_client_info(rdp, s))
return False;
return false;
if (!license_send_valid_client_error_packet(rdp->license))
return False;
return false;
rdp->state = CONNECTION_STATE_LICENSE;
if (!rdp_send_demand_active(rdp))
return False;
return false;
return True;
return true;
}
boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s)
@ -549,30 +549,30 @@ boolean rdp_server_accept_confirm_active(rdpRdp* rdp, STREAM* s)
* the Deactivate All PDU. We need to ignore those noises here.
*/
if (!rdp_recv_confirm_active(rdp, s))
return True;
return true;
rdp->state = CONNECTION_STATE_ACTIVE;
update_reset_state(rdp->update);
if (!rdp_send_server_synchronize_pdu(rdp))
return False;
return false;
if (!rdp_send_server_control_cooperate_pdu(rdp))
return False;
return false;
return True;
return true;
}
boolean rdp_server_reactivate(rdpRdp* rdp)
{
if (!rdp_send_deactivate_all(rdp))
return False;
return false;
rdp->state = CONNECTION_STATE_LICENSE;
if (!rdp_send_demand_active(rdp))
return False;
return false;
return True;
return true;
}

View File

@ -349,15 +349,15 @@ void credssp_write_ts_password_creds(rdpCredssp* credssp, STREAM* s)
ber_write_sequence_tag(s, length);
/* [0] domainName (OCTET STRING) */
ber_write_contextual_tag(s, 0, credssp->ntlmssp->domain.length + 2, True);
ber_write_contextual_tag(s, 0, credssp->ntlmssp->domain.length + 2, true);
ber_write_octet_string(s, credssp->ntlmssp->domain.data, credssp->ntlmssp->domain.length);
/* [1] userName (OCTET STRING) */
ber_write_contextual_tag(s, 1, credssp->ntlmssp->username.length + 2, True);
ber_write_contextual_tag(s, 1, credssp->ntlmssp->username.length + 2, true);
ber_write_octet_string(s, credssp->ntlmssp->username.data, credssp->ntlmssp->username.length);
/* [2] password (OCTET STRING) */
ber_write_contextual_tag(s, 2, credssp->ntlmssp->password.length + 2, True);
ber_write_contextual_tag(s, 2, credssp->ntlmssp->password.length + 2, true);
ber_write_octet_string(s, credssp->ntlmssp->password.data, credssp->ntlmssp->password.length);
}
@ -394,12 +394,12 @@ void credssp_write_ts_credentials(rdpCredssp* credssp, STREAM* s)
length -= ber_write_sequence_tag(s, length);
/* [0] credType (INTEGER) */
length -= ber_write_contextual_tag(s, 0, 3, True);
length -= ber_write_contextual_tag(s, 0, 3, true);
length -= ber_write_integer(s, 1);
/* [1] credentials (OCTET STRING) */
length -= 1;
length -= ber_write_contextual_tag(s, 1, length, True);
length -= ber_write_contextual_tag(s, 1, length, true);
length -= ber_write_octet_string_tag(s, ts_password_creds_length);
credssp_write_ts_password_creds(credssp, s);
@ -491,17 +491,17 @@ void credssp_send(rdpCredssp* credssp, rdpBlob* negoToken, rdpBlob* authInfo, rd
/* TSRequest */
length = ber_get_content_length(ts_request_length);
ber_write_sequence_tag(s, length); /* SEQUENCE */
ber_write_contextual_tag(s, 0, 3, True); /* [0] version */
ber_write_contextual_tag(s, 0, 3, true); /* [0] version */
ber_write_integer(s, 2); /* INTEGER */
/* [1] negoTokens (NegoData) */
if (nego_tokens_length > 0)
{
length = ber_get_content_length(nego_tokens_length);
length -= ber_write_contextual_tag(s, 1, length, True); /* NegoData */
length -= ber_write_contextual_tag(s, 1, length, true); /* NegoData */
length -= ber_write_sequence_tag(s, length); /* SEQUENCE OF NegoDataItem */
length -= ber_write_sequence_tag(s, length); /* NegoDataItem */
length -= ber_write_contextual_tag(s, 0, length, True); /* [0] negoToken */
length -= ber_write_contextual_tag(s, 0, length, true); /* [0] negoToken */
ber_write_octet_string(s, negoToken->data, length); /* OCTET STRING */
}
@ -509,7 +509,7 @@ void credssp_send(rdpCredssp* credssp, rdpBlob* negoToken, rdpBlob* authInfo, rd
if (auth_info_length > 0)
{
length = ber_get_content_length(auth_info_length);
length -= ber_write_contextual_tag(s, 2, length, True);
length -= ber_write_contextual_tag(s, 2, length, true);
ber_write_octet_string(s, authInfo->data, authInfo->length);
}
@ -517,7 +517,7 @@ void credssp_send(rdpCredssp* credssp, rdpBlob* negoToken, rdpBlob* authInfo, rd
if (pub_key_auth_length > 0)
{
length = ber_get_content_length(pub_key_auth_length);
length -= ber_write_contextual_tag(s, 3, length, True);
length -= ber_write_contextual_tag(s, 3, length, true);
ber_write_octet_string(s, pubKeyAuth->data, length);
}
@ -548,22 +548,22 @@ int credssp_recv(rdpCredssp* credssp, rdpBlob* negoToken, rdpBlob* authInfo, rdp
/* TSRequest */
ber_read_sequence_tag(s, &length);
ber_read_contextual_tag(s, 0, &length, True);
ber_read_contextual_tag(s, 0, &length, true);
ber_read_integer(s, &version);
/* [1] negoTokens (NegoData) */
if (ber_read_contextual_tag(s, 1, &length, True) != False)
if (ber_read_contextual_tag(s, 1, &length, true) != false)
{
ber_read_sequence_tag(s, &length); /* SEQUENCE OF NegoDataItem */
ber_read_sequence_tag(s, &length); /* NegoDataItem */
ber_read_contextual_tag(s, 0, &length, True); /* [0] negoToken */
ber_read_contextual_tag(s, 0, &length, true); /* [0] negoToken */
ber_read_octet_string(s, &length); /* OCTET STRING */
freerdp_blob_alloc(negoToken, length);
stream_read(s, negoToken->data, length);
}
/* [2] authInfo (OCTET STRING) */
if (ber_read_contextual_tag(s, 2, &length, True) != False)
if (ber_read_contextual_tag(s, 2, &length, true) != false)
{
ber_read_octet_string(s, &length); /* OCTET STRING */
freerdp_blob_alloc(authInfo, length);
@ -571,7 +571,7 @@ int credssp_recv(rdpCredssp* credssp, rdpBlob* negoToken, rdpBlob* authInfo, rdp
}
/* [3] pubKeyAuth (OCTET STRING) */
if (ber_read_contextual_tag(s, 3, &length, True) != False)
if (ber_read_contextual_tag(s, 3, &length, true) != false)
{
ber_read_octet_string(s, &length); /* OCTET STRING */
freerdp_blob_alloc(pubKeyAuth, length);

View File

@ -154,14 +154,14 @@ void crypto_cert_free(CryptoCert cert)
boolean crypto_cert_verify(CryptoCert server_cert, CryptoCert cacert)
{
return True; /* FIXME: do the actual verification */
return true; /* FIXME: do the actual verification */
}
boolean crypto_cert_get_public_key(CryptoCert cert, rdpBlob* public_key)
{
uint8* p;
int length;
boolean status = True;
boolean status = true;
EVP_PKEY* pkey = NULL;
pkey = X509_get_pubkey(cert->px509);
@ -169,7 +169,7 @@ boolean crypto_cert_get_public_key(CryptoCert cert, rdpBlob* public_key)
if (!pkey)
{
printf("crypto_cert_get_public_key: X509_get_pubkey() failed\n");
status = False;
status = false;
goto exit;
}
@ -178,7 +178,7 @@ boolean crypto_cert_get_public_key(CryptoCert cert, rdpBlob* public_key)
if (length < 1)
{
printf("crypto_cert_get_public_key: i2d_PublicKey() failed\n");
status = False;
status = false;
goto exit;
}
@ -311,7 +311,7 @@ boolean x509_verify_cert(CryptoCert cert, rdpSettings* settings)
{
char* cert_loc;
X509_STORE_CTX* csc;
boolean status = False;
boolean status = false;
X509_STORE* cert_ctx = NULL;
X509_LOOKUP* lookup = NULL;
X509* xcert = cert->px509;
@ -352,7 +352,7 @@ boolean x509_verify_cert(CryptoCert cert, rdpSettings* settings)
goto end;
if (X509_verify_cert(csc) == 1)
status = True;
status = true;
X509_STORE_CTX_free(csc);
X509_STORE_free(cert_ctx);

View File

@ -308,7 +308,7 @@ boolean fastpath_recv_updates(rdpFastPath* fastpath, STREAM* s)
IFCALL(update->EndPaint, update);
return True;
return true;
}
static boolean fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, uint8* eventCode)
@ -316,14 +316,14 @@ static boolean fastpath_read_input_event_header(STREAM* s, uint8* eventFlags, ui
uint8 eventHeader;
if (stream_get_left(s) < 1)
return False;
return false;
stream_read_uint8(s, eventHeader); /* eventHeader (1 byte) */
*eventFlags = (eventHeader & 0x1F);
*eventCode = (eventHeader >> 5);
return True;
return true;
}
static boolean fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
@ -332,7 +332,7 @@ static boolean fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM*
uint16 code;
if (stream_get_left(s) < 1)
return False;
return false;
stream_read_uint8(s, code); /* keyCode (1 byte) */
@ -347,7 +347,7 @@ static boolean fastpath_recv_input_event_scancode(rdpFastPath* fastpath, STREAM*
IFCALL(fastpath->rdp->input->KeyboardEvent, fastpath->rdp->input, flags, code);
return True;
return true;
}
static boolean fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
@ -357,7 +357,7 @@ static boolean fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s,
uint16 yPos;
if (stream_get_left(s) < 6)
return False;
return false;
stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */
stream_read_uint16(s, xPos); /* xPos (2 bytes) */
@ -365,7 +365,7 @@ static boolean fastpath_recv_input_event_mouse(rdpFastPath* fastpath, STREAM* s,
IFCALL(fastpath->rdp->input->MouseEvent, fastpath->rdp->input, pointerFlags, xPos, yPos);
return True;
return true;
}
static boolean fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
@ -375,7 +375,7 @@ static boolean fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s
uint16 yPos;
if (stream_get_left(s) < 6)
return False;
return false;
stream_read_uint16(s, pointerFlags); /* pointerFlags (2 bytes) */
stream_read_uint16(s, xPos); /* xPos (2 bytes) */
@ -383,14 +383,14 @@ static boolean fastpath_recv_input_event_mousex(rdpFastPath* fastpath, STREAM* s
IFCALL(fastpath->rdp->input->ExtendedMouseEvent, fastpath->rdp->input, pointerFlags, xPos, yPos);
return True;
return true;
}
static boolean fastpath_recv_input_event_sync(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
{
IFCALL(fastpath->rdp->input->SynchronizeEvent, fastpath->rdp->input, eventFlags);
return True;
return true;
}
static boolean fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM* s, uint8 eventFlags)
@ -398,13 +398,13 @@ static boolean fastpath_recv_input_event_unicode(rdpFastPath* fastpath, STREAM*
uint16 unicodeCode;
if (stream_get_left(s) < 2)
return False;
return false;
stream_read_uint16(s, unicodeCode); /* unicodeCode (2 bytes) */
IFCALL(fastpath->rdp->input->UnicodeKeyboardEvent, fastpath->rdp->input, unicodeCode);
return True;
return true;
}
static boolean fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s)
@ -413,33 +413,33 @@ static boolean fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s)
uint8 eventCode;
if (!fastpath_read_input_event_header(s, &eventFlags, &eventCode))
return False;
return false;
switch (eventCode)
{
case FASTPATH_INPUT_EVENT_SCANCODE:
if (!fastpath_recv_input_event_scancode(fastpath, s, eventFlags))
return False;
return false;
break;
case FASTPATH_INPUT_EVENT_MOUSE:
if (!fastpath_recv_input_event_mouse(fastpath, s, eventFlags))
return False;
return false;
break;
case FASTPATH_INPUT_EVENT_MOUSEX:
if (!fastpath_recv_input_event_mousex(fastpath, s, eventFlags))
return False;
return false;
break;
case FASTPATH_INPUT_EVENT_SYNC:
if (!fastpath_recv_input_event_sync(fastpath, s, eventFlags))
return False;
return false;
break;
case FASTPATH_INPUT_EVENT_UNICODE:
if (!fastpath_recv_input_event_unicode(fastpath, s, eventFlags))
return False;
return false;
break;
default:
@ -447,7 +447,7 @@ static boolean fastpath_recv_input_event(rdpFastPath* fastpath, STREAM* s)
break;
}
return True;
return true;
}
boolean fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s)
@ -462,7 +462,7 @@ boolean fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s)
*/
if (stream_get_left(s) < 1)
return False;
return false;
stream_read_uint8(s, fastpath->numberEvents); /* eventHeader (1 byte) */
}
@ -470,10 +470,10 @@ boolean fastpath_recv_inputs(rdpFastPath* fastpath, STREAM* s)
for (i = 0; i < fastpath->numberEvents; i++)
{
if (!fastpath_recv_input_event(fastpath, s))
return False;
return false;
}
return True;
return true;
}
STREAM* fastpath_input_pdu_init(rdpFastPath* fastpath, uint8 eventFlags, uint8 eventCode)
@ -494,7 +494,7 @@ boolean fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s)
if (length > 127)
{
printf("Maximum FastPath PDU length is 127\n");
return False;
return false;
}
stream_set_pos(s, 0);
@ -503,9 +503,9 @@ boolean fastpath_send_input_pdu(rdpFastPath* fastpath, STREAM* s)
stream_set_pos(s, length);
if (transport_write(fastpath->rdp->transport, s) < 0)
return False;
return false;
return True;
return true;
}
STREAM* fastpath_update_pdu_init(rdpFastPath* fastpath)
@ -525,7 +525,7 @@ boolean fastpath_send_update_pdu(rdpFastPath* fastpath, STREAM* s)
if (length > FASTPATH_MAX_PACKET_SIZE)
{
printf("Maximum FastPath Update PDU length is %d (actual:%d)\n", FASTPATH_MAX_PACKET_SIZE, length);
return False;
return false;
}
stream_set_pos(s, 0);
@ -535,9 +535,9 @@ boolean fastpath_send_update_pdu(rdpFastPath* fastpath, STREAM* s)
stream_set_pos(s, length);
if (transport_write(fastpath->rdp->transport, s) < 0)
return False;
return false;
return True;
return true;
}
boolean fastpath_send_fragmented_update_pdu(rdpFastPath* fastpath, STREAM* s)
@ -572,7 +572,7 @@ boolean fastpath_send_fragmented_update_pdu(rdpFastPath* fastpath, STREAM* s)
fastpath_send_update_pdu(fastpath, update);
}
return True;
return true;
}
boolean fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, uint16 frameAction, uint32 frameId)
@ -586,9 +586,9 @@ boolean fastpath_send_surfcmd_frame_marker(rdpFastPath* fastpath, uint16 frameAc
update_write_surfcmd_frame_marker(s, frameAction, frameId);
if (transport_write(fastpath->rdp->transport, s) < 0)
return False;
return false;
return True;
return true;
}
boolean fastpath_send_surfcmd_surface_bits(rdpFastPath* fastpath, SURFACE_BITS_COMMAND* cmd)
@ -639,10 +639,10 @@ boolean fastpath_send_surfcmd_surface_bits(rdpFastPath* fastpath, SURFACE_BITS_C
bitmapDataLength -= fragment_size;
if (!fastpath_send_update_pdu(fastpath, s))
return False;
return false;
}
return True;
return true;
}
rdpFastPath* fastpath_new(rdpRdp* rdp)

View File

@ -45,9 +45,9 @@ boolean freerdp_connect(freerdp* instance)
{
if (instance->settings->dump_rfx)
{
instance->update->pcap_rfx = pcap_open(instance->settings->dump_rfx_file, True);
instance->update->pcap_rfx = pcap_open(instance->settings->dump_rfx_file, true);
if (instance->update->pcap_rfx)
instance->update->dump_rfx = True;
instance->update->dump_rfx = true;
}
extension_post_connect(rdp->extension);
@ -61,9 +61,9 @@ boolean freerdp_connect(freerdp* instance)
pcap_record record;
s = stream_new(1024);
instance->update->pcap_rfx = pcap_open(instance->settings->play_rfx_file, False);
instance->update->pcap_rfx = pcap_open(instance->settings->play_rfx_file, false);
if (instance->update->pcap_rfx)
instance->update->play_rfx = True;
instance->update->play_rfx = true;
update = instance->update;
while (instance->update->play_rfx && pcap_has_next_record(update->pcap_rfx))
@ -83,7 +83,7 @@ boolean freerdp_connect(freerdp* instance)
}
xfree(s->data);
return True;
return true;
}
}
@ -97,7 +97,7 @@ boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds
rdp = instance->context->rdp;
transport_get_fds(rdp->transport, rfds, rcount);
return True;
return true;
}
boolean freerdp_check_fds(freerdp* instance)
@ -110,9 +110,9 @@ boolean freerdp_check_fds(freerdp* instance)
status = rdp_check_fds(rdp);
if (status < 0)
return False;
return false;
return True;
return true;
}
static int freerdp_send_channel_data(freerdp* instance, int channel_id, uint8* data, int size)
@ -127,7 +127,7 @@ boolean freerdp_disconnect(freerdp* instance)
rdp = instance->context->rdp;
transport_disconnect(rdp->transport);
return True;
return true;
}
void freerdp_context_new(freerdp* instance)

View File

@ -142,45 +142,45 @@ boolean gcc_read_conference_create_request(STREAM* s, rdpSettings* settings)
/* ConnectData */
if (!per_read_choice(s, &choice))
return False;
return false;
if (!per_read_object_identifier(s, t124_02_98_oid))
return False;
return false;
/* ConnectData::connectPDU (OCTET_STRING) */
if (!per_read_length(s, &length))
return False;
return false;
/* ConnectGCCPDU */
if (!per_read_choice(s, &choice))
return False;
return false;
if (!per_read_selection(s, &selection))
return False;
return false;
/* ConferenceCreateRequest::conferenceName */
if (!per_read_numeric_string(s, 1)) /* ConferenceName::numeric */
return False;
return false;
if (!per_read_padding(s, 1)) /* padding */
return False;
return false;
/* UserData (SET OF SEQUENCE) */
if (!per_read_number_of_sets(s, &number) || number != 1) /* one set of UserData */
return False;
return false;
if (!per_read_choice(s, &choice) || choice != 0xC0) /* UserData::value present + select h221NonStandard (1) */
return False;
return false;
/* h221NonStandard */
if (!per_read_octet_string(s, h221_cs_key, 4, 4)) /* h221NonStandard, client-to-server H.221 key, "Duca" */
return False;
return false;
/* userData::value (OCTET_STRING) */
if (!per_read_length(s, &length))
return False;
return false;
if (stream_get_left(s) < length)
return False;
return false;
if (!gcc_read_client_data_blocks(s, settings, length))
return False;
return false;
return True;
return true;
}
/**
@ -254,17 +254,17 @@ boolean gcc_read_conference_create_response(STREAM* s, rdpSettings* settings)
/* h221NonStandard */
if (!per_read_octet_string(s, h221_sc_key, 4, 4)) /* h221NonStandard, server-to-client H.221 key, "McDn" */
return False;
return false;
/* userData (OCTET_STRING) */
per_read_length(s, &length);
if (!gcc_read_server_data_blocks(s, settings, length))
{
printf("gcc_read_conference_create_response: gcc_read_server_data_blocks failed\n");
return False;
return false;
}
return True;
return true;
}
void gcc_write_conference_create_response(STREAM* s, STREAM* user_data)
@ -316,27 +316,27 @@ boolean gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length
{
case CS_CORE:
if (!gcc_read_client_core_data(s, settings, blockLength - 4))
return False;
return false;
break;
case CS_SECURITY:
if (!gcc_read_client_security_data(s, settings, blockLength - 4))
return False;
return false;
break;
case CS_NET:
if (!gcc_read_client_network_data(s, settings, blockLength - 4))
return False;
return false;
break;
case CS_CLUSTER:
if (!gcc_read_client_cluster_data(s, settings, blockLength - 4))
return False;
return false;
break;
case CS_MONITOR:
if (!gcc_read_client_monitor_data(s, settings, blockLength - 4))
return False;
return false;
break;
default:
@ -347,7 +347,7 @@ boolean gcc_read_client_data_blocks(STREAM* s, rdpSettings *settings, int length
stream_set_pos(s, pos + blockLength);
}
return True;
return true;
}
void gcc_write_client_data_blocks(STREAM* s, rdpSettings *settings)
@ -373,7 +373,7 @@ boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length
if (!gcc_read_user_data_header(s, &type, &blockLength))
{
printf("gcc_read_server_data_blocks: gcc_read_user_data_header failed\n");
return False;
return false;
}
switch (type)
@ -382,7 +382,7 @@ boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length
if (!gcc_read_server_core_data(s, settings))
{
printf("gcc_read_server_data_blocks: gcc_read_server_core_data failed\n");
return False;
return false;
}
break;
@ -390,7 +390,7 @@ boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length
if (!gcc_read_server_security_data(s, settings))
{
printf("gcc_read_server_data_blocks: gcc_read_server_security_data failed\n");
return False;
return false;
}
break;
@ -398,7 +398,7 @@ boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length
if (!gcc_read_server_network_data(s, settings))
{
printf("gcc_read_server_data_blocks: gcc_read_server_network_data failed\n");
return False;
return false;
}
break;
@ -409,7 +409,7 @@ boolean gcc_read_server_data_blocks(STREAM* s, rdpSettings *settings, int length
s->p = holdp + blockLength;
}
return True;
return true;
}
void gcc_write_server_data_blocks(STREAM* s, rdpSettings *settings)
@ -425,9 +425,9 @@ boolean gcc_read_user_data_header(STREAM* s, uint16* type, uint16* length)
stream_read_uint16(s, *length); /* length */
if (stream_get_left(s) < *length - 4)
return False;
return false;
return True;
return true;
}
/**
@ -464,7 +464,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 block
/* Length of all required fields, until imeFileName */
if (blockLength < 128)
return False;
return false;
stream_read_uint32(s, version); /* version */
settings->rdp_version = (version == RDP_VERSION_4 ? 4 : 7);
@ -553,7 +553,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 block
blockLength -= 4;
if (settings->selected_protocol != serverSelectedProtocol)
return False;
return false;
} while (0);
if (highColorDepth > 0)
@ -578,7 +578,7 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 block
settings->color_depth = 24;
break;
default:
return False;
return false;
}
}
else
@ -592,11 +592,11 @@ boolean gcc_read_client_core_data(STREAM* s, rdpSettings *settings, uint16 block
settings->color_depth = 8;
break;
default:
return False;
return false;
}
}
return True;
return true;
}
/**
@ -710,7 +710,7 @@ boolean gcc_read_server_core_data(STREAM* s, rdpSettings *settings)
else if (version == RDP_VERSION_5_PLUS && settings->rdp_version < 5)
settings->rdp_version = 7;
return True;
return true;
}
void gcc_write_server_core_data(STREAM* s, rdpSettings *settings)
@ -731,13 +731,13 @@ void gcc_write_server_core_data(STREAM* s, rdpSettings *settings)
boolean gcc_read_client_security_data(STREAM* s, rdpSettings *settings, uint16 blockLength)
{
if (blockLength < 8)
return False;
return false;
stream_read_uint32(s, settings->encryption_method); /* encryptionMethods */
if (settings->encryption_method == 0)
stream_read_uint32(s, settings->encryption_method); /* extEncryptionMethods */
return True;
return true;
}
/**
@ -777,10 +777,10 @@ boolean gcc_read_server_security_data(STREAM* s, rdpSettings *settings)
if (settings->encryption_method == 0 && settings->encryption_level == 0)
{
/* serverRandom and serverRandom must not be present */
settings->encryption = False;
settings->encryption = false;
settings->encryption_method = ENCRYPTION_METHOD_NONE;
settings->encryption_level = ENCRYPTION_LEVEL_NONE;
return True;
return true;
}
stream_read_uint32(s, serverRandomLen); /* serverRandomLen */
@ -795,7 +795,7 @@ boolean gcc_read_server_security_data(STREAM* s, rdpSettings *settings)
}
else
{
return False;
return false;
}
if (serverCertLen > 0)
@ -810,15 +810,15 @@ boolean gcc_read_server_security_data(STREAM* s, rdpSettings *settings)
len = settings->server_certificate.length;
if (!certificate_read_server_certificate(settings->server_cert, data, len))
{
return False;
return false;
}
}
else
{
return False;
return false;
}
return True;
return true;
}
void gcc_write_server_security_data(STREAM* s, rdpSettings *settings)
@ -845,13 +845,13 @@ boolean gcc_read_client_network_data(STREAM* s, rdpSettings *settings, uint16 bl
int i;
if (blockLength < 4)
return False;
return false;
stream_read_uint32(s, settings->num_channels); /* channelCount */
if (blockLength < 4 + settings->num_channels * 12)
return False;
return false;
if (settings->num_channels > 16)
return False;
return false;
/* channelDefArray */
for (i = 0; i < settings->num_channels; i++)
@ -862,7 +862,7 @@ boolean gcc_read_client_network_data(STREAM* s, rdpSettings *settings, uint16 bl
settings->channels[i].channel_id = MCS_GLOBAL_CHANNEL_ID + 1 + i;
}
return True;
return true;
}
/**
@ -919,7 +919,7 @@ boolean gcc_read_server_network_data(STREAM* s, rdpSettings *settings)
if (channelCount % 2 == 1)
stream_seek(s, 2); /* padding */
return True;
return true;
}
void gcc_write_server_network_data(STREAM* s, rdpSettings *settings)
@ -952,14 +952,14 @@ boolean gcc_read_client_cluster_data(STREAM* s, rdpSettings *settings, uint16 bl
uint32 flags;
if (blockLength < 8)
return False;
return false;
stream_read_uint32(s, flags); /* flags */
if ((flags | REDIRECTED_SESSIONID_FIELD_VALID))
stream_read_uint32(s, settings->redirected_session_id); /* redirectedSessionID */
return True;
return true;
}
/**
@ -994,7 +994,7 @@ void gcc_write_client_cluster_data(STREAM* s, rdpSettings *settings)
boolean gcc_read_client_monitor_data(STREAM* s, rdpSettings *settings, uint16 blockLength)
{
printf("CS_MONITOR\n");
return True;
return true;
}
/**

View File

@ -130,7 +130,7 @@ boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings)
TIME_ZONE_INFO* clientTimeZone;
if (stream_get_left(s) < 172)
return False;
return false;
clientTimeZone = &settings->client_time_zone;
@ -154,7 +154,7 @@ boolean rdp_read_client_time_zone(STREAM* s, rdpSettings* settings)
rdp_read_system_time(s, &clientTimeZone->daylightDate); /* DaylightDate */
stream_read_uint32(s, clientTimeZone->daylightBias); /* DaylightBias */
return True;
return true;
}
/**
@ -239,14 +239,14 @@ boolean rdp_read_client_auto_reconnect_cookie(STREAM* s, rdpSettings* settings)
autoReconnectCookie = &settings->client_auto_reconnect_cookie;
if (stream_get_left(s) < 28)
return False;
return false;
stream_write_uint32(s, autoReconnectCookie->cbLen); /* cbLen (4 bytes) */
stream_write_uint32(s, autoReconnectCookie->version); /* version (4 bytes) */
stream_write_uint32(s, autoReconnectCookie->logonId); /* LogonId (4 bytes) */
stream_write(s, autoReconnectCookie->securityVerifier, 16); /* SecurityVerifier */
return True;
return true;
}
/**
@ -284,22 +284,22 @@ boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
stream_read_uint16(s, clientAddressFamily); /* clientAddressFamily */
stream_read_uint16(s, cbClientAddress); /* cbClientAddress */
settings->ipv6 = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? True : False);
settings->ipv6 = (clientAddressFamily == ADDRESS_FAMILY_INET6 ? true : false);
if (stream_get_left(s) < cbClientAddress)
return False;
return false;
settings->ip_address = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbClientAddress);
stream_seek(s, cbClientAddress);
stream_read_uint16(s, cbClientDir); /* cbClientDir */
if (stream_get_left(s) < cbClientDir)
return False;
return false;
if (settings->client_dir)
xfree(settings->client_dir);
settings->client_dir = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbClientDir);
stream_seek(s, cbClientDir);
if (!rdp_read_client_time_zone(s, settings))
return False;
return false;
stream_seek_uint32(s); /* clientSessionId, should be set to 0 */
stream_read_uint32(s, settings->performance_flags); /* performanceFlags */
@ -312,7 +312,7 @@ boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
/* reserved1 (2 bytes) */
/* reserved2 (2 bytes) */
return True;
return true;
}
/**
@ -392,10 +392,10 @@ boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings)
stream_seek_uint32(s); /* CodePage */
stream_read_uint32(s, flags); /* flags */
settings->autologon = ((flags & INFO_AUTOLOGON) ? True : False);
settings->remote_app = ((flags & INFO_RAIL) ? True : False);
settings->console_audio = ((flags & INFO_REMOTECONSOLEAUDIO) ? True : False);
settings->compression = ((flags & INFO_COMPRESSION) ? True : False);
settings->autologon = ((flags & INFO_AUTOLOGON) ? true : false);
settings->remote_app = ((flags & INFO_RAIL) ? true : false);
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 */
@ -404,7 +404,7 @@ boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings)
stream_read_uint16(s, cbWorkingDir); /* cbWorkingDir */
if (stream_get_left(s) < cbDomain + 2)
return False;
return false;
if (cbDomain > 0)
{
settings->domain = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbDomain);
@ -413,7 +413,7 @@ boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings)
stream_seek(s, 2);
if (stream_get_left(s) < cbUserName + 2)
return False;
return false;
if (cbUserName > 0)
{
settings->username = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbUserName);
@ -422,7 +422,7 @@ boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings)
stream_seek(s, 2);
if (stream_get_left(s) < cbPassword + 2)
return False;
return false;
if (cbPassword > 0)
{
settings->password = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbPassword);
@ -431,7 +431,7 @@ boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings)
stream_seek(s, 2);
if (stream_get_left(s) < cbAlternateShell + 2)
return False;
return false;
if (cbAlternateShell > 0)
{
settings->shell = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbAlternateShell);
@ -440,7 +440,7 @@ boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings)
stream_seek(s, 2);
if (stream_get_left(s) < cbWorkingDir + 2)
return False;
return false;
if (cbWorkingDir > 0)
{
settings->directory = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbWorkingDir);
@ -451,7 +451,7 @@ boolean rdp_read_info_packet(STREAM* s, rdpSettings* settings)
if (settings->rdp_version >= 5)
return rdp_read_extended_info_packet(s, settings); /* extraInfo */
return True;
return true;
}
/**
@ -565,11 +565,11 @@ boolean rdp_recv_client_info(rdpRdp* rdp, STREAM* s)
uint16 sec_flags;
if (!rdp_read_header(rdp, s, &length, &channelId))
return False;
return false;
rdp_read_security_header(s, &sec_flags);
if ((sec_flags & SEC_INFO_PKT) == 0)
return False;
return false;
return rdp_read_info_packet(s, rdp->settings);
}
@ -687,6 +687,6 @@ boolean rdp_recv_save_session_info(rdpRdp* rdp, STREAM* s)
break;
}
return True;
return true;
}

View File

@ -151,9 +151,9 @@ boolean license_send(rdpLicense* license, STREAM* s, uint8 type)
stream_set_pos(s, length);
if (transport_write(license->rdp->transport, s) < 0)
return False;
return false;
return True;
return true;
}
/**
@ -175,19 +175,19 @@ boolean license_recv(rdpLicense* license, STREAM* s)
if (!rdp_read_header(license->rdp, s, &length, &channelId))
{
printf("Incorrect RDP header.\n");
return False;
return false;
}
rdp_read_security_header(s, &sec_flags);
if (!(sec_flags & SEC_LICENSE_PKT))
{
stream_rewind(s, RDP_SECURITY_HEADER_LENGTH);
if (rdp_recv_out_of_sequence_pdu(license->rdp, s) != True)
if (rdp_recv_out_of_sequence_pdu(license->rdp, s) != true)
{
printf("Unexpected license packet.\n");
return False;
return false;
}
return True;
return true;
}
license_read_preamble(s, &bMsgType, &flags, &wMsgSize); /* preamble (4 bytes) */
@ -220,10 +220,10 @@ boolean license_recv(rdpLicense* license, STREAM* s)
default:
printf("invalid bMsgType:%d\n", bMsgType);
return False;
return false;
}
return True;
return true;
}
void license_generate_randoms(rdpLicense* license)
@ -870,7 +870,7 @@ boolean license_send_valid_client_error_packet(rdpLicense* license)
license_send(license, s, ERROR_ALERT);
return True;
return true;
}
/**

View File

@ -62,7 +62,7 @@ static boolean freerdp_listener_open(freerdp_listener* instance, const char* bin
if (status != 0)
{
perror("getaddrinfo");
return False;
return false;
}
for (ai = res; ai && listener->num_sockfds < 5; ai = ai->ai_next)
@ -117,7 +117,7 @@ static boolean freerdp_listener_open(freerdp_listener* instance, const char* bin
freeaddrinfo(res);
return (listener->num_sockfds > 0 ? True : False);
return (listener->num_sockfds > 0 ? true : false);
}
static void freerdp_listener_close(freerdp_listener* instance)
@ -139,7 +139,7 @@ static boolean freerdp_listener_get_fds(freerdp_listener* instance, void** rfds,
int i;
if (listener->num_sockfds < 1)
return False;
return false;
for (i = 0; i < listener->num_sockfds; i++)
{
@ -147,7 +147,7 @@ static boolean freerdp_listener_get_fds(freerdp_listener* instance, void** rfds,
(*rcount)++;
}
return True;
return true;
}
static boolean freerdp_listener_check_fds(freerdp_listener* instance)
@ -161,7 +161,7 @@ static boolean freerdp_listener_check_fds(freerdp_listener* instance)
void* sin_addr;
if (listener->num_sockfds < 1)
return False;
return false;
for (i = 0; i < listener->num_sockfds; i++)
{
@ -173,7 +173,7 @@ static boolean freerdp_listener_check_fds(freerdp_listener* instance)
continue;
perror("accept");
return False;
return false;
}
client = freerdp_peer_new(peer_sockfd);
@ -187,7 +187,7 @@ static boolean freerdp_listener_check_fds(freerdp_listener* instance)
IFCALL(instance->PeerAccepted, instance, client);
}
return True;
return true;
}
freerdp_listener* freerdp_listener_new(void)

View File

@ -191,16 +191,16 @@ boolean mcs_read_domain_mcspdu_header(STREAM* s, enum DomainMCSPDU* domainMCSPDU
*length = tpkt_read_header(s);
if (tpdu_read_data(s) == 0)
return False;
return false;
MCSPDU = *domainMCSPDU;
per_read_choice(s, &choice);
*domainMCSPDU = (choice >> 2);
if (*domainMCSPDU != MCSPDU)
return False;
return false;
return True;
return true;
}
/**
@ -259,7 +259,7 @@ boolean mcs_read_domain_parameters(STREAM* s, DomainParameters* domainParameters
ber_read_integer(s, &(domainParameters->maxMCSPDUsize));
ber_read_integer(s, &(domainParameters->protocolVersion));
return True;
return true;
}
/**
@ -327,24 +327,24 @@ boolean mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s)
tpkt_read_header(s);
if (tpdu_read_data(s) == 0)
return False;
return false;
if (!ber_read_application_tag(s, MCS_TYPE_CONNECT_INITIAL, &length))
return False;
return false;
/* callingDomainSelector (OCTET_STRING) */
if (!ber_read_octet_string(s, &length))
return False;
return false;
stream_seek(s, length);
/* calledDomainSelector (OCTET_STRING) */
if (!ber_read_octet_string(s, &length))
return False;
return false;
stream_seek(s, length);
/* upwardFlag (BOOLEAN) */
if (!ber_read_boolean(s, &upwardFlag))
return False;
return false;
/* targetParameters (DomainParameters) */
mcs_read_domain_parameters(s, &mcs->targetParameters);
@ -356,12 +356,12 @@ boolean mcs_recv_connect_initial(rdpMcs* mcs, STREAM* s)
mcs_read_domain_parameters(s, &mcs->maximumParameters);
if (!ber_read_octet_string(s, &length))
return False;
return false;
if (!gcc_read_conference_create_request(s, mcs->transport->settings))
return False;
return false;
return True;
return true;
}
/**
@ -389,7 +389,7 @@ void mcs_write_connect_initial(STREAM* s, rdpMcs* mcs, STREAM* user_data)
ber_write_octet_string(s, calledDomainSelector, sizeof(calledDomainSelector));
/* upwardFlag (BOOLEAN) */
ber_write_boolean(s, True);
ber_write_boolean(s, true);
/* targetParameters (DomainParameters) */
mcs_write_domain_parameters(s, &mcs->targetParameters);
@ -487,7 +487,7 @@ boolean mcs_send_connect_initial(rdpMcs* mcs)
stream_free(gcc_CCrq);
stream_free(client_data);
return (status < 0 ? False : True);
return (status < 0 ? false : true);
}
/**
@ -505,24 +505,24 @@ boolean mcs_recv_connect_response(rdpMcs* mcs, STREAM* s)
tpkt_read_header(s);
if (tpdu_read_data(s) == 0)
return False;
return false;
ber_read_application_tag(s, MCS_TYPE_CONNECT_RESPONSE, &length);
ber_read_enumerated(s, &result, MCS_Result_enum_length);
ber_read_integer(s, &calledConnectId);
if (!mcs_read_domain_parameters(s, &(mcs->domainParameters)))
return False;
return false;
ber_read_octet_string(s, &length);
if (!gcc_read_conference_create_response(s, mcs->transport->settings))
{
printf("mcs_recv_connect_response: gcc_read_conference_create_response failed\n");
return False;
return false;
}
return True;
return true;
}
/**
@ -564,7 +564,7 @@ boolean mcs_send_connect_response(rdpMcs* mcs)
stream_free(gcc_CCrsp);
stream_free(server_data);
return True;
return true;
}
/**
@ -581,9 +581,9 @@ boolean mcs_recv_erect_domain_request(rdpMcs* mcs, STREAM* s)
MCSPDU = DomainMCSPDU_ErectDomainRequest;
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length))
return False;
return false;
return True;
return true;
}
/**
@ -604,9 +604,9 @@ boolean mcs_send_erect_domain_request(rdpMcs* mcs)
per_write_integer(s, 0); /* subInterval (INTEGER) */
if (transport_write(mcs->transport, s) < 0)
return False;
return false;
return True;
return true;
}
/**
@ -623,9 +623,9 @@ boolean mcs_recv_attach_user_request(rdpMcs* mcs, STREAM* s)
MCSPDU = DomainMCSPDU_AttachUserRequest;
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length))
return False;
return false;
return True;
return true;
}
/**
@ -643,9 +643,9 @@ boolean mcs_send_attach_user_request(rdpMcs* mcs)
mcs_write_domain_mcspdu_header(s, DomainMCSPDU_AttachUserRequest, length, 0);
if (transport_write(mcs->transport, s) < 0)
return False;
return false;
return True;
return true;
}
/**
@ -662,12 +662,12 @@ boolean mcs_recv_attach_user_confirm(rdpMcs* mcs, STREAM* s)
MCSPDU = DomainMCSPDU_AttachUserConfirm;
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length))
return False;
return false;
per_read_enumerated(s, &result, MCS_Result_enum_length); /* result */
per_read_integer16(s, &(mcs->user_id), MCS_BASE_CHANNEL_ID); /* initiator (UserId) */
return True;
return true;
}
/**
@ -691,7 +691,7 @@ boolean mcs_send_attach_user_confirm(rdpMcs* mcs)
transport_write(mcs->transport, s);
return True;
return true;
}
/**
@ -709,16 +709,16 @@ boolean mcs_recv_channel_join_request(rdpMcs* mcs, STREAM* s, uint16* channel_id
MCSPDU = DomainMCSPDU_ChannelJoinRequest;
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length))
return False;
return false;
if (!per_read_integer16(s, &user_id, MCS_BASE_CHANNEL_ID))
return False;
return false;
if (user_id != mcs->user_id)
return False;
return false;
if (!per_read_integer16(s, channel_id, 0))
return False;
return false;
return True;
return true;
}
/**
@ -740,9 +740,9 @@ boolean mcs_send_channel_join_request(rdpMcs* mcs, uint16 channel_id)
per_write_integer16(s, channel_id, 0);
if (transport_write(mcs->transport, s) < 0)
return False;
return false;
return True;
return true;
}
/**
@ -761,14 +761,14 @@ boolean mcs_recv_channel_join_confirm(rdpMcs* mcs, STREAM* s, uint16* channel_id
MCSPDU = DomainMCSPDU_ChannelJoinConfirm;
if (!mcs_read_domain_mcspdu_header(s, &MCSPDU, &length))
return False;
return false;
per_read_enumerated(s, &result, MCS_Result_enum_length); /* result */
per_read_integer16(s, &initiator, MCS_BASE_CHANNEL_ID); /* initiator (UserId) */
per_read_integer16(s, &requested, 0); /* requested (ChannelId) */
per_read_integer16(s, channel_id, 0); /* channelId */
return True;
return true;
}
/**
@ -792,7 +792,7 @@ boolean mcs_send_channel_join_confirm(rdpMcs* mcs, uint16 channel_id)
transport_write(mcs->transport, s);
return True;
return true;
}
/**
@ -812,7 +812,7 @@ boolean mcs_send_disconnect_provider_ultimatum(rdpMcs* mcs)
transport_write(mcs->transport, s);
return True;
return true;
}
/**

View File

@ -43,7 +43,7 @@ int decompress_rdp(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff, u
default:
printf("mppc.c: invalid RDP compression code 0x%2.2x\n", type);
return False;
return false;
}
}
@ -57,7 +57,7 @@ int decompress_rdp(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff, u
* @param roff starting offset of uncompressed data
* @param rlen length of uncompressed data
*
* @return True on success, False on failure
* @return true on success, false on failure
*/
int decompress_rdp_4(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
@ -80,7 +80,7 @@ int decompress_rdp_4(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
if ((rdp->mppc == NULL) || (rdp->mppc->history_buf == NULL))
{
printf("decompress_rdp_4: null\n");
return False;
return false;
}
src_ptr = 0;
@ -123,7 +123,7 @@ int decompress_rdp_4(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
history_ptr += len;
*rlen = history_ptr - rdp->mppc->history_ptr;
rdp->mppc->history_ptr = history_ptr;
return True;
return true;
}
/* load initial data */
@ -474,7 +474,7 @@ int decompress_rdp_4(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
rdp->mppc->history_ptr = history_ptr;
return True;
return true;
}
/**
@ -487,7 +487,7 @@ int decompress_rdp_4(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
* @param roff starting offset of uncompressed data
* @param rlen length of uncompressed data
*
* @return True on success, False on failure
* @return true on success, false on failure
*/
int decompress_rdp_5(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
@ -508,7 +508,7 @@ int decompress_rdp_5(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
if ((rdp->mppc == NULL) || (rdp->mppc->history_buf == NULL))
{
printf("decompress_rdp_5: null\n");
return False;
return false;
}
src_ptr = 0;
@ -551,7 +551,7 @@ int decompress_rdp_5(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
history_ptr += len;
*rlen = history_ptr - rdp->mppc->history_ptr;
rdp->mppc->history_ptr = history_ptr;
return True;
return true;
}
/* load initial data */
@ -938,7 +938,7 @@ int decompress_rdp_5(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
rdp->mppc->history_ptr = history_ptr;
return True;
return true;
}
/**
@ -951,12 +951,12 @@ int decompress_rdp_5(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
* @param roff starting offset of uncompressed data
* @param rlen length of uncompressed data
*
* @return True on success, False on failure
* @return true on success, false on failure
*/
int decompress_rdp_6(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
{
return False;
return false;
}
/**
@ -969,12 +969,12 @@ int decompress_rdp_6(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff,
* @param roff starting offset of uncompressed data
* @param rlen length of uncompressed data
*
* @return True on success, False on failure
* @return true on success, false on failure
*/
int decompress_rdp_61(rdpRdp* rdp, uint8* cbuf, int len, int ctype, uint32* roff, uint32* rlen)
{
return False;
return false;
}
/**

View File

@ -74,7 +74,7 @@ boolean nego_connect(rdpNego* nego)
{
DEBUG_NEGO("Protocol Security Negotiation Failure");
nego->state = NEGO_STATE_FINAL;
return False;
return false;
}
}
while (nego->state != NEGO_STATE_FINAL);
@ -87,12 +87,12 @@ boolean nego_connect(rdpNego* nego)
if(nego->selected_protocol == PROTOCOL_RDP)
{
nego->transport->settings->encryption = True;
nego->transport->settings->encryption = true;
nego->transport->settings->encryption_method = ENCRYPTION_METHOD_40BIT | ENCRYPTION_METHOD_128BIT | ENCRYPTION_METHOD_FIPS;
nego->transport->settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
}
return True;
return true;
}
/**
@ -105,19 +105,19 @@ boolean nego_tcp_connect(rdpNego* nego)
{
if (nego->tcp_connected == 0)
{
if (transport_connect(nego->transport, nego->hostname, nego->port) == False)
if (transport_connect(nego->transport, nego->hostname, nego->port) == false)
{
nego->tcp_connected = 0;
return False;
return false;
}
else
{
nego->tcp_connected = 1;
return True;
return true;
}
}
return True;
return true;
}
/**
@ -256,7 +256,7 @@ boolean nego_recv_response(rdpNego* nego)
{
STREAM* s = transport_recv_stream_init(nego->transport, 1024);
if (transport_read(nego->transport, s) < 0)
return False;
return false;
return nego_recv(nego->transport, s, nego->transport->recv_extra);
}
@ -275,7 +275,7 @@ boolean nego_recv(rdpTransport* transport, STREAM* s, void* extra)
rdpNego* nego = (rdpNego*) extra;
if (tpkt_read_header(s) == 0)
return False;
return false;
li = tpdu_read_connection_confirm(s);
@ -301,7 +301,7 @@ boolean nego_recv(rdpTransport* transport, STREAM* s, void* extra)
nego->state = NEGO_STATE_FINAL;
}
return True;
return true;
}
/**
@ -321,7 +321,7 @@ boolean nego_read_request(rdpNego* nego, STREAM* s)
if (li != stream_get_left(s) + 6)
{
printf("Incorrect TPDU length indicator.\n");
return False;
return false;
}
if (stream_get_left(s) > 8)
@ -349,13 +349,13 @@ boolean nego_read_request(rdpNego* nego, STREAM* s)
if (type != TYPE_RDP_NEG_REQ)
{
printf("Incorrect negotiation request type %d\n", type);
return False;
return false;
}
nego_process_negotiation_request(nego, s);
}
return True;
return true;
}
/**
@ -425,9 +425,9 @@ boolean nego_send_negotiation_request(rdpNego* nego)
stream_set_mark(s, em);
if (transport_write(nego->transport, s) < 0)
return False;
return false;
return True;
return true;
}
/**
@ -546,13 +546,13 @@ boolean nego_send_negotiation_response(rdpNego* nego)
stream_set_mark(s, em);
if (transport_write(nego->transport, s) < 0)
return False;
return false;
/* update settings with negotiated protocol security */
nego->transport->settings->requested_protocols = nego->requested_protocols;
nego->transport->settings->selected_protocol = nego->selected_protocol;
return True;
return true;
}
/**
@ -613,23 +613,23 @@ void nego_set_target(rdpNego* nego, char* hostname, int port)
/**
* Enable RDP security protocol.
* @param nego pointer to the negotiation structure
* @param enable_rdp whether to enable normal RDP protocol (True for enabled, False for disabled)
* @param enable_rdp whether to enable normal RDP protocol (true for enabled, false for disabled)
*/
void nego_enable_rdp(rdpNego* nego, boolean enable_rdp)
{
DEBUG_NEGO("Enabling RDP security: %s", enable_rdp ? "True" : "False");
DEBUG_NEGO("Enabling RDP security: %s", enable_rdp ? "true" : "false");
nego->enabled_protocols[PROTOCOL_RDP] = enable_rdp;
}
/**
* Enable TLS security protocol.
* @param nego pointer to the negotiation structure
* @param enable_tls whether to enable TLS + RDP protocol (True for enabled, False for disabled)
* @param enable_tls whether to enable TLS + RDP protocol (true for enabled, false for disabled)
*/
void nego_enable_tls(rdpNego* nego, boolean enable_tls)
{
DEBUG_NEGO("Enabling TLS security: %s", enable_tls ? "True" : "False");
DEBUG_NEGO("Enabling TLS security: %s", enable_tls ? "true" : "false");
nego->enabled_protocols[PROTOCOL_TLS] = enable_tls;
}
@ -637,12 +637,12 @@ void nego_enable_tls(rdpNego* nego, boolean enable_tls)
/**
* Enable NLA security protocol.
* @param nego pointer to the negotiation structure
* @param enable_nla whether to enable network level authentication protocol (True for enabled, False for disabled)
* @param enable_nla whether to enable network level authentication protocol (true for enabled, false for disabled)
*/
void nego_enable_nla(rdpNego* nego, boolean enable_nla)
{
DEBUG_NEGO("Enabling NLA security: %s", enable_nla ? "True" : "False");
DEBUG_NEGO("Enabling NLA security: %s", enable_nla ? "true" : "false");
nego->enabled_protocols[PROTOCOL_NLA] = enable_nla;
}

View File

@ -212,7 +212,7 @@ INLINE void update_read_2byte_signed(STREAM* s, sint16* value)
stream_read_uint8(s, byte);
negative = (byte & 0x40) ? True : False;
negative = (byte & 0x40) ? true : false;
*value = (byte & 0x3F);
@ -934,7 +934,7 @@ 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)
{
fast_index->opaqueRect = False;
fast_index->opaqueRect = false;
if (orderInfo->fieldFlags & ORDER_FIELD_01)
stream_read_uint8(s, fast_index->cacheId);
@ -1008,7 +1008,7 @@ void update_read_fast_index_order(STREAM* s, ORDER_INFO* orderInfo, FAST_INDEX_O
fast_index->y = fast_index->bkTop;
if ((fast_index->opRight > fast_index->opLeft) && (fast_index->opBottom > fast_index->opTop))
fast_index->opaqueRect = True;
fast_index->opaqueRect = true;
if (orderInfo->fieldFlags & ORDER_FIELD_15)
{
@ -1256,13 +1256,13 @@ void update_read_cache_bitmap_v2_order(STREAM* s, CACHE_BITMAP_V2_ORDER* cache_b
stream_get_mark(s, cache_bitmap_v2_order->bitmapDataStream);
stream_seek(s, cache_bitmap_v2_order->bitmapLength);
cache_bitmap_v2_order->compressed = True;
cache_bitmap_v2_order->compressed = true;
}
else
{
stream_get_mark(s, cache_bitmap_v2_order->bitmapDataStream);
stream_seek(s, cache_bitmap_v2_order->bitmapLength);
cache_bitmap_v2_order->compressed = False;
cache_bitmap_v2_order->compressed = false;
}
}
@ -1475,7 +1475,7 @@ void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA
stream_read_uint16(s, flags); /* flags (2 bytes) */
create_offscreen_bitmap->id = flags & 0x7FFF;
deleteListPresent = (flags & 0x8000) ? True : False;
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) */
@ -1637,24 +1637,24 @@ void update_read_bounds(STREAM* s, BOUNDS* bounds)
stream_read_uint8(s, flags); /* field flags */
if (flags & BOUND_LEFT)
update_read_coord(s, &bounds->left, False);
update_read_coord(s, &bounds->left, false);
else if (flags & BOUND_DELTA_LEFT)
update_read_coord(s, &bounds->left, True);
update_read_coord(s, &bounds->left, true);
if (flags & BOUND_TOP)
update_read_coord(s, &bounds->top, False);
update_read_coord(s, &bounds->top, false);
else if (flags & BOUND_DELTA_TOP)
update_read_coord(s, &bounds->top, True);
update_read_coord(s, &bounds->top, true);
if (flags & BOUND_RIGHT)
update_read_coord(s, &bounds->right, False);
update_read_coord(s, &bounds->right, false);
else if (flags & BOUND_DELTA_RIGHT)
update_read_coord(s, &bounds->right, True);
update_read_coord(s, &bounds->right, true);
if (flags & BOUND_BOTTOM)
update_read_coord(s, &bounds->bottom, False);
update_read_coord(s, &bounds->bottom, false);
else if (flags & BOUND_DELTA_BOTTOM)
update_read_coord(s, &bounds->bottom, True);
update_read_coord(s, &bounds->bottom, true);
}
void update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags)
@ -1675,7 +1675,7 @@ void update_recv_primary_order(rdpUpdate* update, STREAM* s, uint8 flags)
IFCALL(update->SetBounds, update, &orderInfo->bounds);
}
orderInfo->deltaCoordinates = (flags & ORDER_DELTA_COORDINATES) ? True : False;
orderInfo->deltaCoordinates = (flags & ORDER_DELTA_COORDINATES) ? true : false;
#ifdef WITH_DEBUG_ORDERS
if (orderInfo->orderType < PRIMARY_DRAWING_ORDER_COUNT)
@ -1829,29 +1829,29 @@ void update_recv_secondary_order(rdpUpdate* update, STREAM* s, uint8 flags)
switch (orderType)
{
case ORDER_TYPE_BITMAP_UNCOMPRESSED:
update_read_cache_bitmap_order(s, &(update->cache_bitmap_order), False, extraFlags);
update_read_cache_bitmap_order(s, &(update->cache_bitmap_order), false, extraFlags);
IFCALL(update->CacheBitmap, update, &(update->cache_bitmap_order));
break;
case ORDER_TYPE_CACHE_BITMAP_COMPRESSED:
update_read_cache_bitmap_order(s, &(update->cache_bitmap_order), True, extraFlags);
update_read_cache_bitmap_order(s, &(update->cache_bitmap_order), true, extraFlags);
IFCALL(update->CacheBitmap, update, &(update->cache_bitmap_order));
break;
case ORDER_TYPE_BITMAP_UNCOMPRESSED_V2:
update_read_cache_bitmap_v2_order(s, &(update->cache_bitmap_v2_order), False, extraFlags);
update_read_cache_bitmap_v2_order(s, &(update->cache_bitmap_v2_order), false, extraFlags);
//IFCALL(update->BitmapDecompress, update, update->cache_bitmap_v2_order.bitmap);
IFCALL(update->CacheBitmapV2, update, &(update->cache_bitmap_v2_order));
break;
case ORDER_TYPE_BITMAP_COMPRESSED_V2:
update_read_cache_bitmap_v2_order(s, &(update->cache_bitmap_v2_order), True, extraFlags);
update_read_cache_bitmap_v2_order(s, &(update->cache_bitmap_v2_order), true, extraFlags);
//IFCALL(update->BitmapDecompress, update, update->cache_bitmap_v2_order.bitmap);
IFCALL(update->CacheBitmapV2, update, &(update->cache_bitmap_v2_order));
break;
case ORDER_TYPE_BITMAP_COMPRESSED_V3:
update_read_cache_bitmap_v3_order(s, &(update->cache_bitmap_v3_order), True, extraFlags);
update_read_cache_bitmap_v3_order(s, &(update->cache_bitmap_v3_order), true, extraFlags);
IFCALL(update->CacheBitmapV3, update, &(update->cache_bitmap_v3_order));
break;

View File

@ -21,10 +21,10 @@
static boolean freerdp_peer_initialize(freerdp_peer* client)
{
client->context->rdp->settings->server_mode = True;
client->context->rdp->settings->server_mode = true;
client->context->rdp->state = CONNECTION_STATE_INITIAL;
return True;
return true;
}
static boolean freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcount)
@ -32,7 +32,7 @@ static boolean freerdp_peer_get_fds(freerdp_peer* client, void** rfds, int* rcou
rfds[*rcount] = (void*)(long)(client->context->rdp->transport->tcp->sockfd);
(*rcount)++;
return True;
return true;
}
static boolean freerdp_peer_check_fds(freerdp_peer* client)
@ -44,9 +44,9 @@ static boolean freerdp_peer_check_fds(freerdp_peer* client)
status = rdp_check_fds(rdp);
if (status < 0)
return False;
return false;
return True;
return true;
}
static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
@ -59,18 +59,18 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
if (!rdp_read_share_data_header(s, &length, &type, &share_id, &compressed_type, &compressed_len))
return False;
return false;
switch (type)
{
case DATA_PDU_TYPE_SYNCHRONIZE:
if (!rdp_recv_client_synchronize_pdu(s))
return False;
return false;
break;
case DATA_PDU_TYPE_CONTROL:
if (!rdp_server_accept_client_control_pdu(client->context->rdp, s))
return False;
return false;
break;
case DATA_PDU_TYPE_BITMAP_CACHE_PERSISTENT_LIST:
@ -79,11 +79,11 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
case DATA_PDU_TYPE_FONT_LIST:
if (!rdp_server_accept_client_font_list_pdu(client->context->rdp, s))
return False;
return false;
if (client->PostConnect)
{
if (!client->PostConnect(client))
return False;
return false;
/**
* PostConnect should only be called once and should not be called
* after a reactivation sequence.
@ -94,20 +94,20 @@ static boolean peer_recv_data_pdu(freerdp_peer* client, STREAM* s)
{
/* Activate will be called everytime after the client is activated/reactivated. */
if (!client->Activate(client))
return False;
return false;
}
break;
case DATA_PDU_TYPE_SHUTDOWN_REQUEST:
mcs_send_disconnect_provider_ultimatum(client->context->rdp->mcs);
return False;
return false;
default:
printf("Data PDU type %d\n", type);
break;
}
return True;
return true;
}
static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
@ -121,7 +121,7 @@ static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
if (!rdp_read_header(client->context->rdp, s, &length, &channelId))
{
printf("Incorrect RDP header.\n");
return False;
return false;
}
if (channelId != MCS_GLOBAL_CHANNEL_ID)
@ -131,7 +131,7 @@ static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
else
{
if (!rdp_read_share_control_header(s, &pduLength, &pduType, &pduSource))
return False;
return false;
client->settings->pdu_source = pduSource;
@ -139,16 +139,16 @@ static boolean peer_recv_tpkt_pdu(freerdp_peer* client, STREAM* s)
{
case PDU_TYPE_DATA:
if (!peer_recv_data_pdu(client, s))
return False;
return false;
break;
default:
printf("Client sent pduType %d\n", pduType);
return False;
return false;
}
}
return True;
return true;
}
static boolean peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s)
@ -164,7 +164,7 @@ static boolean peer_recv_fastpath_pdu(freerdp_peer* client, STREAM* s)
if (length == 0 || length > stream_get_left(s))
{
printf("incorrect FastPath PDU header length %d\n", length);
return False;
return false;
}
if (fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED)
@ -191,50 +191,50 @@ static boolean peer_recv_callback(rdpTransport* transport, STREAM* s, void* extr
{
case CONNECTION_STATE_INITIAL:
if (!rdp_server_accept_nego(client->context->rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_NEGO:
if (!rdp_server_accept_mcs_connect_initial(client->context->rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_MCS_CONNECT:
if (!rdp_server_accept_mcs_erect_domain_request(client->context->rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_MCS_ERECT_DOMAIN:
if (!rdp_server_accept_mcs_attach_user_request(client->context->rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_MCS_ATTACH_USER:
if (!rdp_server_accept_mcs_channel_join_request(client->context->rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_MCS_CHANNEL_JOIN:
if (!rdp_server_accept_client_info(client->context->rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_LICENSE:
if (!rdp_server_accept_confirm_active(client->context->rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_ACTIVE:
if (!peer_recv_pdu(client, s))
return False;
return false;
break;
default:
printf("Invalid state %d\n", client->context->rdp->state);
return False;
return false;
}
return True;
return true;
}
static void freerdp_peer_disconnect(freerdp_peer* client)
@ -264,7 +264,7 @@ void freerdp_peer_context_new(freerdp_peer* client)
rdp->transport->recv_callback = peer_recv_callback;
rdp->transport->recv_extra = client;
transport_set_blocking_mode(rdp->transport, False);
transport_set_blocking_mode(rdp->transport, false);
IFCALL(client->ContextNew, client, client->context);
}

View File

@ -44,7 +44,7 @@ boolean per_read_length(STREAM* s, uint16* length)
*length = byte;
}
return True;
return true;
}
/**
@ -71,7 +71,7 @@ void per_write_length(STREAM* s, int length)
boolean per_read_choice(STREAM* s, uint8* choice)
{
stream_read_uint8(s, *choice);
return True;
return true;
}
/**
@ -95,7 +95,7 @@ void per_write_choice(STREAM* s, uint8 choice)
boolean per_read_selection(STREAM* s, uint8* selection)
{
stream_read_uint8(s, *selection);
return True;
return true;
}
/**
@ -119,7 +119,7 @@ void per_write_selection(STREAM* s, uint8 selection)
boolean per_read_number_of_sets(STREAM* s, uint8* number)
{
stream_read_uint8(s, *number);
return True;
return true;
}
/**
@ -143,7 +143,7 @@ boolean per_read_padding(STREAM* s, int length)
{
stream_seek(s, length);
return True;
return true;
}
/**
@ -178,9 +178,9 @@ boolean per_read_integer(STREAM* s, uint32* integer)
else if (length == 2)
stream_read_uint16_be(s, *integer);
else
return False;
return false;
return True;
return true;
}
/**
@ -221,11 +221,11 @@ boolean per_read_integer16(STREAM* s, uint16* integer, uint16 min)
stream_read_uint16_be(s, *integer);
if (*integer + min > 0xFFFF)
return False;
return false;
*integer += min;
return True;
return true;
}
/**
@ -254,9 +254,9 @@ boolean per_read_enumerated(STREAM* s, uint8* enumerated, uint8 count)
/* check that enumerated value falls within expected range */
if (*enumerated + 1 > count)
return False;
return false;
return True;
return true;
}
/**
@ -289,7 +289,7 @@ boolean per_read_object_identifier(STREAM* s, uint8 oid[6])
per_read_length(s, &length); /* length */
if (length != 5)
return False;
return false;
stream_read_uint8(s, t12); /* first two tuples */
a_oid[0] = (t12 >> 4);
@ -304,11 +304,11 @@ boolean per_read_object_identifier(STREAM* s, uint8 oid[6])
(a_oid[2] == oid[2]) && (a_oid[3] == oid[3]) &&
(a_oid[4] == oid[4]) && (a_oid[5] == oid[5]))
{
return True;
return true;
}
else
{
return False;
return false;
}
}
@ -362,7 +362,7 @@ boolean per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min)
per_read_length(s, &mlength);
if (mlength + min != length)
return False;
return false;
a_oct_str = s->p;
stream_seek(s, length);
@ -370,10 +370,10 @@ boolean per_read_octet_string(STREAM* s, uint8* oct_str, int length, int min)
for (i = 0; i < length; i++)
{
if (a_oct_str[i] != oct_str[i])
return False;
return false;
}
return True;
return true;
}
/**
@ -420,7 +420,7 @@ boolean per_read_numeric_string(STREAM* s, int min)
stream_seek(s, 1);
}
return True;
return true;
}
/**

View File

@ -98,9 +98,9 @@ boolean rdp_read_share_control_header(STREAM* s, uint16* length, uint16* type, u
*type &= 0x0F; /* type is in the 4 least significant bits */
if (*length - 6 > stream_get_left(s))
return False;
return false;
return True;
return true;
}
void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint16 channel_id)
@ -117,7 +117,7 @@ boolean rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint3
uint8 *compressed_type, uint16 *compressed_len)
{
if (stream_get_left(s) < 12)
return False;
return false;
/* Share Data Header */
stream_read_uint32(s, *share_id); /* shareId (4 bytes) */
@ -137,7 +137,7 @@ boolean rdp_read_share_data_header(STREAM* s, uint16* length, uint8* type, uint3
*compressed_len = 0;
}
return True;
return true;
}
void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 share_id)
@ -232,9 +232,9 @@ boolean rdp_read_header(rdpRdp* rdp, STREAM* s, uint16* length, uint16* channel_
per_read_length(s, length); /* userData (OCTET_STRING) */
if (*length > stream_get_left(s))
return False;
return false;
return True;
return true;
}
/**
@ -365,9 +365,9 @@ boolean rdp_send(rdpRdp* rdp, STREAM* s, uint16 channel_id)
stream_set_pos(s, length);
if (transport_write(rdp->transport, s) < 0)
return False;
return false;
return True;
return true;
}
boolean rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id)
@ -392,9 +392,9 @@ boolean rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id)
stream_set_pos(s, length);
if (transport_write(rdp->transport, s) < 0)
return False;
return false;
return True;
return true;
}
boolean rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id)
@ -420,9 +420,9 @@ boolean rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id)
stream_set_pos(s, length);
if (transport_write(rdp->transport, s) < 0)
return False;
return false;
return True;
return true;
}
void rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s)
@ -546,16 +546,16 @@ boolean rdp_recv_out_of_sequence_pdu(rdpRdp* rdp, STREAM* s)
if (type == PDU_TYPE_DATA)
{
rdp_recv_data_pdu(rdp, s);
return True;
return true;
}
else if (type == PDU_TYPE_SERVER_REDIRECTION)
{
rdp_recv_enhanced_security_redirection_packet(rdp, s);
return True;
return true;
}
else
{
return False;
return false;
}
}
@ -588,24 +588,24 @@ boolean rdp_decrypt(rdpRdp* rdp, STREAM* s, int length)
if (!security_fips_decrypt(s->p, cryptlen, rdp))
{
printf("FATAL: cannot decrypt\n");
return False; /* TODO */
return false; /* TODO */
}
if (!security_fips_check_signature(s->p, cryptlen-pad, sig, rdp))
{
printf("FATAL: invalid packet signature\n");
return False; /* TODO */
return false; /* TODO */
}
/* is this what needs adjusting? */
s->size -= pad;
return True;
return true;
}
stream_seek(s, 8); /* signature */
cryptlen = length - 8;
security_decrypt(s->p, cryptlen, rdp);
return True;
return true;
}
/**
@ -626,7 +626,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
if (!rdp_read_header(rdp, s, &length, &channelId))
{
printf("Incorrect RDP header.\n");
return False;
return false;
}
if (rdp->settings->encryption)
@ -635,14 +635,14 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
if (securityHeader & SEC_SECURE_CHECKSUM)
{
printf("Error: TODO\n");
return False;
return false;
}
if (securityHeader & SEC_ENCRYPT)
{
if (!rdp_decrypt(rdp, s, length - 4))
{
printf("rdp_decrypt failed\n");
return False;
return false;
}
}
}
@ -665,7 +665,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
case PDU_TYPE_DEACTIVATE_ALL:
if (!rdp_recv_deactivate_all(rdp, s))
return False;
return false;
break;
case PDU_TYPE_SERVER_REDIRECTION:
@ -678,7 +678,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
}
}
return True;
return true;
}
static boolean rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s)
@ -692,7 +692,7 @@ static boolean rdp_recv_fastpath_pdu(rdpRdp* rdp, STREAM* s)
if (length == 0 || length > stream_get_left(s))
{
printf("incorrect FastPath PDU header length %d\n", length);
return False;
return false;
}
if (fastpath->encryptionFlags & FASTPATH_OUTPUT_ENCRYPTED)
@ -734,43 +734,43 @@ static boolean rdp_recv_callback(rdpTransport* transport, STREAM* s, void* extra
{
case CONNECTION_STATE_NEGO:
if (!rdp_client_connect_mcs_connect_response(rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_MCS_ATTACH_USER:
if (!rdp_client_connect_mcs_attach_user_confirm(rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_MCS_CHANNEL_JOIN:
if (!rdp_client_connect_mcs_channel_join_confirm(rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_LICENSE:
if (!rdp_client_connect_license(rdp, s))
return False;
return false;
break;
case CONNECTION_STATE_CAPABILITY:
if (!rdp_client_connect_demand_active(rdp, s))
{
printf("rdp_client_connect_demand_active failed\n");
return False;
return false;
}
break;
case CONNECTION_STATE_ACTIVE:
if (!rdp_recv_pdu(rdp, s))
return False;
return false;
break;
default:
printf("Invalid state %d\n", rdp->state);
return False;
return false;
}
return True;
return true;
}
int rdp_send_channel_data(rdpRdp* rdp, int channel_id, uint8* data, int size)

View File

@ -149,7 +149,7 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
stream_seek(s, 8); /* pad (8 bytes) */
if (redirection->flags & LB_NOREDIRECT)
return True;
return true;
else
return rdp_client_redirect(rdp);
}
@ -157,7 +157,7 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
boolean rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s)
{
rdp_recv_server_redirection_pdu(rdp, s);
return True;
return true;
}
boolean rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s)
@ -165,7 +165,7 @@ boolean rdp_recv_enhanced_security_redirection_packet(rdpRdp* rdp, STREAM* s)
stream_seek_uint16(s); /* pad2Octets (2 bytes) */
rdp_recv_server_redirection_pdu(rdp, s);
stream_seek_uint8(s); /* pad2Octets (1 byte) */
return True;
return true;
}
rdpRedirection* redirection_new()

View File

@ -365,7 +365,7 @@ boolean security_establish_keys(uint8* client_random, rdpRdp* rdp)
memcpy(rdp->decrypt_update_key, rdp->decrypt_key, 16);
memcpy(rdp->encrypt_update_key, rdp->encrypt_key, 16);
return True;
return true;
}
boolean security_key_update(uint8* key, uint8* update_key, int key_len)
@ -395,7 +395,7 @@ boolean security_key_update(uint8* key, uint8* update_key, int key_len)
if (key_len == 8)
memcpy(key, salt40, 3); /* TODO 56 bit */
return True;
return true;
}
boolean security_encrypt(uint8* data, int length, rdpRdp* rdp)
@ -409,7 +409,7 @@ boolean security_encrypt(uint8* data, int length, rdpRdp* rdp)
}
crypto_rc4(rdp->rc4_encrypt_key, length, data, data);
rdp->encrypt_use_count += 1;
return True;
return true;
}
boolean security_decrypt(uint8* data, int length, rdpRdp* rdp)
@ -423,7 +423,7 @@ boolean security_decrypt(uint8* data, int length, rdpRdp* rdp)
}
crypto_rc4(rdp->rc4_decrypt_key, length, data, data);
rdp->decrypt_use_count += 1;
return True;
return true;
}
void security_hmac_signature(uint8* data, int length, uint8* output, rdpRdp* rdp)
@ -445,13 +445,13 @@ boolean security_fips_encrypt(uint8* data, int length, rdpRdp* rdp)
{
crypto_des3_encrypt(rdp->fips_encrypt, length, data, data);
rdp->encrypt_use_count++;
return True;
return true;
}
boolean security_fips_decrypt(uint8* data, int length, rdpRdp* rdp)
{
crypto_des3_decrypt(rdp->fips_decrypt, length, data, data);
return True;
return true;
}
boolean security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRdp* rdp)
@ -469,7 +469,7 @@ boolean security_fips_check_signature(uint8* data, int length, uint8* sig, rdpRd
rdp->decrypt_use_count++;
if (memcmp(sig, buf, 8))
return False;
return false;
return True;
return true;
}

View File

@ -41,73 +41,73 @@ rdpSettings* settings_new(void* instance)
settings->width = 1024;
settings->height = 768;
settings->workarea = False;
settings->fullscreen = False;
settings->grab_keyboard = True;
settings->decorations = True;
settings->workarea = false;
settings->fullscreen = false;
settings->grab_keyboard = true;
settings->decorations = true;
settings->rdp_version = 7;
settings->color_depth = 16;
settings->nla_security = True;
settings->tls_security = True;
settings->rdp_security = True;
settings->nla_security = true;
settings->tls_security = true;
settings->rdp_security = true;
settings->client_build = 2600;
settings->kbd_type = 0;
settings->kbd_subtype = 0;
settings->kbd_fn_keys = 0;
settings->kbd_layout = 0x409;
settings->encryption = False;
settings->encryption = false;
settings->port = 3389;
settings->desktop_resize = True;
settings->desktop_resize = true;
settings->performance_flags =
PERF_DISABLE_FULLWINDOWDRAG |
PERF_DISABLE_MENUANIMATIONS |
PERF_DISABLE_WALLPAPER;
settings->auto_reconnection = True;
settings->auto_reconnection = true;
settings->encryption_method = ENCRYPTION_METHOD_NONE;
settings->encryption_level = ENCRYPTION_LEVEL_NONE;
settings->authentication = True;
settings->authentication = true;
settings->order_support[NEG_DSTBLT_INDEX] = True;
settings->order_support[NEG_PATBLT_INDEX] = True;
settings->order_support[NEG_SCRBLT_INDEX] = True;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = True;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = True;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = True;
settings->order_support[NEG_MULTIPATBLT_INDEX] = True;
settings->order_support[NEG_MULTISCRBLT_INDEX] = True;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = True;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = True;
settings->order_support[NEG_LINETO_INDEX] = True;
settings->order_support[NEG_POLYLINE_INDEX] = True;
settings->order_support[NEG_MEMBLT_INDEX] = True;
settings->order_support[NEG_MEM3BLT_INDEX] = True;
settings->order_support[NEG_SAVEBITMAP_INDEX] = True;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_INDEX_INDEX] = True;
settings->order_support[NEG_FAST_GLYPH_INDEX] = True;
settings->order_support[NEG_POLYGON_SC_INDEX] = True;
settings->order_support[NEG_POLYGON_CB_INDEX] = True;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = True;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = True;
settings->order_support[NEG_DSTBLT_INDEX] = true;
settings->order_support[NEG_PATBLT_INDEX] = true;
settings->order_support[NEG_SCRBLT_INDEX] = true;
settings->order_support[NEG_OPAQUE_RECT_INDEX] = true;
settings->order_support[NEG_DRAWNINEGRID_INDEX] = true;
settings->order_support[NEG_MULTIDSTBLT_INDEX] = true;
settings->order_support[NEG_MULTIPATBLT_INDEX] = true;
settings->order_support[NEG_MULTISCRBLT_INDEX] = true;
settings->order_support[NEG_MULTIOPAQUERECT_INDEX] = true;
settings->order_support[NEG_MULTI_DRAWNINEGRID_INDEX] = true;
settings->order_support[NEG_LINETO_INDEX] = true;
settings->order_support[NEG_POLYLINE_INDEX] = true;
settings->order_support[NEG_MEMBLT_INDEX] = true;
settings->order_support[NEG_MEM3BLT_INDEX] = true;
settings->order_support[NEG_SAVEBITMAP_INDEX] = true;
settings->order_support[NEG_GLYPH_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_INDEX_INDEX] = true;
settings->order_support[NEG_FAST_GLYPH_INDEX] = true;
settings->order_support[NEG_POLYGON_SC_INDEX] = true;
settings->order_support[NEG_POLYGON_CB_INDEX] = true;
settings->order_support[NEG_ELLIPSE_SC_INDEX] = true;
settings->order_support[NEG_ELLIPSE_CB_INDEX] = true;
settings->color_pointer = True;
settings->large_pointer = True;
settings->color_pointer = true;
settings->large_pointer = true;
settings->pointer_cache_size = 32;
settings->draw_gdi_plus = False;
settings->draw_gdi_plus = false;
settings->frame_marker = False;
settings->bitmap_cache_v3 = False;
settings->frame_marker = false;
settings->bitmap_cache_v3 = false;
settings->bitmap_cache = True;
settings->persistent_bitmap_cache = False;
settings->bitmap_cache = true;
settings->persistent_bitmap_cache = false;
settings->refresh_rect = True;
settings->suppress_output = True;
settings->refresh_rect = true;
settings->suppress_output = true;
settings->glyphSupportLevel = GLYPH_SUPPORT_NONE;
settings->glyphCache[0].cacheEntries = 254;
@ -133,7 +133,7 @@ rdpSettings* settings_new(void* instance)
settings->fragCache.cacheEntries = 64;
settings->fragCache.cacheMaximumCellSize = 248;
settings->offscreen_bitmap_cache = True;
settings->offscreen_bitmap_cache = true;
settings->offscreen_bitmap_cache_size = 7680;
settings->offscreen_bitmap_cache_entries = 100;
@ -149,12 +149,12 @@ rdpSettings* settings_new(void* instance)
settings->multifrag_max_request_size = 0x200000;
settings->fastpath_input = True;
settings->fastpath_output = True;
settings->fastpath_input = true;
settings->fastpath_output = true;
settings->uniconv = freerdp_uniconv_new();
gethostname(settings->client_hostname, sizeof(settings->client_hostname) - 1);
settings->mouse_motion = True;
settings->mouse_motion = true;
}
return settings;

View File

@ -84,7 +84,7 @@ boolean update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s)
default:
DEBUG_WARN("unknown cmdType 0x%X", cmdType);
return False;
return false;
}
size -= cmdLength;
@ -95,7 +95,7 @@ boolean update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s)
pcap_flush(update->pcap_rfx);
}
}
return True;
return true;
}
void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd)

View File

@ -118,7 +118,7 @@ boolean tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port)
if (status != 0)
{
printf("transport_connect: getaddrinfo (%s)\n", gai_strerror(status));
return False;
return false;
}
tcp->sockfd = -1;
@ -143,13 +143,13 @@ boolean tcp_connect(rdpTcp* tcp, const char* hostname, uint16 port)
if (tcp->sockfd == -1)
{
printf("unable to connect to %s:%s\n", hostname, servname);
return False;
return false;
}
tcp_get_ip_address(tcp);
tcp_get_mac_address(tcp);
return True;
return true;
}
int tcp_read(rdpTcp* tcp, uint8* data, int length)
@ -211,7 +211,7 @@ boolean tcp_disconnect(rdpTcp * tcp)
tcp->sockfd = -1;
}
return True;
return true;
}
boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking)
@ -223,10 +223,10 @@ boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking)
if (flags == -1)
{
printf("transport_configure_sockfd: fcntl failed.\n");
return False;
return false;
}
if (blocking == True)
if (blocking == true)
fcntl(tcp->sockfd, F_SETFL, flags & ~(O_NONBLOCK));
else
fcntl(tcp->sockfd, F_SETFL, flags | O_NONBLOCK);
@ -237,7 +237,7 @@ boolean tcp_set_blocking_mode(rdpTcp* tcp, boolean blocking)
WSAEventSelect(tcp->sockfd, tcp->wsa_event, FD_READ);
#endif
return True;
return true;
}
rdpTcp* tcp_new(rdpSettings* settings)

View File

@ -31,7 +31,7 @@ boolean tls_connect(rdpTls* tls)
if (tls->ctx == NULL)
{
printf("SSL_CTX_new failed\n");
return False;
return false;
}
/*
@ -49,13 +49,13 @@ boolean tls_connect(rdpTls* tls)
if (tls->ssl == NULL)
{
printf("SSL_new failed\n");
return False;
return false;
}
if (SSL_set_fd(tls->ssl, tls->sockfd) < 1)
{
printf("SSL_set_fd failed\n");
return False;
return false;
}
connection_status = SSL_connect(tls->ssl);
@ -63,10 +63,10 @@ boolean tls_connect(rdpTls* tls)
if (connection_status <= 0)
{
if (tls_print_error("SSL_connect", tls->ssl, connection_status))
return False;
return false;
}
return True;
return true;
}
boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_file)
@ -78,13 +78,13 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi
if (tls->ctx == NULL)
{
printf("SSL_CTX_new failed\n");
return False;
return false;
}
if (SSL_CTX_use_RSAPrivateKey_file(tls->ctx, privatekey_file, SSL_FILETYPE_PEM) <= 0)
{
printf("SSL_CTX_use_RSAPrivateKey_file failed\n");
return False;
return false;
}
tls->ssl = SSL_new(tls->ctx);
@ -92,19 +92,19 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi
if (tls->ssl == NULL)
{
printf("SSL_new failed\n");
return False;
return false;
}
if (SSL_use_certificate_file(tls->ssl, cert_file, SSL_FILETYPE_PEM) <= 0)
{
printf("SSL_use_certificate_file failed\n");
return False;
return false;
}
if (SSL_set_fd(tls->ssl, tls->sockfd) < 1)
{
printf("SSL_set_fd failed\n");
return False;
return false;
}
connection_status = SSL_accept(tls->ssl);
@ -112,18 +112,18 @@ boolean tls_accept(rdpTls* tls, const char* cert_file, const char* privatekey_fi
if (connection_status <= 0)
{
if (tls_print_error("SSL_accept", tls->ssl, connection_status))
return False;
return false;
}
printf("TLS connection accepted\n");
return True;
return true;
}
boolean tls_disconnect(rdpTls* tls)
{
SSL_shutdown(tls->ssl);
return True;
return true;
}
int tls_read(rdpTls* tls, uint8* data, int length)
@ -182,27 +182,27 @@ boolean tls_print_error(char *func, SSL *connection, int value)
{
case SSL_ERROR_ZERO_RETURN:
printf("%s: Server closed TLS connection\n", func);
return True;
return true;
case SSL_ERROR_WANT_READ:
printf("SSL_ERROR_WANT_READ\n");
return False;
return false;
case SSL_ERROR_WANT_WRITE:
printf("SSL_ERROR_WANT_WRITE\n");
return False;
return false;
case SSL_ERROR_SYSCALL:
printf("%s: I/O error\n", func);
return True;
return true;
case SSL_ERROR_SSL:
printf("%s: Failure in SSL library (protocol error?)\n", func);
return True;
return true;
default:
printf("%s: Unknown error\n", func);
return True;
return true;
}
}
@ -248,7 +248,7 @@ int tls_verify_certificate(CryptoCert cert, rdpSettings* settings, char* hostnam
rdpCertStore* certstore;
status = x509_verify_cert(cert, settings);
if (status != True)
if (status != true)
{
rdpCertData* certdata;
certdata = crypto_get_cert_data(cert->px509, hostname);

View File

@ -65,9 +65,9 @@ boolean tpkt_verify_header(STREAM* s)
stream_peek_uint8(s, version);
if (version == 3)
return True;
return true;
else
return False;
return false;
}
/**

View File

@ -79,7 +79,7 @@ boolean transport_connect_rdp(rdpTransport* transport)
{
/* RDP encryption */
return True;
return true;
}
boolean transport_connect_tls(rdpTransport* transport)
@ -90,10 +90,10 @@ boolean transport_connect_tls(rdpTransport* transport)
transport->layer = TRANSPORT_LAYER_TLS;
transport->tls->sockfd = transport->tcp->sockfd;
if (tls_connect(transport->tls) != True)
return False;
if (tls_connect(transport->tls) != true)
return false;
return True;
return true;
}
boolean transport_connect_nla(rdpTransport* transport)
@ -104,13 +104,13 @@ boolean transport_connect_nla(rdpTransport* transport)
transport->layer = TRANSPORT_LAYER_TLS;
transport->tls->sockfd = transport->tcp->sockfd;
if (tls_connect(transport->tls) != True)
return False;
if (tls_connect(transport->tls) != true)
return false;
/* Network Level Authentication */
if (transport->settings->authentication != True)
return True;
if (transport->settings->authentication != true)
return true;
if (transport->credssp == NULL)
transport->credssp = credssp_new(transport);
@ -121,19 +121,19 @@ boolean transport_connect_nla(rdpTransport* transport)
"If credentials are valid, the NTLMSSP implementation may be to blame.\n");
credssp_free(transport->credssp);
return False;
return false;
}
credssp_free(transport->credssp);
return True;
return true;
}
boolean transport_accept_rdp(rdpTransport* transport)
{
/* RDP encryption */
return True;
return true;
}
boolean transport_accept_tls(rdpTransport* transport)
@ -144,10 +144,10 @@ boolean transport_accept_tls(rdpTransport* transport)
transport->layer = TRANSPORT_LAYER_TLS;
transport->tls->sockfd = transport->tcp->sockfd;
if (tls_accept(transport->tls, transport->settings->cert_file, transport->settings->privatekey_file) != True)
return False;
if (tls_accept(transport->tls, transport->settings->cert_file, transport->settings->privatekey_file) != true)
return false;
return True;
return true;
}
boolean transport_accept_nla(rdpTransport* transport)
@ -158,24 +158,24 @@ boolean transport_accept_nla(rdpTransport* transport)
transport->layer = TRANSPORT_LAYER_TLS;
transport->tls->sockfd = transport->tcp->sockfd;
if (tls_accept(transport->tls, transport->settings->cert_file, transport->settings->privatekey_file) != True)
return False;
if (tls_accept(transport->tls, transport->settings->cert_file, transport->settings->privatekey_file) != true)
return false;
/* Network Level Authentication */
if (transport->settings->authentication != True)
return True;
if (transport->settings->authentication != true)
return true;
/* Blocking here until NLA is complete */
return True;
return true;
}
int transport_read(rdpTransport* transport, STREAM* s)
{
int status = -1;
while (True)
while (true)
{
if (transport->layer == TRANSPORT_LAYER_TLS)
status = tls_read(transport->tls, stream_get_tail(s), stream_get_left(s));
@ -347,7 +347,7 @@ int transport_check_fds(rdpTransport* transport)
stream_seal(received);
stream_set_pos(received, 0);
if (transport->recv_callback(transport, received, transport->recv_extra) == False)
if (transport->recv_callback(transport, received, transport->recv_extra) == false)
status = -1;
stream_free(received);
@ -387,7 +387,7 @@ rdpTransport* transport_new(rdpSettings* settings)
transport->recv_stream = stream_new(BUFFER_SIZE);
transport->send_stream = stream_new(BUFFER_SIZE);
transport->blocking = True;
transport->blocking = true;
transport->layer = TRANSPORT_LAYER_TCP;
}

View File

@ -69,13 +69,13 @@ void update_read_bitmap_data(STREAM* s, BITMAP_DATA* bitmap_data)
bitmap_data->bitmapLength = cbCompMainBodySize;
bitmap_data->compressed = True;
bitmap_data->compressed = true;
stream_get_mark(s, bitmap_data->bitmapDataStream);
stream_seek(s, bitmap_data->bitmapLength);
}
else
{
bitmap_data->compressed = False;
bitmap_data->compressed = false;
stream_get_mark(s, bitmap_data->bitmapDataStream);
stream_seek(s, bitmap_data->bitmapLength);
}

View File

@ -704,7 +704,7 @@ void gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_comm
gdi->image->bitmap->data = (uint8*) xrealloc(gdi->image->bitmap->data,
gdi->image->bitmap->width * gdi->image->bitmap->height * 4);
if ((surface_bits_command->bpp != 32) || (gdi->clrconv->alpha == True))
if ((surface_bits_command->bpp != 32) || (gdi->clrconv->alpha == true))
{
uint8* temp_image;

View File

@ -104,7 +104,7 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
status = bitmap_decompress(data, bitmap->data, width, height, length, bpp, bpp);
if (status != True)
if (status != true)
{
printf("Bitmap Decompression Failed\n");
}
@ -117,7 +117,7 @@ void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
bitmap->width = width;
bitmap->height = height;
bitmap->compressed = False;
bitmap->compressed = false;
bitmap->length = size;
bitmap->bpp = bpp;
}

View File

@ -58,7 +58,7 @@ static void rail_WindowIcon(rdpUpdate* update, WINDOW_ORDER_INFO* orderInfo, WIN
icon = (rdpIcon*) xzalloc(sizeof(rdpIcon));
icon->entry = window_icon->iconInfo;
icon->big = (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ICON_BIG) ? True : False;
icon->big = (orderInfo->fieldFlags & WINDOW_ORDER_FIELD_ICON_BIG) ? true : false;
DEBUG_RAIL("Window Icon: %dx%d@%dbpp cbBitsColor:%d cbBitsMask:%d cbColorTable:%d",
window_icon->iconInfo->width, window_icon->iconInfo->height, window_icon->iconInfo->bpp,

View File

@ -36,59 +36,59 @@ typedef struct _WINDOW_STYLE WINDOW_STYLE;
WINDOW_STYLE WINDOW_STYLES[] =
{
{ WS_BORDER, "WS_BORDER", False },
{ WS_CAPTION, "WS_CAPTION", False },
{ WS_CHILD, "WS_CHILD", False },
{ WS_CLIPCHILDREN, "WS_CLIPCHILDREN", False },
{ WS_CLIPSIBLINGS, "WS_CLIPSIBLINGS", False },
{ WS_DISABLED, "WS_DISABLED", False },
{ WS_DLGFRAME, "WS_DLGFRAME", False },
{ WS_GROUP, "WS_GROUP", False },
{ WS_HSCROLL, "WS_HSCROLL", False },
{ WS_ICONIC, "WS_ICONIC", False },
{ WS_MAXIMIZE, "WS_MAXIMIZE", False },
{ WS_MAXIMIZEBOX, "WS_MAXIMIZEBOX", False },
{ WS_MINIMIZE, "WS_MINIMIZE", False },
{ WS_MINIMIZEBOX, "WS_MINIMIZEBOX", False },
{ WS_OVERLAPPED, "WS_OVERLAPPED", False },
{ WS_OVERLAPPEDWINDOW, "WS_OVERLAPPEDWINDOW", True },
{ WS_POPUP, "WS_POPUP", False },
{ WS_POPUPWINDOW, "WS_POPUPWINDOW", True },
{ WS_SIZEBOX, "WS_SIZEBOX", False },
{ WS_SYSMENU, "WS_SYSMENU", False },
{ WS_TABSTOP, "WS_TABSTOP", False },
{ WS_THICKFRAME, "WS_THICKFRAME", False },
{ WS_VISIBLE, "WS_VISIBLE", False }
{ WS_BORDER, "WS_BORDER", false },
{ WS_CAPTION, "WS_CAPTION", false },
{ WS_CHILD, "WS_CHILD", false },
{ WS_CLIPCHILDREN, "WS_CLIPCHILDREN", false },
{ WS_CLIPSIBLINGS, "WS_CLIPSIBLINGS", false },
{ WS_DISABLED, "WS_DISABLED", false },
{ WS_DLGFRAME, "WS_DLGFRAME", false },
{ WS_GROUP, "WS_GROUP", false },
{ WS_HSCROLL, "WS_HSCROLL", false },
{ WS_ICONIC, "WS_ICONIC", false },
{ WS_MAXIMIZE, "WS_MAXIMIZE", false },
{ WS_MAXIMIZEBOX, "WS_MAXIMIZEBOX", false },
{ WS_MINIMIZE, "WS_MINIMIZE", false },
{ WS_MINIMIZEBOX, "WS_MINIMIZEBOX", false },
{ WS_OVERLAPPED, "WS_OVERLAPPED", false },
{ WS_OVERLAPPEDWINDOW, "WS_OVERLAPPEDWINDOW", true },
{ WS_POPUP, "WS_POPUP", false },
{ WS_POPUPWINDOW, "WS_POPUPWINDOW", true },
{ WS_SIZEBOX, "WS_SIZEBOX", false },
{ WS_SYSMENU, "WS_SYSMENU", false },
{ WS_TABSTOP, "WS_TABSTOP", false },
{ WS_THICKFRAME, "WS_THICKFRAME", false },
{ WS_VISIBLE, "WS_VISIBLE", false }
};
WINDOW_STYLE EXTENDED_WINDOW_STYLES[] =
{
{ WS_EX_ACCEPTFILES, "WS_EX_ACCEPTFILES", False },
{ WS_EX_APPWINDOW, "WS_EX_APPWINDOW", False },
{ WS_EX_CLIENTEDGE, "WS_EX_CLIENTEDGE", False },
{ WS_EX_COMPOSITED, "WS_EX_COMPOSITED", False },
{ WS_EX_CONTEXTHELP, "WS_EX_CONTEXTHELP", False },
{ WS_EX_CONTROLPARENT, "WS_EX_CONTROLPARENT", False },
{ WS_EX_DLGMODALFRAME, "WS_EX_DLGMODALFRAME", False },
{ WS_EX_LAYERED, "WS_EX_LAYERED", False },
{ WS_EX_LAYOUTRTL, "WS_EX_LAYOUTRTL", False },
{ WS_EX_LEFT, "WS_EX_LEFT", False },
{ WS_EX_LEFTSCROLLBAR, "WS_EX_LEFTSCROLLBAR", False },
{ WS_EX_LTRREADING, "WS_EX_LTRREADING", False },
{ WS_EX_MDICHILD, "WS_EX_MDICHILD", False },
{ WS_EX_NOACTIVATE, "WS_EX_NOACTIVATE", False },
{ WS_EX_NOINHERITLAYOUT, "WS_EX_NOINHERITLAYOUT", False },
{ WS_EX_NOPARENTNOTIFY, "WS_EX_NOPARENTNOTIFY", False },
{ WS_EX_OVERLAPPEDWINDOW, "WS_EX_OVERLAPPEDWINDOW", True },
{ WS_EX_PALETTEWINDOW, "WS_EX_PALETTEWINDOW", True },
{ WS_EX_RIGHT, "WS_EX_RIGHT", False },
{ WS_EX_RIGHTSCROLLBAR, "WS_EX_RIGHTSCROLLBAR", False },
{ WS_EX_RTLREADING, "WS_EX_RTLREADING", False },
{ WS_EX_STATICEDGE, "WS_EX_STATICEDGE", False },
{ WS_EX_TOOLWINDOW, "WS_EX_TOOLWINDOW", False },
{ WS_EX_TOPMOST, "WS_EX_TOPMOST", False },
{ WS_EX_TRANSPARENT, "WS_EX_TRANSPARENT", False },
{ WS_EX_WINDOWEDGE, "WS_EX_WINDOWEDGE", False }
{ WS_EX_ACCEPTFILES, "WS_EX_ACCEPTFILES", false },
{ WS_EX_APPWINDOW, "WS_EX_APPWINDOW", false },
{ WS_EX_CLIENTEDGE, "WS_EX_CLIENTEDGE", false },
{ WS_EX_COMPOSITED, "WS_EX_COMPOSITED", false },
{ WS_EX_CONTEXTHELP, "WS_EX_CONTEXTHELP", false },
{ WS_EX_CONTROLPARENT, "WS_EX_CONTROLPARENT", false },
{ WS_EX_DLGMODALFRAME, "WS_EX_DLGMODALFRAME", false },
{ WS_EX_LAYERED, "WS_EX_LAYERED", false },
{ WS_EX_LAYOUTRTL, "WS_EX_LAYOUTRTL", false },
{ WS_EX_LEFT, "WS_EX_LEFT", false },
{ WS_EX_LEFTSCROLLBAR, "WS_EX_LEFTSCROLLBAR", false },
{ WS_EX_LTRREADING, "WS_EX_LTRREADING", false },
{ WS_EX_MDICHILD, "WS_EX_MDICHILD", false },
{ WS_EX_NOACTIVATE, "WS_EX_NOACTIVATE", false },
{ WS_EX_NOINHERITLAYOUT, "WS_EX_NOINHERITLAYOUT", false },
{ WS_EX_NOPARENTNOTIFY, "WS_EX_NOPARENTNOTIFY", false },
{ WS_EX_OVERLAPPEDWINDOW, "WS_EX_OVERLAPPEDWINDOW", true },
{ WS_EX_PALETTEWINDOW, "WS_EX_PALETTEWINDOW", true },
{ WS_EX_RIGHT, "WS_EX_RIGHT", false },
{ WS_EX_RIGHTSCROLLBAR, "WS_EX_RIGHTSCROLLBAR", false },
{ WS_EX_RTLREADING, "WS_EX_RTLREADING", false },
{ WS_EX_STATICEDGE, "WS_EX_STATICEDGE", false },
{ WS_EX_TOOLWINDOW, "WS_EX_TOOLWINDOW", false },
{ WS_EX_TOPMOST, "WS_EX_TOPMOST", false },
{ WS_EX_TRANSPARENT, "WS_EX_TRANSPARENT", false },
{ WS_EX_WINDOWEDGE, "WS_EX_WINDOWEDGE", false }
};
void print_window_styles(uint32 style)

View File

@ -34,10 +34,10 @@ boolean window_list_has_next(rdpWindowList* list)
if (list->iterator != NULL)
{
if (list->iterator != NULL)
return True;
return true;
}
return False;
return false;
}
rdpWindow* window_list_get_next(rdpWindowList* list)

Some files were not shown because too many files have changed in this diff Show More